The Asterisk PBX is arguably the future of telephony. It comes with a variety of features and is compatible with most of the telephony hardware. Asterisk works only on linux. This tutorial explores the procedure of installing asterisk in linux. Before you begin the process of installation, run the following commands to get your system ready:
apt update -y
apt install wget -y
If you are using RHEL, Centos or any other fedora based linux, the above commands will begin with ‘yum’ and not ‘apt’. Once wget is installed you can use it to download the asterisk tar archaive from asterisk.org. e.g
depending on the version whose link you pick, your version may differ but the installation follows the same process for now. Type ‘ls’ on the downloaded directory to check that asterisk has been downloaded. You now need to untar the .tar.gz archive with the command.
tar xvzf nameofyourasteriskarchive.tar.gz
Some magical text will display on your terminal during the untarring process. It’s the directories of the untarred asterisk. ‘ls’ the asterisk directory again. to see the untarred folder of asterisk. The one i’m using in this tutorial is ‘asterisk-16.4.0’. Change directory to your asterisk folder eg
Once in the asterisk folder, the first thing you need to do is install prerequisite libraries and components. Luckily, asterisk comes with a script to automatically do that. The script is in the contrib/scripts/install_prereq. The below command will work fine for most installations.
Once prerequisites are installed you can proceed to build asterisk using the ‘./configure’ command. Before running the ./configure command in the asterisk directory. ensure you have installed linux build tools.
After the building is complete you will see a success message.
Run ‘make menuselect’ after this to select the modules you want installed in your asterisk.
Using the tab key, navigate the window that pops up and make selections of your desire then save and exit to proceed. The next command you should type is:
After asterisk is done installing you will see something similar to the below image.
To make your asterisk accessible by systemctl run
To have sample configuration files installed alongside your astyerisk, run
To have configuration of a basic sample pbx installed instead of the sample files run
If everything went well asterisk console can be accessed by running
to signify asterisk to open with a verbose level of 3. Configuration files for asterisk are stored in /etc/asterisk. ls and explore them to fine-tune your box into what you desire.