System information

The default directory locations and the options you can use to modify them are listed
in Table 4-1. For additional information about the usage of these directories, see the
File Structure section of Chapter 2.
Table 4-1. asterisk.conf [directories] section
Option Value/Example Notes
astetcdir /etc/asterisk The location where the Asterisk configuration files are stored.
astmoddir /usr/lib/asterisk/
modules
The location where loadable modules are stored.
astvarlibdir /var/lib/asterisk The base location for variable state information used by various parts of Asterisk.
This includes items that are written out by Asterisk at runtime.
astdbdir /var/lib/asterisk Asterisk will store its internal database in this directory as a file called astdb.
astkeydir /var/lib/asterisk Asterisk will use a subdirectory called keys in this directory as the default location
for loading keys for encryption.
astdatadir /var/lib/asterisk This is the base directory for system-provided data, such as the sound files that
come with Asterisk.
astagidir /var/lib/asterisk/
agi-bin
Asterisk will use a subdirectory called agi-bin in this directory as the default
location for loading AGI scripts.
astspooldir /var/spool/asterisk The Asterisk spool directory, where voicemail, call recordings, and the call orig-
ination spool are stored.
astrundir /var/run/asterisk The location where Asterisk will write out its UNIX control socket as well as its
process ID (PID) file.
astlogdir /var/log/asterisk The directory where Asterisk will store its log files.
The [options] Section
This section of the asterisk.conf file configures defaults for global runtime options. The
available options are listed in Table 4-2. Most of these are also controllable via
command-line parameters to the asterisk application. For a complete list of the
command-line options that relate to these options, see the Asterisk manpage:
$ man asterisk
Table 4-2. asterisk.conf [options] section
Option Value/Example Notes
verbose 3 Sets the default verbose setting for the Asterisk logger. This value is also set by
the -v command-line option. The verbose level is 0 by default.
debug 3 Sets the default debug setting for the Asterisk logger. This value is also set by
the -d command-line option. The debug level is 0 by default.
alwaysfork yes Forking forces Asterisk to always run in the background. This option is set to
no by default.
nofork yes Forces Asterisk to always run in the foreground. This option is set to no by default.
72 | Chapter 4:Initial Configuration Tasks