If you are putting an AI voice agent behind a self-hosted phone system, the engine in front of it has one main job: get caller audio to your speech and language models, get the agent's audio back, and move the call to a person when needed. In the Asterisk vs FreeSWITCH choice, both engines can do this, but they expose audio, call control and transfers differently, and they come with different licences and support models. This comparison covers only that telephony layer, not complete AI agent products.
Short answer
- Pick Asterisk if you want first-party, documented ways to stream call audio to an AI service, including a WebSocket channel driver that handles framing and timing for you, and a published support schedule with LTS dates.
- Pick FreeSWITCH if your team already builds on its Event Socket, wants fine control over whether media passes through the server, and is comfortable with community modules for WebSocket audio streaming.
- Stay with what you run if you already operate one of them in production: both can route calls to an AI agent and transfer back, and switching engines is a migration project of its own.
- Consider a managed layer if you do not want to run, patch and scale the engine yourself.
How we compared
We used only official sources: Asterisk documentation, the FreeSWITCH manual and source repository maintained by SignalWire, the sponsors' own pages, and the IETF RFCs for SIP. Everything was checked on October 6, 2026. We did not benchmark either engine, and neither project publishes official concurrency or sizing figures, so this article makes no performance claims.

Asterisk vs FreeSWITCH at a glance
| Criterion | Asterisk | FreeSWITCH |
|---|---|---|
| Main sponsor | Sangoma, "primary developer and sponsor" of Asterisk and FreePBX | SignalWire, "primary sponsor", founded by the original FreeSWITCH developers |
| Licence | GNU GPL v2, also available under alternative licences from Digium, Inc. | MPL-1.1 (repository LICENSE file) |
| Commercial edition or support price | Not published | Commercial edition from SignalWire; price not published |
| Release model | New major roughly yearly; LTS: 4 years full support + 1 year security fixes | Latest GitHub release v1.10.12; LTS/EOL schedule not published |
| Fully supported series (Oct 6, 2026) | 20.x LTS (until Oct 19, 2026), 22.x LTS, 23.x | Not published |
| First-party audio streaming to AI | AudioSocket (TCP), ARI External Media (RTP), WebSocket channel driver, EAGI (inbound audio) | Event Socket unicast audio streaming over TCP or UDP |
| WebSocket audio streaming | chan_websocket, from 20.16, 21.11, 22.6 and 23.0 | No in-tree module in the official manual; community modules exist |
| Call-control API | ARI (REST + WebSocket events), AMI, AGI (synchronous) | Event Socket inbound and outbound modes; embedded scripting |
| Blind transfer | Transfer(), BlindTransfer() | transfer, deflect (SIP REFER), redirect (SIP 3xx) |
| Attended transfer | AttendedTransfer(); remote attended transfers via an external_replaces extension | att_xfer, three_way |
| Media path options | Not compared in this article | Default, proxy and bypass media modes |
| Paid modules | Not compared in this article | AMD and G.729A modules licensed per concurrent channel; price not published |
| Official concurrency guidance | Not published | Not published |
| Managed AI option from the sponsor | Not compared in this article | SignalWire AI Agent Runtime $0.16/min, transport billed separately |
Prices and features checked October 6, 2026. Sources: Sangoma open source, Asterisk licence, Asterisk versions, FreeSWITCH repository, FreeSWITCH LICENSE, FreeSWITCH manual, SignalWire FreeSWITCH editions, commercial modules, SignalWire pricing, plus the pages linked in each section below.
Getting call audio to the AI
This is the difference that matters most for an AI voice agent.
Asterisk documents several first-party paths. AudioSocket is "a simple TCP-based protocol for sending and receiving real-time audio streams, and sending DTMF digits", carrying signed-linear 16-bit mono PCM at rates from 8 kHz up to 192 kHz. The AudioSocket() dialplan application, available since 18.0.0, sends 8 kHz audio by default and does not answer the call for you. ARI External Media, introduced in 16.6, forwards bridge audio to an external host and can inject audio back; its original form uses RTP over UDP with a fixed format, which Asterisk transcodes to. EAGI exposes incoming audio on file descriptor 3.
The newest path is the WebSocket channel driver, available from Asterisk 23.0.0, 22.6.0, 21.11.0 and 20.16.0. Media travels in binary frames and control in text frames; the driver frames and times audio for most codecs, generates silence when your app sends nothing, and supports TLS. Commands such as FLUSH_MEDIA, PAUSE_MEDIA and MARK_MEDIA help when a caller interrupts the agent. Limits are documented: messages above 65,500 bytes close the socket and hang up the call, the queue holds about 1,000 frames (about 20 seconds), and flow-control events fire at about 900 and 800 frames. The same page notes that AudioSocket and RTP External Media leave binary packet handling and timing to the developer.
FreeSWITCH documents one first-party streaming path in its manual: the Event Socket unicast command, which activates audio streaming to a given IP and port over TCP or UDP. The official module reference contains no WebSocket audio-streaming module; community modules fill this gap. mod_audio_stream streams L16 audio at 8 or 16 kHz to a WebSocket URL; its community edition is licensed AGPL-3.0 with a FreeSWITCH linking exception, and bidirectional streaming is listed as a feature of its commercial version. The original mod_audio_fork repository from drachtio returned "not found" when we checked; several community forks exist.
Media must pass through FreeSWITCH to be streamed. The media handling guide describes default mode (the server terminates RTP and can transcode, record and detect DTMF), proxy mode (forwards payloads without transcoding) and bypass mode (endpoints exchange RTP directly, so media processing is unavailable).
Choose Asterisk if you want a first-party WebSocket path with documented flow control and you can run a release that includes it. Choose FreeSWITCH if you prefer raw TCP/UDP streaming via Event Socket, or you accept a community module and have checked its licence and who maintains it.
Call control and AI orchestration
Your AI orchestrator needs to answer calls, play and stop audio, bridge legs and react to events.
On Asterisk, ARI is asynchronous: a REST interface plus a WebSocket that carries JSON events, with the Stasis dialplan application handing channel control to your app. AMI is also asynchronous and event-driven, while AGI is synchronous, so each action blocks until it completes. Asterisk's documentation advises against calling ARI directly from a web page and recommends putting your own application server in front.
On FreeSWITCH, the Event Socket works in two directions. In inbound mode your app connects to FreeSWITCH (default port 8021). In outbound mode the dialplan socket application connects each call to your server (default port 8084). FreeSWITCH also supports embedded scripting languages.

