Linux Tactic

Maximizing Communication Efficiency with Asterisk on CentOS 7

Asterisk is a free, open-source communication platform that provides a range of features such as voicemail, call queuing, and interactive voice response. It is widely used by businesses and individuals who require a reliable and flexible communication platform.

In this article, we will explore how to install Asterisk on CentOS 7 and its key features. Whether you are new to Asterisk or have some experience, this article has something for everyone.

Installing Asterisk on CentOS 7

Before we begin, it is essential to understand that CentOS 7 comes with SELinux enabled by default. SELinux is a security module that can block certain actions by default.

We will disable SELinux to ensure we have all the necessary permissions to install and run Asterisk. The first step involves disabling SELinux by running the following commands:

$ sudo setenforce 0

$ sudo sed -i ‘s/^SELINUX=enforcing$/SELINUX=disabled/’ /etc/selinux/config

Next, we will download and extract Asterisk source code to the /usr/src directory using the following commands:

$ sudo yum install -y wget

$ sudo wget

$ sudo tar -zxvf asterisk-version.tar.gz -C /usr/src/

The next step is to install Asterisk dependencies.

Asterisk requires certain packages to function correctly, such as MP3 sources, which can be installed by running the install_prereq script:

$ cd /usr/src/asterisk-version/contrib/scripts/

$ sudo ./install_prereq install

Once the dependencies are installed, we can compile and install Asterisk. The following commands will help you navigate to the Asterisk source code directory, configure it, and install Asterisk:

$ cd /usr/src/asterisk-version

$ sudo ./configure

$ sudo make menuselect

$ sudo make install

$ sudo make config

$ sudo systemctl enable asterisk

$ sudo systemctl start asterisk

Creating Asterisk User

After the installation is complete, we need to create an Asterisk user with specific permissions to run Asterisk. The following commands will help you add a new Asterisk user, specify the AST_USER and AST_GROUP values, set ownership and permission, and start the Asterisk service:

$ sudo adduser asterisk -m -c “Asterisk User”

$ sudo usermod -aG asterisk apache

$ sudo chown -R asterisk.asterisk /var/{lib,log,run,spool}/asterisk

$ sudo chmod -R 750 /var/{lib,log,run,spool}/asterisk

$ sudo systemctl start asterisk

Configuring Firewall Rules

Finally, we need to configure firewall rules to allow communication traffic through the firewall. The following commands help you create a new asterisk.xml file, add the necessary firewall rules, and restart the firewalld service:

$ sudo vi /etc/firewalld/services/asterisk.xml

$ sudo firewall-cmd –permanent –add-service=asterisk

$ sudo firewall-cmd –reload

Asterisk Features

Now that we have installed Asterisk, let us take a look at some of its key features.

Voicemail and Call Handling

One of the significant features of Asterisk is its voicemail and call handling capabilities. You can set up voicemail boxes for each user, personalize voicemail greetings, and manage voicemail messages.

With Asterisk, you can also use music on hold to play music or messages to clients while they are on hold, reducing hang-ups.

Call Queuing

Another useful feature of Asterisk is call queuing. If all your lines are busy, Asterisk can queue calls, and callers will be notified of their position in the queue.

Asterisk can also provide estimated wait times, play music to callers on hold, and even offer the option to leave a voicemail.

Conference Calling

With Asterisk, you can also set up conference calls with multiple participants. Conference calls can be scheduled in advance or created on the fly.

You can set up password-protected conferences to ensure only authorized participants join.

Call Recording

Asterisk allows you to record calls conveniently. It can be a helpful tool for training purposes or resolving disputes.

You can choose to record all calls by default or selectively specify when to record calls.

Interactive Voice Response

Interactive Voice Response (IVR) is a feature that enables callers to interact with an automated system using voice commands or touch-tone inputs. IVR allows you to create custom menus, direct callers to the appropriate destination, and even provide automated responses to common queries.


In conclusion, Asterisk provides a wide range of features that make communication easier and more efficient. We have discussed how to install Asterisk on CentOS 7 and its key features such as voicemail and call handling, call queuing, conference calling, call recording, and IVR.

