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].
Let's look at asterisk.conf . Unlike most configuration files, asterisk.conf is not read on reload . Only at startup and restart. It is read by the main asterisk thread and variables from there are globals that may affect all parts of Asterisk. The [directories] section is most useful for anybody who uses a custom installation of Asterisk. Though for distributors I would recommend to patch those values in the source. It is still very handy if you want to have more than one copy of Asterisk on the system. The [options] section has grown over time and includes many options. Some of them corespond to command-line switches. It is interesting to note that values in the configuration file override Asterisk command-line switches of Asterisk and not vice-versa as it is the common with Unix programs. Thus relying on setting parameters through controlling the command-line of Asterisk is not as robust as editing asterisk.conf . The reason for that is that on 'reastart', asterisk re-execs itself. It retains the same command-line options. But it re-reads asterisk.conf , and thus changes to the command-line options would require stopping the Asterisk process and starting it again, as opposed to using the 'restart' command in asterisk. The [compat] section is new in the game for asterisk 1.6 . It makes it actively danbgerous to write asterisk from scratch (as done by, well, someone, in http://svn.digium.com/svn/asterisk/trunk/contrib/scripts/live_ast ). In fact, the only way blessed by the Asterisk developers to write a valid asterisk.conf is to use the output of 'make install' . -- Tzafrir Cohen icq#16849755 jabber:[EMAIL PROTECTED] +972-50-7952406 mailto:[EMAIL PROTECTED] http://www.xorcom.com iax:[EMAIL PROTECTED]/tzafrir _______________________________________________ -- 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