Choose Asterisk if your team wants a REST-plus-events model that maps cleanly onto a web-style orchestrator. Choose FreeSWITCH if you want each call pushed to your server over a socket with full command access.
Transfers to human agents
When the AI agent hands a caller to a person, the transfer mechanism decides who stays in the call and what your records show.
SIP defines the building blocks: REFER (RFC 3515) asks the other side to contact a new target and can be used for call transfer, and the Replaces header (RFC 3891) enables attended transfer.
Asterisk's Transfer() application returns a SIP 302 redirect if used before the call is set up and reports the outcome in TRANSFERSTATUS. BlindTransfer() redirects all channels bridged to the caller, and AttendedTransfer() is also available. For remote attended transfers, where a REFER with Replaces points at a dialog on another server, Asterisk routes the call through an external_replaces extension; without it these transfers fail. The documentation recommends avoiding remote attended transfers where possible because of the security risk of calling untrusted domains, and allow_transfer = no disables them.
FreeSWITCH's dialplan tools include deflect ("Send a SIP REFER to redirect the call to another URI"), redirect (SIP 3xx), transfer for blind transfers, att_xfer for attended transfers with a success or failure result, and three_way.

Choose Asterisk if your transfers stay inside one PBX and you want status variables you can branch on in the dialplan. Choose FreeSWITCH if you want an explicit REFER action (deflect) to hand calls to an upstream carrier or contact center without keeping the media.
Licensing and commercial support
Asterisk is distributed under GPL v2 and is also available under alternative licences negotiated with Digium, Inc. The project states its belief that applications controlling Asterisk through AMI, AGI or ARI do not have to be GPL-licensed, and grants an additional licence if a court finds otherwise. FreeSWITCH's repository LICENSE file is MPL-1.1. Licence obligations depend on how you modify and distribute the software, so involve legal counsel; this is not legal advice.
For support, Sangoma describes itself as the primary developer and sponsor of Asterisk and FreePBX. SignalWire offers a commercially supported FreeSWITCH edition alongside the free open-source one, and states that a free SignalWire account is required to access packages and downloads. Neither page publishes support prices. FreeSWITCH's commercial modules for answering-machine detection and G.729A are sold per concurrent channel and bound to the machine's MAC address.
Choose Asterisk if GPL v2 with a stated exception for API-driven apps fits your distribution model. Choose FreeSWITCH if MPL-1.1 fits better, and budget for any per-channel modules you need.
Release lifecycle and upgrades
Asterisk publishes its support schedule: LTS releases get four years of full support plus one year of security fixes, and bug-fix updates arrive roughly every four to six weeks. As of October 6, 2026, 20.x LTS moves to security fixes only on 19 October 2026, 21.x reaches end of life on 18 October 2026, 22.x LTS is fully supported until 16 October 2028, and 24.x LTS was listed as pre-release for 15 October 2026.
FreeSWITCH's latest GitHub release is v1.10.12, which added ARM64 support and dropped Debian 10 and CentOS. No LTS or end-of-life schedule is published. Commercial module packages are built for Debian 12 and 13, and SignalWire stops building them once a Debian release reaches end of life.
Whichever you run, treat dialplan and module changes like code: test them on a staging route before live traffic.
Choose Asterisk if your change process needs dated support windows. Choose FreeSWITCH if you track releases yourself and pin to your operating system's lifecycle.
Security defaults and operations
Both engines are self-hosted, so you own patching, hardening, scaling and monitoring. One default deserves attention: the FreeSWITCH Event Socket vanilla configuration listens on all interfaces with the password "ClueCon", which must be changed and restricted before production. On Asterisk, the remote attended transfer behaviour above is the documented risk to review.
Neither project publishes concurrency guidance, so load-test with your codecs, streaming method and AI round trips.

