[asterisk-dev] detect called channel hang-up even with dial application g argument

Matt Fredrickson creslin at digium.com
Tue Jan 24 13:48:14 CST 2017


On Mon, Jan 23, 2017 at 6:38 PM, Fred Muteesa <muteesafred at hotmail.com> wrote:
> Hello Dev team,
>
> I have been playing with asterisk dial function and I have the senarial
> below.
>
> I am generating a call from server 1 and receiving it on server 3, but I
> want server 1 to control how long this call should be.
>
> Though I placed server 2 in the middle which is able to modify my parameters
> of the dial function and control call duration.
>
> How do I detect on server 1 that server 3 has hangup so that server 2 does
> not keep the call connected longer than I require.
>
> This is of extreme importance to me all advise and help will be appreciated.
>
>
>
>
>
> On Server 1
>
> [to_server2]
>
> exten => 1234,1,Dial(SIP/server2/1234,3,S(3))
>
> exten =>1234,2,Hangup()
>
>
>
> on Server 2
>
> [from_server1]
>
> exten => 1234,1,Dial(SIP/server3/1234,,gS(15))
>
> exten =>1234,2,wait(15)
>
>
>
> on Server 3
>
> [from_server2]
>
> exten =>1234,1,answer()
>
> exten =>1234,2,wait(3)

Hey Fred,

First off, welcome to the Asterisk Development mailing list, Fred!
This list is typically used for C code level discussion of Asterisk
and its associated modules and internals.  Sometimes
telecommunications protocol level discussions occur as well.  For
dialplan and related questions such as this, I would recommend using
the asterisk-users mailing list or the discourse forums on
community.asterisk.org.

I would think that your dialplan setup should allow server 1 to detect
when server 3 hangs up as long as you indeed have server 1 dialing
server 2, and server 2 dialing server 3.  When you post your question
to the -users list, I would also include the output of the asterisk
verbose logs from the server that the hangup does not happen on as
expected.  You might also enable sip debug, using 'sip set debug on'
on it so that a protocol level dump is available.

-- 
Matthew Fredrickson
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA



More information about the asterisk-dev mailing list