How to Configure FreePBX for a Private Office Telephone Exchange

systech_freepbx_office_setup

By Leo Antony Raj, Senior Trainer, Systech Group 20+ years in networking and cybersecurity · Updated November 2026. 

  6 Min read

In short

FreePBX is a web-based administration platform for managing an Asterisk-based private branch exchange (PBX). It allows an organisation to build an office telephone system with internal extensions, external SIP trunk connectivity, inbound and outbound call routes, IVR menus, ring groups, queues and voicemail.

A typical setup starts with installing a supported FreePBX release, securing the administrator account and network access, creating employee extensions, and configuring a SIP/PJSIP trunk with a VoIP provider. Inbound routes direct calls from public telephone numbers to the correct extension or call-handling feature, while outbound routes decide which trunk handles calls made by employees.

This guide uses FreePBX 17 as the installation reference because Sangoma’s official download page documents FreePBX 17 installation on Debian 12. Menu names and options may differ by release, module version, SIP driver and provider. Always use your provider’s current trunk parameters and the official documentation for your installed release.

Table of Contents

What Is FreePBX and How Does It Work with Asterisk?

FreePBX is an open-source, web-based graphical user interface used to configure and manage an Asterisk-based telephone system. Asterisk is the underlying communications engine that handles call processing, media, extensions, trunks and telephony features. FreePBX provides an administration interface so an administrator can manage many PBX settings without manually editing every Asterisk configuration file. Understanding the Linux environment behind these services is easier with Linux system administration training in Trichy covering server management and Linux services.

A PBX, or Private Branch Exchange, is a telephone system that manages calls within an organisation and connects those calls to external telephone networks. Instead of giving every employee a separate public telephone line, a business can create internal extensions and use one or more SIP trunks for external calling.

What can you manage through FreePBX?

Create internal extensions for employees and departments.

Connect the PBX to a VoIP provider through a SIP trunk.

Route incoming calls to extensions, ring groups, queues or IVR menus.

Control outgoing calls with route priorities and dial patterns.

Configure voicemail, call recording and time conditions where supported and permitted.

Monitor system status, manage backups and apply security settings.

FreePBX and Asterisk: the difference

How a Private Office PBX Handles Calls

A private office telephone exchange connects employee phones to the PBX and connects the PBX to an external VoIP provider. Employees can call one another using internal extension numbers. When an employee calls an external number, FreePBX selects an outbound route and sends the call through the configured SIP trunk. When a customer calls the organisation’s public number, the provider sends the call to the PBX, and an inbound route sends it to the correct destination. Understanding IP addressing, routing and network communication is important, and CCNA networking training in Chennai covering routing and switching fundamentals helps build that foundation.

For example, a small office may use extension 201 for reception, 202 for sales and 203 for accounts. A customer calls the company’s public number and hears an IVR menu. Selecting Sales sends the call to the sales ring group, while selecting Accounts routes the call to extension 203.

What is a SIP trunk?

A SIP trunk is the logical connection between the PBX and a voice service provider. It carries call signalling and, depending on the configuration, voice media between the office PBX and the provider. The provider supplies the SIP server address, authentication details or IP-authentication requirements, supported codecs, telephone numbers (DIDs), concurrent-call limits and any required network allow-list information.

FreePBX 17 Prerequisites and Installation Options

For example, a small office may use extension 201 for reception, 202 for sales and 203 for accounts. A customer calls the company’s public number and hears an IVR menu. Selecting Sales sends the call to the sales ring group, while selecting Accounts routes the call to extension 203.

What is a SIP trunk?

A SIP trunk is the logical connection between the PBX and a voice service provider. It carries call signalling and, depending on the configuration, voice media between the office PBX and the provider. The provider supplies the SIP server address, authentication details or IP-authentication requirements, supported codecs, telephone numbers (DIDs), concurrent-call limits and any required network allow-list information.

