What Packages Do I Need?

Most Asterisk configurations are composed of three main packages : the main Asterisk program (asterisk), the Zapata telephony drivers (zaptel), and the PRI libraries (libpri). If you plan on a pure VoIP network, the only real requirement is the asterisk package, but we recommend installing all three packages; you can choose what modules to activate later. The zaptel drivers are required if you are using analog or digital hardware, or if you’re using the ztdummy driver (discussed later in this chapter) as a timing source. The libpri library is optional unless you’re using ISDN PRI interfaces, and you may save a small amount of RAM if you don’t load it, but we recommend that it be installed in conjunction with the zaptel package for completeness.

In the first edition of this book, we recommended that you install the additional asterisk-sounds package. This was a separate compressed archive that you would download, extract, and then install. As of Asterisk version 1.4.0, there are now two sets of sounds packages: the Core Sound package and the Extra Sound package. Since Asterisk supports several different audio formats, these packages can be obtained in a number of different sound formats, such as G.729 and GSM. The reason for all of the different formats is that Asterisk can use the sound format that requires the least amount of CPU transcode. For example, if you have a lot of connections coming in on VoIP channels that are running GSM, you would want to have the GSM version of the sound files. You can select one or more sound prompt types in the menuselect screen (discussed later in this chapter). We recommend that you install at least one type of sounds file from both the Core Sound package and Extra Sound package menu items. Since we may make use of some of the Extra Sound files throughout this book, we will assume you have at least one of the formats installed.

Linux Package Requirements

To compile Asterisk, you must have the GCC compiler (version 3.x or later) and its dependencies on your system. Asterisk also requires bison, a parser generator program that replaces yacc, and ncurses for CLI functionality. The cryptographic library in Asterisk requires OpenSSL and its development packages.

Zaptel requires libnewt and its development packages for the zttool program (see the section called “Using ztcfg and zttool” later in this chapter). If you’re using PRI interfaces, Zaptel also requires the libpri package (again, even if you aren’t using PRI circuits, we recommend that you install libpri along with zaptel).

If you install the Software Development packages in CentOS, you will have all of these tools. If you are looking to keep things trim, and wish to install the bare minimum to compile Asterisk and its related packages, Table 3.1, “List of packages required to compile libpri, zaptel, and asterisk” will prove useful.

Note

In the following table, the -y switch to the yum application means to answer yes to all prompts, and using it will install the application and all dependencies without prompting you. If this is not what you want, omit the -y switch.

If you just want to install all of the above packages in one go, you can specify more than one package on the command line, e.g.:

# yum install -y gcc ncurses-devel libtermcap-devel [...]

Table 3.1. List of packages required to compile libpri, zaptel, and asterisk

Package nameInstallation commandNoteUsed by
GCC 3.x yum install -y gcc Required to compile zaptel, libpri, and asterisklibpri, zaptel, asterisk
ncurses-devel yum install -y ncurses-devel Required by menuselectmenuselect
libtermcap-devel yum install -y libtermcap-devel Required by asteriskasterisk
Kernel Development Headers yum install -y kernel-devel Required to compile zaptelzaptel
Kernel Development Headers (SMP) yum install -y kernel-smp-devel Required to compile zaptelzaptel
GCC C++ 3.x yum install -y gcc-c++ Required by asteriskasterisk
OpenSSL (optional) yum install -y openssl-devel Dependency of OSP, IAX2 encryption, res_crypto (RSA key support)asterisk
newt-devel (optional) yum install -y newt-devel Dependency of zttoolzaptel
zlib-devel (optional) yum install -y zlib-devel Dependency of DUNDiasterisk
unixODBC; unixODBC-devel (optional) yum install -y unixODBC-devel Dependency of func_odbc, cdr_odbc, res_config_odbc, res_odbc, ODBC_STORAGEasterisk
libtool (optional; recommended) yum install -y libtool Dependency of ODBC-related modulesasterisk
GNU make (version 3.80 or higher) [a] yum install -y make Required to compile zaptel and asteriskasterisk

[a] It is a common problem among new installs on some Linux distriebutons to see GNU make versions of 3.79 or lower. Note that Asterisk will no longer build correctly unless you have at least version 3.80 of GNU make.