Home » Blog » Asterisk/Vicidial » Install Asterisk 18 LTS on Debian 11 / Debian 10

Install Asterisk 18 LTS on Debian 11 / Debian 10

Install Asterisk 18 LTS on Debian 11 / 10: Hello! In this guide, we will walk you through the installation of Asterisk 18 LTS on Debian 11 (Bullseye) and Debian 10 (Buster) by building the software from source. The default version of the Asterisk package available in the OS upstream repositories might be a bit outdated, so building it from source ensures you get the latest version with all the features and updates.

  • Conference calling
  • Call Monitoring
  • Call Recording
  • Distributed Universal Number Discovery
  • SMS Messaging
  • Trunking
  • Transcoding
  • Voicemail
  • Caller ID on Call Waiting
  • Direct Inward System Access
  • Call Parking
  • Music on Hold
  • Music on Transfer
  • Caller ID Blocking
  • Database Store / Retrieve
  • Direct Inward System Access
  • Automated Attendant
  • Blacklists
  • Call Detail Records
  • Call Forward on Busy
  • Call Forward on No Answer
  • Call Forward Variable
  • Call Snooping
  • Among many other features

We will perform an installation of Asterisk 18 LTS on Debian 11 / Debian 10 by building the software from source. The default version of asterisk package available in the OS upstream repositories is a bit old as can be seen by running the commands below:

$ sudo apt update
$ apt policy asterisk
# Debian 11
asterisk:
  Installed: (none)
  Candidate: 1:16.16.1~dfsg-1+deb11u1
  Version table:
     1:16.16.1~dfsg-1+deb11u1 500
        500 http://security.debian.org/debian-security bullseye-security/main amd64 Packages
     1:16.16.1~dfsg-1 500
        500 http://deb.debian.org/debian bullseye/main amd64 Packages

# Debian 10
$ apt policy asterisk
asterisk:
  Installed: (none)
  Candidate: 1:16.2.1~dfsg-1+deb10u2
  Version table:
     1:16.2.1~dfsg-1+deb10u2 500
        500 http://deb.debian.org/debian buster/main amd64 Packages

As seen from the output, the version of Asterisk on Debian 10 is lower as compared to one in Debian 11.

Step 1: Update system packages

Ensure all packages are updated in the system before we can install Asterisk 18 LTS on Debian 11 / Debian 10.

sudo apt update
sudo apt full-upgrade -y

You can do a system power cycle after a successful upgrade if required.

This will update your package lists and upgrade your existing packages to their latest versions.

Step 3: Install Dependencies

Asterisk requires several libraries and tools to build successfully. Install them by running the following command:

sudo apt install -y wget build-essential libssl-dev libncurses5-dev libnewt-dev libxml2-dev libsqlite3-dev uuid-dev libjansson-dev automake libtool

Step 4: Download Asterisk

Navigate to the /usr/src directory where we’ll download the Asterisk source code:

cd /usr/src

Now, use wget to download the Asterisk 18 LTS source code:

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

Step 5: Extract and Compile Asterisk

Extract the downloaded Asterisk source code and move into the Asterisk directory:

sudo tar -zxvf asterisk-18-current.tar.gz
cd asterisk-18*/

Next, run the following commands to prepare and configure Asterisk:

sudo contrib/scripts/get_mp3_source.sh
sudo ./configure --with-jansson-bundled
sudo make menuselect

The make menuselect command will open a menu that allows you to select which Asterisk modules you want to install. Use the arrow keys to navigate, the spacebar to select/deselect modules, and then press ‘Save’ and ‘Exit’ to continue.

Step 6: Build and Install Asterisk

Build and install Asterisk by running the following commands:

sudo make
sudo make install
sudo make config

Step 7: Start Asterisk

You can start the Asterisk service with the following command:

sudo systemctl start asterisk

Step 8: Enable Asterisk at Boot

To ensure that Asterisk starts automatically on system boot, run:

sudo systemctl enable asterisk

Step 9: Verify Asterisk Installation

To verify that Asterisk is installed and running, open the Asterisk CLI by running:

sudo asterisk -rvv

If you see the Asterisk CLI prompt, it means Asterisk is installed and operational.

Step 10: Install Additional Modules (Optional)

Depending on your requirements, you might need to install additional Asterisk modules. You can do this using the menuselect tool:

cd /usr/src/asterisk-18*/
sudo make menuselect
sudo make
sudo make install

Step 11: Configure Asterisk

Now that Asterisk is installed, you can configure it by editing the appropriate configuration files located in /etc/asterisk/. You can use a text editor like nano or vim to make changes. Be sure to consult Asterisk documentation for your specific configuration needs.

Congratulations! You have successfully installed Asterisk 18 LTS on Debian 11 or Debian 10. You can now configure and use Asterisk for various telephony and VoIP applications as per your requirements. Enjoy the rich set of features Asterisk provides for your communication needs.

Scroll to Top