[asterisk-dev] [Code Review] Dynamiclly generate asterisk.conf (new script)

Tzafrir Cohen tzafrir.cohen at xorcom.com
Sat Apr 10 18:50:49 CDT 2010


On Sat, Apr 10, 2010 at 11:23:36PM -0000, pabelanger at gmail.com wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/616/
> -----------------------------------------------------------
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> A new script to dynamically generate asterisk.conf. This simply moves the functionality from the Makefile (cleaning it up) into an external script.  However, I would like to enhance 'make_asterisk_conf' allow a user to make dynamic changes to the static configuration.  IE: toggle settings, override '(!)' flag.
> 
> I have also made some formatting (easier to read) and grammar changes to 'asterisk.conf'.


The only dynamic part of that generated config file is:

[directories](!) ; remove the (!) to enable this
astetcdir => ${ASTETCDIR}
astmoddir => ${MODULES_DIR}
astvarlibdir => ${ASTVARLIBDIR}
astdbdir => ${ASTDBDIR}
astkeydir => ${ASTKEYDIR}
astdatadir => ${ASTDATADIR}
astagidir => ${AGI_DIR}
astspooldir => ${ASTSPOOLDIR}
astrundir => ${ASTVARRUNDIR}
astlogdir => ${ASTLOGDIR}

(copying text from the reviewboard is no fun)

As you can see, this part has no effect by default.
Furthermore, it is confusing. When you want to override some of those
variables, you'll have to edit it anyway. But in this case when I remove
the '(!)' all of them take effect.

So what I suggest is to simply have configs/asterisk.conf.sample . It
will have a '[directories]' section that is not templated-out, but each
of the lines will be commented-out.

-- 
               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



More information about the asterisk-dev mailing list