System information
Running make samples on a system that already has configuration files
will overwrite the existing files.
Using make samples to Create Sample
Configuration Files for Future Reference
Even though we are not going to use the sample configuration files that come with
Asterisk, the fact is that they are an excellent reference. If there is a module that you
are not currently using but wish to put into production, the sample file will show you
exactly what syntax to use, and what options are available for that module.
Running the sudo make samples command in your Asterisk source directory
*
is harmless
on a new system that has just been built, but it is very dangerous to run on a system
that already has configuration files, as this command will overwrite any existing files
(which would be a disaster for you if you do not have a current backup).
If you’ve run the sudo make samples command, you will want to move the files that it
has created in /etc/asterisk/ to another folder. We like to create a folder called /etc/
asterisk/unused/ and put any sample/unused configuration files in there, but feel free
to store them wherever you like.
We’re now going to step through all the files that are required to get a simple Asterisk
system up and running.
indications.conf and asterisk.conf
The
first file needed is indications.conf, a file that contains information about how to
detect different telephony tones for different countries. There is a perfectly good sample
file that we can use in the Asterisk source, so let’s copy it into our /etc/asterisk/ directory:
$ cp ~/src/asterisk-complete/asterisk/1.8/configs/indications.conf.sample \
/etc/asterisk/indications.conf
Because we’re running Asterisk as non-root, we need to tell Asterisk which user to run
as. This is done with the asterisk.conf file. We can copy a sample version of it from the
Asterisk source to /etc/asterisk:
$ cp ~/src/asterisk-complete/asterisk/1.8/configs/asterisk.conf.sample \
/etc/asterisk/asterisk.conf
The asterisk.conf file contains many options that we won’t go over here (they are cov-
ered in “asterisk.conf” on page 71), but we do need to make an adjustment. Near the
end of the [options] section, there are two options we need to enable: runuser and
rungroup.
* /usr/src/asterisk-complete/asterisk/asterisk-1.8.<your version>/
Base Configuration | 53
Downloa d f r o m W o w ! e B o o k < w w w.woweb o o k . c o m >