With Asterisk, you can create a powerful and flexible communication platform tailored to your needs. Whether you are a small business or a large enterprise, Asterisk has something for everyone.In the previous section, we explored how to install Asterisk on CentOS 7 and its key features.

In this section, we will look at the importance of checking the Asterisk documentation and how it can help you configure and use Asterisk effectively. The Asterisk documentation provides useful information on how to configure and use various Asterisk features and tools.

Checking Asterisk Documentation

The Asterisk documentation is a valuable resource for anyone looking to set up and use Asterisk. The documentation contains step-by-step guides, configuration files, sample code, and examples that can help you navigate Asterisk’s features and tools.

When configuring and using Asterisk, it is essential to check the documentation to ensure you are using it correctly. The documentation provides information on how to use Asterisk’s various features, such as call handling, IVR, and call recording.

The documentation also provides information on various Asterisk tools that can help you troubleshoot and debug issues. For example, Asterisk’s CLI (Command Line Interface) can be used to monitor active calls, check system status, and execute commands.

Moreover, the manuals available in the documentation includes the Asterisk Administrator’s Guide, the Asterisk Gateway Interface (AGI) documentation, the Asterisk Dialplan Fundamentals guide, and the Asterisk Management Interface documentation. These guides not only teach you how to configure Asterisk but they also deepen your understanding of the underlying structure of the system.

Configuring and Using Asterisk

After installing Asterisk and checking the Asterisk documentation, you can begin configuring and using Asterisk’s features and tools. The following are some of the things you can do with Asterisk.

Set up VoIP

Asterisk is a popular choice for setting up VoIP (Voice over Internet Protocol) solutions. Setting up VoIP can be straightforward with Asterisk, thanks to its comprehensive SIP implementation.

SIP (Session Initiation Protocol) is a protocol used for initiating, maintaining, and terminating real-time communication sessions, such as voice and video calls, over the internet. With Asterisk, you can set up a fully-functional VoIP system with features such as call routing, caller ID, voicemail, call conferencing, and call recording.

Create an IVR

Interactive Voice Response (IVR) is a feature that allows callers to interact with an automated system using voice commands or touch-tone inputs. With Asterisk, you can create custom IVR menus that guide callers through various options, such as pressing a button to speak to a customer service representative or entering a numeric value to retrieve account information.

IVR can be a powerful tool for businesses looking to improve customer satisfaction by providing an automated and user-friendly way for callers to get the help they need. Configure

Call Queuing

Asterisk’s call queuing feature can help businesses handle high call volumes by queueing calls automatically and notifying callers of their position in the queue.

You can set up call queuing for various departments or teams and even provide estimated wait times. Callers can listen to music on hold or even choose to leave a voicemail message while waiting in the queue


Call Recording

Call recording is a crucial feature for businesses that need to record conversations for compliance, training, or dispute resolution purposes.

With Asterisk, you can quickly set up call recording for a specific extension, phone number, or call group. You can also configure Asterisk to store call recordings locally or on an external server.


In conclusion, checking the Asterisk documentation is essential for configuring and using Asterisk effectively. The documentation provides valuable information on Asterisk features and tools, such as IVR, call queuing, and call recording.

Asterisk is a versatile communication platform popular with businesses of all sizes. With Asterisk, you can set up a VoIP system, create an IVR, configure call queuing, and record calls.

Configuring and using Asterisk is easy, thanks to its user-friendly interface and the comprehensive documentation available. By checking the Asterisk documentation and following the guidelines provided, you can configure and use Asterisk to its full potential and improve your communication experience.

In this article, we explored how to install and configure Asterisk on CentOS 7 and its key features, including voicemail, call queuing, conference calling, call recording, and IVR. We also discussed the importance of checking the Asterisk documentation to configure and utilize its functionalities properly.

With Asterisk, businesses of all sizes can have access to a versatile and flexible communication platform that can be tailored to their specific needs. The takeaway from this article is that Asterisk is a reliable and open-source communication platform that can help businesses improve their communication experience and better serve their customers.

Popular Posts