text
stringlengths
0
152
At this point you can also select other languages you wish to have
on your system. We recommend you select the WAV and G722 for‐
mats (and G729 as well, if you need to support it).
Under Codec Translators (--- External ---):
• Select [*] codec_opus
• Select [*] codec_silk
• Select [*] codec_siren7
• Select [*] codec_siren14
• Select [*] codec_g729a
36
|
Chapter 3: Installing Asterisk
Under Core Sound Packages:
• Deselect [*] CORE-SOUNDS-EN-GSM
• Select [*] CORE-SOUNDS-EN-WAV
• Select [*] CORE-SOUNDS-EN-G722
Under Extras Sound Packages:
• Select [*] EXTRA-SOUNDS-EN-WAV
• Select [*] EXTRA-SOUNDS-EN-G722
Save and Exit.
Three more commands and Asterisk is installed:
$ make # this will take several minutes to complete
# (depending on the speed of your system)
$ sudo make install # you must run this with escalated privileges
$ sudo make config # this too
When the make config command has completed, it will suggest
some commands to install the sample configuration files. For the
purposes of this book, you do not want to do this. We will be build‐
ing the necessary files by hand, so the sample files will only serve to
disrupt and confuse that process. Having said that, the sample files
are useful, and we will mention them throughout this book, since
they are excellent reference material.
Reboot the system.
Once the boot is complete, log back in as the astmin user, and temporarily set SELi‐
nux to Permissive (it will revert to Enforcing after each boot, so until we’ve sorted
out the SELinux portion of the install, this has to happen on every boot):
$ sudo setenforce Permissive
$ sudo sestatus
This should show Current mode: permissive
Verify that Asterisk is running with the following command:
$ ps -ef | grep asterisk
You want to see the /user/sbin/asterisk daemon running (currently as user root,
but we’ll fix that shortly).
Asterisk is now installed and is running; however, there are a few configuration set‐
tings we’ll need to make before the system is in any way useful.
Asterisk Installation
|
37
Initial Configuration
Asterisk stores its configuration files in the /etc/asterisk folder by default. The Aster‐
isk process itself doesn’t need any configuration files in order to run; however, it will
not be usable yet, since none of the features it provides have been specified. We’re
going to handle a few of the initial configuration tasks now.
Asterisk configuration files use the semicolon (;) character for
comments, primarily because the hash character (#) is a valid char‐
acter on a telephone number pad.
The modules.conf file gives you fine-grained control over what modules Asterisk will
(and will not) load. It’s usually not necessary to explicitly define each module in this
file, but you could if you wanted to. We’re going to create a very simple file like this:
$ sudo chown asterisk:asterisk /etc/asterisk ; sudo chmod 664 /etc/asterisk
$ sudo -u asterisk vim /etc/asterisk/modules.conf
[modules]
autoload=yes
preload=res_odbc.so
preload=res_config_odbc.so
We’re using ODBC to load many of the configurations of other modules, and we need
this connector available before Asterisk attempts to load anything else, so we’ll pre-