Asterisk – VOIP Server Installation on Linux – centOS

March 14, 2009 / vps hosting

Asterisk – VOIP Server Installation on Linux – centOS

Prior to installation, you need to make sure all packages up-to-date. Run yum-y update. In case, any Kernel files were updated, the server will require reboot of the server. Now, you will need to download pre-requisites or essentials of Asterisk :

gcc
kernel-devel
bison
openssl-devel
doxygen #

In case you have a Dual Core Processor Server, Kernel-smp-devel is required through

apt-get update
apt-get install gcc kernel-devel bison openssl-devel

Or through yum

yum -y update
yum install gcc kernel-devel bison openssl-devel

Donwnload the latest version through asterisk website to /usr/src

In case you are using PRI cards, you need to the following :

wget http://ftp.digium.com/pub/libpri/releases/libpri-<version>.tar.gz

Untar the files :

tar -zxf zaptel-<version>.tar.gz
tar -zxf asterisk-<version>.tar.gz
tar -zxf libpri-<version>.tar.gz

Installation of Zaptel :

cd /usr/src/zaptel

make clean
make
make install

Restart Zaptel Service

Installation of LIBRI :

In case you are using E1 Cards, install LIBRI :

cd /usr/src/libpri

make clean
make
make install

Asterisk Installation :

cd /usr/src/asterisk

make mpg123 #
make clean
make
make install

If kernel is used, edit spinlock.h or Zaptel will not compile :

vi /usr/src/kernels/2.6.9-34.EL-x86_64/include/linux/spinlock.h

In Text Editor : define DEFINE_RWLOCK(x) rw_lock_t x = RW_LOCK_UNLOCKED
and change to define DEFINE_RWLOCK(x) rwlock_t x = RW_LOCK_UNLOCKED