Overview
Discover what makes FreePBX powerful
FreePBX is an open‑source, web‑based graphical front‑end for the Asterisk PBX engine. It exposes a RESTful API, PHP‑based modules, and an underlying MySQL database to manage extensions, trunks, IVR menus, call queues, and voicemail. From a developer’s standpoint, FreePBX abstracts the low‑level dialplan syntax of Asterisk into configurable modules while still allowing direct access to the underlying `extensions.conf` and `sip.conf` files for custom logic. The platform is built around a modular architecture, where each feature (e.g., call recording, voicemail‑to‑email) is encapsulated as a PHP module that registers hooks into the Asterisk event bus (AMI).
Modular PHP Framework
RESTful API & AMI Integration
Scribe Integration
Webhooks & Callbacks
Overview
FreePBX is an open‑source, web‑based graphical front‑end for the Asterisk PBX engine. It exposes a RESTful API, PHP‑based modules, and an underlying MySQL database to manage extensions, trunks, IVR menus, call queues, and voicemail. From a developer’s standpoint, FreePBX abstracts the low‑level dialplan syntax of Asterisk into configurable modules while still allowing direct access to the underlying extensions.conf and sip.conf files for custom logic. The platform is built around a modular architecture, where each feature (e.g., call recording, voicemail‑to‑email) is encapsulated as a PHP module that registers hooks into the Asterisk event bus (AMI).
Key Features
- Modular PHP Framework – Each feature is a standalone module that can be enabled or disabled via the admin UI. Modules expose hooks (
pre_execute,post_execute) that developers can override to inject custom PHP logic. - RESTful API & AMI Integration – FreePBX provides a
freepbxapiendpoint for CRUD operations on extensions, trunks, and queues. Developers can also consume Asterisk’s AMI events (Event: NewChannel,Event: Dial) to build real‑time dashboards or call analytics. - Scribe Integration – The bundled Scribe module adds AI transcription to calls and voicemails, exposing WebSocket streams for real‑time speech recognition. The API allows developers to retrieve transcripts via
/api/v1/scribe/transcripts. - Webhooks & Callbacks – Modules can register custom webhooks that fire on events such as
CallEndedorVoicemailReceived, enabling seamless integration with external CRM or ticketing systems.
Technical Stack
| Layer | Technology |
|---|---|
| Web UI | PHP 7+, MySQL, jQuery, Bootstrap |
| Backend Logic | FreePBX PHP modules (MVC‑like), Asterisk AMI |
| Dialplan Engine | Asterisk 16+ (C, Lua extensions) |
| Database | MySQL 5.7+/MariaDB for configuration persistence |
| Optional AI Layer | Python/Node.js microservice (Scribe) for transcription |
FreePBX’s codebase follows a loosely coupled design: modules register themselves in modules.conf, and the core dispatcher routes HTTP requests to module controllers. Asterisk’s AMI is used for real‑time events, while the cdr database table logs call detail records that can be queried via SQL or exposed through the API.
Deployment & Infrastructure
- Self‑Hosting – FreePBX runs on any LAMP stack; Docker images are available (
freepbx:latest) for quick container deployment. Thedocker-compose.ymlexample mounts a persistent volume for/var/www/html/asteriskand/etc/asterisk. - Scalability – Horizontal scaling is achieved by running multiple FreePBX instances behind a load balancer (e.g., HAProxy) with shared MySQL replication. Asterisk’s
pjsipstack supports thousands of concurrent SIP registrations per node. - High Availability – Pairing FreePBX with an Asterisk cluster and using MySQL Galera for synchronous replication ensures zero‑downtime failover.
- Monitoring – Built‑in
freepbx_monitormodule exposes Prometheus metrics; integration with Grafana dashboards is common for call traffic analysis.
Integration & Extensibility
- Module API – Developers can create new modules by extending
Base_Moduleand implementingsetup()/remove()hooks. The module skeleton includes templates for database migrations, language files, and UI forms. - Event Hooks – The
Eventsclass allows subscription to AMI events (on('NewChannel', callback)) or FreePBX internal events (on('module_enable', callback)). - Webhooks – Custom endpoints can be registered in
webhook.xmland triggered via the core’sWebHook::fire()method. - Scribe API – Exposes a WebSocket endpoint (
/ws/scribe) for streaming transcription results, and REST endpoints for transcript storage and retrieval.
Developer Experience
- Documentation – The official FreePBX Wiki provides module development guides, API references, and architectural overviews. The community forum (FreePBX Community) is active for troubleshooting.
- Testing – Unit tests are written in PHPUnit; the core framework supports stubbing AMI responses for isolated module testing.
- Community – A large contributor base ensures rapid bug fixes and feature additions. Many third‑party modules (e.g., RingCentral, Twilio) demonstrate integration patterns.
Use Cases
- Enterprise Call Center – Deploy FreePBX with custom IVR modules, call queues, and Scribe transcription to feed analytics into a CRM.
- VoIP Service Provider – Build a white‑label PBX solution with configurable SIP trunks, auto‑dialer modules, and real‑time monitoring dashboards.
- Small Business – Leverage the web UI to manage extensions, voicemail‑to‑email, and integrate with Slack via webhooks for instant notifications.
- Educational Institutions – Use the call recording and transcription APIs to archive lectures or support remote learning platforms.
Advantages
- Open Source & Extensible – No licensing costs; developers can modify core PHP modules or contribute back to the community.
- Performance – Asterisk’s event‑driven architecture handles high call volumes; FreePBX adds minimal overhead.
- **Flex
Open SourceReady to get started?
Join the community and start self-hosting FreePBX today
Related Apps in apis-services
Mastodon
Decentralized, real‑time social networking
Discourse
Open‑source community forum platform with real‑time chat and AI
Rocket.Chat
Secure, open‑source team communication platform
Novu
Unified notification platform for multi‑channel delivery
Mattermost
Secure, self‑hosted team collaboration with chat, voice, and AI
Jitsi Meet
Free, encrypted video conferencing for everyone
Weekly Views
Repository Health
Information
Explore More Apps
FlowFuse
Collaborative, secure Node-RED dev and deployment platform
Polaris
Self-hosted music streaming for any device
Open-Meteo
Free, key‑less weather API for developers
Huginn
Automate online tasks on your own server
Music Player Daemon
Remote, flexible music server for desktop and network playback
Ampache
Stream your music and videos from any device
