Am just trying to confirm a current issue that am having in regards to two separate ARI applications connecting and running off the same asterisk system and then catching states through both those applications.
When I connect and point 2 of these towards the same asterisk system it seems that whatever application was running first runs fine and catches states fine and logs them to the console, when I then run another application at the same time it can then catch states and post them to the console, but the first application stops doing that altogether.
Version Information
Asterisk 13.6.0
ari-client 0.5.0
I have tried the following:
Different ARI username & password for each application on the same system
Run the node-ari applications on separate VM’s
Both have there own local node-ari libs.
Run them off a single node-arilib
I am unsure if am overlooking something simple, or if its a limitation of node-ari itself only beign able to catch events for only one application at a time.
The node applications run but only one can catch states at any given time and I am trying to get to bottom as to way.
I can’t say I’ve heard of anyone encountering this, and in fact the testsuite runs scenarios like this every day. What version of Asterisk and what is the console output?
I am currently running asterisk 13.6 and using ari-client 0.5.0, I have set up the console.log to post events as they are caught and post them to the console.
Example
Application 1 was run first which is monitoring device_states, every time a device state is caught it gets logged to the console.
Then I run application 2 alongside application 1, the same idea every time a device state is caught it gets logged to the console…but then the application 1 stops catching the states altogether and but application 2 is catching the events fine.
The console.log when am running the applications dont show any errors and they both run fine…but only one it seems is able to catch and log events at any given time and am unaware if that is the case.
I believe I have resolved the issue, the stasis name was being overwritten every time because it wasn’t, I just had to change that and I believe it has resolved the issue.
As seen below:
Connected to Asterisk 13.6.0 currently running on debiantester (pid = 1605)
[2016-05-09 13:53:44] NOTICE[6259]: res_ari.c:758 process_cors_request: Origin header 'localhost:8088' does not match an allowed origin.
Activating Stasis app 'ARI-Metric-App'
== WebSocket connection from '127.0.0.1:47765' for protocol '' accepted using version '13'
Activating Stasis app 'ARI-Metric-App'
[2016-05-09 13:53:45] NOTICE[6280]: res_ari.c:758 process_cors_request: Origin header 'localhost:8088' does not match an allowed origin.
Activating Stasis app 'ARI-Dialler-App'
== WebSocket connection from '127.0.0.1:47782' for protocol '' accepted using version '13'
Activating Stasis app 'ARI-Dialler-App'