Before installing FreePBX, plan the number of users, expected simultaneous calls, phone types, public telephone numbers and network design. Hardware requirements depend on call volume, enabled modules, recording, conferencing and other workloads. Sangoma’s FreePBX download page lists Debian 12 with at least 2 GB RAM and 20 GB disk as the minimum starting point for its FreePBX 17 shell-script installation path; production systems should be sized for the actual workload and storage needs. Understanding server hardware and network infrastructure is also useful through hardware and networking training in Trichy with practical infrastructure labs.

Installation prerequisites

A dedicated physical server or virtual machine with supported resources.

Debian 12 for the documented FreePBX 17 shell-script installation method.

Stable LAN connectivity and a reserved/static internal IP address for the PBX.

A supported DNS name or public address if remote access or provider connectivity requires it.

A compatible IP phone or softphone for testing.

SIP trunk account and provider configuration details for external calls.

A firewall and network plan that restricts PBX access to trusted networks and provider signalling/media sources.

A backup plan for the PBX configuration and call records, subject to retention and privacy requirements.

FreePBX 17 installation options

The official FreePBX download page documents two installation paths for FreePBX 17: a Debian 12 shell-script installation and a FreePBX 17 ISO installation. The shell-script method can be used on a Debian 12 host or virtual machine and does not require a physical monitor and keyboard connected to the server. The ISO method packages the Debian installation workflow and FreePBX setup.

Prepare a supported Debian 12 server or virtual machine, or use the official FreePBX 17 ISO path.

Download the current installation script or ISO from the official FreePBX download page. Verify the download and follow the official installation instructions.

For the shell-script method, run the official installer with the required root or sudo privileges, as documented by Sangoma. Do not copy installation commands from an unrelated or outdated tutorial.

Allow the installer to complete and record the server’s internal IP address and system details.

Open the FreePBX Administrator Control Panel from a browser on a trusted management network and complete the initial setup.

Important: this article does not reproduce a one-size-fits-all shell command because installer URLs, dependencies and supported procedures can change. Use the current script and step-by-step instructions linked from the official download page.

Choose the correct version

Sangoma’s published version information identifies FreePBX 17 as supported and based on Debian 12. FreePBX 15 is listed as end-of-life, while FreePBX 18 is listed as planned in the version roadmap available at the time of research. Check the live version-status page before beginning a production deployment because support dates and release status can change.

First Login and Initial System Settings

After installation, connect to the PBX administration page using the server’s internal address. Complete the initial administrator setup before configuring employee phones or SIP trunks.

Create a strong, unique administrator username and password.

Set the correct system time zone, date and time synchronisation.

Configure the PBX hostname and DNS settings where required.

Confirm the internal network address and trusted local networks.

Review system updates and install supported updates according to the vendor’s maintenance guidance.

Configure a secure backup destination and schedule.

Review the FreePBX firewall and ensure that management access is limited to trusted administrator networks.

Avoid using the PBX administrator account as a normal phone extension. Administrator access and employee calling credentials serve different purposes and should remain separate.

Create Employee Extensions

An extension represents an internal user, phone or endpoint on the PBX. Each employee can be assigned an extension number and a compatible IP phone or softphone. In current FreePBX environments, PJSIP is generally the preferred SIP channel driver for new extension and trunk configurations where supported.

Example extension plan

Extension creation workflow

Open the extension management area in the FreePBX administration interface. In many installations this is under Applications → Extensions; menu labels can vary.

Choose the option to add a new PJSIP extension, if supported by the installed release.

Enter a unique extension number and a clear display name, such as Sales or Reception.

Generate a strong, unique secret or authentication credential for the endpoint.

Configure voicemail and other extension options only if required.

Save the extension and apply the configuration changes.

Enter the extension credentials into the employee’s IP phone or softphone and confirm that the endpoint registers.

Do not use predictable secrets such as 1234, the extension number or the company name. Each endpoint should have its own credentials. Avoid sharing one extension across multiple people when individual call logs and access control are required.

Configure a PJSIP SIP Trunk

