Changeset 1949

Show
Ignore:
Timestamp:
05/21/06 00:08:44 (2 years ago)
Author:
qldrob
Message:

Minor fix in macro-dialout-trunk to avoid an error on line 250 (originally) when there was no max channels

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/astetc/extensions.conf

    r1916 r1949  
    242242; 
    243243[macro-dialout-trunk] 
    244 exten => s,1,GotoIf($["${ARG3}" = ""]?3:2)      ; arg3 is pattern password 
    245 exten => s,2,Authenticate(${ARG3}) 
    246 exten => s,3,Macro(user-callerid) 
    247 exten => s,4,Macro(record-enable,${CALLERID(number)},OUT) 
    248 exten => s,5,Macro(outbound-callerid,${ARG1}) 
    249 exten => s,6,Set(GROUP()=OUT_${ARG1}) 
    250 exten => s,7,GotoIf($[ ${GROUP_COUNT()} > ${OUTMAXCHANS_${ARG1}} ]?108) 
    251 ; if we've used up the max channels, continue at (n+101) 
    252 exten => s,8,Set(DIAL_NUMBER=${ARG2}) 
    253 exten => s,9,Set(DIAL_TRUNK=${ARG1}) 
    254 exten => s,10,AGI(fixlocalprefix) ; this sets DIAL_NUMBER to the proper dial string for this trunk 
    255 exten => s,11,Set(OUTNUM=${OUTPREFIX_${ARG1}}${DIAL_NUMBER})  ; OUTNUM is the final dial number 
    256 exten => s,12,Set(custom=${CUT(OUT_${ARG1},:,1)})  ; Custom trunks are prefixed with "AMP:" 
    257 exten => s,13,GotoIf($["${custom}" = "AMP"]?16) 
    258 exten => s,14,Dial(${OUT_${ARG1}}/${OUTNUM},120,${TRUNK_OPTIONS})  ; Regular Trunk Dial 
    259 exten => s,15,Goto(s-${DIALSTATUS},1) 
    260  
    261 ; This is a custom trunk.  Substitute $OUTNUM$ with the actual number and rebuild the dialstring 
    262 ; example trunks: "AMP:CAPI/XXXXXXXX:b$OUTNUM$,30,r", "AMP:OH323/$OUTNUM$@XX.XX.XX.XX:XXXX" 
    263 exten => s,16,Set(pre_num=${CUT(OUT_${ARG1},$,1)}) 
    264 exten => s,17,Set(the_num=${CUT(OUT_${ARG1},$,2)})  ; this is where we expect to find string OUTNUM 
    265 exten => s,18,Set(post_num=${CUT(OUT_${ARG1},$,3)}) 
    266 exten => s,19,GotoIf($["${the_num}" = "OUTNUM"]?20:21) ; if we didn't find "OUTNUM", then skip to Dial 
    267 exten => s,20,Set(the_num=${OUTNUM}) ; replace "OUTNUM" with the actual number to dial 
    268 exten => s,21,Dial(${pre_num:4}${the_num}${post_num},120,${TRUNK_OPTIONS}) 
    269 exten => s,22,Goto(s-${DIALSTATUS},1) 
    270  
    271 exten => s,108,Noop(max channels used up) 
     244exten => s,1,GotoIf($["${ARG3}" = ""]?noauth) ; arg3 is pattern password 
     245exten => s,n(auth),Authenticate(${ARG3}) 
     246exten => s,n(noauth),Set(GROUP()=OUT_${ARG1}) 
     247exten => s,n,Set(DIAL_NUMBER=${ARG2}) 
     248exten => s,n,Set(DIAL_TRUNK=${ARG1}) 
     249exten => s,n,Macro(user-callerid) 
     250exten => s,n,Macro(record-enable,${CALLERID(number)},OUT) 
     251exten => s,n,Macro(outbound-callerid,${ARG1}) 
     252exten => s,n,GotoIf($[ ${LEN(${OUTMAXCHANS_${ARG1}} != 0 ]?checkmax:nomax) 
     253exten => s,n(checkmax),GotoIf($[ ${GROUP_COUNT()} > ${OUTMAXCHANS_${ARG1}} ]?chanfull) 
     254exten => s,n(nomax),AGI(fixlocalprefix) ; this sets DIAL_NUMBER to the proper dial string for this trunk 
     255exten => s,n,Set(OUTNUM=${OUTPREFIX_${ARG1}}${DIAL_NUMBER}) ; OUTNUM is the final dial number 
     256exten => s,n,Set(custom=${CUT(OUT_${ARG1},:,1)}) ; Custom trunks are prefixed with "AMP:" 
     257exten => s,n,GotoIf($["${custom}" = "AMP"]?customtrunk) 
     258exten => s,n,Dial(${OUT_${ARG1}}/${OUTNUM},120,${TRUNK_OPTIONS}) ; Regular Trunk Dial 
     259exten => s,n,Goto(s-${DIALSTATUS},1) 
     260exten => s,n(customtrunk),Set(pre_num=${CUT(OUT_${ARG1},$,1)}) 
     261exten => s,n,Set(the_num=${CUT(OUT_${ARG1},$,2)}) ; this is where we expect to find string OUTNUM 
     262exten => s,n,Set(post_num=${CUT(OUT_${ARG1},$,3)}) 
     263exten => s,n,GotoIf($["${the_num}" = "OUTNUM"]?20:21) ; if we didn't find "OUTNUM", then skip to Dial 
     264exten => s,n,Set(the_num=${OUTNUM}) ; replace "OUTNUM" with the actual number to dial 
     265exten => s,n,Dial(${pre_num:4}${the_num}${post_num},120,${TRUNK_OPTIONS}) 
     266exten => s,n,Goto(s-${DIALSTATUS},1) 
     267 
     268exten => s,n(chanfull),Noop(max channels used up) 
    272269 
    273270exten => s-BUSY,1,NoOp(Trunk is reporting BUSY) 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads