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 <sylv...@wazo.io <mailto:sylv...@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 -vinz...@sipgate.de  <mailto:vinz...@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>

-- 
_____________________________________________________________________
-- 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

Reply via email to