A SIP trunk connects FreePBX to the VoIP provider. The provider may authenticate the PBX using a username and password (registration or credentials-based trunk) or by checking the source IP address (IP-authenticated trunk). The provider’s documentation determines which method and fields should be used. Configuring secure SIP connectivity also requires knowledge of network access controls, which learners can develop through firewall training in Trichy covering network security, NAT and firewall configuration

Information to collect from the provider

SIP server or proxy hostname and port.

Authentication username and password, if using a credentials-based trunk.

Provider signalling IP addresses and permitted media ranges, if using IP authentication.

Whether the trunk must register or uses IP authentication.

Assigned inbound telephone number(s), also called DIDs.

Outbound caller ID requirements and permitted number format.

Supported codecs, transport options and any TLS/SRTP requirements.

Concurrent-call limit and any provider-specific dialling rules.

PJSIP trunk setup workflow

Open Connectivity → Trunks and choose Add Trunk → Add SIP (chan_pjsip) Trunk, where those menu labels are present in your version.

Give the trunk a clear name, such as Office_VoIP_Provider.

Open the PJSIP General settings and enter the provider’s SIP server, port and authentication information exactly as supplied.

For a credentials-based trunk, configure the username, secret, authentication direction and registration behaviour according to the provider’s guide.

For an IP-authenticated trunk, configure the provider’s signalling IP addresses in the appropriate match/permit fields and follow the provider’s current instructions. Do not enable anonymous inbound SIP as a shortcut.

Select only codecs supported by both the provider and endpoints. Common codecs include G.711 A-law or μ-law, but the provider’s specification takes priority.

Configure transport, NAT and external/local network settings according to the actual network topology and provider requirements.

Save the trunk, apply the configuration and check its registration or status using the available FreePBX status page or Asterisk diagnostics.

The TTNC setup guide uses chan_pjsip for its credentials-based trunk example and notes that interface details can vary between FreePBX versions. It provides provider-specific values for authentication, SIP server, port and codecs. These values are examples for that provider, not universal settings. Use your own provider’s credentials and current documentation.

PJSIP vs legacy chan_sip

PJSIP is the modern SIP stack used by current Asterisk deployments and is the recommended direction for new configurations where supported. Older guides may show chan_sip or legacy menu fields. Do not copy legacy peer details into a PJSIP trunk form; the fields and configuration model are different.

Configure Inbound Routes

An inbound route tells FreePBX what to do when an external call arrives through a SIP trunk. The route can match a DID number and, where required, caller ID conditions. Its destination may be an extension, ring group, queue, IVR or another supported call-handling target. Understanding advanced routing and enterprise network design is useful here, and CCNP training in Trichy covering advanced routing and network operations can help strengthen those skills.

Open Connectivity → Inbound Routes, or the equivalent menu in your installed version.

Add a new inbound route and provide a descriptive name, such as Main_Office_Inbound.

Enter the DID number exactly in the format delivered by the SIP provider. If the provider sends a different number format, match the format shown in the PBX call logs.

Set caller ID matching only when the business needs a specific rule.

Choose the destination: reception extension, sales ring group, IVR or another approved destination.

Save and apply the configuration.

Call the public number from an external phone and confirm that the expected destination receives the call.

A DID is the public telephone number assigned by the provider. If the PBX receives several DIDs, create routes that distinguish them so each number can reach the correct department or menu.

Configure Outbound Routes and Dial Patterns

An outbound route controls which SIP trunk handles calls placed by internal extensions. Dial patterns define which numbers match the route and may remove or add digits before the call is sent to the provider.

Open Connectivity → Outbound Routes and add a route with a clear name, such as Office_Outbound.

Choose the trunk in the Trunk Sequence for Matched Routes section.

Configure the dial patterns to match the organisation’s numbering plan and the provider’s required number format.

Set caller ID according to the provider’s approved outbound number.

Save the route and apply the changes.

Test permitted local, national and international destinations according to the organisation’s calling policy.

