[Asterisk-Users] exten statement execution order
Johann
johann.hoehn at ecommerce.com
Wed May 10 07:38:11 MST 2006
David,
You need to use the 'g' option with Dial().
g - Proceed with dialplan execution at the current extension if the
destination channel hangs up.
--johann
David L. West wrote:
> In the following macro, a call is dialed and control branches according
> to DIALSTATUS, much like the default std-exten macro. What I'm trying
> to figure out is how to regain control when the call is answered.
>
> ; Standard extension logic
> [macro-stdexten]
> ; ${ARG1}=Extension ${ARG2}=Device(s) to ring
> exten => s,1,NoOp(stdexten ${EXTEN})
> exten => s,n,Set(cname=${CALLERID(number)}@asterisk.deskoptional.com)
> exten => s,n,Set(CALLERID(number)=${cname})
> exten => s,n,Macro(psa-predial)
> exten => s,n,Dial(${ARG2},20,tTwW)
> exten => s,n,Set(savestatus=${DIALSTATUS})
> exten => s,n,Macro(psa-postdial)
> exten =>
> s,n,Goto(s-${savestatus},1);ANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER
> exten => s-ANSWER,1,NoOp(call was answered!!!!!)
> exten => s-CHANUNAVAIL,1,VoiceMail(u${ARG1})
> exten => s-CONGESTION,1,VoiceMail(u${ARG1})
> exten => s-NOANSWER,1,Voicemail(u${ARG1})
> exten => s-BUSY,1,Voicemail(b${ARG1})
> exten => s,200,NoOp(DONE WITH MACRO)
>
> In all cases but "ANSWER", the psa-postdial macro executes. Can somebody
> help me understand the
> flow of operations here? The s-ANSWER line never gets called either.
>
> I'm digging around on www.voip-info, but hoping some kind sould here will
> set me on the right path.
>
>
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> 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