Recording non-agent calls with agi-NVA_recording.agi
agi-NVA_recording.agi records calls that bypass the VICIdial agent screen, logging them to user_call_log or call_log and optionally searching vicidial_list for the dialed number.
VICIdial's Call recording system is built around the agent screen — when an Agent is logged in and working a call, recording starts and stops through the standard session flow. But not every call in your Asterisk system goes through an agent session. Managers dialing out directly, inbound calls routed through a Call Menu before an agent picks up, or custom dialplan extensions that bypass the agent interface entirely — none of those get recorded by default.
That is the gap agi-NVA_recording.agi fills. NVA stands for Non-VICIdial-Agent. The script attaches itself to a Dialplan context and handles recording, call logging, and optionally a Lead lookup for calls that the standard agent screen never touches.
What the script records and logs
sequenceDiagram
participant DP as Dialplan
participant NVA as agi-NVA_recording.agi
participant UL as user_call_log
participant CL as call_log
participant REC as Audio Recording
DP->>NVA: AGI call with arguments
NVA->>UL: log if param 3 is Y
NVA->>CL: log if param 4 is Y
NVA->>REC: record audio if param 5 is Y
NVA-->>DP: continue to next dialplan stepRecording and logging are independent switches. You can log to user_call_log without recording audio, record audio without any log entry, or enable all three. The call_log parameter (argument 4) is only needed for inbound and intersystem calls. If you enable it on a standard outbound-agent-context call, you risk creating duplicate log entries.
Arguments and dialplan examples
Arguments are passed in a dash-delimited string. The first argument sets logging output to NONE, STDERR, FILE, or BOTH. The second argument is the VICIdial user ID; if left empty, it defaults to the accountcode on the channel, which is usually the phone Extension. Arguments 3 through 5 are Y/N flags for user_call_log, call_log, and audio recording respectively. Arguments 7 and 8 control whether the Recording format (WAV/MP3) ID is played to the caller before recording starts and whether that ID is embedded in the filename.
; Custom dialplan: log to user_call_log, record audio
exten => _X.,1,AGI(agi-NVA_recording.agi,BOTH------Y---N---Y---N)
exten => _X.,n,Goto(default,${EXTEN},1)
exten => _X.,n,Hangup
; Inbound to agent: also log to call_log
exten => 5678,1,AGI(agi-NVA_recording.agi,BOTH------Y---Y---Y---N)
exten => 5678,n,Goto(vicidial-auto,5678,1)
exten => 5678,n,Hangup
; Call Menu prompt: record and play recording ID
; agi-NVA_recording.agi,BOTH------Y---N---Y---N---Y---YThe On-demand recording ID play option (argument 7 set to Y) causes the script to announce the recording reference number to the caller before the audio capture starts. Argument 8 embeds that same ID in the audio filename, making it easier to locate a specific recording later when the caller quotes their ID.
Lead lookup and NVA list insertion
Arguments 9 through 16 handle an optional Lead lookup against vicidial_list. Set argument 9 to Y and the script searches for the dialed phone number — assuming 10-digit numbers — using either ALLLISTS or a PHONE scope. If the number is not found and you have argument 11 set to Y, the call ends with an error before recording starts. If argument 13 is Y, the script instead inserts the number as a new lead into the NVA List ID configured on the phone record, with optional overrides for list ID, phone code, and status in arguments 14 through 16.
For a full picture of where this script fits among the other AGI tools, the VICIdial API and AGI overview explains how each script layer connects. The HTTP-side equivalent for non-agent actions is covered in non-agent API vs agent API.
Every VICIfast plan ships a VICIdial instance provisioned in under 40 seconds with the default dialplan already in place, so you can drop in agi-NVA_recording.agi entries without starting from scratch.
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. “Recording non-agent calls with agi-NVA_recording.agi”. VICIfast LLC, June 28, 2026. Retrieved from https://vicifast.com/blog/use-agi-nva-recording
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.