Back to articles
AI & Cloud

Complete Guide to Building a Fully Open-Source VoIP PBX System with Asterisk and FreePBX on Cheap Cloud Servers

A detailed guide on building a complete open-source VoIP PBX system using Asterisk and FreePBX on a low-cost cloud server, covering installation, configuration, integration, and...

DPTCloud Engineering4 min read
Complete Guide to Building a Fully Open-Source VoIP PBX System with Asterisk and FreePBX on Cheap Cloud Servers

Introduction to Open-Source VoIP PBX Systems

VoIP (Voice over Internet Protocol) PBX systems are increasingly popular in businesses due to their flexibility, low operational costs, and high scalability. In this guide, we’ll build a complete open-source VoIP PBX system using Asterisk and FreePBX on a low-cost cloud server. This solution is ideal for small and medium-sized enterprises looking to manage their communication systems independently without relying on expensive commercial VoIP services.

System Requirements and Environment Preparation

To deploy a VoIP PBX with Asterisk and FreePBX, you will need:

  • A cloud server with at least 4GB RAM and 2 CPU cores (8GB RAM is recommended)
  • Operating system: CentOS 7/8 or Ubuntu 20.04/22.04
  • Stable internet connection with sufficient bandwidth (minimum 10Mbps)
  • A static IP address (provided by your cloud service provider)
  • Root SSH access to the server

We will use High-RAM Cloud VPS to ensure stable performance for VoIP services.

Installation and Configuration Steps

The deployment process includes installing the operating system, updating the system, and setting up Asterisk and FreePBX.

Install Operating System and Update

On the server, start the operating system and log in via SSH:

ssh root@your-server-ip

Update the system:

sudo apt update && sudo apt upgrade -y

Install Asterisk Service

Install Asterisk:

sudo apt install asterisk -y

Start and enable the Asterisk service:

sudo systemctl start asterisk
sudo systemctl enable asterisk
sudo asterisk -rv

Deploy FreePBX

FreePBX is a graphical user interface for managing Asterisk. Install FreePBX:

wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-install.sh
chmod +x freepbx-install.sh
sudo ./freepbx-install.sh

The installation process will prompt you to select options such as server name, email address, and database configuration.

Integration and Performance Optimization

After installation, configure components like SIP trunks, extensions, and routing.

Configure SIP Trunks

In the FreePBX interface, go to Trunks and select Outbound Routes to set up connections with VoIP service providers.

Set Up Extensions and Configure IP Phones

Go to Extensions to create new extensions. Each extension can be configured with a password, ringtone, and access permissions.

Testing and System Verification

To verify the system works correctly, perform the following steps:

  • Access the FreePBX interface via a web browser: http://your-server-ip/admin
  • Test internal calls between extensions
  • Make calls through the SIP trunk to real phone numbers
  • Ensure clear audio and no interruptions

Troubleshooting and Optimization

During operation, you may encounter common issues:

  • Unable to make calls: Check SIP trunk configuration and firewall settings.
  • Audio interruptions: Verify network bandwidth and QoS settings.
  • No incoming calls: Check routing and SIP registration.

To optimize performance, consider:

Conclusion

With Asterisk and FreePBX, you can build a complete open-source VoIP PBX system on a low-cost cloud server. This guide provides a foundation for deployment, configuration, and performance optimization, suitable for small and medium-sized businesses.

References

DPTCloud Tier III Infrastructure

High-RAM Cloud VPS Plans Optimized for AI, Databases & Cache

Enterprise RAID 10 NVMe SSDs, CMC & FPT District 9 uplinks with Anycast Anti-DDoS and 99.99% SLA.

View 22 VPS Plans
ECO · vn-02Recommended

VPS-4E

297.000 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe
ECO · vn-02

VPS-5E

614.900 ₫ / mo

10% VAT included

  • CPU: 8 vCPU
  • RAM: 16 GB
  • SSD: 100 GB NVMe
ADVANCED · vn-03Recommended

VPS-4T

548.900 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe

Related Articles

View all
ZaloZalo SupportDiscord0384 753 478