Why an AI Voice Agent Platform Should Need Only One Dialplan Entry
How a call to 85 plus a dial code reaches the right AI agent on VICIdial, Asterisk and FreeSWITCH, what each line does, and why the smallest integration is the right design.
By Walter Brennan
Most "AI for call centers" products want to become your phone system. We took the opposite view when we built Bridgeside AI: an AI voice agent platform should not ask you to move your trunks, numbers, lists or agents. Your dialer already places the calls, records them and manages your people. The AI only needs to be reachable at an extension, the same way a human seat or a queue is.
This post explains how that works on VICIdial, Asterisk and FreeSWITCH, what each line of the dialplan entry does, and why we think the smallest possible integration is the right design.
What an AI voice agent platform needs from your dialer
Strip the problem down and an AI agent needs three things from the phone system:
- Audio in both directions, with little delay. The agent has to hear the caller and answer without a noticeable lag.
- Call control. The agent must be able to hang up when the conversation is done and transfer a qualified caller to a person.
- A place to write results. The outcome of the call (disposition, summary, do-not-call requests) has to land where your team already looks.
Everything else, the script, the voice, the qualifying questions and the transfer rules, lives on the platform. None of it needs to touch your dialer configuration. That is why the dialer side can be so small.
The extension, line by line
Every campaign in Bridgeside AI gets a three-digit dial code. On a VICIdial or Asterisk server, a single pattern serves all of them. The portal generates the entry with your organization's token filled in. A simplified version looks like this:
exten => _85XXX,1,Answer()
same => n,Set(PORT=${CURL(https://app.bridgeside.ai/api/asterisk/rtp?token=…&agent=${EXTEN:2})})
same => n,Dial(UnicastRTP/app.bridgeside.ai:${PORT}/c(ulaw))
same => n,Hangup()
_85XXXmatches 85 followed by any three digits. A call to85101reaches the campaign with dial code 101.Answer()picks up the channel.- The
CURLline asks the platform for a media port for this one call and tells it which campaign is wanted.${EXTEN:2}strips the 85 and leaves the dial code. Dial(UnicastRTP/...)streams the call audio to that port and carries the agent's voice back, in G.711 u-law, the codec your calls already use. There is no transcoding.Hangup()cleans up when the bridge ends.
You paste this once. VICIdial users put it in the server's Custom Dialplan Entry. Plain Asterisk, FreePBX and Issabel users put it in extensions_custom.conf. Reload the dialplan and you are done. Every campaign you create later works without another change on the dialer. The step-by-step version is in our guide to adding an AI voice agent to VICIdial.
How hangups, transfers and dispositions get back
Audio is only half of it. The platform keeps one Asterisk Manager Interface (AMI) connection to each dialer you register, and it uses very little of it: the hangup event, Hangup and Redirect.
When the agent decides a caller is qualified, it redirects the live channel to the in-group, extension or number you set on the campaign. The caller never hangs up and is never re-dialed. When the conversation is over, the agent hangs up the channel and your dialer's normal cleanup runs.
After each call the platform classifies the conversation. On VICIdial it writes a disposition status, a two-line summary and any do-not-call request back to the lead through the non-agent API. Every campaign can also send signed webhooks (call.started, call.transferred, call.appointment and call.ended) to your CRM or any other system, including the answers the agent collected to your qualifying questions.
FreeSWITCH and Twilio
FreeSWITCH gets the same idea with different plumbing. One dialplan extension matches 85 plus the dial code, answers, and starts mod_audio_stream, which opens a WebSocket to the platform. Transfers and hangups go over the Event Socket Layer (ESL). Our FreeSWITCH guide covers the details.
If you do not run your own switch, Twilio works too. Point a number's voice webhook at the campaign's answer URL and Twilio streams the call to the agent through media streams.
Why we chose the smallest possible integration
You can try it this afternoon
Nothing about your trunks, DIDs, lists or agent screens changes, so a pilot is one dialplan entry and one routing change on a single campaign. You can listen to real calls the same day instead of planning a migration.
You can turn it off with one change
If the agent is not right for a campaign, route that campaign back to your human agents. There is no data to move and no numbers to port back. That makes the decision to try it much cheaper.
Your dialer keeps doing what it is good at
Pacing, list management, local call times, recording and reporting stay in VICIdial or Asterisk. The agent is the far end of a normal bridge, so your existing recordings capture the whole call. Bridgeside AI does not store call audio.
New campaigns never touch the dialer again
Adding a campaign, changing a script, switching a voice or testing two versions of an opener all happen on the portal. The dialplan entry stays exactly as it was on day one.
What you need before the first call
- A dialer you control: Asterisk 15 or newer (VICIdial's own builds are fine), or FreeSWITCH with
mod_audio_streamloaded. - AMI (TCP 5038) or ESL (TCP 8021) reachable from the platform's address only, never from the whole internet.
- Outbound UDP for call audio and HTTPS to the platform, which most dialers already allow.
- For VICIdial dispositions, a non-agent API user with Modify Leads set to 1 and user level 8 or higher.
The free trial includes 60 minutes with no card, so you can hear the agent on your own calls before you look at pricing.
FAQ
Do I need a separate dialplan entry for each campaign?
No. The _85XXX pattern covers every dial code. A new campaign gets a new code on the portal and works through the same entry.
Does the AI replace my dialer's call recording?
No. The agent is the far end of an ordinary bridge, so the recording you already run captures both sides. Bridgeside AI keeps a transcript of each call for the retention period your organization chooses, from 1 to 90 days, and does not store audio.
What happens if the platform cannot give the call a port?
The generated entry checks for an empty answer. By default the caller hears a short busy message and the call ends. You can change that branch to send the call to a human in-group instead.
Does it work with FreePBX and Issabel?
Yes. Put the entry in extensions_custom.conf and point an inbound route, queue failover or IVR option at it, for example with a FreePBX Custom Destination. See Asterisk and FreePBX for the full setup.