On Thu, Feb 6, 2014 at 10:22 AM, Paul Belanger <paul.belanger@xxxxxxxxxxxxxx> wrote: > On Thu, Feb 6, 2014 at 11:13 AM, David M. Lee <dlee@xxxxxxxxxx> wrote: >> >> On Feb 5, 2014, at 5:22 PM, Matthew Jordan <mjordan@xxxxxxxxxx> wrote: >> >> BridgeCreated event never gets fired as you have to subscribe to bridge >> events before you receive them. Well, as you can't subscribe to something >> before creating it, this will never be called. Should an application >> automatically be subscribed to any bridges it created? >> >> >> That's an interesting point. >> >> Currently, the response to the POST /bridges returns the Bridge data >> model that you created. I'm not sure the BridgeCreated event adds much >> value, even if we did emit it. >> >> >> Agreed. Sending an event in addition to the response is redundant. >> > The issue I see with that approach, is now you have to add logic to > publish return results from POST to the event system, if you want to > consume them some place else. Which, I don't think exists today > witnin ARI. ARI events != Stasis messages. The fact that a bridge has been created will *always* cause a Stasis message to be emitted that notifies everyone that a bridge was created. Consumers of Stasis will always be notified of what occurs to objects created by ARI, regardless of ARI knowing that they exist or not. The objects themselves raise the messages; ARI does not. The issue here isn't whether or not the creation message occurs - it does - it's that ARI isn't showing that event because it happens before a subscription to the bridge's Stasis topic has been set up. Unlike some other consumers, ARI sets up subscriptions to each object's topic (as opposed to the 'all' aggregation topics) - which means by the time it creates said subscription, it has missed the creation message. As it is, that doesn't matter - it just returns what would be conveyed in the creation message in the response. -- Matthew Jordan Digium, Inc. | Engineering Manager 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: http://digium.com & http://asterisk.org _______________________________________________ asterisk-app-dev mailing list asterisk-app-dev@xxxxxxxxxxxxxxxx http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev