VICIfast
Operations

The IVR Recording Verification AGI explained (3rd-party verify)

VICIdial's IVR_recording_verification AGI automates 3rd-party consent recording: it walks callers through a scripted IVR and logs all responses to the vicidial_ivr database table.

VICIfast Support
··2 min read
The IVR Recording Verification AGI explained (3rd-party verify)

Third-party verification (TPV) is a compliance requirement in many industries: a customer's verbal consent must be recorded by a system that has no commercial interest in the sale. VICIdial's agi-IVR_recording_verification AGI (Asterisk Gateway Interface) handles this entirely inside Asterisk. It runs an automated IVR (interactive voice response) session, records the call, collects digit responses, and logs everything to the vicidial_ivr table.

What the AGI does, step by step

When a call reaches the IVR_recording_verification AGI, it works through a configurable sequence:

  1. Optionally plays the recording ID with an introductory prompt.
  2. Optionally records this call (Y/N configurable in the argument string).
  3. Optionally asks the caller to enter a company code (digit count and prompt are configurable).
  4. Optionally asks for a user code with a configurable digit count.
  5. Optionally asks for the customer phone number with a configurable digit count (example: Y-10-85100001 means yes, 10 digits, play prompt 85100001).
  6. Optionally speaks the current date.
  7. Plays a dash-delimited list of consent prompts, each expecting a single digit 1–9 response.
  8. Plays a closing prompt that announces the recording ID.
  9. Logs the full session to the vicidial_ivr table, and optionally to a log file or STDERR.

Digit acceptance rules

The AGI accepts only digits 1 through 9 at each prompt step. Hash (#), star (*), and zero (0) are explicitly rejected. A typical convention is 1 for yes and 3 for no, though any 1–9 digit can be mapped to a prompt's meaning. This keeps the IVR from accepting accidental presses of common phone keys.

**Heads up:** Your audio prompts need to match your digit scheme. If your prompt says 'press 1 for yes or 2 for no' but you have not mapped digit 2 to anything in the prompt list, callers who press 2 may get stuck or time out. Test the full prompt sequence end-to-end before going live.

Dialplan setup

sequenceDiagram
  participant C as Customer
  participant A as Asterisk IVR
  participant D as vicidial_ivr table
  C->>A: Call arrives on DID
  A->>C: Play recording ID prompt
  A->>C: Ask for company code
  C->>A: Enter digits
  A->>C: Ask consent question 1
  C->>A: Press 1 yes
  A->>C: Ask consent question 2
  C->>A: Press 1 yes
  A->>C: Play closing recording ID
  A->>D: Log full session

For a direct inbound DID the dialplan entry looks like this (arguments condensed for readability):

exten => 1234,1,Ringing

exten => 1234,2,Wait(1)

exten => 1234,3,Answer

exten => 1234,4,AGI(agi-IVR_recording_verification.agi,<argument-string>)

For a VICIdial transfer from an agent, use the _83002*. wildcard context pattern. The DNIS field in the argument string should match the number the customer originally called.

Logging and the vicidial_ivr table

Every session is written to the vicidial_ivr table. The logging parameter accepts FILE, STDERR, BOTH, or NONE. The script uses /etc/astguiclient.conf for database connection settings and the log file path — it does not need any extra database configuration beyond a working astguiclient install.

For the base Call recording concepts this AGI builds on, see VICIdial call recording explained. For a comparison of all three recording AGIs, see the recording AGIs overview.

Running a compliance-focused contact center? See VICIfast pricing — managed hosting means your recording infrastructure stays current without manual patching.

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. “The IVR Recording Verification AGI explained (3rd-party verify)”. VICIfast LLC, June 24, 2026. Retrieved from https://vicifast.com/blog/vicidial-ivr-recording-verification-agi

Have questions?

Related posts

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

Comments are reviewed before they appear. We never publish your email.

No comments yet — be the first.