Asterisk is an open source framework for building communications applications. Asterisk turns an ordinary computer into a communications server. Asterisk powers IP PBX systems, VoIP gateways, conference servers and other custom solutions. It is used by small businesses, large businesses, call centers, carriers and government agencies, worldwide. Asterisk is free and open source.

The tutorial was prepared with our "CentOS 7" template and is meant to work on our self-managed virtual private servers.

0. Preliminary requirements:
"CentOS 7" template installed on server;
Fully updates server software (yum update).

1. Installing dependencies

yum install epel-release dmidecode gcc-c++ ncurses-devel libxml2-devel openssl-devel newt-devel kernel-devel sqlite-devel libuuid-devel gtk2-devel jansson-devel binutils-devel -y

2. Installing PJPROJECT

First of all we create a directory in which we perform all the actions:

mkdir ~/install

cd ~/install

Then we have to download PJROJECT and extract it:

wget http://www.pjsip.org/release/2.5.5/pjproject-2.5.5.tar.bz2

tar -jxvf pjproject-2.5.5.tar.bz2

cd pjproject-2.5.5

Now we prepare program for compilation:

./configure --prefix=/usr --libdir=/usr/lib64 --enable-shared --disable-video --disable-sound --disable-opencore-amr

And also make sure that all dependencies are in place:

make dep

make

Finally we install the packages:

make install

ldconfig

3. Installing Asterisk

Let's go back to our "install" directory:

cd ~/install

Now we have to download Asterisk files and extract them:

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

tar -zxvf asterisk-13-current.tar.gz

cd asterisk-13.10.0/

"13.10.0" can change depending on current Asterisk version.

If you will want to use MP3 files for music on hold calls we have to install some dependencies:

yum install svn -y

contrib/scripts/get_mp3_source.sh

Now we get back to configuring Asterisk:

./configure --libdir=/usr/lib64

make menuselect

After this command you should get menu on screen that allows you to configure the features you want to build. In this menu we have to select:

"Add-ons" -> "format_mp3"

And also "Extra Sound Packages" -> "EXTRA-SOUNDS-EN-WAV"

We save and exit with button "F12".

In the end we compile and install Asterisk with sample configuration:

make

make install

make samples

make config

4. Checking the installation

We start Asterisk with:

service asterisk start

And to connect to Asterisk we use:

asterisk -rvv

For more information about Asterisk and its configuration visit: https://wiki.asterisk.org/wiki/display/AST/Basic+PBX+Functionality

Was dit antwoord nuttig? 125 gebruikers vonden dit artikel nuttig (500 Stemmen)