How to install Asterisk 18 on Debian 10
Asterisk is an open-source PBX software. It is used to manage SIP sessions between endpoints. Asterisk is a very powerful server that can be used to implement PBX, IVRs, VoIP gateways and many more features. It supports many VoIP protocols such as SIP(Session Initiation Protocol) and MGCP(Media Gateway Control Protocol. It also supports many hardware devices such as analogue cards, PRI cards, etc.
Today we will be installing Asterisk 18.0.0 on Debian 10, which is the latest Asterisk release at the time of writing. Before we jump to the installation let us look at the major changes which the new release has brought with it.
Major Changes From Asterisk 17 to 18
Codec H.265/HEVC is now an officially supported video codec. It can be used by specifying “h265” in the allow line.
Logger A new formatter “plain” has been added. It will always print file, function and line number and never prints the color controlled characters. It can be used in logger.conf
STIR/SHAKEN The support for STIR/SHAKEN(Secure Telephony Identity Revisited / Signature-based Handling of Asserted information using toKENs) has been added which is used to combat telephony fraud. It is a certificate-based technology and it uses public and private keys to identify the source. The configuration for it is done in the stir_shaken.conf. You can find the sample config file here.
You can find all the changes here.
We will be installing the Asterisk 18.0.0 which is the second release at the time. It includes all the latest bug fixes and features which have been added in the past year. For this tutorial, we will be using Debian 10 as the host operating system. Here is a brief overview of the steps we will be following in the tutorial.
- Pre-requisite operations
- Downloading the source
- Configuring the Install
Step 1: Pre-Requisites
First, let us make sure that our packages and OS are up to date.
Now we will install the packages to fulfill the dependencies of Asterisk 18.
Step 2: Downloading the Source
Let’s download the latest Asterisk 18 source on our Debian 10 OS from the official website. It is possible that newer version might have been released when you are installing so you can visit this link and download the latest release.
Untar the tarball you just downloaded
Switch to the extracted directory, here the version is 18.0.0-rc2, your might be different
Step 3: Configuring
Since we have already satisfied the dependencies required by Asterisk 18 on Debian 10, we will now run the configuration script using the following command
This configure script will check our system for the dependencies of the different modules of the asterisk. We used the –with-jansson parameter so as to install Jansson library which is required for asterisk to work. It comes bundled with the asterisk source and saves us the hassle to compile it from the source.
We will now select the modules and packages that we want to compile with our base Asterisk installation. Use the following command to open the asterisk configuration menu.
You can enable/disable the modules that you wish to compile alongside the core of asterisk from this menu.
Step 4: Compiling
Now we will compile and install Asterisk 18 with the modules that we have selected. This process will take some time depending on your computer resources.
Now that the asterisk is compiled and ready to be used, if required you can run the following command to generate the sample config files for asterisk. It is optional.
The config files which the above command will generate can be found in /etc/asterisk directory
We are also required to install asterisk init script
Now we will start the asterisk service and enable it so that it will run with every system reboot
To connect to the Asterisk CLI we will use the following command. Adding -vvv at the end will change the verbosity of the core logs to 3.
Now that asterisk is properly installed and running you can now start working on the config files to build your application. If you have generated the sample files you will see something as shown below in the /etc/asterisk directory
If you have not generated the sample config, then you can start building up your config files under the same directory.
Thanks for reading, if you face any issue during the installation you can use the comments section below and consider subscribing to our newsletter
4 Replies to “How to install Asterisk 18 on Debian 10”
Nice tutorial, is working like a charm. There is an typo at Step 1: apt upgrade 🙂
Glad it helped. And Thanks for the correction.
Thanks for the tutorial
I have a problem with version 17 and 18, at the end when I do the netstat -anup command, I have Asterisk listenning on the ports 4569 4520 58152 5000 and 2727 but not on the port 5060
Thank you for your help.
hola gracias excelente todo fue a la primera, gracias lo instalé en debian 10 buster de Digital Ocean