Skip to content
ViciDial AI ViciDial AI ViciDial AI

The VICIdial Community Blog

ViciDial AI ViciDial AI ViciDial AI

The VICIdial Community Blog

  • Home
  • Vicidial Hosting
  • Home
  • Vicidial Hosting
Close

Search

  • Home
  • Vicidial Hosting
Subscribe
TroubleshootingVICIdial

VICIdial ‘Dial Timed Out’ and Agents Stuck on ‘Waiting for Ring

By duarte
March 28, 2023 3 Min Read
0

These two get reported together and treated as one problem. They are not. Understanding which you are actually looking at cuts the diagnosis time substantially.

Waiting for Ring

The agent screen shows this while it waits for VICIdial to report that a call has been placed to their conference. Stuck there means the loop between Asterisk, the database and the agent’s browser is broken somewhere.

Check the AGI Line First

This is the most common cause by a wide margin. Every outbound dialplan entry needs the call_log AGI at priority 1:

exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91NXXNXXXXXX,n,Dial(SIP/mytrunk/${EXTEN:1},,tTo)
exten => _91NXXNXXXXXX,n,Hangup()

Without it, the call connects but nothing registers the channel against the agent’s session. The screen waits forever for an event that will never arrive.

Check what is actually loaded — not what you think you saved in the admin interface:

asterisk -rx "dialplan show default" | head -40

Confirm the AGI listener is alive:

netstat -tlnp | grep 4577
screen -ls | grep ASTlisten

If ASTlisten is not running, restart the daemons:

/usr/share/astguiclient/ADMIN_keepalive_ALL.pl --restart

Check the Screens

VICIdial’s state machine runs across several perl processes. If one has died, symptoms surface in the agent interface rather than as an obvious error.

screen -ls

You want ASTfastlog, ASTVDauto, ASTVDadapt, ASTupdate, ASTsend and ASTlisten. Any missing process explains this behaviour. Check why before restarting:

tail -100 /var/log/astguiclient/process.log

A repeatedly dying screen usually means a perl module problem or a database connection failure, and restarting just delays the next occurrence.

Check Database Load

The agent interface polls the database frequently. Under load, or with a crashed table, those queries stall and the screen hangs.

SHOW PROCESSLIST;

Long-running queries against vicidial_live_agents or vicidial_auto_calls point at a locking or table problem:

mysqlcheck -u cron -p1234 --check asterisk | grep -v "OK$"

A crashed vicidial_live_agents table produces exactly this symptom, for every agent at once.

Check the Browser Side

If it affects one agent only and their phone is registered, look at their connection. The agent interface needs to reach the server continuously. A flaky connection or an aggressive corporate proxy will break the polling.

Confirm the phone is up:

asterisk -rx "sip show peer 8001"

And that the time on the agent’s machine is not wildly off — VICIdial compares timestamps and a large skew causes odd interface behaviour.

Dial Timed Out

Different problem entirely. Asterisk dialled, waited, and gave up.

Read the Actual Hangup Cause

asterisk -rvvvvv
sip set debug peer mytrunk

Place a test call and read the response. The SIP code tells you who is refusing:

ResponseMeaning
No response at allPackets not reaching the carrier — firewall or routing
403 ForbiddenCarrier rejecting your traffic. IP not whitelisted, or account suspended
404 Not FoundNumber format wrong. Usually the dial prefix not stripped
480 Temporarily UnavailableFar end unreachable
503 Service UnavailableCarrier at capacity, or your channel limit hit
487 Request TerminatedYour side cancelled — this is the timeout itself

Turn debug off afterwards:

sip set debug off

Check the Number Being Sent

If every call to a particular format fails, the dial prefix is probably not being stripped:

exten => _9X.,n,NoOp(DIALING: ${EXTEN:1})

Watch the CLI. If it shows 915551234567 rather than 15551234567, your ${EXTEN:1} is missing or the pattern is matching a different rule than you expect.

Check the Timeout Value

Dial(SIP/mytrunk/${EXTEN:1},30,tTo)

Thirty seconds is standard for predictive campaigns. If your carrier is slow to return ringback on certain routes, legitimate calls get cut at 30 and logged as timeouts. Raise it to 45 and see whether the rate changes.

The campaign’s Dial Timeout in Admin → Campaigns → Detail interacts with this. If the campaign timeout is shorter than the dialplan timeout, the campaign wins.

Check Channel Capacity

If timeouts appear only at peak, you are hitting a limit:

asterisk -rx "core show channels count"

Compare to what your carrier permits concurrently. Exceeding it produces 503s that surface as timeouts. Lower the auto dial level or buy more channels — there is no configuration fix for a hard channel cap.

Check the Trunk Itself

asterisk -rx "sip show registry"
asterisk -rx "sip show peers"

A registration that has silently dropped will cause every call to time out while the admin interface still shows the carrier as active.

Telling Them Apart Quickly

Run this while an agent reports the problem:

asterisk -rx "core show channels"

That one command sorts most reports into the right bucket immediately, which is worth more than any individual fix below it.

Tags:

agiasteriskcall_logcarrierdial timed outtroubleshootingvicidialwaiting for ring
Author

duarte

Follow Me
Other Articles
Stacked horizontal strata representing software layers, with the Asterisk layer highlighted.
Previous

VICIdial Scratch Install on AlmaLinux 9 with Asterisk 18

Audio waveform travelling inside a bounded, measured channel.
Next

Installing VICIphone WebRTC with Let’s Encrypt SSL on ViciBox 11

No Comment! Be the first one.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

About This Site

Vicidial, Asterisk, GoAutoDial and FreePBX tutorials — with practical guides to AI answering machine detection and AI agent integration.

Search

Recent Posts

  • AI Answering Machine Detection for VICIdial: Integrating VM Hunter
  • Piping VICIdial Call Recordings Into a Speech-to-Text Workflow
  • Fixing ‘Extension s Rejected Because Extension Not Found’ on Inbound Calls
  • Connecting FreePBX to VICIdial Over a SIP Trunk
  • Asterisk Variable Manipulation: Substrings, Math and Caller ID Rewriting

ViciDial AI

Vicidial, Asterisk, GoAutoDial and FreePBX tutorials — with practical guides to AI answering machine detection and AI agent integration.

Recent Posts

  • AI Answering Machine Detection for VICIdial: Integrating VM Hunter
  • Piping VICIdial Call Recordings Into a Speech-to-Text Workflow
  • Fixing ‘Extension s Rejected Because Extension Not Found’ on Inbound Calls
  • Connecting FreePBX to VICIdial Over a SIP Trunk
  • Asterisk Variable Manipulation: Substrings, Math and Caller ID Rewriting

Archives

  • June 2025 (1)
  • April 2024 (1)
  • January 2024 (1)
  • December 2023 (1)
  • October 2023 (1)
  • September 2023 (1)
  • August 2023 (1)
  • June 2023 (1)
  • May 2023 (1)
  • March 2023 (1)
  • February 2023 (1)
  • December 2022 (1)
  • November 2022 (1)
  • October 2022 (1)
  • September 2022 (1)
  • August 2022 (1)
  • July 2022 (1)
  • June 2022 (1)
  • April 2022 (1)
  • March 2022 (1)

Find Us

Contact Us:

email: info@vicidialai.com

Copyright 2026 — ViciDial AI. All rights reserved. | Privacy Policy