Asterisk 11 Installation on CentOS 6

Asterisk-11-Installation-centOS

Hey guys! I will show you quick steps to install Asterisk 11 on CentOS 6, Okay before we start, make sure you have installed CentOs6 in your machine and check if there are any updates you need to complete, if so, make sure you complete those.

For your easy understanding, I’ve summarized the steps below and will explain each in detail.

Asterisk 11 Installation Summary:

a. Update CentOS (If Any)

b. Disabling SELinux

c. Next Reboot

d. Basic Dependencies Installation

e. Downloading your Asterisk Source Code

f. Extraction of Downloaded Files

g. DAHDI Installation

h. LibPRI Installation

i. Change Asterisk Directory

j. Run Configure Script for Asterisk

k. Install Sample Files

l. Start DAHDI

m. Start Asterisk

Now let’s see each in detail:

(a) Update CentOS

As I said above, you need to update your CentOS 6 Server first and look for any possible unimplemented updates.

yum update –y

(b) Disabling SELinux

To disable SELinux you can use any text editor (VIM etc) to commit this change. You need to go to /etc/selinux/config and change SELINUX=enforcing to SELINUX=disabled

Or else you can do this by using the command line below

sed -is/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config

(c) Next Reboot

Once you have completed the above-mentioned change and the file is updated, you need to reboot the system using:

Reboot

(d) Basic Dependencies Installation

Asterisk 11.0.0 requires some prerequisite dependencies, so you can use the below command line to install them:

yum install -y make wgetopenssl-develncurses-devel newt-devel libxml2-devel kernel-develgccgcc-c++ sqlite-devel

(e) Download Your Asterisk Source Code

To download your asterisk source code move to directory /usr/src by using the below command:

cd /usr/src/

and then you can download the Source Code tar balls using these commands

Note: one by one or at a time

wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz

wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4-current.tar.gz

wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz

(f) Extract Downloaded Files

You can extract the downloaded tar balls to their corresponding directories using:

tarzxvfdahdi-linux-complete*

tarzxvflibpri*

tarzxvf asterisk*

(g) DAHDI Installation

Install DAHDI (Digium Asterisk Hardware Device Interface) using the command line:

cd /usr/src/dahdi-linux-complete*

make&& make install && make config

(h)LibPRI Installation

In order to enable your BRI, PRI, and QSIG based hardware, you will be needing PRI Library or LibPRI. You can install these libraries using:

cd /usr/src/libpri*

make&& make install

(i) Changing Asterisk Directory

Now you have to move back to the Asterisk Installation Directory:

cd /usr/src/asterisk*

(j) Running Configure Script for Asterisk

At this point, you need to know your CentOS 6 Architecture (32 or 64 Bit). Mostly you will be aware of it. In case you are not, you can try this command:

uname -a

For 32 Bit, you will be getting a response like:

2.6.18-238.12.1.el5 #1 SMP Sun Aug 01 14:17:06 IST 2015 i686 i686 i386 GNU/Linux

For 64 Bit, the system will respond with something like:

2.6.18-238.19.1.el5 #1 SMP Sun Aug 01 09:41:14 IST 2015 x86_64 x86_64x86_64 GNU/Linux

Based on your OS Architecture, go ahead with these commands for Asterisk Configuration Script.

For 32 Bit:

./configure && make menuselect&& make && make install

For 64 Bit:

./configure –libdir=/usr/lib64 && make menuselect&& make && make install

(k) Install Sample Files

These sample files are a great resource, especially for the newbies. You can Install Sample Files using:

make samples

Once you are done, add the Asterisk Install Script in directory /etc/init.d/ using:

makeconfig

(l) Starting DAHDI

To start DAHDI Device Drivers, use:

servicedahdi start

(m) Start Asterisk

Now, you can start Asterisk:

service asterisk start

(n) Connecting to the Asterisk Console

asterisk -rvvv

That’s it! you’re done.

Before you leave check: Asterisk installation and configuration in Linux Server to make Calls between two VOIP phone

For more updates follow us on Facebook, Twitter, LinkedIn

Subscribe to get free blog content to your Inbox