Hi, Am writing scripts to manage configuration management and Asterisk. I would like to be able to point the asterisk binary at config directory with an asterisk.conf in it, and for asterisk to run a pre- flight check. A bit like a pint check in php, 'apachectl configtest' and lots of other tools. asterisk will then exit with 0 on a safe config, and 1 on a bad config. I can reject bad config and stop my config management script in the event of an error. Looking at the man page, it looks like this feature is missing. Anyone got another tool which can do this instead ? Best wishes, Andy Davidson
On Wednesday 17 October 2007 22:23:23 Andy Davidson wrote:> Hi, > > Am writing scripts to manage configuration management and Asterisk. > > I would like to be able to point the asterisk binary at config > directory with an asterisk.conf in it, and for asterisk to run a pre- > flight check. A bit like a pint check in php, 'apachectl configtest' > and lots of other tools. > > asterisk will then exit with 0 on a safe config, and 1 on a bad > config. I can reject bad config and stop my config management script > in the event of an error. > > Looking at the man page, it looks like this feature is missing. > > Anyone got another tool which can do this instead ?I know only of aelparse for extensions.ael (utils dir if i'm not mistaken) For the rest - you can get trough with simple regexps (config file formats are nearly identical). extensions.conf is generally the same format as other config files, however you should check syntax of applications, and priority ordering (if you are using it at all). Regards, Atis -- Atis Lezdins VoIP Developer, IQ Labs Inc. atis at iq-labs.net Skype: atis.lezdins Cell Phone: +371 28806004 Work phone: +1 800 7502835
On Wed, Oct 17, 2007 at 08:23:23PM +0100, Andy Davidson wrote:> Hi, > > Am writing scripts to manage configuration management and Asterisk. > > I would like to be able to point the asterisk binary at config > directory with an asterisk.conf in it, and for asterisk to run a pre- > flight check. A bit like a pint check in php, 'apachectl configtest' > and lots of other tools. > > asterisk will then exit with 0 on a safe config, and 1 on a bad > config. I can reject bad config and stop my config management script > in the event of an error. > > Looking at the man page, it looks like this feature is missing. > > Anyone got another tool which can do this instead ?One lame suggestion: run a different asterisk. This will require an engeneered asterisk.conf . It will also cause problems as the new asterisk will try binding to local ports to which the current asterisk is already bound. Asterisk is also not so good at detecting broken configuration and dying from it. -- Tzafrir Cohen icq#16849755 jabber:tzafrir.cohen at xorcom.com +972-50-7952406 mailto:tzafrir.cohen at xorcom.com http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir