Re: ChannelLeftBridge vs StasisEnd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nitesh,

I struggled with this before, and agree with what Ben (Skrusty?) says above. The point is, the exact event you reap in your ARI application depends on, well, your application. Some ARI applications need to know when a channel left the bridge, others need to know when the channel hungup. I think the Asterisk/ARI developers decided to give access to as many events as possible so that the ARI application developers have a rich set of events to work with; we don't need to use all of them. And this means your ARI application will have "noop" for events which do not pertain to your application and wait only for a StasisEnd. 

Hope that helps you.

On Mon, Apr 18, 2016 at 9:34 AM, Ben Merrills <b.merrills@xxxxxxxxxxxxxxxx> wrote:

Hi Nitesh,

 

Neither of the events signify that channel has hungup. You should have another event Hangup when a channel is hung up, or destroyed if it’s part of an unanswered/timeout Originate (if I remember right).

 

How you decide to clean up or manage your code really depends on what you’re doing. When you say building a mixing bridge, do you mean a simple conference? Two way call? What you do in your code depends on what you want to happen when one party hangs up!

 

Skrusty

 

From: asterisk-app-dev-bounces@xxxxxxxxxxxxxxxx [mailto:asterisk-app-dev-bounces@xxxxxxxxxxxxxxxx] On Behalf Of Nitesh Bansal
Sent: 18 April 2016 14:18
To: Asterisk Application Development discussion <asterisk-app-dev@xxxxxxxxxxxxxxxx>
Subject: ChannelLeftBridge vs StasisEnd

 

Hello,

I'm building a mixing bridge with ARI and Asterisk 13.

Now when a channel hangs up, I can see two StasisEvents:

'ChannelLeftBridge' and 'StasisEnd'.

To me, there should be just one event when a channel hangs up, if

it hangs up, it should automatically leave the bridge.

Is there any specific order that these two events should come from
Asterisk?

Which event should I rely on to write the cleanup code for a channel?

Thanks,

Nitesh

 


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7539 / Virus Database: 4545/12056 - Release Date: 04/18/16


_______________________________________________
asterisk-app-dev mailing list
asterisk-app-dev@xxxxxxxxxxxxxxxx
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev


_______________________________________________
asterisk-app-dev mailing list
asterisk-app-dev@xxxxxxxxxxxxxxxx
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev

[Index of Archives]     [Asterisk SS7]     [Asterisk Announcements]     [Asterisk Users]     [PJ SIP]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Linux API]

  Powered by Linux