Overview
Discover what makes FreeSWITCH powerful
FreeSWITCH is a **software‑defined telecom stack** that replaces legacy hardware switches with a highly modular, open‑source platform. Built in C and compiled for multiple operating systems—including Linux, Windows, macOS, BSD, and even Raspberry Pi—FreeSWITCH exposes a rich set of APIs that let developers orchestrate voice, video, and messaging flows entirely in code. The core engine is event‑driven: every call leg, media stream, or SIP transaction emits events that can be captured by scripting languages (Lua, Python, JavaScript) or external services via the **mod_event_socket** interface. This event‑centric model makes it straightforward to build complex call routing, IVR, or real‑time transcription services on top of a single process.
C core
Modular plugins
Event socket
Scripting engines
Overview
FreeSWITCH is a software‑defined telecom stack that replaces legacy hardware switches with a highly modular, open‑source platform. Built in C and compiled for multiple operating systems—including Linux, Windows, macOS, BSD, and even Raspberry Pi—FreeSWITCH exposes a rich set of APIs that let developers orchestrate voice, video, and messaging flows entirely in code. The core engine is event‑driven: every call leg, media stream, or SIP transaction emits events that can be captured by scripting languages (Lua, Python, JavaScript) or external services via the mod_event_socket interface. This event‑centric model makes it straightforward to build complex call routing, IVR, or real‑time transcription services on top of a single process.
Architecture
At its heart, FreeSWITCH is a single‑process, multi‑threaded application that manages all media pipelines and signaling. The stack is composed of:
- C core: Handles SIP/SDP parsing, media transport (RTP/RTCP), and audio codecs.
- Modular plugins (
mod_*): Each feature—such as SIP, WebRTC, SMS, or database integration—is a loadable module. - Event socket: A TCP/Unix‑socket interface that publishes events in JSON or XML, enabling external controllers.
- Scripting engines: Lua, Python, JavaScript, and Erlang are embedded for call logic.
- Database back‑ends: Optional MySQL, PostgreSQL, or SQLite for dialplan storage and state persistence.
- Web UI: The “Fusion” web interface (based on Apache HTTPD) provides real‑time monitoring and configuration.
FreeSWITCH can run as a single node or be clustered via the mod_moho or mod_router modules, allowing horizontal scaling across commodity servers. The media pipeline is fully hardware‑accelerated where possible (e.g., Intel QuickSync, NVIDIA NVENC), ensuring low latency even under heavy load.
Core Capabilities
Developers have access to a wealth of programmable features:
- SIP/WebRTC endpoints: Full support for SIP over TCP/TLS, UDP, and WebSocket.
- Programmable dialplan: XML or Lua scripts that dictate call flow, bridging, and media handling.
- Media manipulation: Built‑in codecs (G.711, G.722, Opus), transcoding, echo cancellation, and DTMF detection.
- Messaging: SMS over SMPP or SIP MESSAGE; integration with
mod_signalwirefor cloud‑based messaging. - Event-driven APIs:
event_socket,mod_event_xmlrpc, and RESTful endpoints for external control. - Analytics: Built‑in Call Detail Records (CDRs) and real‑time stats via the
mod_statsmodule.
The modular design means that if a feature is unnecessary, it can simply be omitted from the build, keeping the footprint minimal.
Deployment & Infrastructure
FreeSWITCH is designed for self‑hosting on commodity hardware. Typical deployment scenarios include:
- Single‑node: A Raspberry Pi or a small VPS handling a few dozen concurrent calls.
- High‑availability cluster: Multiple FreeSWITCH instances behind a load balancer, sharing CDRs in a central database.
- Containerization: Official Docker images are available, and the project provides example Dockerfiles for building from source. Containers can be orchestrated with Kubernetes or Docker‑Compose, allowing zero‑downtime upgrades and autoscaling.
Because FreeSWITCH is a single binary, it can be deployed on bare metal or inside a VM without the overhead of a full virtualized environment. The media streams are handled directly on the host network stack, giving developers fine control over QoS and routing.
Integration & Extensibility
Extending FreeSWITCH is straightforward:
- Custom modules: Write C extensions that hook into the event loop, or use existing open‑source modules from the community.
- External APIs: The
mod_event_socketexposes a socket interface; developers can write listeners in any language that supports TCP sockets. - Webhooks & REST:
mod_restor third‑party modules expose RESTful endpoints for call control, enabling integration with CRM or ticketing systems. - SignalWire plug‑in:
mod_signalwireallows instant connectivity to SignalWire’s cloud services (SMS, SIP trunking) without leaving the FreeSWITCH environment.
These integration points make it possible to build end‑to‑end communication solutions that span on‑premises and cloud components.
Developer Experience
FreeSWITCH’s documentation is extensive, with a dedicated Confluence site that covers everything from installation to advanced scripting. The community is active on Slack, GitHub Issues, and mailing lists, providing quick support for hard‑core developers. The codebase is well‑structured, with clear separation between core logic and optional modules, which aids in debugging and contribution. Licensing is GPL‑v2 with a dual‑licensing model for commercial use, giving flexibility for open‑source or proprietary projects.
Use Cases
- Enterprise PBX: Replace legacy hardware with a cost‑effective, fully programmable switch that integrates with existing VoIP trunks.
- Contact centers: Build IVR, queueing, and recording systems that can scale from a handful to thousands of agents.
- **IoT voice gateways
Open SourceReady to get started?
Join the community and start self-hosting FreeSWITCH 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
ClipCascade
Secure clipboard sync across devices, no setup needed
Dropserver
Your personal web app platform
Atheos
Lightweight web IDE for fast, collaborative coding
PocketBase
Lightweight Go backend in a single file
Shaarli
Personal, fast, database‑free link bookmarking
Element
Secure, sovereign messaging built on the Matrix open standard
