<div dir="ltr">Hi Russell, <br><br> 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 <a href="http://www.simionovich.com/?page_id=127">http://www.simionovich.com/?page_id=127</a><br>
<br> I'd appreciate it if you can take a look at it, and see if I have a mistake somewhere.<br><br>Cheers,<br> Nir S<br><br><div class="gmail_quote">On Sat, Oct 25, 2008 at 10:05 PM, Russell Bryant <span dir="ltr"><<a href="mailto:russell@digium.com">russell@digium.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br>
On Oct 25, 2008, at 5:29 PM, Nir Simionovich wrote:<br>
<br>
> I've been trying to read how Asterisk applications or functions<br>
> relate<br>
> to specific configuration files,<br>
> however, I was unable to figure out a single methodology to do so. I<br>
> may<br>
> be missing something here,<br>
> but as I'm trying to write an application that relies on a<br>
> configuration<br>
> file, this point kinda got me stuck.<br>
><br>
> My general application description is available at<br>
> <a href="http://www.simionovich.com/?page_id=94" target="_blank">http://www.simionovich.com/?page_id=94</a>, and I<br>
> would highly appreciate it is you could please point me to some<br>
> example<br>
> that may help me out in a<br>
> simple and clear way. I've tried chan_sip.c to figure out how the<br>
> configuration section works, but as<br>
> I said, I got stuck (My C is a little rusty, I have to admit).<br>
<br>
<br>
</div>The functions for configuration handling are declared in include/<br>
asterisk/config.h. The three that are most commonly used are.<br>
<br>
ast_config_load()<br>
- Load a configuration file<br>
<br>
ast_category_browse()<br>
- Traverse configuration categories (The stuff in square brackets)<br>
<br>
ast_variable_browse()<br>
- Traverse key/value pairs within a certain configuration category<br>
<br>
There are a lot of examples, and they're all a little bit different.<br>
If you search around for ast_config_load(), you will find all of the<br>
places that configuration is handled.<br>
<br>
Here is an older set of slides on the config API that might help as<br>
well:<br>
<br>
<a href="http://svncommunity.digium.com/svn/russell/presentations/astricon07/developer-day/Astricon_config_API.odp" target="_blank">http://svncommunity.digium.com/svn/russell/presentations/astricon07/developer-day/Astricon_config_API.odp</a><br>
<br>
--<br>
Russell Bryant<br>
Senior Software Engineer<br>
Open Source Team Lead<br>
Digium, Inc.<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
--Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--" target="_blank">http://www.api-digital.com--</a><br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br>
</blockquote></div><br></div>