[Asterisk-Users] Action after _caller_ has hungup(cmd Dial 'g'-option)

Christian B bencokakao at gmail.com
Mon Mar 13 04:31:51 MST 2006


Hmm, both of you recommend a solution with the dial cmd in an
agi-script, i would prefer a direct solution but i guess there is none.
thanks for your replies!

regards
chris


On Sat, 11 Mar 2006 09:54:23 +0000
"Julian J. M." <julianjm at gmail.com> wrote:

> You can use DeadAGI.
> 
> exten => _X.,1,DeadAGI(agicall.agi,${EXTEN})
> 
> now in that AGI (pseudocode)
> 
> $exten=Get parameter 1
> $dialstring="SIP/mytrunk/".$exten;
> $res=$agi->dial($dialstring),
> //If we used deadagi, if the _caller_ hangs up, the agi keep runing here
>  $chres = $agi->channel_status();
> $status=$chres['data'];
> 
> Here's a list of possible return values. If $status==6, then the
> _callee_ hung up.
> 
> CLI> show agi channel status
>  Usage: CHANNEL STATUS [<channelname>]
>         Returns the status of the specified channel.
>  If no channel name is given the returns the status of the
>  current channel.  Return values:
>   0 Channel is down and available
>   1 Channel is down, but reserved
>   2 Channel is off hook
>   3 Digits (or equivalent) have been dialed
>   4 Line is ringing
>   5 Remote end is ringing
>   6 Line is up
>   7 Line is busy
> 
> 
> ---
> Julian J. M.
> 
> 
> 
> 
> On 3/10/06, Christian B <bencokakao at gmail.com> wrote:
> > Hello!
> >
> > There's the "g"-option for the Dial-cmd that allows to execute the next
> > extensions in the current context when the callee hangs up.
> >
> > I would need the same for a call where the caller hangs up, concretely
> > i have to inform a agi-application of the end of a call. Does someone
> > know a way to do this from the dialplan?
> >
> > thanks
> > Christian
> > _______________________________________________
> > --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
> >
> _______________________________________________
> --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