Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

3. Install Asterisk

synox edited this page Jan 29, 2016 · 1 revision

Compile and install asterisk

Upgrade linux: sudo apt-get update && sudo apt-get upgrade -y && sudo reboot

Note: It is not adviced to install asterisk using the debian package manager, as there are often old versions. Asterisk 13.6 or newer is required.

Download asterisk:

mkdir -p ~/src/asterisk
cd ~/src/asterisk
wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-13.6.0.tar.gz
tar -xvzf asterisk-13.6.0.tar.gz
cd ~/src/asterisk/asterisk-13.6*

Install dependencies:

sudo apt-get install build-essential libjansson-dev dahdi-linux libncurses5-dev libssl-dev libxml2-dev libsqlite3-dev sqlite3   uuid-dev vim-nox libnewt-dev python-dev

Compile Asterisk:

./configure
make

You may add more modules with menuselect:

make menuselect

Install asterisk with sample configs:

sudo make install
sudo make config
sudo make samples

Create a user:

sudo adduser --disabled-password --gecos "" asterisk sudo chown -R asterisk:asterisk /etc/asterisk/

Load the audio drivers:

sudo modprobe snd_pcm_oss

Append to the file /etc/modules the line:

snd_pcm_oss

Smoke Test

You can now test asterisk with:

sudo service asterisk stop
sudo /usr/sbin/asterisk -cvvv

Asterisk configuration

Install the telewall asterisk configuration:

sudo mv /etc/asterisk /tmp/asterisk-default
sudo ln -s /telewall/etc/asterisk /etc/asterisk

Create the databases:

sudo touch /var/log/asterisk/master.db
sudo sqlite3 /var/log/asterisk/master.db < /telewall/db-schema-asterisk.sql

Start asterisk manually to check for errors and then as a service:

sudo /usr/sbin/asterisk -cvvv
sudo service asterisk start