[asterisk-dev] Formatting options for CLI output

Dan Jenkins dan.jenkins at holidayextras.com
Fri Nov 9 06:42:54 CST 2012


Hi Michael,

I disagree with your point about AMI over HTTP and how JSON/XML should be
limited to this. There are so many drawbacks to using the AMI over HTTP
that I (as a web developer) use the AMI over TCP because AMI over HTTP
doesn't give me everything I need. Digium talked at AstriDevCon about
making Asterisk's APIs more friendly to web developers - Steve Sokol talks
about it on his blog
http://www.stevensokol.com/2012/11/the-grand-unified-asterisk-api.html -
these are only thoughts right now though.

JSON and XML are not just used for WEB applications, they are data formats
that follow a standard and that's why they are used so heavily; what's so
wrong with Asterisk following another standard. Yes, JSON is easier to use
within Javascript for example, but that's just because it's a standard.

But yes, +1 for Olle's suggestion for a summary AMI command/event.

Dan Jenkins

-- 
Dan Jenkins - Senior Web Developer
email: dan.jenkins at holidayextras.com
twitter: dan_jenkins <http://twitter.com/dan_jenkins>
linkedin: jenkinsdaniel <http://www.linkedin.com/in/jenkinsdaniel>
skype: d-jenkins
blog: www.dan-jenkins.co.uk
about.me: about.me/dan_jenkins



On 9 November 2012 12:32, Michael L. Young <myoung at acsacc.com> wrote:

> ----- 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)
>
> --
> _____________________________________________________________________
> -- 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/79ef5788/attachment.htm>


More information about the asterisk-dev mailing list