On Thu, 2008-11-06 at 17:02 +0200, Tzafrir Cohen wrote: > On Thu, Nov 06, 2008 at 12:57:15PM +0200, Tzafrir Cohen wrote: > > Hi > > > > I'm lately bothered with the need to provide a set of Asterisk > > configuration files in a package that will be good for a wide range of > > Asterisk users. > > > > Asterisk configuration files support #include and a number of other > > interesting tricks, as mentioned in > > http://svn.digium.com/svn/asterisk/branches/1.4/doc/configuration.txt [0]. > > Where can we find tools to parse Asterisk configuration files? > > Asterisk does not provide any library or utility to read configuration > files. The asterisk-gui uses Asterisk itself to both read and write > configuration files. >
Tzafrir-- Not entirely true. In trunk, I developed a set of files in utils that allow you toread and write config files externally to asterisk. See extconf.c; it's a pain in the kazoo to maintain, but could be very useful for those who need to do external config file processing. It could stand a little updating against the asterisk core, as new things have been introduced since it was written. I thought about writing a new parser, about using someone elses' code that was similar, and my best estimate was that reusing the code in Asterisk to do it was the cheapest alternative at the time. The config file stuff is actually pretty feature packed! murf > The FreeIRIS project uses a set of perl module, that are also available > in CPAN, as Asterisk::config > http://search.cpan.org/dist/Asterisk-config/ > http://www.freeiris.org/ > > (Never tried using them) > > > Next file to look at is modules.conf . modules.conf is one of those > files with a "single section" (or maybe two or three, but many entries > in that section). Mostly the order in modules.conf doesn't count. > However I beleive that in some specific cases the order of entries there > does count. > > In addition, of of the entries there are of the same two keys ('load' > and 'unload'). Hence it's imporssible to override an earlier > "assignment" later. This makes module.conf very unmodular (pun not > intended) by nature. > > The problem with modules.conf is that a mistake in it can easily get > Asterisk to either fail to load or behave very strange. > > Can someone describe to me a real-life situation where the order of > directives in modules.conf matters? > -- Steve Murphy Software Developer Digium
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users