NATIVE FREESWITCH MODULE mod_audio_stream

Stream call audio.
In both directions.

A flexible, bidirectional WebSocket audio interface for FreeSWITCH. Stream live call audio to your application, play audio back into calls, and control playback and interruptions — directly in the FreeSWITCH media path.

Bidirectional audio Direct & Mix playback Debian 12/13 · EL9
FREESWITCH CLI ● STREAM ACTIVE
# Start bidirectional streaming
fs_cli> uuid_audio_stream <uuid> start
ws://127.0.0.1:8080 mono 16k
+OK Success
# Interrupt queued playback
fs_cli> uuid_audio_stream <uuid> break
# Stop the stream
fs_cli> uuid_audio_stream <uuid> stop
REAL-WORLD ADOPTION

Built over years.
Used in production.

mod_audio_stream is used by thousands of companies through its Community Edition, with hundreds of commercial deployments worldwide. Its users include major telecommunications providers, contact center operators and teams building voice applications on FreeSWITCH.

YOUR AUDIO. YOUR APPLICATION.

One media interface.
Endless possibilities.

Connect FreeSWITCH audio to your own WebSocket service for voice AI, transcription, speech synthesis, analysis or custom real-time processing. You choose the backend and its protocol.

01 / TELEPHONY FreeSWITCH Caller and bridged audio
↔
02 / AUDIO TRANSPORT mod_audio_stream WebSocket & playback control
↔
03 / YOUR BACKEND WebSocket Server AI · STT · TTS · custom apps
ENGINEERED FOR LIVE AUDIO

Control every part of the stream.

Native audio capture, transport and playback, with flexible control from FreeSWITCH.

01 / DUPLEX

Bidirectional streaming

Send live call audio over WebSocket and receive audio for playback in the same session.

02 / INTERRUPTION

Interrupt & synchronize

Use break to clear pending playback and reset playback offsets for responsive conversations.

03 / BRIDGED CALLS

Direct & Mix modes

Play audio directly into a channel or mix playback into bridged calls so both parties can hear and interact.

04 / FORMATS

Flexible audio formats

PCM16 streaming with PCM, PCMU, PCMA and Opus return-audio options, depending on the edition.

05 / CONVERSION

Resampling & buffering

Adapt PCM sample rates and tune audio buffering for different applications and playback requirements.

06 / LOCAL OUTPUT

Named Pipe (FIFO)

Forward PCM16 audio to local processes through a named pipe alongside WebSocket-based workflows.

TWO PLAYBACK APPROACHES

One caller.
Or both sides of a call.

Direct playback sends returned audio into the selected channel. In bridged calls, Mix mode integrates returned audio into the media path, allowing caller and callee to participate in the same AI-assisted conversation.

Interruption support clears queued audio when the application needs to stop speaking, while frame-based playback helps maintain timing.

Direct channel playback Bridged-call mixed playback Queue clearing and playback reset
PLAYBACK MODES
DirectSingle channel
MixBridged conversations
InterruptClear queued audio
Frame pacing20 ms playback
Playback behavior is integrated with FreeSWITCH media handling.
PER-CALL STREAM CONTROL
# Start audio streaming
uuid_audio_stream <uuid> start ws://127.0.0.1:8080 mono 16k

# Manage the live stream
uuid_audio_stream <uuid> pause
uuid_audio_stream <uuid> resume
uuid_audio_stream <uuid> send_text Hello
uuid_audio_stream <uuid> break
uuid_audio_stream <uuid> stop
DEVELOPER-FIRST API

Start. Stream.
Interrupt. Resume.

Manage individual streams using the uuid_audio_stream FreeSWITCH API. Integrate stream control with your dialplan, ESL application or external call logic.

start · stop · pause · resume send_text · break Per-call WebSocket sessions
Explore the project on GitHub →
BUILT AROUND FREESWITCH

Keep the flexibility
of your call platform.

Continue using native FreeSWITCH features such as uuid_record for call recording while the module handles audio streaming. Use the Named Pipe output when a local process needs PCM audio.

The module is a WebSocket client, not a hosted AI service. Your WebSocket server receives audio, applies application logic and can send audio back for playback.

Native FreeSWITCH recording via uuid_record PCM16 output to local FIFO Backend-agnostic WebSocket transport
APPLICATION SCENARIOS
Voice AIConversational backends
Speech-to-textLive transcription
Text-to-speechAudio playback
Audio processingCustom pipelines
Choose your own WebSocket application and protocol.
COMMUNITY & COMMERCIAL

Start free. Extend when needed.

Use the Community Edition or contact us about commercial capabilities and licensing.

COMMUNITY EDITION

€0 / free

Up to 10 concurrent channels. Download packages for supported Linux distributions.

Download Free →
READY TO STREAM?

Connect FreeSWITCH audio to your application.

Download the module, connect your WebSocket server and take control of live audio.