Install Freepbx On Centos 7

As you obviously have little knowledge of CentOS, the better answer here would be to not install on your own instance and to always use the full, distro ISO. It will move up to 7 with FreePBX 14 and you stay in 100% known territory for getting support from people.

This role installs Freepbx, Asterisk and all the required mass of packages needed on a CentOS 7.x

Requirements

This module requires Ansible 2.2

Role Variables

See defaults for variables and descriptions

Install Freepbx On Centos 7

Description

The intention of this role is to take everything here and place it into a role, it will basically take a fresh CentOS 7.XX system and deploy asterisk 14 and the latest Freepbx on the same machine.

To test this locally simple move into the 'tests' folder. Have Vagrant, Virtualbox and Ansible installed. Then type

vagrant up

Once it has done installing and configuring open a web browser and navigate to http://127.0.0.1:8080 or https://127.0.0.1:4443

Things to be aware of

  • No iptables or firewalld configured, this will be an open system. After deploy it will be ready to be configured by the GUI and an IP
  • As of 10/09/17 this works fine on a digital ocean Droplet.
  • There are a few callouts to scripts in some of the source code, this can be worked around but will need to dissect these scripts and hope the source code doesn't change too much.
  • Because much of this is pulling down tarballs and doing configure and make installs, there have been a number of static assumptions made based on the file it creates. This is to prevent 'changed' each time and make the code imutable.

So this is a starting point, my hope is to simplify the install of FreePBX and for people who wish to use it without all the commercial modules but still get the usage of the excellent GUI provided by FreePBX.

Example Playbook

Example to call:

HomeAsteriskHow to Install Asterisk 15 PBX on CentOS 7
(Last Updated On: November 26, 2018)

Asterisk is the most popular and completely open source PBX system with features of commercially available PBX systems. In this guide, we will show you how to install Asterisk 15 on CentOS 7 server. Asterisk uses commodity Ethernet hardware and allows for the integration of physically separate installations.

Features of Asterisk PBX system

Among the good feature of Asterisk are:

  • Conference calling
  • Call Recording
  • Call Monitoring
  • Distributed Universal Number Discovery
  • Caller ID on Call Waiting
  • Direct Inward System Access
  • Call Parking
  • SMS Messaging
  • Trunking
  • Transcoding
  • Voicemail
  • Call Queues and many other features.

In our recent guide, we covered the Installation of Asterisk with FreePBX on Ubuntu 18.04 and Ubuntu 16.04 server. If you need a commercial system there is 3CX which has a guide for the installation on our blog.

UPDATE:

How to Install Asterisk 15 on CentOS 7

Install Freepbx 14 On Centos 7

Before you start executing Asterisk install commands on your CentOS 7 server, make sure all the package son the system are up to date.

Set hostname type:

When done, add the epel repository

Centos

Disable SELinux by running the commands below:

Then follow the steps below to install and configure Asterisk 15 on your CentOS 7 server

Step 1: Install Asterisk 15 PBX dependencies

The initial step when setting up Asterisk is to install all required dependencies.

You also need to install Development Tools group packages.

The other packages that you need to install are:

Step 2: Download and Install Jansson

Jansson is a C library for encoding, decoding and manipulating JSON data. Download and install it on CentOS 7 server by running the commands below:

Step 3: Download and Install PJSIP

PJSIP is a free and open source multimedia communication library written in C language implementing standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. Clone the project from Github, then compile and install.

Step 4: Download and Install Asterisk

Now that we have all dependency packages installed, we should be ready to download and install Asterisk 15 on CentOS 7.

If all goes well, you should get output similar to below:

Freepbx tftp server setup

Step 5: Set Asterisk menu options

Setup menu options by running the following command:

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 following minimal modules

On Extra Sound Packages select as shown below:

You can change other configurations you see fit. When done, save and exit

Now run the following command to download the mp3 decoder library into the source tree.

To start building and installation of Asterisk with selected modules, run the commands.

Sample output:

A systemd asterisk unit file will be created for you.

Asterisknow Based Linux Server Centos

Create separate user and group to run asterisk services, and assign correct permissions:

Set Asterisk default user to asterisk:

Restart asterisk service after making the changes

Enable service to start on boot:

Install Freepbx On Centos 7

Test to see if you can connect to Asterisk CLI:

Install Free Pbx On Centos 7 Network

You can confirm that Asterisk service is running as user asterisk. This is a recommended setting for Production.

Conclusion

Install Free Pbx On Centos 7 Installation

You now have a running Asterisk 15 on CentOS 7 server. In our next how-to guide, we will cover the installation and Configuration of FreePBX on CentOS 7. Stay tuned and drop a comment if you encounter any issue with the setup.

Freepbx Firewall Service Not Running

Further reading: How to secure Asterisk and FreePBX from VoIP Fraud and Bruteforce attacks