Who should choose which
- You run FreePBX or Asterisk today: keep Asterisk and add AI through chan_websocket on a supported release, or route calls over SIP to an AI platform.
- You run FreeSWITCH with Event Socket applications: keep FreeSWITCH, stream with
unicastor a vetted community module, and usedeflectoratt_xferfor handoffs. - You are building a new AI front end and want first-party streaming: Asterisk 22.x LTS with chan_websocket gives a documented WebSocket path and a published support window.
- You do not want to operate a media server: use a managed layer. SignalWire, FreeSWITCH's sponsor, publishes an AI Agent Runtime at $0.16/min with transport billed separately, and other platforms accept calls over SIP.
A short pilot test plan
- Pick one inbound number and one AI use case.
- Stream audio with your chosen method and confirm sample rate and codec end to end.
- Interrupt the agent mid-sentence and confirm its audio stops promptly.
- Run blind and attended transfers to a real human queue and check the records.
- Kill the AI service mid-call and confirm the caller reaches a person.
- Load-test to your expected peak and watch CPU, jitter and dropped audio.
- Review security: Event Socket or ARI exposure, transfer permissions and TLS.
Where NextLevel fits
NextLevel is not a replacement for either engine. Its SIP Bridge is an Asterisk-based bridge between NextLevel's LiveKit-powered AI orchestrator and SIP endpoints, and it lists Asterisk, FreePBX, FreeSWITCH and Kamailio among the on-premises systems it connects to over SIP standards. For each routed call it can hand off to the AI agent, route to a human queue or fail over, with alerts by Slack, PagerDuty or email; the integrations page describes the same architecture. Context-rich warm transfers are covered separately, and voice AI architecture explains how interruptions and latency are handled.
Plans start from $49/month; phone agents need an active SIP trunk, and higher tiers, telephony and setup can add cost. NextLevel can deliver a working prototype in 2 days.
Frequently asked questions
Is Asterisk or FreeSWITCH better for AI voice agents?
Neither is better in general. Asterisk offers more first-party audio-streaming options, including a WebSocket channel driver, and a published support schedule. FreeSWITCH offers flexible media modes and Event Socket control but relies on community modules for WebSocket streaming. The engine your team already runs well is often the practical choice.
Does FreeSWITCH support WebSocket audio streaming?
Not through a module documented in the official manual as of October 6, 2026. The manual documents Event Socket unicast streaming over TCP or UDP. Community modules such as mod_audio_stream add WebSocket streaming under their own licences.
Which Asterisk version do I need for WebSocket streaming?
Asterisk 20.16, 21.11, 22.6, 23.0 or later. Check support dates too: 20.x moves to security fixes only on 19 October 2026 and 21.x reaches end of life on 18 October 2026.
Can public pricing identify the cheaper choice?
Both engines are free to download, but neither sponsor publishes support prices, and FreeSWITCH's AMD and G.729A modules are licensed per channel. Real cost depends on servers, engineering time, support contracts and the AI services you connect.
What should a proof of concept test?
Audio quality at your codec and sample rate, interruption handling, blind and attended transfers to real queues, behaviour when the AI service fails, and load at your expected peak.
If you would like to see how an AI agent connects to your Asterisk or FreeSWITCH system, build your AI agent.