Philip A. Prindeville
2010-Apr-29 02:35 UTC
[asterisk-users] Issue with (pattern) matching extension
Here's a segment of my dialplan, I'm working on the freenum/ISN
functionality:
same => n,Set(isnresult=${ENUMLOOKUP(${EXTEN},sip,,1,freenum.org)})
same => n,GotoIf($["${isnresult}" !=
""]?:fn-CONGESTION,1)
; set up our outgoing call state
same => n,Set(SIPFROMUSER=${CALLERID(num)})
same => n,GotoIf($["${GLOBAL(FREENUMDOMAIN)}" ==
""]?dial:)
same => n,Set(SIPFROMDOMAIN=${GLOBAL(FREENUMDOMAIN)})
same => n(dial),Dial(SIP/${isnresult},40)
same => n,Goto(fn-${DIALSTATUS},1)
exten => fn-BUSY,1,Busy()
exten => _fn-.,1,NoOp(ISN: ${DIALSTATUS})
same => n,Congestion()
and the logging:
== ast_get_enum(num='555*99999', tech='sip',
suffix='freenum.org', options='', record=1
== ENUM options(): pos=1, options='2'
== ISN ENUM: left=555, middle='99999.'
== ast_get_enum() profiling: FAIL, 5.5.5.99999.freenum.org, 21 ms
-- Executing [555*99999 at outbound-freenum2:5]
Set("SIP/guest_1-00000010", "isnresult=") in new stack
-- Executing [555*99999 at outbound-freenum2:6]
GotoIf("SIP/guest_1-00000010", "0?:fn-CONGESTION,1") in new
stack
-- Goto (outbound-freenum2,fn-CONGESTION,1)
[Apr 28 16:55:22] WARNING[5987]: pbx.c:4358 __ast_pbx_run: Channel
'SIP/guest_1-00000010' sent into invalid extension
'fn-CONGESTION' in context 'outbound-freenum2', but no invalid
handler
pbx*CLI>
Note that the string "fn-CONGESTION" isn't matching the extension
pattern:
exten => _fn-.,1,NoOp(ISN: ${DIALSTATUS})
and I'm not sure why.
Anyone want to venture how to go about figuring out how?
Ishfaq Malik
2010-Apr-29 08:33 UTC
[asterisk-users] Issue with (pattern) matching extension
Philip A. Prindeville wrote:> Here's a segment of my dialplan, I'm working on the freenum/ISN > functionality: > > > same => n,Set(isnresult=${ENUMLOOKUP(${EXTEN},sip,,1,freenum.org)}) > same => n,GotoIf($["${isnresult}" != ""]?:fn-CONGESTION,1) > ; set up our outgoing call state > same => n,Set(SIPFROMUSER=${CALLERID(num)}) > same => n,GotoIf($["${GLOBAL(FREENUMDOMAIN)}" == ""]?dial:) > same => n,Set(SIPFROMDOMAIN=${GLOBAL(FREENUMDOMAIN)}) > same => n(dial),Dial(SIP/${isnresult},40) > same => n,Goto(fn-${DIALSTATUS},1) > > exten => fn-BUSY,1,Busy() > > exten => _fn-.,1,NoOp(ISN: ${DIALSTATUS}) > same => n,Congestion() > > > and the logging: > > > > == ast_get_enum(num='555*99999', tech='sip', suffix='freenum.org', options='', record=1 > == ENUM options(): pos=1, options='2' > == ISN ENUM: left=555, middle='99999.' > == ast_get_enum() profiling: FAIL, 5.5.5.99999.freenum.org, 21 ms > -- Executing [555*99999 at outbound-freenum2:5] Set("SIP/guest_1-00000010", "isnresult=") in new stack > -- Executing [555*99999 at outbound-freenum2:6] GotoIf("SIP/guest_1-00000010", "0?:fn-CONGESTION,1") in new stack > -- Goto (outbound-freenum2,fn-CONGESTION,1) > [Apr 28 16:55:22] WARNING[5987]: pbx.c:4358 __ast_pbx_run: Channel 'SIP/guest_1-00000010' sent into invalid extension 'fn-CONGESTION' in context 'outbound-freenum2', but no invalid handler > pbx*CLI> > > > Note that the string "fn-CONGESTION" isn't matching the extension pattern: > > exten => _fn-.,1,NoOp(ISN: ${DIALSTATUS}) > > and I'm not sure why. > > Anyone want to venture how to go about figuring out how? > > > > >Hi Try exten => _fn-[A-Z].,1,NoOp(ISN: ${DIALSTATUS}) Ish -- Ishfaq Malik Software Developer PackNet Ltd Office: 0161 660 3062