ARI - subscription messages reach more than one instance of my app

I have an application that places calls using ARI
The application is deployed to 2 or more boxes that connect to the same Asterisk server
websocket.Connect( "/ari/events?api_key="+user+":"+password+"&app="+app_instance+"&subscribeAll=false"
and subscribe to receive messages like this:

where app_instance is different for every box running my application. (using the machine name)
However, both boxes running the app are getting channel and bridge messages meant for only box.
How can I register so that messages for each app_instance are sent to only one box? Do I need two asterisk boxes in this case?

You appear to be subscribing each instance to receive all channel and bridge events. Each connection would therefore receive all channel and bridge events. If you don’t want everything, then you’d have to subscribe to specific things. Do note that if a channel enters your application, then your application automatically receives events for it.

removing the eventSource for channel: solved the problem.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.