Skip to main content

Installing Asterisk on Rocky Linux

Updated over 3 weeks ago

Asterisk is an open source framework for building communications applications. It turns an ordinary computer into a communications server. Asterisk powers IP PBX systems, VoIP gateways, conference servers, and other custom solutions. Small businesses, large companies, call centers, carriers, and government agencies worldwide use it. Asterisk is free and open source.

Preliminary requirements:

Rocky Linux" template installed on the server.

1. Updating the server software:

sudo dnf -y update

2. Installing the wget service:

sudo dnf install wget

3. Set the hostname to the domain you will be using for Asterisk:

sudo hostnamectl set-hostname asterisk.my-domain.com

4. Adding required repositories:

Installing the EPEL (Extra Packages for Enterprise Linux):

sudo dnf -y install epel-release

Enabling Rocky Linux PowerTools:

sudo dnf config-manager --set-enabled crb

5. Install development tools:

sudo dnf group -y install "Development Tools"
sudo dnf -y install git wget

6. Installing Asterisk:

Downloading and configuring Asterisk:

wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20-current.tar.gz tar xvfz asterisk-20-current.tar.gz
cd asterisk-20.15.1/

Run sudo -s to be sure we are root permitted.

Installing install_prereq as below:

contrib/scripts/install_prereq install

You should see the message:

All required packages are installed, and we are going to configure and build Asterisk:

./configure --libdir=/usr/lib64 --with-jansson-bundled=yes

If everything goes correctly, you will get a huge Aterix logo as a result:

7. Set Asterisk menu options

Some menu options that exist by default may not be needed, and you can manage them by running the command below:

make menuselect

As a result, you will get a menu, where can make required changes:

In the end, we compile and install Asterisk with a sample configuration:

make
make install
make progdocs
make samples
make config

8. Checking the installation

We start Asterisk with:

We start Asterisk with:

To connect to Asterisk, we use:

asterisk -rvv 

For more information about Asterisk and its configuration, visit:

Did this answer your question?