Tag Archives: asterisk

How to install Asterisk on CentOS

In this installment of our How To, we are going to go over on the topic of how to install Asterisk on CentOS. For this we are going to use Asterisk 13 and CentOS 7 minimal version. But, instructions will mostly be similar to other versions of Asterisk and CentOS.

As a first step you need to download latest asterisk on to your machine. For this you need wget tool. As we are using minimal flavor of CentOS even wget tool is not available on fresh install. Run the following command to install wget.

yum install wget

Once, wget is installed successfully, run the following command to download asterisk.

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

Extract downloaded asterisk tar ball

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

Install the following dependencies

yum install gcc
yum install gcc-c++
yum install ncurses-devel
yum install uuid-devel libuuid-devel
yum install jansson-devel
yum install libxml2-devel
yum install sqlite-devel

Once, all the above dependencies are installed. You can now run the following command to enable or disable modules of your choice.

make menuselect

After you are done with the menuselect screen, run the following command to compile and install asterisk

make
make install
make samples

That’s it now you have asterisk installed successfully on your you machine. Run, the following command to start asterisk

asterisk -vvvvgc

Now, you should see asterisk console saying “Asterisk Ready”. Instead, if you encounter the following error

/usr/bin/asterisk: error while loading shared libraries: libasteriskssl.so.1: cannot open shared object file: no such file or directory.

Don’t worry, just run the following command and start asterisk again after that.

ldconfig

 

How to install Asterisk 13 on Debian 8

In this post we are going to go over on how to install Asterisk 13 on Debian 8 from source. It’s pretty straight forward. Most of the commands shown below needs to be executed with root privileges. So, it’s better to login on console with root user account

First download latest Asterisk 13 version from Asterisk’s web site.

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

Extract downloaded tar ball

tar -zxvf asterisk-13-current.tar.gz
cd asteirks-13.6.0

gcc comes installed on Debian 8. You need to install remaining dependencies using following commands

apt-get install g++
apt-get install libncurses-dev
apt-get install uuid-dev
apt-get install libjansson-dev
apt-get install libxml2-dev
apt-get install libsqlite3-dev

Once all the dependencies are installed. Run the following command

./configure

This is exit successfully without any errors. If there are any error like missing packages, you need to install them via apt-get. Before you compile Asterisk you have opportunity to enable or disable modules that you like by running following command

make menuselect

That command will bring up a console application as shown below, where you can navigate around using arrow keys of your keyboard and choose to enable or disable modules of your choice.

make-menuselect

Some of the modules in there depend on external packages. You need to install those dependencies in order enable those particular modules.

Now it’s time for compiling asterisk. Run the following command on console.

make

Once the above command runs with out error, you need to run the following command to install asterisk in system directories.

make install
make samples

That’s it now you have asterisk installed on your machine. The following command should bring up asterisk console as shown below

asterisk -vvvvvvgc

asterisk-ready

Like it says Asterisk is now ready!