Subscribe To Events Via ARI From Node.js Without Sending To Stasis

Home » Asterisk Users » Subscribe To Events Via ARI From Node.js Without Sending To Stasis
Asterisk Users 3 Comments

Hi,

I’m writing a node.js backend to pass events via a websocket to a CRM.

Basically what I want to do is notice when things happen (i.e. new channel, new bridge etc) without sending the channels to the Stasis app.

The channels I’m interested in are agents who are in a queue only because they are in a realtime MySQL database for the queue_member_table.

There doesn’t appear to be a way to monitor general Asterisk events like you can in the Asterisk manager without polling for channel statuses or sending the channels to the Stasis app and recreating the logic of the Queue application.

Is this a correct assumption?

3 thoughts on - Subscribe To Events Via ARI From Node.js Without Sending To Stasis

  • You can subscribe to events for everything, but ARI events are a subset of what are available over AMI so you may not get what you want. Events raised by applications for example would not be present. You can subscribe to all channels by subscribing to “channel:” using the
    /applications//subscription resource, and “bridge:” for all bridges.

    Cheers,

  • The Stasis app name. You are saying you want to subscribe a specific Stasis application to certain events.