ARI Channel Events Subscription


I need help trying to determine if a specific behavior in Asterisk is a bug or just me not understanding how Asterisk is supposed to work.

Setup: Asterisk 17.5.1, PJSIP, and ARI with Automatic Context Creation (no dialplan).

I’m subscribing 3 ARI applications to events with subscribeAll=false :
wss://…/ari/events?app=CallControl,CallQueueing,CallDialing& subscribeAll=false &api_key=uuu:pwd

Then I’m originating a call using originate: POST /channels from the CallDialing application:
…/ari/channels?endpoint=PJSIP/0001130& app=CallDialing &appArgs=&callerId=%22The%22%20%3C8001112222%3E&timeout=30

My understanding is that the application that originates a channel (CallDialing in this case) should receive the channel events (Dial, ChannelDestroyed, etc.) exclusively because subscribeAll=false was specified. But what is actually happening is that ARI generates some events (Dial, ChannelHangupRequest, and ChannelDestroyed) for both, CallDialing and CallControl. Is this by design or a bug?

Note: The PJSIP endpoints are created with context = stasis-CallControl because I need the CallControl application to take control when a call is dialed by the softphone. Not sure if this has anything to do with this issue though.



I would expect only the CallDialing application to receive events. Do you have a complete log of the ARI requests and the over the wire ARI events?

No but I can try to get the logs for you. Does Asterisk provides any type of ARI logging or do I have to manually dump the events and requests myself to a log file?


There is the “ari set debug” CLI command which displays things.

arilog.txt (15.1 KB)

Great, here is the log from the previously described interaction. Please let me know if you need extra information. Thanks!

Nothing stands out as being the cause. I’d file an issue[1] with logs and an example application with configuration that shows the issue. It may be due to registering multiple applications to the same event connection, that’s functionality that I’ve never seen anyone actually use before so it may be the cause of it.


Issue has been filed.

Thanks for your help!

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