<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Nir,</div><div><br></div><div>+1 to being able to send a json string, but if you wanted that right now you could use one of the modules on top of nodejs/php/python. My nodejs module would allow you to do this but I agree that it's extra hassle just for monitoring, making nice basic replies and sending json instead of return separated key value pairs would be a great addition, however you'd want to change the response too, not sure how easy that would be.</div>
<div><br></div><div>It would also make parsing the responses from the ami ridiculously fast in nodejs/JavaScript.<br><br>Dan</div><div><br>On Nov 9, 2012, at 2:27, Nir Simionovich <<a href="mailto:nir.simionovich@gmail.com">nir.simionovich@gmail.com</a>> wrote:<br>
<br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"><meta name="Generator" content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@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.EmailStyle17
        {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.25in 1.0in 1.25in;}
div.WordSection1
        {page:WordSection1;}
--></style><div class="WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Ok, that’s a +1 by me as well. But, if we go that route, I think we should be able to format the output of that <br>
action. It would be very useful. Honestly, while on the subject, and I do admit that what I’m about to say will <br>be totally out there – it would be really nice if the input to AMI can be a single JSON array, instead of doing the <br>
ever annoying \n\n in manager – no?</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I’d love to get cracking on this one as I need it – if someone can throw me some pointers as to how the manager<br>
actually works in that respect.</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Nir S</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:asterisk-dev-bounces@lists.digium.com">asterisk-dev-bounces@lists.digium.com</a> [<a href="mailto:asterisk-dev-bounces@lists.digium.com">mailto:asterisk-dev-bounces@lists.digium.com</a>] <b>On Behalf Of </b>Russell Bryant<br>
<b>Sent:</b> Friday, November 09, 2012 3:11 AM<br><b>To:</b> Asterisk Developers Mailing List<br><b>Subject:</b> Re: [asterisk-dev] Formatting options for CLI output</span></p><p class="MsoNormal"> </p><p class="MsoNormal">
On Thu, Nov 8, 2012 at 7:50 PM, Olle E. Johansson <<a href="mailto:oej@edvina.net" target="_blank">oej@edvina.net</a>> wrote:</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><p class="MsoNormal"> </p><div><div><p class="MsoNormal">9 nov 2012 kl. 01:33 skrev "Nir Simionovich" <<a href="mailto:nir.simionovich@gmail.com" target="_blank">nir.simionovich@gmail.com</a>>:</p></div>
<div><p class="MsoNormal"><br><br></p><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Let’s take the “sip show peers” CLI command. It’s equivalent in the AMI world will be the “sippeers” action.</span></p>
</div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Compare the output of the two, when all you require is the summary line – it just doesn’t make sense to use<br>
AMI. Same applies to CoreShowChannels action.</span></p></div></div></div><p class="MsoNormal"> </p><div><p class="MsoNormal">So we can make a manager action that gives you the summary only... :-)</p></div></div></blockquote>
<div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">+1 ... :-)</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">-- </p></div><div><p class="MsoNormal">Russell Bryant </p></div></div></div>
</div></div></blockquote><blockquote type="cite"><div><span>--</span><br><span>_____________________________________________________________________</span><br><span>-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com">http://www.api-digital.com</a> --</span><br>
<span></span><br><span>asterisk-dev mailing list</span><br><span>To UNSUBSCRIBE or update options visit:</span><br><span> <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev">http://lists.digium.com/mailman/listinfo/asterisk-dev</a></span></div>
</blockquote></body></html>