aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-04-30 05:23:56 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-04-30 05:23:56 +0000
commit57119fce7fe50dc8e387b11dc2145cfcf807b284 (patch)
tree67cbdacd4e330a337359883eb4b42b3676408d94
parentf131179d80fe49c9137261f6b9b794ef9dbb6731 (diff)
Logic fixups for a sample FREENUM dialplan context.
(closes issue #17263) Reported by: pprindeville Patches: freenum-dialplan.patch#3 uploaded by pprindeville (license 347) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@260280 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--configs/extensions.conf.sample14
1 files changed, 9 insertions, 5 deletions
diff --git a/configs/extensions.conf.sample b/configs/extensions.conf.sample
index eafcffb84..933bba1d4 100644
--- a/configs/extensions.conf.sample
+++ b/configs/extensions.conf.sample
@@ -421,18 +421,22 @@ exten => _XXXXXX*X!,1,Goto(outbound-freenum2,${EXTEN},1)
;
exten => _X!,1,Verbose(2,Performing ISN lookup for ${EXTEN})
same => n,Set(SUFFIX=${CUT(EXTEN,*,2-)}) ; make sure the suffix is all digits as well
-same => n,GotoIf($["${FILTER(0-9,${SUFFIX})}" != "${SUFFIX}"]?i:) ; filter out bad characters per the README-SERIOUSLY.best-practices.txt document
+same => n,GotoIf($["${FILTER(0-9,${SUFFIX})}" != "${SUFFIX}"]?fn-CONGESTION,1)
+ ; 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($["${GLOBAL(FREENUMDOMAIN)}" == ""]?dial:) ; check if we set the FREENUMDOMAIN global variable in [global]
+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]