Understanding dial patterns

A dial pattern tells FreePBX which dialled numbers should use a route. A business may use an access prefix such as 9 before external numbers, but this is a design choice—not a universal requirement. The prefix can be stripped or transformed before the call reaches the provider.

Do not use an unrestricted catch-all dial pattern unless you understand the fraud and cost risks. Restrict premium-rate, international and other high-cost destinations unless they are explicitly required. Emergency calling must be tested and configured in line with local requirements and the provider’s service terms.

Set Up Ring Groups, IVR, Queues and Voicemail

Ring groups

A ring group sends an incoming call to several extensions according to a selected ringing strategy. For example, a Sales ring group can ring extensions 202, 203 and 204 at the same time or in a configured sequence. Set the ring time and destination for unanswered calls.

IVR (Interactive Voice Response)

An IVR plays a recorded greeting and lets callers choose an option using their phone keypad. A simple office IVR might say: press 1 for Sales, press 2 for Support, or press 0 for Reception. Each key should point to a valid destination, and the menu should include a timeout and invalid-input destination.

Queues

A queue manages calls waiting for an available agent. It can be useful for customer support or sales teams that receive more calls than they can answer immediately. Configure agent membership, caller announcements, wait limits and the destination for callers who leave or exceed the waiting limit.

Voicemail

Voicemail allows callers to leave a recorded message when an extension or group cannot answer. Configure the mailbox, PIN, notification preferences and message-retention policy. Avoid weak default PINs and review who can access voicemail messages.

Example office call flow

Test Internal, Incoming and Outgoing Calls

Do not consider the PBX ready simply because the administration dashboard loads. Test each call path using real endpoints and an external telephone connection.

Useful troubleshooting checks

Check whether the extension is registered and whether its credentials match the PBX configuration.

Check the SIP trunk status and provider portal for registration or authentication errors.

Review inbound DID formatting and confirm the number sent by the provider matches the inbound route.

Review outbound dial patterns, trunk sequence and caller ID settings.

Check firewall rules, NAT, RTP media reachability and provider IP allow-lists when calls connect but audio fails.

Review Asterisk and FreePBX logs for SIP response codes and call-routing errors.

Test from a trusted LAN endpoint first, then test remote endpoints only after the PBX security design is in place.

Not sure which route fits you?

Tell us your stream and what you are hoping for, and we will tell you honestly which option suits.

Get course details

FreePBX Security Best Practices

A PBX exposed to the internet can be targeted by automated SIP registration attempts, password guessing and toll fraud. A compromised PBX may be used to make expensive unauthorised calls or access call data. Security must be designed before remote phones or public SIP traffic are enabled. Organisations deploying virtualised or cloud-hosted PBX environments can also build infrastructure knowledge through cloud computing training in Trichy covering virtualisation and cloud infrastructure.

Keep FreePBX, Asterisk, the operating system and modules patched using supported update procedures.

Use strong, unique administrator passwords and unique secrets for every extension.

Enable the FreePBX Firewall and assign the correct trust zones. Interfaces exposed to untrusted networks must not be treated as trusted.

Enable intrusion detection / Fail2ban and review blocked IPs and security events.

Allow SIP signalling and RTP media only from the provider and networks that need access, where the topology permits.

Do not enable anonymous inbound SIP as a workaround for trunk registration problems.

Use HTTPS for the administration interface and a valid certificate where supported.

Use TLS and SRTP where supported by the PBX, phones and provider; encryption must be configured consistently at both ends.

Restrict the administration interface to a trusted management network or VPN. Avoid exposing the GUI directly to the public internet.

Disable unused extensions, modules, services and remote-access paths.

Limit international and premium-rate outbound calling and apply spending or destination controls where available.

Create encrypted backups, protect backup credentials and test restoration.

Review call logs, account changes, trunk activity and unusual call patterns regularly.

