In this guide, we are looking at how to install Asterisk 18 LTS on Oracle Linux 8. Asterisk is a powerful opensource PBX system, providing a number of useful features to users, used by different kinds of organizations all over the world.

Features of Asterisk PBX

  • 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

How To Install Asterisk 18 LTS on Oracle Linux 8

Follow the below steps to install Asterisk 18 LTS on Oracle Linux 8

Update System packages

Ensure that your system packages are upto date before beginning installations. Run the below commands:

sudo dnf -y update

Disable SElinux

I am going to disable SElinux so as not to prevent any installations

$ sudo vi /etc/selinux/config
# Set the line ‘SELINUX = enforcing’ to ‘SELINUX = Disabled’
SELINUX = Disabled

After that reboot your server

sudo reboot

Install required Packages

There are a number of packages that Asterisk require to be install. Run the below commands to install them:

Install epel-repository on Oracle Linux 8 with the command:

sudo dnf -y install

Install other required packages as below:

sudo dnf -y install git wget vim  net-tools sqlite-devel psmisc ncurses-devel libtermcap-devel newt-devel libxml2-devel libtiff-devel gtk2-devel libtool libuuid-devel subversion kernel-devel kernel-devel-$(uname -r) crontabs cronie-anacron

Also install Development Tools group packages with the below command:

sudo dnf group -y install "Development Tools"

Install Jansson

Jansson is a C library for encoding, decoding and manipulating JSON data. Clone from Github and install as below:

cd /usr/src/ 
sudo git clone 
cd jansson 
sudo autoreconf  -i 
sudo ./configure --prefix=/usr/ 
sudo make
sudo make install

Install PJSIP

PJSIP is a free and open source multimedia communication library. It implements standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. Download the latest version from the official website using wget, extract and install as below:

cd usr/src
sudo wget
sudo tar xvf 2.10.tar.gz
cd pjproject-2.10
sudo ./configure CFLAGS="-DNDEBUG -DPJ_HAS_IPV6=1" --prefix=/usr --libdir=/usr/lib64 --enable-shared --disable-video --disable-sound --disable-opencore-amr
sudo make dep
sudo make
sudo make install 
sudo ldconfig

Install Libedit

Libedit is an alternative to the GNU readline command-line editing.

cd /usr/src
sudo wget
sudo tar xzvf libedit-20190324-3.1.tar.gz
cd libedit-20190324-3.1
sudo ./configure 
sudo make 
sudo make install

Install Asterisk 18 LTS on Oracle Linux 8

Visit Asterisk official website and download the latest version or use wget to get it directly to your terminal and extract

cd /usr/src
sudo wget
sudo tar xvf asterisk-18-current.tar.gz
cd asterisk-18.1.1

To enable mp3 music to play when on hold, run the following commands to install the required dependencies.

$ sudo dnf install svn
$ sudo ./contrib/scripts/
A    addons/mp3 
A    addons/mp3/MPGLIB_README 
A    addons/mp3/common.c 
A    addons/mp3/huffman.h 
A    addons/mp3/tabinit.c 
A    addons/mp3/Makefile 
A    addons/mp3/README 
A    addons/mp3/decode_i386.c 
A    addons/mp3/dct64_i386.c 
A    addons/mp3/MPGLIB_TODO 
A    addons/mp3/mpg123.h 
A    addons/mp3/layer3.c 
A    addons/mp3/mpglib.h 
A    addons/mp3/decode_ntom.c 
A    addons/mp3/interface.c 
Exported revision 202.

Then configure asterisk as below:

./configure --libdir=/usr/lib64

If successfully configured, it should output as below:

           .$7$7..          .7$$7:.     
         .$$:.                 ,$7.7    
       .$7.     7$$$$           .$$77   
    ..$$.       $$$$$            .$$$7  
   ..7$   .?.   $$$$$   .?.       7$$$. 
  $.$.   .$$$7. $$$$7 .7$$$.      .$$$. 
.777.   .$$$$$$77$$$77$$$$$7.      $$$, 
$$$~      .7$$$$$$$$$$$$$7.       .$$$. 
.$$7          .7$$$$$$$7:          ?$$$. 
$$$          ?7$$$$$$$$$$I        .$$$7  
$$$       .7$$$$$$$$$$$$$$$$      :$$$.  
$$$       $$$$$$7$$$$$$$$$$$$    .$$$.   
$$$        $$$   7$$$7  .$$$    .$$$.    
$$$$             $$$$7         .$$$.     
7$$$7            7$$$$        7$$$       
$$$$$                        $$$        
 $$$$7.                       $$  (TM)      
  $$$$$$$.           .7$$$$$$  $$       

Set Asterisk Menu options by running the below command:

sudo make menuselect

You should get a list of features to enable. Use arrow keys to navigate and ‘ENTER’ key to select On Add-ons select chan_ooh323 and format_mp3  as shown below:

On Core Sound Packages, select the formats of Audio packets like below

For Music on Hold,select the shown packages

On Extra Sound Packages select as shown below:

Under applications section, enable app-macro

Once done, click on ‘Save & Exit’ then run the below commands to finish up

$ sudo make
$ sudo make install
+---- Asterisk Installation Complete -------+ 
+                                           + 
+                                           + 
+ Asterisk has successfully been installed. + 
+ If you would like to install the sample   + 
+ configuration files (overwriting any      + 
+ existing config files), run:              + 
+                                           + 
+ For generic reference documentation:      + 
+    make samples                           + 
+                                           + 
+ For a sample basic PBX:                   + 
+    make basic-pbx                         + 
+                                           + 
+                                           + 
+-----------------  or ---------------------+ 
+                                           + 
+ You can go ahead and install the asterisk + 
+ program documentation now or later run:   + 
+                                           + 
+               make progdocs               + 
+                                           + 
+ **Note** This requires that you have      + 
+ doxygen installed on your local system    + 

$ sudo make samples

$ sudo make config

Now create a separate user to run Asterisk services and update ownership of directories

sudo groupadd asterisk 
sudo useradd -r -d /var/lib/asterisk -g asterisk asterisk 
sudo usermod -aG audio,dialout asterisk 
sudo chown -R asterisk.asterisk /etc/asterisk 
sudo chown -R asterisk.asterisk /var/{lib,log,spool}/asterisk
sudo chown -R asterisk.asterisk /usr/lib64/asterisk

Set Asterisk default user to asterisk:

$ sudo vim /etc/sysconfig/asterisk 

$ sudo vim /etc/asterisk/asterisk.conf 
runuser = asterisk ; The user to run as. 
rungroup = asterisk ; The group to run as.

Restart asterisk after making the above changes.

sudo systemctl restart asterisk

Confirm status

systemctl status asterisk

Output if running

Use the below command to test if you can connect to Asterisk CLI

sudo asterisk -rvvv

Successful connection gives the below output

That’s it. You have successfully installed Asterisk 18 LTS on Oracle Linux 8. I hope the guide has been helpful. Check more interesting guides below;

How to Install Asterisk 18 LTS on Centos 7


  1. Hello,
    I followed this tutorial but I can’t register my extensions on the softphones I’m using. Are there any tips you can give me on this issue?


Please enter your comment!
Please enter your name here