[asterisk-dev] Odd behavior in stdexten

Philip Prindeville philipp_subx at redfish-solutions.com
Tue Sep 8 13:56:51 CDT 2009


I should probably have included a bit more of the config:

[redfish-extens]
include => stdexten

exten => 111,1,NoOp(Exten: ${EXTEN})
exten => 111,n,Gosub(stdexten(111,${PHILIP},redfish))
exten => 111,n,Goto(s,exten)

exten => 112,1,NoOp(Exten: ${EXTEN})
exten => 112,n,Gosub(stdexten(112,${REDFISH},redfish))
exten => 112,n,Goto(s,exten)

exten => 113,1,NoOp(Exten: ${EXTEN})
exten => 113,n,Gosub(stdexten(113,${GUEST},redfish))
exten => 113,n,Goto(s,exten)

exten => 114,1,NoOp(Exten: ${EXTEN})
exten => 114,n,Gosub(stdexten(114,${CELL},redfish))
exten => 114,n,Goto(s,exten)


And calling from the internal SIP context works fine:

[redfish-internal]
exten => s,1,Answer()
exten => s,n(exten),Background(vm-enter-num-to-call)
exten => s,n,WaitExten(5)
exten => s,n(goodbye),Playback(vm-goodbye)
exten => s,n(end),Hangup()

include => outbound-intl
include => outbound-toll
include => outbound-local
include => redfish-extens
include => utility-extens
;include => freenum

exten => 115,1,Dial(${FAX})
exten => 115,n,Congestion()
exten => 115,n,Hangup()

exten => 777,1,Goto(voicemail,1)

exten => voicemail,1,VoicemailMain(${CALLERIDNUM}@redfish)
exten => voicemail,n,Hangup()

exten => i,1,NoOp(Invalid: ${EXTEN})
exten => i,n,Playback(pbx-invalid)
exten => i,n,Goto(s,exten)

exten => t,1,Goto(s,goodbye)


As evinced by:

    -- Executing [111 at redfish-internal:1] NoOp("SIP/office_1-08464bf8", "Exten: 111") in new stack
    -- Executing [111 at redfish-internal:2] Gosub("SIP/office_1-08464bf8", "stdexten(111,SIP/bedroom_1&SIP/office_2&SIP/remote_2&SIP/kitchen_1&Local/2088919324 at follow-me&SIP/softphone,redfish)") in new stack
    -- Executing [111 at redfish-internal:50000] NoOp("SIP/office_1-08464bf8", "Start stdexten") in new stack



so I'm not sure why it works sometimes and not others.

Snuff suggested that it might have to do with whether or not the
"include" occurs at the top of the context or not, but I tested this and
it didn't seem to make a difference.


Philip Prindeville wrote:
> I just bumped to 1.6.1.6 and picked up:
>
> http://svn.digium.com/view/asterisk?view=rev&rev=152765
>
>
> But I'm seeing:
>
>     -- Executing [s at redfish-pstn:27] Gosub("SIP/sip_proxy-08498060", "stdexten(111,SIP/bedroom_1&SIP/office_2&SIP/remote_2&SIP/kitchen_1&Local/@follow-me&SIP/softphone,redfish)") in new stack
> [Sep  7 23:33:34] NOTICE[7367]: pbx.c:3233 pbx_extension_helper: No such label 'stdexten' in extension 's' in context 'redfish-pstn'
> [Sep  7 23:33:34] WARNING[7367]: pbx.c:8998 pbx_parseable_goto: Priority 'stdexten' must be a number > 0, or valid label
> [Sep  7 23:33:34] ERROR[7367]: app_stack.c:279 gosub_exec: Gosub address is invalid: 'stdexten(111,SIP/bedroom_1&SIP/office_2&SIP/remote_2&SIP/kitchen_1&Local/@follow-me&SIP/softphone,redfish)'
>
>
>
>
> The relevant part of the dialplan looks like:
>
>
> [redfish-pstn]
> include => stdexten
>
> exten => s,1(incoming),NoOp()
>
> ...
> exten => s,n,Wait(0.5)                          ; in case signalling is faster
>                                                 ; than media channel
>                                                 ; establishment
> ...
> exten => s,n,Gosub(stdexten(111,${PHILIP},redfish))
> exten => s,n(end),Hangup()
> ...
>
> ; list of extensions
> exten => _#,1(pound),NoOp(Directory)
> exten => _#,n,Background(rd-philip111&rd-office112&rd-urgent114&rd-fax115)
> exten => _#,n,Goto(s,exten)
>
> include => redfish-extens
>
> ...
>
>
> So I'm a little confused why this used to work but now doesn't.
>
> What am I missing?
>
> Thanks,
>
> -Philip
>
>   




More information about the asterisk-dev mailing list