[asterisk-dev] No Bridge Created Event published
Jean Aunis
jean.aunis at prescom.fr
Thu Oct 22 01:34:41 CDT 2020
Hi,
When I have to deal with bridges in ARI I explicitly subscribe the
application to the newly created bridge. If I remember well this is
because I don't get the BridgeDestroyed event otherwise.
The code (NodeJS) looks like something like this :
bridge.create().then( () => {
ari.applications.subscribe({
applicationName: 'myApplication',
eventSource: 'bridge:' + bridge.id
});
});
But I don't rely on BridgeCreated events, so maybe it won't work for
you. I suppose there may be a race condition, depending whether the
subscribe request comes before or after the BridgeCreated event is emitted.
Regards,
Jean
Le 21/10/2020 à 17:41, Jöran Vinzens a écrit :
> Hi,
>
> yes, we do subscribe to an application.
> So we e.g. subscribe to app "foo". As soon as there is a new
> channel we start Stasis(foo) and we get events for this channel. From
> our backend we create a bridge and here is the issue. There is no
> "BridgeCreated" Event published to "foo".
> There is no way to spawn a bridge within a specific application like
> "foo". There is no parameter in bridge create where you can specify
> the app name.
>
>
>
> On Wed, Oct 21, 2020 at 5:20 PM Sylvain Boily <sylvain at wazo.io
> <mailto:sylvain at wazo.io>> wrote:
>
> Hello,
>
> On 2020-10-21 10:22 AM, Jöran Vinzens wrote:
> > Hi all,
> >
> > yesterday at AstriDevCon we started a discussion about Bridge
> Created
> > Events on ARI.
> > According to the Documentation there is such an event, but I have
> > never seen one.
> >
> > My Stasis App is connected to a specific App and Consumes only
> these
> > Events. While creating a Bridge, there is no way to configure a ARI
> > App name, where these events should be published.
>
> A subscribe to the application is not the good way?
>
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+18+Applications+REST+API#Asterisk18ApplicationsRESTAPI-subscribe
>
> I'm not completely sure about your use case, but i can share what
> we did
> if it can help.
>
> https://github.com/wazo-platform/wazo-calld/blob/master/wazo_calld/plugins/adhoc_conferences/stasis.py#L58
>
> Sylvain
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
>
>
>
> --
> Jöran Vinzens -vinzens at sipgate.de <mailto:vinzens at sipgate.de>
> Telefon: +49 211-63 55 56-21
> Telefax: +49 211-63 55 55-22
>
> sipgate GmbH - Gladbacher Str. 74 - 40219 Düsseldorf
> HRB Düsseldorf 39841 - Geschäftsführer: Thilo Salmon, Tim Mois
> Steuernummer: 106/5724/7147, Umsatzsteuer-ID: DE219349391
>
> www.sipgate.de <http://www.sipgate.de> -www.sipgate.co.uk <http://www.sipgate.co.uk>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20201022/acaea69c/attachment-0001.html>
More information about the asterisk-dev
mailing list