[asterisk-app-dev] ChannelLeftBridge vs StasisEnd

Tickling Contest tickling.contest at gmail.com
Mon Apr 18 13:34:40 CDT 2016


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 at mersontech.co.uk>
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 at lists.digium.com [mailto:
> asterisk-app-dev-bounces at lists.digium.com] *On Behalf Of *Nitesh Bansal
> *Sent:* 18 April 2016 14:18
> *To:* Asterisk Application Development discussion <
> asterisk-app-dev at lists.digium.com>
> *Subject:* [asterisk-app-dev] 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 at lists.digium.com
> http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-app-dev/attachments/20160418/462e6117/attachment.html>


More information about the asterisk-app-dev mailing list