Why the whole integration is one dialplan entry
How a call to 85 plus a dial code reaches the right AI agent on VICIdial, Asterisk and FreeSWITCH, and why we designed it that way.
By Walter Brennan
Most "AI for call centers" products want to become your phone system. We took the opposite view: your dialer already places the calls, records them and manages agents. The AI only needs to be reachable at an extension.
The extension
Every campaign in Bridgeside AI gets a three-digit dial code. On the dialer, a single pattern serves all of them:
exten => _85XXX,1,Answer()
same => n,Set(PORT=${CURL(${GW}/api/asterisk/rtp?token=…&agent=${EXTEN:2})})
same => n,Dial(UnicastRTP/app.bridgeside.ai:${PORT}/c(ulaw))
The CURL call asks the platform for a media port for this call and tells it which campaign is wanted. The Dial then streams audio both ways. Hangup and transfer come back over AMI, and the disposition goes to VICIdial's non-agent API when the call ends.
FreeSWITCH
FreeSWITCH users get the same thing through mod_audio_stream: one extension that starts a WebSocket to the platform with the dial code in the URL. Transfers and hangups use the event socket.
Why it matters
Because nothing about your trunks, DIDs or agent screens changes, you can try the agent on one campaign this afternoon and turn it off with a routing change if it is not for you.

