Re: ARI - ChannelCreated event

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

 



Thank you for the detailed explanation!  Looks like there was a bug fix/enhancement included in 12.5 that allows subscribing to technologies.  I am on 12.4 currently.  I will try that global subscription when I do though.  

-Chris

On Tue, Sep 30, 2014 at 11:58 AM, Matthew Jordan <mjordan@xxxxxxxxxx> wrote:

On Tue, Sep 30, 2014 at 10:33 AM, Chris Bestall <chris.bestall@xxxxxxxxx> wrote:
Why is there an ARI data model for this event if it cannot be received?


On Tue, Sep 30, 2014 at 10:20 AM, Scott Griepentrog <sgriepentrog@xxxxxxxxxx> wrote:
The ChannelCreated event exists internally (and you can receive it with AMI).  However, the channel is created first, then it enters the stasis app -- thus the stasis app does not receive the channel created event because it's not associated with the channel yet.



Well.... it can be received. It's just rare.

Generally, a StasisStart event indicates when a channel enters into your application. When that occurs, you get a subscription to the channel. When the channel leaves (indicated by StasisEnd), that subscription is terminated.

If you persisted the subscription via the applications resource, then you'd get the slightly less elusive ChannelDestroyed event.

So how do you get the ChannelCreated? And when?

By subscribing for an endpoint via the applications resource. Subscribing to an endpoint also subscribes you to any channels created for that endpoint. Likewise, subscripting to an endpoint's technology subscribes you to all endpoints, which subscribes you to all channels for those endpoints. (This is how you can make a 'show me the world via ARI' - albeit a more specific slice of the world). If you do that, you'll get the ChannelCreated events when a channel is made that is associated with an endpoint.

Matt

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

_______________________________________________
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