System information
Although most modules do not use much in the way of resources, and they all load
very quickly, it just seems cleaner to our minds to load only those modules that you
are planning on using in your system. Additionally, there are security benefits to not
loading modules that accept connections over a network.
In the past we felt that explicitly loading each desired module was the best way to handle
this, but we have since found that this practice creates extra work. After every upgrade
we found ourselves having to edit the modules.conf file to correct all the module dif-
ferences between releases, and the whole process ended up being needlessly compli-
cated. What we prefer to do these days is to allow Asterisk to automatically load the
modules that it finds, but to explicitly tell Asterisk not to load any modules we do not
want loaded by use of the noload directive. A sample modules.conf file can be found in
“modules.conf” on page 56.
Using menuselect to Control Which Modules Are Compiled and Installed
One other way that you can control which modules Asterisk loads is to simply not
compile and install them in the first place. During the Asterisk installation process, the
make menuselect command provides you with a menu interface that allows you to
specify many different directives to the compiler, including which modules to compile
and install. If you never compile and install a module, the effect of this at load time is
that it won’t exist, and therefore won’t be loaded. If you are new to Linux and Asterisk,
this may create confusion for you if you later want to use a module and discover that
it doesn’t exist on your system.
More information about menuselect is available in “make menuselect” on page 59.
The [modules] Section
The modules.conf file contains a single section. The options available in this section are
listed in Table 4-5. With the exception of autoload, all of the options may be specified
more than once.
A list of all loadable modules is available in Chapter 2, with notes on
our opinion regarding the popularity/status of each of them.
76 | Chapter 4: Initial Configuration Tasks