Asterisk is a free and Open Source framework for building communications applications. Asterisk turns an ordinary computer into a VoIP communications server. Asterisk powers IP PBX systems, VoIP gateways, conference servers and is used by small businesses, large businesses, call centers, carriers, and governments worldwide. Today we will install Asterisk on Debian. All required packages will be installed via apt, but Asterisk will be installed from source. Let’s see how to install Asterisk on Debian
There are many versions of Asterisk available on their website, but the latest is 13 with LTS (Long Term Support). So we will download it from source and install in this tutorial.
First of all we will install the build environment:
apt-get install build-essential
This command will install the basic packages that are needed on a new server to install Asterisk 13.
Now we will install some more dependencies which are directly dependent on Asterisk 13:
apt-get install openssl libxml2-dev libncurses5-dev uuid-dev sqlite3 libsqlite3-dev pkg-config libjansson-dev
This command will install the libraries which Asterisk will be needing to work and for CDR’s there are many options available. At the moment, we will install SQLite also as we haven’t decided yet that we will use Mysql or SQLite.
Now we will download asterisk from their website by the following command:
Now we have successfully downloaded Asterisk 13 on our server.
To install it from the source which we have downloaded we have to extract it. Use the following command to extract:
tar xvf asterisk-13-current.tar.gz
Now enter the folder to install Asterisk:
To compile from a source we have to use the following command which will check all that are all dependencies installed before installing the software:
The above image shows that there are some libraries missing now we will resolve these dependencies one by one:
tar xvf jansson-2.5.tar.gz
Now we have downloaded the missing library and we will compile it from source in order to resolve the issue:
As all of its dependencies are met so we will now execute the following command to install Libjasson:
make && make install && ldconfig Now we will go to Asterisk's folder and execute the ./configure command again to check if any other dependency is left:
This shows that now we are ready to install Asterisk as all of its dependencies are met. Now execute the following set of commands and wait for a little while as it will take some time to execute:
make install & make samples
Asterisk is now installed and ready to use. You can login to asterisks console by the following command:
So we have successfully installed Asterisk on our Debian Server and you can start working on Asterisk.