Operations

Reading VICIdial call logs without SQL

Which VICIdial table holds which part of a call, what one transferred inbound call leaves behind, and where to read it all without writing SQL.

By Published Updated 5 min read
Glowing table icon on a dark blue grid

To the point

VICIdial does not keep one record per call. It writes each part of a call to its own log table, and the call's uniqueid ties the rows together.

  • Inbound: the DID log, a closer log row for each queue leg, an agent log row for each agent, a transfer log row for each hand-over and the recording log.
  • Outbound: the outbound call log, the dial log, the carrier log and the answering-machine log.
  • Without SQL: VICIdial's lead page shows most of these for one lead. The transfer log and the carrier log are not on it. Trustane's call sheet reads them all for one call.

Plays from YouTube when you press Play. Google's privacy policy applies.

Our video on YouTube

One call, many tables

Every call in VICIdial gets a uniqueid, and VICIdial writes that id into most of the log rows the call produces. We read five calls on a VICIdial 2.14 server on 2026-10-26: a plain inbound call, a call transferred twice, an abandoned call, a queue timeout and a manual outbound dial. A transferred inbound call kept one uniqueid from start to end, with a row in each table below for each part.

TableWhat it holdsA row for each
vicidial_did_logThe DID called, the caller ID number and name, the route, the channel it came in onCall that arrives on a DID
vicidial_closer_logThe in-group, the queue wait and place in line, the agent, the status, the length and who ended it (term_reason)Queue leg
vicidial_agent_logThe agent's wait, talk, disposition and dead seconds, and the status they setAgent who had the call
vicidial_xfer_logWho passed the call to whom, through which in-groupTransfer to an agent or a queue
recording_logThe file, its length and whose it isRecording
vicidial_logThe campaign, the agent, the status, the length and who ended itOutbound call
vicidial_dial_logThe number sent with its dial prefix, the channel, the caller ID sent and the SIP hang-up causeDial attempt
vicidial_carrier_logThe carrier's answer: dial status, hang-up cause and SIP causeCarrier attempt
vicidial_amd_logThe answering-machine resultAnswering-machine check
Diagram of one transferred inbound call and the VICIdial table each step is written to
One call, one uniqueid, five tables

What a transferred call leaves behind

Take one inbound call that an agent transferred to a second agent, who transferred it to a third. It leaves:

  • 1 row in vicidial_did_log, when it arrived on the DID;
  • 3 rows in vicidial_closer_log, one per leg: the first queue, then AGENTDIRECT twice, VICIdial's queue for a call sent straight to one agent;
  • 2 rows in vicidial_xfer_log, one per hand-over;
  • 3 rows in vicidial_agent_log, one per agent, each with that agent's own disposition;
  • the recordings in recording_log, when recording is on: the whole call under the DID's extension, and each agent's part.

So the call's talk time is in the agent log, per agent, and who hung up is on the last closer log row.

A call nobody answered

When the caller gives up or the queue's time runs out, the closer log row belongs to the user VDCL, which VICIdial creates as "Inbound No Agent". Its term_reason says which: ABANDON when the caller gave up, QUEUETIMEOUT when the queue's time ran out.

Who ended the call

term_reason on the closer log has 12 values in VICIdial's table. Four of them:

term_reasonMeans
CALLERThe caller hung up
AGENTThe agent hung up
ABANDONThe caller gave up while waiting
QUEUETIMEOUTThe queue's time ran out

The others include AFTERHOURS, NOAGENT and MAXCALLS. NONE is the default until VICIdial writes another.

Read it in VICIdial without SQL

VICIdial's own lead page, Modify Lead (admin_modify_lead.php), lists for one lead:

  • Calls to this lead: the outbound log;
  • Closer records for this lead: every queue leg;
  • Agent log records for this lead;
  • IVR logs for this lead;
  • Recordings for this lead.

That covers most of a call. Two parts are not on the lead page: the transfer log and the carrier log. Its CALLER ID link adds the dial log's caller ID and SIP cause, the answering-machine result and the DID to each call. For the carrier and the dial, VICIdial has the Carrier Log Report and the Dial Log Report under Reports, then Admin Utilities (level 9 users). The carrier log is only written when the server's Carrier Logging Active is on, which is its default.

The lead page is organised by table and by lead, not by call. A lead called three times shows the rows of all three calls, and you match them yourself by time.

Read it in Trustane

Trustane's call sheet reads all nine tables in the table above for one call, by its uniqueid. It puts the rows in order as steps, and keeps the raw rows under What VICIdial logged. Find what happened to any VICIdial call walks through it.

Questions people ask

Why does a transferred call have three closer log rows?

One per leg. Each agent who took the call through a queue, including AGENTDIRECT, adds a row.

Where is the talk time?

Per agent, in vicidial_agent_log (talk_sec). The closer log's length runs from the start of the leg, so it includes the queue wait.

Why is the carrier log empty?

Check the server's Carrier Logging Active. It is a per-server setting, on by default, and with it off the carrier log stays empty.

Next steps

VICIdial is a trademark of its owner. Trustane is an independent hosting provider.

Sources

  1. VICIdial SVN r4037, the log tables and their columns
  2. VICIdial SVN r4006, the lead page (Modify Lead)
  3. VICIdial SVN r4031, the reports list (Carrier Log Report, Dial Log Report)
  4. VICIdial SVN r4037, the transfer log row an agent's transfer writes
  5. VICIdial SVN r4006, a blind transfer logged to user_call_log
  6. Trustane, five calls measured on a VICIdial 2.14 server, 2026-10-26
  7. Trustane console, the call sheet

Trustane

Managed VICIdial hosting

Run it on cores of your own

Managed VICIdial, billed by the hour against a balance you top up.

Or try one server free for 7 days, no top-up.