[asterisk-app-dev] Standardization of Case for ARI URIs

Scott Griepentrog sgriepentrog at digium.com
Tue Jan 21 16:57:40 CST 2014


I was assuming that we would leave TECH to be case INsensitive, and thus it
wouldn't matter.  We can also then optionally go through and change all
json output to lowercase.

If you want to treat TECH as a case sensitive value, then ALL instances of
IAX and PJSIP and LOCAL etc would have to be changed everywhere in the code
(for any json output anyway) so that you don't have code broken by a
lowercase TECH requirement.  This would also break some EXISTING ari apps,
likely also tests.

What about a transitional period (such as Asterisk 12) where TECH is case
insensitive and the json output of TECH is lowercased, then later (in trunk
& Asterisk 13) the case sensitivity on TECH can be changed?




On Tue, Jan 21, 2014 at 2:50 PM, Paul Belanger <paul.belanger at polybeacon.com
> wrote:

> On Tue, Jan 21, 2014 at 3:47 PM, Scott Griepentrog
> <sgriepentrog at digium.com> wrote:
> >
> > Would you extend TECH being lower case to replacing all cases where
> PJSIP is output in response to an ARI request (and thus could get copied
> into a URL)?  For example, instead of:
> >
> >   {
> >     "technology": "IAX2",
> >     "resource": "demo",
> >     "state": "unknown",
> >     "channel_ids": []
> >   },
> >   {
> >     "technology": "PJSIP",
> >     "resource": "200",
> >     "state": "offline",
> >     "channel_ids": []
> >   },
> >
> > You would want:
> >
> >   {
> >     "technology": "iax2",
> >     "resource": "demo",
> >     "state": "unknown",
> >     "channel_ids": []
> >   },
> >   {
> >     "technology": "pjsip",
> >     "resource": "200",
> >     "state": "offline",
> >     "channel_ids": []
> >   },
> >
> > Or would it be sufficient to say that lowercase is preferred, but due to
> case insensitivity it's not necessary to change all existing cases where it
> is output?
> >
> Right, I would expect only lower case TECH to work after the change.
> URL are case sensitive, but we are forcing lower case for TECH.
>
> So:
>
> /iax2/demo works!
>
> and
>
> /IAX2/demo 404
>
> --
> Paul Belanger | PolyBeacon, Inc.
> Jabber: paul.belanger at polybeacon.com | IRC: pabelanger (Freenode)
> Github: https://github.com/pabelanger | Twitter:
> https://twitter.com/pabelanger
>
> _______________________________________________
> asterisk-app-dev mailing list
> asterisk-app-dev at lists.digium.com
> http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
>



-- 
[image: Digium logo]
Scott Griepentrog
Digium, Inc · Software Developer
445 Jan Davis Drive NW · Huntsville, AL 35806 · US
direct/fax: +1 256 428 6239 · mobile: +1 317 507 4029
Check us out at: http://digium.com · http://asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-app-dev/attachments/20140121/cefa00ae/attachment.html>


More information about the asterisk-app-dev mailing list