-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BridgeCreated and BridgeDestroyed aren't catch #110
Comments
You may want to move I don't see where you are creating a bridge. By default you'll only get events for the bridges you create inside your Stasis app. |
Hi @samuelg, It's more complicated, I tried to simplify a little bit this example. So I have an application with Inversify and the ari is like a service which the other services depends on. And the subscription is an other service that create subscription for websocket client. My bridge is created inside another service but like I said all works with the channel and bridge creation, also I get theses other events without any difficulty: ChannelEnteredBridge, ChannelLeftBridge, ChannelDestroyed, Dial, ChannelStateChange. My only trouble comes from theses two events above. Thanks for your help. |
Bridges can be reused so it's possible an existing bridge (unused) bridge was used. Without knowing how your application is interacting with bridges/channels it's hard to tell what might be wrong. Are you creating/destroying said bridges yourself? You might not get the events if the bridges are being created/destroyed by another app unless you register for bridge events. The events you are getting you list above are technically Channel events. As long as your application is handling StasisStart events or originating the channels, you'll be auto subscribed to the Channel events which is why you would be receiving them but not necessarily receiving Bridge events. Hope that helps. |
Yeah I'm having the same problem. I'm trying to maintain state even over crashes so I do the following: Save bridges to DB when created/delete when destroyed I have: ari.on('BridgeDestroyed', destroyBridge); but the function doesn't get called when the bridge is destroyed. Is there a better way to know that this has happened so I can clear it out of my DB? |
Looks like in my case I should be able to subscribe my application to the bridge but I can't see how to do that from ari-client |
I didn't get the bridge destroyed but I guess that's because it just sits there empty. I subscribed to the channel destroyed and then checked for empty bridges to destroy and it worked fine. |
You only would receive those events if you use |
Hi,
I'm trying to listen theses two events
BridgeCreated
andBridgeDestroyed
but I do not get any information.I didn't find any people who complain about that, then I think I made a mistake somewhere. Is that the right way to catch up theses events ?
Thanks for your answer
The text was updated successfully, but these errors were encountered: