How To Install FreePBX on CentOS

PBX (stands for private branch exchange) is a private telephone network used that can be very easily connected to the public landline and mobile networks. The PBX network also provides audio, video and instant messaging communication through the TCP/IP protocol stack for its internal network and interconnects its internal network with the Public Switched Telephone Network (PSTN) for telephony communication.

A lot of successful businesses are aiming to have their own telephony system that will allow them to have many different features, lower their costs using VoIP, especially on international calls, but inside that company as well. Some of them are choosing hosted solution, some are having their own In-House solution. In this tutorial we are installing FreePBX & Asterisk VoIP on a base CentOS 6.4 installation.

Asterisk is an open source software implementation of a telephone private branch exchange (PBX); it was created in 1999. Like any PBX, it allows attached telephones to make calls to one another, and to connect to other telephone services, such as the public switched telephone network (PSTN) and Voice over Internet Protocol (VoIP) services. Its name comes from the asterisk symbol, *. Asterisk includes many features like Voice mail, conference calling, Interactive voice response, automatic call distribution, Fax to email services etc.

In order to control Asterisk, we will use FreePBX. It is open source graphical user interface that makes asterisk management very easy. It is usually included in the asterisk distribution, but it can be installed manually if needed. FreePBX distribution is unified server distribution that includes all of the software packages and dependencies required for Asterisk VoIP server, such as:

Apache Web Server

Cyrus SASL (Simple Authentication Security Layer)

Dnsmasq

Fail2ban

iptables

Mailx

MySQL Server

Network Time Protocol

OpenVPN Server

Postfix MTA

Prosody XMPP Server

TFTP Server

Very Secure FTP Daemon (vsftpd)

Vim text editor

Before we start with the installation, we must make sure that the server has decent and stable internet connection and it should be in a geographical location near the place where the majority of our calls will come from. We also need to determine the size of our server. That will depends mostly on the number of the concurrent calls that we anticipate to have. It is not that bad even if we choose wrong, since we can resize our server at any time later, but some best practices showed that we should follow this calculations.

Server with 512 MB RAM can support approximately 5-15 concurrent calls

Server with 1 GB can support approximately 15-25 concurrent calls

Server with 2 GB can support approximately 25-50 concurrent calls

Server with 4 GB can support approximately 50-100 concurrent calls

Server with 8 GB can support approximately 100-175 concurrent calls

Server with 16 GB can support approximately 175+ concurrent calls

Next, we must make sure that our fully qualified domain name is properly set in our hosts file and make sure that the server time setting match the appropriate time zone that server belongs to. The last step before we actually start with the installation is to update our currently installed packages from the standard CentOS repositories:

# yum update

Now, we are ready to start the deployment. We will use installation script that we need to download. The script will download some file during the installation, so we will use /tmp folder during the installations.

Once it is finished, we will have fully functional IP-PBX server, based on the FreePBX Distribution. Now, we need to test if our GUI works. To do that, we will open our browser and point to the fully qualified name or the IP of our newly installed PBX, we will be presented with FreePBX administrator-account setup screen. We should setup our admin account using the GUI. That will be the information that we will use later for managing the server through the GUI.

If we want to upgrade out FreePBX system later, we can search for available upgrades, download the upgrade script and execute it, similar to the installation process. First, we need to determine which our current version is:

# cat /etc/schmooze/pbx-version

Then, we can check the change list for the new version that is available and make decision whether we would like to upgrade or not. The upgrade process work same as the installation. The upgrade script might ask us for some additional information or confirmation. Once the upgrade is done we can check and confirm that our system is upgraded but executing:

# cat /etc/schmooze/pbx-version

If there is more than one upgrade script available, we should execute every upgrade script, one by one, is sequential order and save every script in the same folder. This Asterisk and OpenPBX server are part of a very wide field and there are a lot of additional things to be considered and explored. However, this tutorial underlines the very basic information and steps that are required in order to get our own PBX system up and running.