[asterisk-users] Dial() after the h extension has been invoked?

Frank Vanoni mailinglist at linuxista.com
Fri Nov 12 11:20:39 CST 2021


On Fri, 2021-11-12 at 16:56 +0000, Antony Stone wrote:

> I use Dial() commands with custom SIP headers to pass information
> (eg: about 
> the current state of a call) between the front-end and back-end
> machines, and 
> this works very well.
> 
>  I need to perform a Dial() 
> command after an inbound channel has hung up.  I do not expect the
> Dial() to 
> bridge to anything (the context being dialled simply does some
> database 
> manipulation and then hangs up without even bothering to answer).
> 
> 
> Any suggestions welcome :)


Maybe you can use the "g" option in the first Dial(...) and proceed in
the dial plan with the second Dial(...)

g - Proceed with dialplan execution at the next priority in the current
extension if the destination channel hangs up.

Example:

exten => 1234,1,Dial(SIP/deskphone,120,g)
same => n,Dial(SIP/cordlessphone)
same => n,Hangup()

Extension 1234 dials a deskphone. If "deskphone" answer... bla bla
bla... and after "deskphone" hangs up, the "cordlessphone" is dialed.










More information about the asterisk-users mailing list