[Asterisk-Users] Dial option g

Jason Williams jas.williams at gmail.com
Tue Mar 8 04:13:32 MST 2005


Could you do something with the h (Calling party Hangup)
eg
exten => h,1,DoSomething


On Sun, 6 Mar 2005 15:00:23 -0500, George Burt <george at trueshot.com> wrote:
> I am trying to run a macro at the beginning of call and after the call is
> terminated.
> 
> exten => 33,1,Macro(makeOnJS,${EXTEN},${CALLERIDNUM},${DATETIME})
> exten => 33,2,Dial(SIP/33,15,tg)
> exten => 33,3,NoOp(makeOffJS*${EXTEN}*${CALLERIDNUM}*${DATETIME})
> exten => 33,4,Macro(makeOffJS,${EXTEN},${CALLERIDNUM},${DATETIME})
> exten => 33,102,Voicemail2(b33)  ; go to Voicemail2 if phone is "B"usy
> exten => 33,103,Macro(makeOffJS,${EXTEN},${CALLERIDNUM},${DATETIME})
> exten => 33,104,Hangup ; and then hangup.
> 
> This runs the [macro-makeOnJS] just fine.
> 
> It runs the [macro-makeOffJS] only when the called party hangs up first.
> 
> In fact, that is exactly what the option g description says in the Dial
> documentation:
> g: When the called party hangs up, exit to execute more commands in the
> current context.
> 
> In the "Return Codes" description of the Dial Command, it says:
> 
> Dial returns -1 if the originating channel hangs up, or if the call is
> bridged and either of the parties in the bridge terminate the call.
> 
> I need a way to do something if the Dial returns a -1 code.
> 
> Any ideas?
> 
> Thanks,
> 
> George Burt
> 
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>



More information about the asterisk-users mailing list