Duplicate ARI events?

Hello folks,

I’m using Asterisk 17.3 with PJSIP and two ARI Apps with Automatic Context Creation (no dial plan), and the problem is that Asterisk is generating duplicated Endpoint events for both ARI apps instead of just one.

Here’s a quick description of the setup:

  • Two ARI apps (AriApp1, and AriApp2).
  • PJSIP endpoint context is set to stasis-AriApp1.
  • Subscribe to ARI events specifying both apps: /ari/events?app=AriApp1,AriApp2&subscribeAll=true&api_key=user:pwd

The problem is that ARI generates 2 endpoint events (PeerStatusChange, ContactStatusChange, DeviceStateChanged) for each endpoint (one for each ARI App), one event with “application": “AriApp1”, and the duplicated event with “application": “AriApp2”.

If the PJSIP endpoints are configured with context stasis-AriApp1, shouldn’t ARI generate events only for AriApp1? Am I not understanding how ARI events are supposed to work?

Thanks,

Marcelo

You’ve subscribed both applications to receive all events, so they would receive all events. As well setting a context on an endpoint in PJSIP only means that calls are directed to it, they don’t influence what application receives PeerStatusChange, ContactStatusChange, etc.

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