Asterisk configuration on Centos 5

This is a tutorial on how to install and configure a Asterisk 1.4 installation on a Centos system like the ClearOS firewall.

Firs thing to do is install the dependencies to the server you will need to install the following packages.

yum -y install gcc gcc-c++ kernel-devel bison openssl-devel libtermcap-devel ncurses-devel doxygen curl-devel newt-devel mlocate lynx tar wget nmap bzip2 mod_ssl crontabs vixie-cron speex speex-devel unixODBC unixODBC-devel libtool-ltdl libtool-ltdl-devel mysql-connector-odbc mysql mysql-devel mysql-server php-mysql php-mbstring php-mcrypt flex screen libxml2 libxml2-devel libtiff libtiff-devel gmime gmime-devel net-snmp-utils net-snmp-devel neon libxml2 openssl openssl-devel gnutls-devel gnutls-utils

Then its time to download the source packages from Digiums home page.

first thing to do is to make a directory to store all Asterisk related program under.
# mkdir /usr/src/asterisk/
# cd /usr/src/asterisk
# wget
# tar -zxf asterisk-1.4-current.tar.gz

Now its time to configure and install Asterisk 1.4

# cd /usr/src/asterisk/asterisk-1.4
# make clean
# ./configure
# make menuselect   (now you can select the applications you want to have and the sounds you need.)
# make
# make install

Install sample files in /etc/asterisk, install docs/manpages and set to start on boot.

# make samples
# make progdocs
# make config
# chkconfig asterisk on

Check Asterisk starts properly:

# asterisk -vvvvvvvvvvvvvvvvvvvc

CLI> stop now

Assuming it does start properly, you probably want to start it in the background:

# service asterisk start

Now its time to configure the asterisk server to your needs I’m going to add my configurations files to this blog post but any passwords will be removed for safety reasons.