[asterisk-dev] Formatting options for CLI output
Dan Jenkins
dan.jenkins at holidayextras.com
Fri Nov 9 01:40:07 CST 2012
Nir,
+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.
It would also make parsing the responses from the ami ridiculously fast in
nodejs/JavaScript.
Dan
On Nov 9, 2012, at 2:27, Nir Simionovich <nir.simionovich at gmail.com> wrote:
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
action. It would be very useful. Honestly, while on the subject, and I do
admit that what I’m about to say will
be totally out there – it would be really nice if the input to AMI can be a
single JSON array, instead of doing the
ever annoying \n\n in manager – no?
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
actually works in that respect.
Nir S
*From:* asterisk-dev-bounces at lists.digium.com [
mailto:asterisk-dev-bounces at lists.digium.com<asterisk-dev-bounces at lists.digium.com>]
*On Behalf Of *Russell Bryant
*Sent:* Friday, November 09, 2012 3:11 AM
*To:* Asterisk Developers Mailing List
*Subject:* Re: [asterisk-dev] Formatting options for CLI output
On Thu, Nov 8, 2012 at 7:50 PM, Olle E. Johansson <oej at edvina.net> wrote:
9 nov 2012 kl. 01:33 skrev "Nir Simionovich" <nir.simionovich at gmail.com>:
Let’s take the “sip show peers” CLI command. It’s equivalent in the AMI
world will be the “sippeers” action.
Compare the output of the two, when all you require is the summary line –
it just doesn’t make sense to use
AMI. Same applies to CoreShowChannels action.
So we can make a manager action that gives you the summary only... :-)
+1 ... :-)
--
Russell Bryant
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20121109/46ce78a9/attachment-0001.htm>
More information about the asterisk-dev
mailing list