Installing Asterisk from source code on debian ubuntu 20.04/18.04

Installing asterisk From the Source Code :

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 Installing Asterisk from source code. 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.
We are installing Asterisk 13, But Select the latest version from the Asterisk Downloads page.

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

installing asterisk communication server on linux
Now asterisk is compiled, Go ahead and install the Asterisk server using following command

make install

asterisk-make-config-command-install-asterisk
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

Hi Guys, I am Venkatesh. I am a programmer and an Open Source enthusiast. I write about programming and technology on this blog.

You may also like...

1 Response

  1. […] Then try again running the Asterisk configure command. Most probably you will see beautiful Asterisk ASCII art. If you want to Install the Asterisk from the Source Please follow the below article. Installing Asterisk Open Source Communication Engine from Source Code. […]

Leave a Reply