[asterisk-dev] minimal default configuration
Tzafrir Cohen
tzafrir.cohen at xorcom.com
Sat Nov 24 12:29:40 CST 2007
The subdirectory configs/ of asterisk contains well-annotated and
detailed configuration files. Those files are installed as 'sample'
configuration files (the separate installation target 'make samples').
Thus they serve both the purpose of reference and example.
There's an annoying behaviour I occasionally run into with respect to
the Asterisk configuration files in Debian packages. But please bear
with me, as I'll explain later why I think it indicates a more generic
problem.
With Debian packaging there's special handling of configuration files
(basically: files under /etc ). Those files are generally not to be
automatically updated if the user has edited them. If the user has, dpkg
will ask the user what to do (get the new version? keep the modified
one? fix things manually?)
The asterisk package (actually a separate sub-package, asterisk-config,
but this is for unrelated technical reasons) thus has some 67 files
under /etc/asterisk/ . If a user just installs asterisk and doesn't
need to change any of those: no problem - an upgrade will go smoothly.
But if the user has actually changed anything, then on an upgrade he has
extra work.
So an upgrade of the asterisk-config (even if this is due to a small
change that has not really changed the behaviour of the relevant
module) becomes a pain.
And then again: some users want to just start from scratch, without the
many samples. And thus they have to actively delete our files.
So what happens for those users who don't like debs?
With a typical installation you'd just run 'make samples' once at
initial install and hope to have a sane defaults.
And then what happens if you upgrade Asterisk and the file in configs/
changes? The file under /etc/asterisk would still be the old, unfixed,
copy.
And then the files themselves are quite detailed. They also set quite a
few values, and thus make then a sort of "de-facto defaults". And by
that they are confusing as reference. Two examples for that:
asterisk.conf is sets all the values under [directories] even though
there's no need to set them. That file is generated to reflect the
default build settings. Thus there is no need to set any value in
the [directoies] section to get the required result.
So the file asterisk.conf installed by default will confuse me if I want
to write one from scratch.
(BTW: the other sectoins in asterisk.conf are indeed well-written. At
least the version in trunk)
Do you think that indeed default values should generally not be enabled
in the sample configuration files?
The [modules] section in modules.conf includes "autoload=yes". I ofen
wonder why this is not the default: if you don't want to load modules
automatically, you'll need to take the time to handcraft the list of
modules in modules.conf anyway. Adding "autoload=no" there is no
problem.
Such a case (sample value differs from the default) is a source for
support issues: what exactly is the "default"? If someone wrote that
file from scratch, did he forget that?
Changing the default to a value is naturally not something to be taken
lightly. I wonder what other configuration values in Asterisk have
incorrect defaults.
And then there are some cases where too many things are installed. Why
do we need both extensions.conf and extensions.ael installed? Assuming
that both pbx_config.so and pbx_ael.so are installed (which is the
default) both will be installed and the result is a confusing dialplan.
So I'd like to get to a situation where Asterisk is as functional as
possible with the minimal ammount of configuration files, rather than
rely on the sample config files.
--
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