[asterisk-dev] Formatting options for CLI output

Michael L. Young myoung at acsacc.com
Fri Nov 9 06:32:13 CST 2012


----- Original Message -----
> From: "Saúl Ibarra Corretgé" <saghul at gmail.com>
> To: "Asterisk Developers Mailing List" <asterisk-dev at lists.digium.com>
> Sent: Friday, November 9, 2012 4:28:05 AM
> Subject: Re: [asterisk-dev] Formatting options for CLI output
> 
> Hi,
> 
> +1 for Olle's suggestion. On to the format...
> 
> Nir Simionovich 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?
> >
> 
> Why? You'll get text so you'll need to JSON-decode it anyway, so
> what's
> wrong about \n\n ?

It's because for a web developer, that is the easy route.  Instead of them having to do any extra coding to parse the data, they can just feed it straight into their script.

I do favor the addition of an AMI command to get just summary information about SIP peers. +1

I am not for the command line turning into a "web service" for applications to get their data from.  If there was any data to be presented in JSON/XML, it would need to be limited to AMI over http.

Michael
(elguero)



More information about the asterisk-dev mailing list