Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/signalwire/freeswitch/llms.txt

Use this file to discover all available pages before exploring further.

FreeSWITCH is a Software Defined Telecom Stack that enables the digital transformation from proprietary telecom switches to a versatile software implementation. It runs on any commodity hardware — from a Raspberry Pi all the way up to a multi-core server in a data center — and supports a wide range of telephony protocols including SIP, WebRTC, H.323, and PSTN. Originally created by Anthony Minessale II and now sponsored by SignalWire, FreeSWITCH is a production-proven platform trusted by carriers, enterprises, and developers worldwide.

Installation

Install FreeSWITCH from SignalWire packages on Debian/Ubuntu or build from source.

Quickstart

Start a FreeSWITCH instance, register a SIP phone, and make your first call in minutes.

Architecture

Deep dive into FreeSWITCH’s modular core, media subsystem, and module loading.

Event Socket (ESL)

Control FreeSWITCH programmatically using the Event Socket Library.

What FreeSWITCH Can Do

FreeSWITCH is a general-purpose telephony engine. Its module system lets you compose exactly the feature set your deployment needs, without carrying unnecessary overhead. Common production use cases include:
  • PBX and enterprise telephony — SIP extensions, call routing, voicemail, hunt groups, and ring strategies for offices of any size.
  • Call center platform — ACD queues (mod_fifo), skills-based routing, agent callbacks, and real-time monitoring.
  • Interactive Voice Response (IVR) — DTMF- and speech-driven menu trees with TTS and ASR integrations.
  • WebRTC gateway — Bridges browser-based WebRTC clients to SIP and PSTN networks using DTLS-SRTP.
  • Media server — Audio/video mixing, conferencing (mod_conference), recording, transcoding, and streaming.
  • Voicemail system — Per-user mailboxes with IMAP storage, MWI, and email notification.
  • PSTN gateway — Connects digital telephone lines (T1/E1/SS7) to VoIP via channel drivers such as mod_freetdm.
  • Hosted telecom services — Scalable multi-tenant deployments paired with SignalWire cloud infrastructure.

Architecture Overview

FreeSWITCH is built around a small, stable core that handles call state, media routing, and the XML configuration engine. Everything else — SIP stacks, codecs, scripting, databases, and application logic — lives in dynamically loadable modules. The core exposes a rich C API that modules use to register endpoint drivers, dialplan applications, API commands, and event handlers. Key architectural layers:
  • Core — Call state machine, media subsystem (RTP/RTCP/SRTP), XML preprocessor, and in-process SQLite database.
  • Endpoint modulesmod_sofia (SIP/SDP via sofia-sip), mod_verto (WebRTC JSON-RPC), mod_freetdm (TDM/PSTN).
  • Dialplan — XML Dialplan with regex pattern matching; extensible via mod_xml_curl for HTTP-driven routing.
  • Application modules — Conference, voicemail, IVR, bridge, queue, playback, record, and hundreds more.
  • Scripting modulesmod_lua, mod_python3, mod_v8 (JavaScript), and mod_perl for call logic in familiar languages.
  • Event Socket — A TCP socket API (mod_event_socket) that exposes every internal event and API command to external processes.
For a full deep dive including diagrams, threading model, and media flow, see the Architecture Overview.

SignalWire Integration

SignalWire is the primary sponsor of FreeSWITCH and was founded by the original FreeSWITCH developers. The mod_signalwire module, distributed in the FreeSWITCH source tree, allows any FreeSWITCH instance to instantly pair with the SignalWire cloud platform. Once connected, your switch gains access to:
  • PSTN calling and SMS — Outbound and inbound DID numbers routed through SignalWire’s carrier network.
  • Elastic scaling — Overflow traffic to SignalWire when local capacity is exhausted.
  • SIP trunking — Standards-based SIP interconnect for carrier-grade reliability.
  • Serverless application hosting — Run call-control applications on SignalWire without managing infrastructure.
To pair your instance, install mod_signalwire, generate a token in the SignalWire Dashboard, and paste it into the module configuration. The module handles registration, keepalives, and inbound routing automatically.

Community and Support

FreeSWITCH has an active global community across multiple channels:

Build docs developers (and LLMs) love