What agi-VDAD_ALL_outbound.agi does on the outbound side
agi-VDAD_ALL_outbound.agi consolidates eight separate outbound transfer scripts, routing answered outbound calls to agents or running survey, broadcast, and reminder campaigns.
Once an outbound dialed call is answered, VICIdial needs to connect it to a live Agent or play an automated message. That handoff is the job of agi-VDAD_ALL_outbound.agi. This AGI (Asterisk Gateway Interface) script runs inside the Asterisk dialplan the moment the remote party picks up, and it consolidates eight separate outbound transfer scripts that previously existed as individual files. By centralizing the logic, a single dialplan extension block handles standard agent delivery, survey campaigns, broadcast messages, and reminder calls.
It is the outbound counterpart to agi-VDAD_ALL_inbound.agi. The inbound script answers a call coming into the system and finds a closer for it; this script takes a call your dialer placed and finds an agent to hand it to. Both share the same agent search methods and the same five-dash argument convention, so once you read one, the other reads the same way. The difference is direction. Inbound starts from a caller you did not control, while outbound starts from a number the Campaign selected from the Hopper and dialed through your Carrier. The lead is already known on the outbound side, because the dialer chose it, so this script does not need the caller ID lookup step the inbound script relies on.
How an answered call gets routed
flowchart TD
A[Outbound call answered] --> B[agi-VDAD_ALL_outbound.agi invoked]
B --> C{Call handling method}
C -->|NORMAL| D[Find available agent via LB/LO/SO]
C -->|SURVEY| E[Play survey audio file]
C -->|BROADCAST| F[Play message to caller]
C -->|REMINDER| G[Play reminder message]
C -->|REMINDX| H[Play reminder then transfer to agent]
E --> I{DTMF response}
I -->|opt-in digit| D
I -->|opt-out digit| J[Set DNC or status and hangup]
D --> K[Deliver call to agent screen]
F --> L[Hangup]
G --> LThe first argument sets the handling method. NORMAL is the default and covers standard predictive and preview dialing — the call goes to an agent as soon as one is found. BROADCAST plays a message without any agent involvement. SURVEY plays a question audio file and waits for a DTMF key press (Dual-Tone Multi-Frequency — the tones a phone keypad sends) DTMF, then either transfers the caller to an agent or logs an opt-out. REMINDER plays an appointment reminder and hangs up, while REMINDX plays the reminder then transfers to a live agent.
Parameters and dialplan wiring
The second argument is the agent search method: LB for load balance across all servers (the default), LO to prioritize the home server before overflowing, or SO to stay on the home server only. The third argument sets the connected line name, which solves caller ID name display issues on the agent side. Arguments four through ten are only used for survey and reminder variants: the audio file to play, the acceptable DTMF digits, the opt-out digit, the transfer audio file, the DNC audio file, and an OPTIN or OPTOUT flag that controls whether the call goes to an agent on a button press or on silence.
exten => 8368,1,AGI(agi://127.0.0.1:4577/call_log)
exten => 8368,2,AGI(agi-VDAD_ALL_outbound.agi,NORMAL-----LB-----${CONNECTEDLINE(name)})
exten => 8368,3,AGI(agi-VDAD_ALL_outbound.agi,NORMAL-----LB-----${CONNECTEDLINE(name)})
exten => 8368,4,AGI(agi-VDAD_ALL_outbound.agi,NORMAL-----LB-----${CONNECTEDLINE(name)})
exten => 8368,5,HangupNotice that the script is called three times on priorities 2, 3, and 4. This is intentional. The script returns control to Asterisk if it cannot place the call with an Agent on the first pass, and the next priority calls it again so the search can retry. Each pass re-checks which agents are free, so a call that found nobody a moment ago can still connect if an agent finishes a wrap-up between attempts. If all three passes fail, Asterisk falls through to Hangup and the call ends.
Call logging and the connected line name
The first priority in the example is not the outbound script at all — it is AGI(agi://127.0.0.1:4577/call_log), a connection to the local ASTGUIclient call-log listener. This records the call event before the agent search runs, so the call is tracked even if no agent picks it up. Running call_log first means your reporting reflects every answered outbound call, not only the ones that reached an agent.
The ${CONNECTEDLINE(name)} passed as the third argument carries the connected line name from the channel into the script. This solves a real display problem: some carriers rewrite the caller ID name mid-call, which can leave the agent screen showing the wrong name. Passing the channel value through explicitly preserves the name VICIdial expects. If you leave it empty, the agent screen still works, but the connected name may change on calls routed through certain trunks.
Survey opt-in and opt-out behavior
For survey campaigns, the OPTIN flag means the call only transfers to an agent if the caller presses the designated button. OPTOUT does the opposite: the call transfers unless the caller presses the opt-out digit. If the opt-out status is set to DNC, the script also inserts the number into the internal do-not-call table — a list of numbers the Campaign is not allowed to dial again DNC list.
For the full picture of how outbound AGI scripts fit into the VICIdial architecture, see the VICIdial API and AGI overview. If you want to understand how inbound calls are handled by the complementary script, see the comparison of Non-Agent API versus Agent API for context on where AGI fits relative to HTTP-based integrations.
If you want a server with the outbound dialplan configured from day one, see the VICIfast plans — every box provisions in under 40 seconds with the standard AGI dialplan in place.
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_outbound.agi does on the outbound side”. VICIfast LLC, June 28, 2026. Retrieved from https://vicifast.com/blog/use-agi-vdad-all-outbound
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.