[asterisk-users] h exten no getting run ...
Julian Lyndon-Smith
asterisk at dotr.com
Sun Mar 29 16:34:31 CDT 2009
errotan wrote:
> That h extension belongs to [questionnaire-hangup] it won't run unless the
> call hangs up while in that context.
>
If you look in the snippet I provided, [questionnaire-hangup] is
"included" into [questionnaire-menu] - the hangup code may be used in
several contexts, so rather than duplicate code it is much better to
include it.
Julian
>
>
> On Sunday 29 March 2009 11.42.29 Julian Lyndon-Smith wrote:
>
>> Asterisk 1.4 r181990
>>
>> given the dialplan snippet below, can anyone tell me why the h exten is
>> not being run ?
>>
>> ===========================================================================
>> = console output:
>> [Mar 29 10:33:49] -- Executing [s at questionnaire-menu:1]
>> Set("Zap/1-1", "TIMEOUT(digit)=3") in new stack
>> [Mar 29 10:33:49] -- Digit timeout set to 3
>> [Mar 29 10:33:49] -- Executing [s at questionnaire-menu:2]
>> Set("Zap/1-1", "TIMEOUT(response)=5") in new stack
>> [Mar 29 10:33:49] -- Response timeout set to 5
>> [Mar 29 10:33:49] -- Executing [s at questionnaire-menu:3]
>> Playback("Zap/1-1",
>> "custom/Set1/a4e471fa-bd5d-859d-de11-a80900620b28-0") in new stack
>> [Mar 29 10:33:49] -- <Zap/1-1> Playing
>> 'custom/Set1/a4e471fa-bd5d-859d-de11-a80900620b28-0' (language 'en')
>> [Mar 29 10:33:53] -- Channel 0/1, span 1 got hangup request, cause 16
>> [Mar 29 10:33:53] WARNING[18721]: file.c:738 ast_readaudio_callback:
>> Failed to write frame
>> [Mar 29 10:33:53] == Spawn extension (questionnaire-menu, s, 3) exited
>> non-zero on 'Zap/1-1'
>> [Mar 29 10:33:53] -- Hungup 'Zap/1-1'
>> [Mar 29 10:33:53] == End MixMonitor Recording Zap/1-1
>>
>> ===========================================================================
>>
>> [questionnaire-hangup]
>>
>> exten =>
>> h,1,Set(DATA=${CURL(MyApp/SaveQuestionnaire,COMPLETED=${COMPLETED}&QUESTION
>> NAIRE_GUID=${QUESTIONNAIRE_GUID})}) exten => h,n,return
>>
>> [questionnaire-menu]
>>
>> exten => _X,1,GotoIf($["${EXTEN}" >
>> "${QUESTIONNAIRE_MAX}"]?questionnaire-finished,1,1)
>> exten => _X,n,Set(QUESTION=${EXTEN})
>> exten => _X,n,Gosub(get-answer,Q,1)
>> exten => _X,n(next),Goto(${MATH(${EXTEN}+1,i)},1)
>>
>> exten => s,1,set(TIMEOUT(digit)=3)
>> exten => s,n,set(TIMEOUT(response)=5)
>> exten => s,n(mainmenu),Playback(custom/Set1/${QUESTIONNAIRE_GUID}-0)
>> exten => s,n,Goto(1,1)
>>
>> exten => t,1,Goto(s,mainmenu)
>>
>> include => questionnaire-hangup;
>>
>>
>>
>> ______________________________________________________________________
>> This email has been scanned by the MessageLabs Email Security System.
>> For more information please visit http://www.messagelabs.com/email
>> ______________________________________________________________________
>>
>> _______________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>> http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
>
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
More information about the asterisk-users
mailing list