Installing Asterisk from source code on debian ubuntu 12.04/14.04

Spread the love
Few days back, I have written one tutorial for Connecting two asterisk servers using SIP protocol. Today In this tutorial I want to write about Installation process of Asterisk 13. We can Install asterisk from source code or through packages. Here I am installing Asterisk 13 from source code on Debian Ubuntu 14.04. But but could be easily adapted for any Linux distro.

Frist of all, Install the Dependencies:

Here is the list of dependencies for Asterisk 13.

build-essential
ncurses-dev
libxml2-dev
libsqlite3-dev
libssl-dev (required in order to install Asterisk with chan_sip available)
uuid-dev
libjansson-dev

Install above dependencies with the following command

sudo apt-get install build-essential ncurses-dev libxml2-dev libsqlite3-dev libssl-dev uuid-dev libjansson-dev

Download & Install the Asterisk 13:

Download the latest stable version of Asterisk using wget.

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

Then Extract the Downloaded file.

tar -zxvf asterisk-13*

After extracting the Asterisk, Go to extracted asterisk folder, This is the root folder for our asterisk server, Then Run the below command to configure the asterisk.

./configure

If  everything went well you will see one ASCII Art of Asterisk symbol like this.

If you want to enable extra resources then run the below command.

make menuselect

Now compile the asterisk server using following command.

make

Now asterisk is compiled, Go ahead and install the Asterisk server using following command

make install

If you want to create sample asterisk configuration files run the below command, It will create all asterisk sample configuration files.

make samples

To run the asterisk on startup, and to generate init script run the following command

make config

Now asterisk is Installed on your system
You can control the asterisk using init script or using service command like below

Start :
service asterisk start   (or)
/etc/init.d/asterisk start

restart :
service asterisk restart  (or)
/etc/init.d/asterisk restart

stop :
service asterisk stop (or)
/etc/init.d/asterisk stop

Now restart the Asterisk server

/etc/init.d/asterisk restart

Check if the Asterisk is running or not using the following command.

ps -ef | grep asterisk

Connect to Asterisk Command line Interface (CLI) using following command

asterisk -cvvvdddr

Congratulations! you are successfully Installed Asterisk Communication Engine on your linux box. Go ahead and change necessary configuration files and try to make a test call between two endpoints.

Venkatesh Macha

Hi Guys, I am Venkatesh Macha. I am a programmer and an Open Source enthusiast, Presently working as a Software Engineer. Apart from that, I love to explore new technologies and things.

You may also like...

Leave a Reply