[asterisk-users] Issue with (pattern) matching extension
Jim Dickenson
dickenson at cfmc.com
Thu Apr 29 05:22:31 CDT 2010
I banged my head with a like problem a few days ago.
>> exten => _fn-.,1,NoOp(ISN: ${DIALSTATUS})
n does not mean the letter n in a pattern it has a special meaning!
--
Jim Dickenson
mailto:dickenson at cfmc.com
CfMC
http://www.cfmc.com/
On Apr 29, 2010, at 1:33 AM, Ishfaq Malik wrote:
> 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
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list