<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Tue, Sep 30, 2014 at 10:33 AM, Chris Bestall <span dir="ltr"><<a href="mailto:chris.bestall@gmail.com" target="_blank">chris.bestall@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">Why is there an ARI data model for this event if it cannot be received?</span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+REST+Data+Models#Asterisk12RESTDataModels-ChannelCreated" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+REST+Data+Models#Asterisk12RESTDataModels-ChannelCreated</a></div><div><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 30, 2014 at 10:20 AM, Scott Griepentrog <span dir="ltr"><<a href="mailto:sgriepentrog@digium.com" target="_blank">sgriepentrog@digium.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="color:#660000">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.</div><div style="color:#660000"><br></div></div><br></blockquote></div></div></div></div></div></blockquote><div><br></div><div>Well.... it can be received. It's just rare.<br><br></div><div>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.<br><br></div><div>If you persisted the subscription via the applications resource, then you'd get the slightly less elusive ChannelDestroyed event.<br><br></div><div>So how do you get the ChannelCreated? And when?<br><br></div><div>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.<br></div></div><br></div><div class="gmail_extra">Matt<br clear="all"></div><div class="gmail_extra"><br>-- <br><div dir="ltr"><div>Matthew Jordan<br></div><div>Digium, Inc. | Engineering Manager</div><div>445 Jan Davis Drive NW - Huntsville, AL 35806 - USA</div><div>Check us out at: <a href="http://digium.com" target="_blank">http://digium.com</a> & <a href="http://asterisk.org" target="_blank">http://asterisk.org</a></div></div>
</div></div>