[asterisk-dev] [asterisk-app-dev] How do third partymoduledevelopersexposetheir resources via asterisk ARI?

Daniel Jenkins dan.jenkins88 at gmail.com
Fri Oct 18 11:02:26 CDT 2013


On Fri, Oct 18, 2013 at 4:52 PM, Paul Albrecht <palbrecht at glccom.com> wrote:

>
> On Oct 18, 2013, at 10:20 AM, "David M. Lee" <dlee at digium.com> wrote:
>
> > On Oct 18, 2013, at 9:27 AM, Paul Albrecht <palbrecht at glccom.com> wrote:
> >
> >>> As far as registering a resource with ARI, the main function is
> ast_ari_add_handler()[2]. That call, and the code to build the
> stasis_rest_handlers tree that gets passed into it, resides in the
> generated res/res_ari_{resource}.c file.
> >>>
> >>
> >> Suppose this will work, but why not implement resources the usual way
> asterisk does this sort of thing? That is, create an object via a
> registration interface and then call the methods on the object when they're
> needed. For resources, it would be something like register the uri and
> callbacks for the rest methods and then invoke the methods via the object
> when then accessed.
> >
> > That's exactly what we have. But the C code to do so is tedious,
> repetitive, and error prone.
> >
>
> No it's really not. I would expect the callback to be in the module
> responsible for the resource. if that's tedious, repetitive, and error
> prone the you should reconsider your design and implementation.
>
> > We made design decisions to provide (and some extent, enforce) API
> documentation for ARI. Generating C code from the API declarations was
> fairly simple, and helps to enforce consistency between the API
> declarations and the implementation.
> >
>
> I guess at this point I find myself question the decision to do ARI in the
> first place. What's it supposed to be doing and how is it an improvement
> over the existing asterisk interfaces?
>
> > --
> > David M. Lee
> > Digium, Inc. | Software Developer
> > 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
> > Check us out at:  www.digium.com  & www.asterisk.org
> >
> >
> > --
> > _____________________________________________________________________
> > -- 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
>
>

Paul, can you answer the question in my email so we all know where we
stand, as I've taken your email to mean something different to what other
people have talked about.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20131018/e7020e81/attachment-0001.html>


More information about the asterisk-dev mailing list