Matt Riddell
2016-Nov-23 22:41 UTC
[asterisk-users] Subscribe to events via ARI from node.js without sending to Stasis
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? -- Cheers, Matt Riddell _______________________________________________ http://www.venturevoip.com/news.php (Daily Asterisk News) http://www.venturevoip.com/pabx_on_disk.php (PABX on a Disk) http://www.venturevoip.com/exchange.php (Full ITSP Solution) http://www.venturevoip.com/cc.php (Call Centre Solutions) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20161123/4bb85352/attachment.html>
Joshua Colp
2016-Nov-27 23:44 UTC
[asterisk-users] Subscribe to events via ARI from node.js without sending to Stasis
On Wed, Nov 23, 2016, at 06:41 PM, Matt Riddell wrote:> 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.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/<app name>/subscription resource, and "bridge:" for all bridges. Cheers, -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org
Matt Riddell
2016-Nov-28 15:39 UTC
[asterisk-users] Subscribe to events via ARI from node.js without sending to Stasis
> On 27/11/2016, at 6:44 PM, Joshua Colp <jcolp at digium.com> wrote: > > On Wed, Nov 23, 2016, at 06:41 PM, Matt Riddell wrote: >> >> 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. > > 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/<app name>/subscription resource, and "bridge:" for all > bridges.<app name> is the stasis app name or the Asterisk application name? -- Cheers, Matt Riddell _______________________________________________ http://www.venturevoip.com/news.php (Daily Asterisk News) http://www.venturevoip.com/pabx_on_disk.php (PABX on a Disk) http://www.venturevoip.com/exchange.php (Full ITSP Solution) http://www.venturevoip.com/cc.php (Call Centre Solutions) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20161128/0b1c4d48/attachment.html>