[asterisk-dev] Application/Function configuration parsing

Nir Simionovich nir.simionovich at gmail.com
Sun Oct 26 08:44:56 CDT 2008


Hi Russell,

  I've started documenting what I'm gathering from the configuration parser
in chan_sip.c, and i've loaded it into my blog at
http://www.simionovich.com/?page_id=127

  I'd appreciate it if you can take a look at it, and see if I have a
mistake somewhere.

Cheers,
  Nir S

On Sat, Oct 25, 2008 at 10:05 PM, Russell Bryant <russell at digium.com> wrote:

>
> On Oct 25, 2008, at 5:29 PM, Nir Simionovich wrote:
>
> >  I've been trying to read how Asterisk applications or functions
> > relate
> > to specific configuration files,
> > however, I was unable to figure out a single methodology to do so. I
> > may
> > be missing something here,
> > but as I'm trying to write an application that relies on a
> > configuration
> > file, this point kinda got me stuck.
> >
> >  My general application description is available at
> > http://www.simionovich.com/?page_id=94, and I
> > would highly appreciate it is you could please point me to some
> > example
> > that may help me out in a
> > simple and clear way. I've tried chan_sip.c to figure out how the
> > configuration section works, but as
> > I said, I got stuck (My C is a little rusty, I have to admit).
>
>
> The functions for configuration handling are declared in include/
> asterisk/config.h.  The three that are most commonly used are.
>
> ast_config_load()
>  - Load a configuration file
>
> ast_category_browse()
>  - Traverse configuration categories (The stuff in square brackets)
>
> ast_variable_browse()
>  - Traverse key/value pairs within a certain configuration category
>
> There are a lot of examples, and they're all a little bit different.
> If you search around for ast_config_load(), you will find all of the
> places that configuration is handled.
>
> Here is an older set of slides on the config API that might help as
> well:
>
>
> http://svncommunity.digium.com/svn/russell/presentations/astricon07/developer-day/Astricon_config_API.odp
>
> --
> Russell Bryant
> Senior Software Engineer
> Open Source Team Lead
> Digium, Inc.
>
>
>
>
>
> _______________________________________________
> --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/20081026/b081c073/attachment.htm 


More information about the asterisk-dev mailing list