Reader setup
Before you apply
- A disposable lab campaign with a synthetic agent and a recorded consent test script
- Written approval for recording, retention and sending the test audio to the selected provider
- A read-only Non-Agent API account with user_level 7 or higher and "view reports" enabled for recording_lookup — see Check VICIdial Non-Agent API access if you do not have one yet — or read-only access to an already-exported recording copy as a fallback
- Expected result
- You will produce one reviewable transcript and prove that the original recording, transcript and call identifier stay linked without changing live call routing.
- Before making changes
- Do not send customer recordings, phone numbers, payment data, health data, credentials or live audio to a new service for this exercise. Stop if consent, retention or processor approval is unclear.
Guided example: find the recording with recording_lookup before you touch a file
Use one fictional or otherwise authorized test recording and an account with access to that file only. Compare the returned transcript with the audio, then delete the test data according to the service’s documented process.
VICIdial ships its own tool for finding a recording: the Non-Agent API's `recording_lookup` function searches read-only by agent and date, or by a lead's numeric lead_id — see Check VICIdial Non-Agent API access for the full function list, its permission model and how to set up the credential file. The account you use for it needs user_level 7 or higher and "view reports" enabled; confirm or create that account with your VICIdial administrator before your first request.
That lookup exists because the recording itself is not in one predictable place: on our ViciBox 12 lab, a campaign's recording extension runs Asterisk's `Monitor()` application, and a separate cron job later mixes the two call legs and moves the finished files into format and stage subfolders. `recording_lookup` hides that internal layout instead of asking you to reconstruct it, which is why it is the first step here, not a last resort.
A transcription workflow built on top of that lookup is still a much smaller change than letting a bot answer or place calls: a worker copies one approved recording, sends it to a speech-to-text API, and places the result in a review queue. Start here so the team can validate accuracy, privacy, retention and identifiers before any live media design.
A fresh lab with no completed test calls yet is expected to return a NO RECORDINGS FOUND line, not a fault in your request. Treat that response as the correct baseline and place at least one completed, consented test call through your disposable campaign (see Place and disposition a VICIdial test call if you have not placed one yet) before concluding the lookup is broken.
recording_lookup also accepts uniqueid and extension as alternate search fields alongside agent and date, and a duration=Y setting that adds each recording's length in seconds ahead of its location — useful context to log in your manifest without needing the file itself.
- Before you use it
- Point <AGENT_USER> and <YYYY-MM-DD> at your own disposable lab campaign and a day it actually ran test calls, never a real agent's schedule. Confirm the API account has user_level 7 or higher and "view reports" before the first call.
curl --fail-with-body --silent --show-error --config /etc/vicidial-api/readonly.cfg \ --data-urlencode "function=version" curl --fail-with-body --silent --show-error --config /etc/vicidial-api/readonly.cfg \ --data-urlencode "function=recording_lookup" \ --data-urlencode "agent_user=<AGENT_USER>" \ --data-urlencode "date=<YYYY-MM-DD>" \ --data-urlencode "header=YES"This example has no recorded result here. Follow its preparation, expected result and stop conditions before using it.
- Success looks like
- The version call echoes this build's API version, then recording_lookup returns either a pipe-delimited row starting with the call's start time, or a NO RECORDINGS FOUND line — both are valid outcomes, and the second is the expected one on a lab with few or no completed test calls.
- Stop if
- USER DOES NOT HAVE PERMISSION TO GET RECORDING INFO means the account is missing user_level 7 or "view reports" — fix the account with your administrator rather than widening the search to a whole campaign or an open date range to force a result.
Reference screenshots 3 images
Reference capture
Reference screens from the demo
Captured on an isolated VICIdial demo: Administration screens on September 24, 2026, and the idle Agent screen on August 11, 2026. Each caption states its own capture time, and every sanitized image helps you recognize a related screen; none proves that this article's call, command, or result occurred.Open the script workspace
Open to enlargeCapture details
No scripts are defined for the fixture account, so the listing is empty. It does not show a script execution, CRM exchange, or call result.Check list-level form and URL fields
Open to enlargeCapture details
This is list configuration rather than a lead record; it contains no customer row and does not prove a dialing or import result.Recognize where the agent sees the workflow
Open to enlargeCapture details
This is a real logged-in idle Agent screen with session and system identifiers redacted. Customer fields are blank, and it does not prove a placed, answered, recorded, transferred, or completed call.Use one stable identifier and a written data boundary
Pick one non-secret correlation value already allowed by your lab—such as an internal test call ID—and store it beside every job. Do not use a phone number as the job key. The worker needs a small manifest: recording path, checksum, internal call ID, consent flag, creation time and retention deadline.
A transcript is derived customer data, not harmless debug text. Decide who can read it, where it is stored, how long it lasts, and how deletion reaches both the audio and downstream transcript before the first upload.
Guided example: inventory an already-exported copy (fallback)
If you are working from an already-exported copy of what `recording_lookup` reported, rather than calling the API directly for this exercise, this command lists only WAV files in a dedicated lab export directory and calculates a checksum. It does not contact an AI provider or change Asterisk, and it is a fallback step, not the first place to look.
Point this only at a dedicated export directory you control, never at Asterisk's own recording tree. If you need to confirm that a stage folder exists there, list the directory itself, never its contents, and let recording_lookup or your recording owner supply the actual file.
- Before you use it
- Create or obtain this lab-only directory through the recording owner; replace neither path with a production recording directory.
LAB_AUDIO=/srv/vicigeek-lab/audiofind "$LAB_AUDIO" -maxdepth 1 -type f -name '*.wav' -printf '%f\n'sha256sum "$LAB_AUDIO/test-call-001.wav"This example has no recorded result here. Follow its preparation, expected result and stop conditions before using it.
- Success looks like
- You see the approved filename and one checksum you can record in the test manifest.
- Stop if
- Stop if the filename or directory suggests a live customer recording, or if you cannot verify its consent status.
Guided example: submit one approved file for transcription
The provider endpoint and model below are an example of a documented audio-transcription API. Keep the API key in an environment variable supplied by a secret manager; never put it in a VICIdial campaign, browser page, shell history, article screenshot or source control.
The response is evidence for review, not a disposition and not an automatic update to a lead. A transcript can contain recognition errors and must not change customer or agent records without a person-approved rule.
- Before you use it
- Use only a consented synthetic recording and a least-privilege project key. Confirm the provider, region, retention and contractual settings with the data owner first.
: "${TRANSCRIPTION_API_KEY:?Supply the key through your secret manager}"curl --fail-with-body https://api.openai.com/v1/audio/transcriptions \ -H "Authorization: Bearer $TRANSCRIPTION_API_KEY" \ -F file=@/srv/vicigeek-lab/audio/test-call-001.wav \ -F model=gpt-4o-transcribe \ -o /srv/vicigeek-lab/output/test-call-001.jsonThis example has no recorded result here. Follow its preparation, expected result and stop conditions before using it.
- Success looks like
- curl exits successfully and creates a JSON response for the single lab file; inspect it locally before storing or sharing it.
- Stop if
- Stop on an authorization, location or policy error. Do not retry by weakening TLS, disabling logging, or switching to real recordings.
Review accuracy before you build automation
Compare the transcript with the known lab script. Record omissions, incorrect names, speaker confusion and timestamps that matter to the intended use. If you need speaker labels, test that as a separate acceptance criterion; do not assume that a transcript identifies agent and customer correctly.
Do not score agents, infer eligibility, or trigger customer actions from the first experiment. A human reviewer should approve any structured fields before they are written to a CRM or report.
Only then assess a live voice-bot design
A real-time bot needs its own routing, interruption, escalation to a human, DTMF, recording, disclosure, outage and fallback decisions. Asterisk ARI can manipulate media and emits events over a WebSocket, but whether it fits a particular VICIdial build is an architecture question to test in a separate isolated environment.
Keep the initial production candidate asynchronous: completed recording to bounded review queue. It avoids making call completion depend on an external AI service and gives the team a clean stop switch: disable the worker while VICIdial and Asterisk continue their normal call flow.
- The recording was synthetic and consented.
- Record the transcript’s test ID, its deletion date and who will delete it; do not record its contents.
- A reviewer checked it before any system-of-record update.
Checks and sources
What was checked
- NON-AGENT_API.txt documents recording_lookup as a read-only, permissioned search by agent and date or by lead_id, requiring user_level 7 or higher and "view reports" — the shipped way to find a recording, not a filesystem convention this article invents.
- The cited transcription API accepts an audio file and returns a transcription response; speaker diarization and model behavior must be tested against the intended audio and policy boundary.
- No latency, accuracy, savings or autonomous-call claim is made because those outcomes depend on the recording, provider, deployment and evaluation set.
Primary references
Sources
- VICIdial Non-Agent APIVICIdial · accessed September 23, 2026
- OpenAI Audio API: transcriptionsOpenAI · accessed September 23, 2026
- OpenAI data controlsOpenAI · accessed September 23, 2026


