Changeset 1957

Show
Ignore:
Timestamp:
05/23/06 15:15:20 (2 years ago)
Author:
mheydon1973
Message:

Using vars everywhere in dialout-trunk now.

** NOTE ** This really needs putting into 2.1 branch to fix a bug when the Max Channels box is left blank

Files:

Legend:

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

    r1953 r1957  
    242242; 
    243243[macro-dialout-trunk] 
    244 exten => s,1,GotoIf($["${ARG3}" = ""]?noauth) ; arg3 is pattern password 
    245 exten => s,n(auth),Authenticate(${ARG3}) 
    246 exten => s,n(noauth),Set(GROUP()=OUT_${ARG1}) 
     244exten => s,1,Set(DIAL_TRUNK=${ARG1}) 
    247245exten => s,n,Set(DIAL_NUMBER=${ARG2}) 
    248 exten => s,n,Set(DIAL_TRUNK=${ARG1}) 
     246exten => s,n,Set(ROUTE_PASSWD=${ARG3}) 
     247exten => s,n,GotoIf($["${ROUTE_PASSWD}" = ""]?noauth) ; arg3 is pattern password 
     248exten => s,n(auth),Authenticate(${ROUTE_PASSWD}) 
     249exten => s,n(noauth),Set(GROUP()=OUT_${DIAL_TRUNK}) 
    249250exten => s,n,Macro(user-callerid) 
    250251exten => s,n,Macro(record-enable,${CALLERID(number)},OUT) 
    251 exten => s,n,Macro(outbound-callerid,${ARG1}) 
    252 exten => s,n,GotoIf($["${OUTMAXCHANS_${ARG1}}foo" = "foo"]?nomax) 
    253 exten => s,n(checkmax),GotoIf($[ ${GROUP_COUNT()} > ${OUTMAXCHANS_${ARG1}} ]?chanfull) 
     252exten => s,n,Macro(outbound-callerid,${DIAL_TRUNK}) 
     253exten => s,n,GotoIf($["${OUTMAXCHANS_${DIAL_TRUNK}}foo" = "foo"]?nomax) 
     254exten => s,n(checkmax),GotoIf($[ ${GROUP_COUNT()} > ${OUTMAXCHANS_${DIAL_TRUNK}} ]?chanfull) 
    254255exten => s,n(nomax),AGI(fixlocalprefix) ; this sets DIAL_NUMBER to the proper dial string for this trunk 
    255 exten => s,n,Set(OUTNUM=${OUTPREFIX_${ARG1}}${DIAL_NUMBER}) ; OUTNUM is the final dial number 
    256 exten => s,n,Set(custom=${CUT(OUT_${ARG1},:,1)}) ; Custom trunks are prefixed with "AMP:" 
     256exten => s,n,Set(OUTNUM=${OUTPREFIX_${DIAL_TRUNK}}${DIAL_NUMBER}) ; OUTNUM is the final dial number 
     257exten => s,n,Set(custom=${CUT(OUT_${DIAL_TRUNK},:,1)}) ; Custom trunks are prefixed with "AMP:" 
    257258exten => s,n,GotoIf($["${custom}" = "AMP"]?customtrunk) 
    258 exten => s,n,Dial(${OUT_${ARG1}}/${OUTNUM},120,${TRUNK_OPTIONS}) ; Regular Trunk Dial 
     259exten => s,n,Dial(${OUT_${DIAL_TRUNK}}/${OUTNUM},120,${TRUNK_OPTIONS}) ; Regular Trunk Dial 
    259260exten => s,n,Goto(s-${DIALSTATUS},1) 
    260 exten => s,n(customtrunk),Set(pre_num=${CUT(OUT_${ARG1},$,1)}) 
    261 exten => s,n,Set(the_num=${CUT(OUT_${ARG1},$,2)}) ; this is where we expect to find string OUTNUM 
    262 exten => s,n,Set(post_num=${CUT(OUT_${ARG1},$,3)}) 
     261exten => s,n(customtrunk),Set(pre_num=${CUT(OUT_${DIAL_TRUNK},$,1)}) 
     262exten => s,n,Set(the_num=${CUT(OUT_${DIAL_TRUNK},$,2)}) ; this is where we expect to find string OUTNUM 
     263exten => s,n,Set(post_num=${CUT(OUT_${DIAL_TRUNK},$,3)}) 
    263264exten => s,n,GotoIf($["${the_num}" = "OUTNUM"]?outnum:skipoutnum) ; if we didn't find "OUTNUM", then skip to Dial 
    264265exten => s,n(outnum),Set(the_num=${OUTNUM}) ; replace "OUTNUM" with the actual number to dial 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads