Bridgeside AI
← All integrations
FreeSWITCH integration

FreeSWITCH with mod_audio_stream and the event socket

A single extension starts a WebSocket audio stream to Bridgeside AI; hangup and transfer come back over ESL. No RTP port range to open.

Requirements
  • FreeSWITCH 1.10 or newer with mod_audio_stream loaded
  • mod_event_socket reachable on TCP 8021 from Bridgeside AI only
  • Outbound TCP 443 to app.bridgeside.ai
How it connects

FreeSWITCH in 4 steps

01

Load mod_audio_stream

Install the open-source mod_audio_stream module and make sure mod_event_socket listens on an address Bridgeside AI can reach, protected by a strong password and an inbound ACL.

02

Add the dialer

Type FreeSWITCH, host, ESL port (8021) and password, and the dialplan context used for transfers (for example default).

03

Paste the extension

The generated extension answers, starts `uuid_audio_stream` to wss://app.bridgeside.ai/fs with the dial code in the URL, and parks the call. Reload the dialplan.

04

Route calls

Send DIDs or IVR options to 85 + dial code. The agent transfers by uuid_transfer into your context.

The dialplan

What you paste into FreeSWITCH

Generated with your token on the Dialers page.

  • Audio over a single WebSocket (TLS), 8 kHz mono
  • Hangup and transfer over ESL
  • Heartbeat keeps long calls alive
  • Caller id and lead name passed through the URL
  • Same campaigns, voices and appointment booking
<extension name="bridgeside_ai">
  <condition field="destination_number" expression="^85(\d{3,6})$">
    <action application="answer"/>
    <action application="sleep" data="200"/>
    <action application="set" data="STREAM_HEART_BEAT=15"/>
    <action application="set" data="api_result=${uuid_audio_stream ${uuid} start wss://app.bridgeside.ai/fs?token=…&amp;agent=$1&amp;uuid=${uuid}&amp;phone=${caller_id_number} mono 8k}"/>
    <action application="park"/>
  </condition>
</extension>
FAQ

FreeSWITCH questions

Why WebSocket instead of RTP?+

mod_audio_stream is the cleanest way to fork audio out of FreeSWITCH and it travels over TLS on 443, so nothing else needs to be opened inbound except ESL.

Can I keep FreeSWITCH recording?+

Yes. The call stays on your switch; record_session works as usual.

Put an agent on FreeSWITCH this afternoon

60 free minutes, no card, one dialplan entry.