How to install Asterisk on Ubuntu 20.04?

Overview

Asterisk is a free and open-source communication platform that allows developers to create their own telephony applications. Originally developed by Mark Spencer in 1999, Asterisk has grown to become one of the most popular PBX (Private Branch Exchange) systems in the world.

Asterisk can be used to build a wide range of communication applications, such as VoIP (Voice over IP) gateways, IVR (Interactive Voice Response) systems, conference bridges, and call centers. It provides a powerful set of features, including call recording, call forwarding, caller ID, voicemail, and many more.

This tutorial demonstrates how to set up Asterisk on Ubuntu 20.04.

Prerequisites

There are certain prerequisites that need to be met before you begin.

  • Ubuntu 20.04-equipped system

  • A sudo-privileged user account

  • Internet connection

  • Knowledge of CLI

Get Started

Step 1: Update the package index and upgrade the system:

sudo apt update
sudo apt upgrade

When prompted to continue, enter 'y'.

Step 2: Install dependencies required by Asterisk:

sudo apt install build-essential wget curl libncurses5-dev libssl-dev libxml2-dev uuid-dev sqlite3 libsqlite3-dev pkg-config libjansson-dev

When prompted to continue, enter 'y'.

Step 3: Download the latest version of Asterisk:

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

Step 4: Extract the Archive

tar -zxvf asterisk-18-current.tar.gz

Step 5: Change to the Asterisk source directory:

cd asterisk-18.*

Step 6: Run the following command to configure Asterisk:

./configure

Step 7: If there are any missing dependencies, Asterisk will let you know. Install the missing dependencies and then run ./configure again.

Since the 'libedit' development package is not configured, we'll first install it on our system.

sudo apt-get install libedit-dev

When prompted to continue, enter 'y'.

Once all the dependencies are configured. Run the following command once again.

./configure

Asterisk has successfully been configured.

Step 8: Build and install Asterisk:

make
sudo make install

Conclusion

This tutorial demonstrated how to set up Asterisk on a system running Ubuntu 20.04. Before you begin building and installing Asterisk, make sure you have all the necessary tools accessible.

Last updated