Thursday, 21 February 2019

How to install Asterisk

Install Asterisk on Ubuntu 16.04 from Source


Open Terminal

1) Use following command to switch root
sudo su

[enter your password]

2) Install initial dependencies
apt-get install build-essential wget libssl-dev libncurses5-dev libnewt-dev libxml2-dev linux-headers-$(uname -r) libsqlite3-dev uuid-dev git subversion

Y [Enter]

3) Move to /usr/src/ dir
cd /usr/src

4) Download asterisk there

5) Unpack it
tar zxvf asterisk-13-current.tar.gz

6) Goto directory asterisk-13
cd asterisk-13.24.1

7) Compile pjproject:

git clone git:// pjproject

cd pjproject

./configure --prefix=/usr --enable-shared --disable-sound --disable-resample --disable-video --disable-opencore-amr CFLAGS='-O2 -DNDEBUG'

make dep


make install


ldconfig -p |grep pj

cd ..

Configure and compile the Asterisk code


contrib/scripts/install_prereq install

y [Enter]

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

On successful configuration the following output will show on terminal.



Goto Channel Drivers> chan_sip

if chan_sip is mark by * then Save & Exit if not mark it with * then Save & Exit.

If gcc is missing use following (a,b and c) command

a) sudo apt-get update

b) sudo apt-get install build-essential

y [Enter]

c) make && make install

make samples

make config

And for having the startup script installed and enabled to start asterisk on every boot, we run make config, followed by ldconfig:


Now start Asterisk
 /etc/init.d/asterisk start

Enter following command to asterisk console/Asterisk CLI

asterisk -vgrc

No comments:

Post a comment