<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.gmailsignatureprefix
        {mso-style-name:gmail_signature_prefix;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Ok that worked.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Since I have not declared a statis app called “test”, does that mean any non-existent app name on the URL will subscribe to all system events?  (Or is test a built-in app name)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Brian<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> asterisk-users [mailto:asterisk-users-bounces@lists.digium.com] <b>On Behalf Of </b>Joshua C. Colp<br><b>Sent:</b> Wednesday, June 7, 2023 9:56 AM<br><b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users@lists.digium.com><br><b>Subject:</b> Re: [asterisk-users] Listen to ARI events<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Wed, Jun 7, 2023 at 10:46 AM TTT <<a href="mailto:lists@telium.io">lists@telium.io</a>> wrote:<o:p></o:p></p></div><div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>I’ve reread the documentation a few times, and what isn’t clear is whether I need an app=X parameter in the url.  In other words, can I only get events for a single named statis app?  Or can I get events for the entire Asterisk server?</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>The command below (without app= parameter) results in no events being shown, but no error either.</span><o:p></o:p></p></div></div></div></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>You must specify an app as well. If you don't, it should reply with a 400. If it's not... then are you connecting to Asterisk? What does the console say? For example I did the following:<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>wscat --connect "ws://kappa:8088/ari/events?api_key=asterisk:asterisk&subscribeAll=yes&app=test"<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Which connected successfully and then I did a call which resulted in:<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal> {"type":"ChannelCreated","timestamp":"2023-06-07T10:54:56.295-0300","channel":{"id":"1686146096.1","name":"PJSIP/mytrunk_endpoint-00000000","state":"Down","protocol_id":"","caller":{"name":"Electron","number":"1009"},"connected":{"name":"","number":""},"accountcode":"","dialplan":{"context":"from-external","exten":"s","priority":1,"app_name":"","app_data":""},"creationtime":"2023-06-07T10:54:56.295-0300","language":"en"},"asterisk_id":"0c:c4:7a:ba:b3:5a","application":"test"}<br>< {"type":"ChannelDialplan","timestamp":"2023-06-07T10:54:56.295-0300","dialplan_app":"AppDial2","dialplan_app_data":"(Outgoing Line)","channel":{"id":"1686146096.1","name":"PJSIP/mytrunk_endpoint-00000000","state":"Down","protocol_id":"d89ddae0-6568-4ab4-995b-8feb39366a58","caller":{"name":"Electron","number":"1009"},"connected":{"name":"","number":""},"accountcode":"","dialplan":{"context":"from-external","exten":"s","priority":1,"app_name":"AppDial2","app_data":"(Outgoing Line)"},"creationtime":"2023-06-07T10:54:56.295-0300","language":"en"},"asterisk_id":"0c:c4:7a:ba:b3:5a","application":"test"}<br>< {"type":"Dial","timestamp":"2023-06-07T10:54:56.295-0300","dialstatus":"","forward":"","dialstring":"mytrunk_endpoint","peer":{"id":"1686146096.1","name":"PJSIP/mytrunk_endpoint-00000000","state":"Down","protocol_id":"d89ddae0-6568-4ab4-995b-8feb39366a58","caller":{"name":"Electron","number":"1009"},"connected":{"name":"","number":""},"accountcode":"","dialplan":{"context":"from-external","exten":"s","priority":1,"app_name":"AppDial2","app_data":"(Outgoing Line)"},"creationtime":"2023-06-07T10:54:56.295-0300","language":"en"},"asterisk_id":"0c:c4:7a:ba:b3:5a","application":"test"}<br>< {"cause":34,"type":"ChannelHangupRequest","timestamp":"2023-06-07T10:54:56.296-0300","channel":{"id":"1686146096.1","name":"PJSIP/mytrunk_endpoint-00000000","state":"Down","protocol_id":"d89ddae0-6568-4ab4-995b-8feb39366a58","caller":{"name":"Electron","number":"1009"},"connected":{"name":"","number":""},"accountcode":"","dialplan":{"context":"from-external","exten":"s","priority":1,"app_name":"AppDial2","app_data":"(Outgoing Line)"},"creationtime":"2023-06-07T10:54:56.295-0300","language":"en"},"asterisk_id":"0c:c4:7a:ba:b3:5a","application":"test"}<br>< {"type":"Dial","timestamp":"2023-06-07T10:54:56.296-0300","dialstatus":"CONGESTION","forward":"","dialstring":"mytrunk_endpoint","peer":{"id":"1686146096.1","name":"PJSIP/mytrunk_endpoint-00000000","state":"Down","protocol_id":"d89ddae0-6568-4ab4-995b-8feb39366a58","caller":{"name":"Electron","number":"1009"},"connected":{"name":"","number":""},"accountcode":"","dialplan":{"context":"from-external","exten":"s","priority":1,"app_name":"AppDial2","app_data":"(Outgoing Line)"},"creationtime":"2023-06-07T10:54:56.295-0300","language":"en"},"asterisk_id":"0c:c4:7a:ba:b3:5a","application":"test"}<br>< {"type":"ChannelDestroyed","timestamp":"2023-06-07T10:54:56.296-0300","cause":34,"cause_txt":"Circuit/channel congestion","channel":{"id":"1686146096.1","name":"PJSIP/mytrunk_endpoint-00000000","state":"Down","protocol_id":"d89ddae0-6568-4ab4-995b-8feb39366a58","caller":{"name":"Electron","number":"1009"},"connected":{"name":"","number":""},"accountcode":"","dialplan":{"context":"from-external","exten":"s","priority":1,"app_name":"AppDial2","app_data":"(Outgoing Line)"},"creationtime":"2023-06-07T10:54:56.295-0300","language":"en"},"asterisk_id":"0c:c4:7a:ba:b3:5a","application":"test"} <o:p></o:p></p></div><p class=MsoNormal><br clear=all><o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal><span class=gmailsignatureprefix>-- </span><o:p></o:p></p><div><div><div><div><div><div><div><div><div><div><p class=MsoNormal><span style='font-family:"Tahoma",sans-serif;color:#073763'>Joshua C. Colp</span><span style='font-family:"Tahoma",sans-serif'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Tahoma",sans-serif;color:#073763'>Asterisk Project Lead</span><span style='font-family:"Tahoma",sans-serif'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Tahoma",sans-serif;color:#073763'>Sangoma Technologies</span><span style='font-family:"Tahoma",sans-serif'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Tahoma",sans-serif;color:#073763'>Check us out at <a href="http://www.sangoma.com" target="_blank">www.sangoma.com</a> and <a href="http://www.asterisk.org" target="_blank">www.asterisk.org</a></span><span style='font-family:"Tahoma",sans-serif'><o:p></o:p></span></p></div></div></div></div></div></div></div></div></div></div></div></div></body></html>