Sangoma’s security guidance specifically recommends keeping the system patched, enabling Fail2ban, enabling the PBX Firewall, placing interfaces with untrusted inbound traffic in the Internet zone and using HTTPS for administration. Its remote-extension guidance warns that making a PBX reachable from the internet also makes it reachable by attackers; secure the system before enabling remote extensions.

Remote extensions: use a secure access design

Remote employees may connect using a supported softphone or IP phone, but remote extension access increases the PBX’s exposure. Prefer a properly secured VPN or a supported secure remote-access architecture where practical. If direct remote SIP access is required, follow the vendor’s security guidance, restrict source networks where possible, use strong endpoint credentials and confirm firewall and NAT settings. Do not simply place the PBX on a public IP or DMZ without a security plan.

Common FreePBX Configuration Problems

Make one configuration change at a time and test again. Avoid copying a full configuration from a different FreePBX version or provider because trunk authentication, transport, codecs and dial patterns are provider-specific.

FreePBX vs Traditional PBX vs Hosted VoIP

The right option depends on the organisation’s technical skills, number of users, call volume, uptime requirements, compliance needs and willingness to maintain telephony infrastructure.

Frequently asked questions

What is FreePBX Configuration?

FreePBX Configuration is the process of setting up and managing an Asterisk-based PBX through the FreePBX web interface. It includes extensions, SIP trunks, inbound and outbound routes, call-handling features and security settings.

No. Asterisk is the telephony engine that processes calls. FreePBX is the web-based administration interface used to configure and manage an Asterisk system.

Yes. It can manage internal extensions and connect an office to a VoIP provider through a SIP trunk, subject to compatible hardware, software and provider services.

An extension is an internal identity assigned to an employee, phone or endpoint. It allows users to call one another within the PBX and use permitted external calling routes.

A PJSIP trunk is a SIP connection configured using Asterisk’s PJSIP channel driver. It connects FreePBX to a SIP provider for inbound and outbound calls.

Inbound routes decide where incoming calls from a provider should go. Outbound routes decide which trunk should carry calls made by internal extensions.

An IVR is an automated menu that plays a greeting and routes callers according to keypad selections, such as Sales, Support or Reception.

Yes, supported remote endpoints can connect to FreePBX, but remote access must be carefully secured with appropriate firewall, authentication, encryption and network settings.

PJSIP is the modern SIP channel driver used in current Asterisk deployments. Older tutorials may describe the legacy chan_sip driver, so the configuration steps should match the installed version and supported modules.

Keep the system updated, use strong unique credentials, enable the PBX Firewall and intrusion detection, restrict network access, use HTTPS and supported SIP/media encryption, monitor call activity and back up the configuration.

Final Thoughts

FreePBX Configuration gives an organisation a flexible way to manage an office telephone exchange using Asterisk and VoIP. A reliable deployment depends on more than creating extensions: the SIP trunk must match the provider’s requirements, inbound and outbound routes must be planned carefully, and call-handling features must be tested with real endpoints.

Security should be part of the setup from the beginning. Keep the PBX updated, protect administrator and extension credentials, restrict network access, enable firewall and intrusion-detection controls, and monitor calling activity. Before putting the system into production, test internal calls, inbound calls, outbound calls, IVR options, voicemail and audio in both directions.

Leo Antony Raj, Networking and Cyber Security trainer at Systech Group

Written by

Leo Antony Raj

Senior Trainer · Networking, Cyber Security and Cloud

Leo Antony Raj has over 20 years of hands-on experience in hardware, networking, server configuration, ethical hacking and cloud computing. He has trained more than 10,000 students, and he teaches networking first, because every security and cloud role is built on it.

20+ years experience 10,000+ students trained Systech Group, Trichy
Connect on LinkedIn
Ethical Hacking Course Quick Enquiry Form

Fill the Form Get Free Consultation From Industry Experts!

CCNA Quick Enquiry Form

Fill the Form Get Free Consultation From Industry Experts!

Quick Enquiry Form

Fill the Form Get Free Consultation From Industry Experts!