Index: configs/extensions.conf.sample =================================================================== --- configs/extensions.conf.sample (revision 258772) +++ configs/extensions.conf.sample (working copy) @@ -424,15 +424,18 @@ same => n,GotoIf($["${FILTER(0-9,${SUFFIX})}" != "${SUFFIX}"]?i:) ; filter out bad characters per the README-SERIOUSLY.best-practices.txt document same => n,Set(TIMEOUT(absolute)=10800) same => n,Set(isnresult=${ENUMLOOKUP(${EXTEN},sip,,1,freenum.org)}) ; perform our lookup with freenum.org -same => n,GotoIf($["${isnresult}" != ""]?:notfound) +same => n,GotoIf($["${isnresult}" != ""]?from:) +same => n,Set(DIALSTATUS=CONGESTION) +same => n,Goto(fn-CONGESTION,1) +same => n(from),Set(SIPFROMUSER=${CALLERID(num)}) same => n,GotoIf($["${GLOBAL(FREENUMDOMAIN)}" == ""]?dial:) ; check if we set the FREENUMDOMAIN global variable in [global] same => n,Set(SIPFROMDOMAIN=${GLOBAL(FREENUMDOMAIN)}) ; if we did set it, then we'll use it for our outbound dialing domain same => n(dial),Dial(SIP/${isnresult},40) -same => n,Goto(fn-${DIALSTATUS}) +same => n,Goto(fn-${DIALSTATUS},1) exten => fn-BUSY,1,Busy() -exten => _fn-.,1,NoOp(ISN: ${DIALSTATUS}) +exten => _f[n]-.,1,NoOp(ISN: ${DIALSTATUS}) same => n,Congestion() [macro-trunkdial] @@ -483,7 +486,7 @@ exten => stdexten-BUSY,n,NoOp(Finish stdexten BUSY) exten => stdexten-BUSY,n,Return() ; If they press #, return to start -exten => _stdexten-.,1,Goto(stdexten-NOANSWER,1) ; Treat anything else as no answer +exten => _stde[x]te[n]-.,1,Goto(stdexten-NOANSWER,1) ; Treat anything else as no answer exten => a,1,VoicemailMain(${mbx}) ; If they press *, send the user into VoicemailMain exten => a,n,Return() @@ -523,7 +526,7 @@ exten => stdexten-TORTURE,1,Goto(${tortcntx},s,1) ; Callee chose to send this call to a telemarketer torture script. -exten => _stdexten-.,1,Goto(stdexten-NOANSWER,1) ; Treat anything else as no answer +exten => _stde[x]te[n]-.,1,Goto(stdexten-NOANSWER,1) ; Treat anything else as no answer exten => a,1,VoicemailMain(${mbx}) ; If they press *, send the user into VoicemailMain exten => a,n,Return