<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi,</p>
<p>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.</p>
<p>The code (NodeJS) looks like something like this :</p>
<p><tt>bridge.create().then( () => {</tt><tt><br>
</tt><tt> ari.applications.subscribe({</tt><tt><br>
</tt><tt> applicationName: 'myApplication',</tt><tt><br>
</tt><tt> eventSource: 'bridge:' + bridge.id</tt><tt><br>
</tt><tt> });</tt><tt><br>
</tt><tt>});</tt></p>
<p>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.</p>
<p>Regards,</p>
<p>Jean<br>
</p>
<div class="moz-cite-prefix">Le 21/10/2020 à 17:41, Jöran Vinzens a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAC3=B=tCdqb0iwxvK=G09mpknOPu9zDsrJTVq-kwtRvnZPQG9Q@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi,
<div><br>
</div>
<div>yes, we do subscribe to an application.</div>
<div>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". <br>
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.</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Oct 21, 2020 at 5:20
PM Sylvain Boily <<a href="mailto:sylvain@wazo.io"
moz-do-not-send="true">sylvain@wazo.io</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
On 2020-10-21 10:22 AM, Jöran Vinzens wrote:<br>
> Hi all,<br>
><br>
> yesterday at AstriDevCon we started a discussion about
Bridge Created <br>
> Events on ARI.<br>
> According to the Documentation there is such an event,
but I have <br>
> never seen one.<br>
><br>
> My Stasis App is connected to a specific App and Consumes
only these <br>
> Events. While creating a Bridge, there is no way to
configure a ARI <br>
> App name, where these events should be published.<br>
<br>
A subscribe to the application is not the good way?<br>
<br>
<a
href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+18+Applications+REST+API#Asterisk18ApplicationsRESTAPI-subscribe"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://wiki.asterisk.org/wiki/display/AST/Asterisk+18+Applications+REST+API#Asterisk18ApplicationsRESTAPI-subscribe</a><br>
<br>
I'm not completely sure about your use case, but i can share
what we did <br>
if it can help.<br>
<br>
<a
href="https://github.com/wazo-platform/wazo-calld/blob/master/wazo_calld/plugins/adhoc_conferences/stasis.py#L58"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://github.com/wazo-platform/wazo-calld/blob/master/wazo_calld/plugins/adhoc_conferences/stasis.py#L58</a><br>
<br>
Sylvain<br>
<br>
<br>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a
href="http://www.api-digital.com" rel="noreferrer"
target="_blank" moz-do-not-send="true">http://www.api-digital.com</a>
--<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a
href="http://lists.digium.com/mailman/listinfo/asterisk-dev"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.digium.com/mailman/listinfo/asterisk-dev</a></blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<pre>Jöran Vinzens - <a href="mailto:vinzens@sipgate.de" target="_blank" moz-do-not-send="true">vinzens@sipgate.de</a>
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
<a href="http://www.sipgate.de" target="_blank" moz-do-not-send="true">www.sipgate.de</a> - <a href="http://www.sipgate.co.uk" target="_blank" moz-do-not-send="true">www.sipgate.co.uk</a>
</pre>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
</blockquote>
</body>
</html>