What agi-VDAD_ALL_inbound.agi does with an inbound call
agi-VDAD_ALL_inbound.agi consolidates thirteen separate inbound closer scripts into one, routing inbound calls to available agents based on caller ID handling method and in-group.
When an inbound call lands on your VICIdial system, something has to decide who answers it. That job belongs to agi-VDAD_ALL_inbound.agi. It is a single AGI script (Asterisk Gateway Interface — a program Asterisk calls mid-dialplan to run external logic) AGI (Asterisk Gateway Interface) that consolidates thirteen separate inbound closer scripts into one. Before this consolidation existed, each handling variation had its own file; now they all share one entry point driven by parameters you set in the Dialplan or in the DID and Call Menu settings of your VICIdial admin panel.
A DID (direct inward dialing) (Direct Inward Dialing number) or a Call Menu in VICIdial sets the parameters automatically, so you do not need to hard-code argument values in the dialplan entry for normal inbound routing. The script takes over from Asterisk once the call is answered and delivers it to a waiting Agent.
How the script routes an inbound call
flowchart TD
A[Inbound call answered] --> B[agi-VDAD_ALL_inbound.agi invoked]
B --> C{Caller ID method}
C -->|CID| D[Add new lead with caller phone number]
C -->|CIDLOOKUP| E[Search whole system for existing lead]
C -->|CIDLOOKUPRC| F[Search within one campaign lists]
C -->|CLOSER| G[Fronter transfer call arriving]
D --> H{Agent search method}
E --> H
F --> H
G --> H
H -->|LB| I[Load balance across all servers]
H -->|LO| J[Priority to home server then overflow]
H -->|SO| K[Home server only]
I --> L[Deliver call to in-group queue]
J --> L
K --> LThe first parameter controls caller ID handling. The most common choices are CID (the script receives the caller number and creates a new Lead record with it), CIDLOOKUP (it searches the entire system for an existing lead matching that number), and CLOSER (the call is a transfer from a VICIdial fronter or a previous in-group call). There are also ANI variants for RBS T1 lines, VID variants for vendor lead codes prompted through an IVR, and 3DIGITID/4DIGITID variants that let a caller enter an agent extension directly.
Parameters and dialplan wiring
The script accepts up to sixteen arguments, separated by five dashes. The most important are the caller ID handling method (argument 1), the agent search method (argument 2), the Ingroup name (argument 3), the phone number that was called for log purposes (argument 4), and the list ID to use when creating a new lead record (argument 8). Arguments 13 through 16 are only used when the method is a VID variant with IVR prompting.
exten => 1234,1,Answer
exten => 1234,2,AGI(agi-VDAD_ALL_inbound.agi,CID-----LB-----INB-----7274515134-----Closer-----park----------999-----1-----OUTB)
exten => 1234,3,HangupIn this example CID tells the script to capture the caller number, LB load-balances across all servers, INB is the in-group name, and 999 is the list ID for new lead records. DID forwarded calls can also invoke the script with no arguments at all — the DID record in VICIdial admin supplies the parameters at runtime.
When to use each caller ID method
Use CID when you want every inbound caller to generate a fresh lead. Use CIDLOOKUP when callers are existing contacts and you want the agent to see their history. The restricted variants CIDLOOKUPRL and CIDLOOKUPRC narrow that search to a single Lead list or Campaign respectively, which matters when you run multiple campaigns and do not want leads from an unrelated list surfacing on the agent screen.
For an overview of where this AGI fits alongside the full set of API and AGI tools, see the VICIdial API and AGI overview. If you are also working with non-AGI integrations, the guide on calling the Non-Agent API covers the HTTP-based side of the picture.
If you want a VICIdial server that already has the inbound dialplan in place and ready for calls, every VICIfast plan provisions a fully configured box in under 40 seconds.
About VICIfast LLC
VICIfast LLC operates a managed VICIdial hosting + BYOI service for outbound and inbound call centers. We run the dialers, the carriers, the recordings pipeline, and the compliance plumbing so operators don’t have to.
Citing this article
VICIfast Engineering. “What agi-VDAD_ALL_inbound.agi does with an inbound call”. VICIfast LLC, June 28, 2026. Retrieved from https://vicifast.com/blog/use-agi-vdad-all-inbound
Have questions?
You might be interested in
VICIfast newsletter
Liked this? Get the next one in your inbox.
We ship the kind of stuff you just read — concrete, numbers-first, no drip. One email when a new post goes live. Unsubscribe in one click.
Comments
No comments yet — be the first.