There already is a special character to tell asterisk not to parse a line... its: ";" that is why the default configuration is completely filled with lines that start with ; its considered a comment character to asterisk and will make it ignore the line... you'd just want to add some extra characters to your program probably... something that would denote "this is a config line for script A"<br>
<br>so if you make your lines something like<br><br><br>;A:<br><br>then you could have another character for script B that would have lines in the same file like:<br><br>;B: <br><br>or w/e... its up to you to determine what characters you'd want to use beyond the ; to denote config lines for your other programs.<br>
<br>--<br>Matt<br><br><div class="gmail_quote">On Fri, May 22, 2009 at 3:23 AM, Olivier <span dir="ltr"><<a href="mailto:oza-4h07@myamail.com">oza-4h07@myamail.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;">
Hi,<br><br>To a large extend, Asterisk's /etc/asterisk/*.conf configuration files conform to a format such as:<br><br>[section1]<br>key1=value1<br>key2=value2<br><br>[section2]<br>
key1=value1<br>
key2=value2<br>...<br><br>To increase coherence when running custom-made application in Perl, Java, PHP, ...) and Asterisk on the same platform, I'm wondering if could extend a bit Asterisk's config files instead of duplicating data in an independant config file.<br>
<br>For instance, an app that uses Manager interface needs to be configured with :<br>- the Asterisk manager interface IP address,<br>- a username and secret.<br><br>The later 2 parameters are included /etc/asterisk/manager.conf but the first one is not.<br>
So instead of writing an independant myapp.conf holding all 3 parameters, should I only add the first parameter to existing manager.conf file ?<br><br>Doing this, I would have to make sure that when Asterisk is parsing its config file, it doesn't stop when it reads unkown supplementary parameters (those added for custom app).<br>
It seems to be the case now with 1.6.1 : a NOTICE warning is sent but it doesn't really hurt.<br>[May 22 09:15:32] NOTICE[15917]: manager.c:3903 __init_manager: Invalid keyword <foo> = <bar> in manager.conf [general]<br>
<br>Maybe, adding a keyword that would tell Asterisk to skip reading this config file line would be a plus (avoiding warnings and collision with new keywords).<br>What do you think ?<br><br>Then, my next question, is there widely available librairies to parse Asterisk's config files-like files ?<br>
<br>Regards<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-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br>