On this page
The cleanest way to add an AI voice agent to VICIdial is to let VICIdial keep dialing and send answered calls to the AI over SIP, the same way it sends calls to a remote agent. The AI talks to the lead, transfers qualified people to your closers, and writes the result back to the lead through VICIdial's APIs. Your lists, hopper, call times and reports stay where they are.
Two ways to connect an AI voice agent to VICIdial
There are two architectures. Both work. They suit different teams.
Option 1: VICIdial dials, the AI answers
VICIdial stays in charge of dialing. It works through the hopper, places calls, handles answer detection and drop rates, and routes each answered call to an agent. The AI is set up as one of those agents: a SIP endpoint that VICIdial can send calls to, usually configured as a remote agent or reached through a custom carrier or extension.
When the call lands, the AI receives the call ID and phone number, looks up the lead, and starts talking. VICIdial's own Agent API includes a remote agent call control function (ra_call_control) that can hang up a remote agent's call or transfer it to an extension or an in-group, and log a status while doing so.
Option 2: the AI platform dials by itself
Here the AI platform has its own trunk, its own lists and its own dialing logic. VICIdial is either not involved or only receives the transferred calls. This is simpler if you have no dialer today. It is harder if you do, because you now have two systems deciding who gets called, two sets of Do Not Call checks and two places to report from.
| VICIdial dials, AI answers | AI platform dials | |
|---|---|---|
| Who owns lists and hopper | VICIdial | The AI platform |
| Answer detection | VICIdial or the AI, your choice | The AI platform |
| Reporting | Stays in VICIdial | Split, unless you sync |
| Transfer to closers | VICIdial in-groups | SIP transfer into VICIdial |
| Best for | Teams already running VICIdial | Teams without a dialer, or a separate campaign |
For most VICIdial shops, option 1 is the one to start with. You change one thing, who answers the call, and keep everything else you already trust.
The call flow, step by step
Here is what happens on a single call in option 1, for example:
- VICIdial pulls a lead from the hopper and dials it on your carrier.
- The lead answers. VICIdial runs its answer handling, or passes the call straight on.
- VICIdial routes the call to the AI endpoint over SIP, with a call ID that ties it to the lead.
- The AI looks up the lead (name, list fields, notes) and opens the conversation using your script.
- It handles the talk: confirms the person, qualifies them, answers questions from the script, handles objections.
- If the person qualifies and wants to talk now, the AI transfers the call to a closer in-group.
- If not, the AI sets an outcome: not interested, call back later, wrong number, voicemail.
- The AI writes that disposition and a short call summary back to the lead in VICIdial.
- VICIdial uses the status as usual for recycling, callbacks and reports.
Step 2 matters more than it looks. If VICIdial runs its own answering machine detection before handing over, the person may say "hello" and hear nothing while detection finishes. We cover why in answering machine detection and dead air. One option is to send answered calls to the AI immediately and let it detect voicemail itself while it speaks.
Transferring qualified calls to closers
The transfer is the point of the call, and it is where many pilots break. There are two ways to do it.
Transfer through VICIdial
The AI asks VICIdial to move the call. For a remote agent call, ra_call_control with the INGROUPTRANSFER stage sends it to an in-group, where your closers pick it up like any other inbound or closer call. For an agent that is logged into the agent screen, the Agent API's transfer_conference function offers a LOCAL_CLOSER option that sends the call to an in-group, and consultative options that keep the customer on while a closer joins.
The advantage: the closer gets the lead record on screen, and VICIdial logs the transfer.
Transfer by SIP
The AI's side either bridges the call to a new destination, or sends a SIP REFER, the standard message defined in RFC 3515 that asks the other end to connect to someone else. A bridge keeps the AI's media path in the call. A REFER hands the call back so the AI drops out. Which works depends on your Asterisk and carrier setup, so test both.
Either way, decide what happens when no closer is free. Options include queuing with a short message, booking a callback, or letting the AI keep the conversation going. Dropping a hot lead into silence is the worst outcome.
Writing dispositions and notes back to the lead
If the AI's results do not land in VICIdial, your recycling rules, callbacks and reports go blind. VICIdial's Non-Agent API handles this. Its update_lead function finds a lead by lead ID, vendor lead code or phone number and can set the status (up to six characters) and the comments field (up to 255 characters), along with other lead fields and custom fields. The API user needs API access and lead-modify permissions, and the documentation asks you to avoid apostrophes, double quotes and ampersands in values.
An illustrative request looks like this:
# Illustrative only: set a disposition and a short note on lead 12345
https://your-vicidial/vicidial/non_agent_api.php
?source=aiagent
&user=apiuser
&pass=********
&function=update_lead
&lead_id=12345
&status=CALLBK
&comments=Interested+in+renewal.+Asked+for+a+call+after+5pm.
A few practical rules:
- Create the statuses first. Add the AI's outcome codes to the campaign before go-live, so they show up in reports and recycling.
- Keep the comments short. 255 characters is a summary, not a transcript. Store the full transcript and recording elsewhere and put a reference in a custom field if you need it.
- Use HTTPS and a dedicated API user with only the permissions it needs.
What to test in a pilot
Start small: one campaign, one list, a few hours a day, with a person listening to every call for the first days. Check these:
| What to test | How to check it |
|---|---|
| Silence after "hello" | Listen to the first five seconds of each call |
| Voicemail handling | Count voicemails the AI talked to as if they were people, and people it treated as voicemail |
| Lead lookup | Does the AI greet the right person with the right details? |
| Script adherence | Spot-check transcripts against your approved script |
| Transfers | Did every transfer reach a closer, and did the closer see the lead? |
| Dispositions | Do statuses and comments in VICIdial match what happened? |
| Calling rules | Are call times, Do Not Call and retry limits respected? |
| Cost | Compare spend per qualified transfer, not per minute |
On the last point, short AI calls are where billing increments add up; we explain the maths in AI call center costs: per second vs per minute.
Common failure points
Dead air
The most common complaint. It comes from answer detection running before handover, slow SIP setup, or an AI that waits to be spoken to. The fix is to hand the call over fast and have the AI speak first.
Dropped transfers
Transfers fail for dull reasons: the in-group has no agents logged in, the closer's phone rings out, codecs do not match, or the carrier rejects the REFER. Test every transfer path with real phones before you go live, and decide what the AI says when nobody picks up.
Caller ID reputation
An AI agent does not fix a bad number. If your outbound numbers are labelled as spam, fewer people answer, whatever answers the call. In the US, the FCC requires voice providers to use the STIR/SHAKEN caller ID authentication framework on IP networks, which lets carriers check that the number shown has not been spoofed. Make sure your carrier signs your calls, register your numbers with the analytics providers where you can, and watch answer rates per number.
Calling rules differ by country and change often. Check yours with a lawyer before any pilot; this post is not legal advice.
Where LeadPulse fits
LeadPulse, the AI voice agent Procelo builds for call centres, is designed for option 1. VICIdial keeps dialing, answered calls reach the assistant over SIP, and it looks up the lead and writes the disposition and a call summary back through the Non-Agent API. Claude runs the conversation from your script in English or Spanish. It transfers by bridge or SIP REFER, detects voicemail by LLM, audio or both, records and transcribes every call, follows calling-hour, Do Not Call and retry rules, and is billed per second. It can also run its own outbound campaigns or answer inbound numbers if you prefer option 2. For a broader view of what AI can and cannot take over, read can AI replace call center agents, or book a call to plan a pilot on your own VICIdial.
Frequently asked questions
Can VICIdial send calls to an AI voice agent?
Yes. VICIdial routes answered calls to agents over SIP, and an AI agent can be one of those endpoints, typically set up as a remote agent or through a custom carrier or extension. The exact setup depends on your VICIdial version and Asterisk configuration.
Do I need to replace VICIdial to use an AI agent?
No. In the most common setup VICIdial keeps doing what it does well: lists, hopper, dialing, call times and reporting. The AI only takes over the conversation on answered calls.
How does the AI pass a call to a human closer?
Either through VICIdial, by asking it to transfer the call to a closer in-group, or at the SIP level with a bridge or a REFER. Transferring through VICIdial is usually better, because the closer gets the lead on screen and the transfer is logged.
How do AI call results get back into VICIdial?
Through the Non-Agent API. The update_lead function can set the lead's status and comments, so the AI's outcome and a short summary sit on the lead like any agent disposition.
What should a first pilot look like?
One campaign, one list and limited hours, with a person reviewing calls daily. Measure silence after hello, voicemail handling, transfer success and whether dispositions match reality before you add volume.
Sources
- VICIdial Agent API, VICIdial Group, 2024
- VICIdial Non-Agent API, VICIdial Group, 2024
- RFC 3515: The Session Initiation Protocol (SIP) Refer Method, IETF, 2003
- Combating spoofed robocalls with caller ID authentication, Federal Communications Commission, 2024




