Master the root causes of dead calls in ViciDial, diagnose them using logs and database queries, and implement proven fixes to eliminate dead air and improve call quality.
Prerequisites
Before diving into this tutorial, ensure you have:
- A functioning ViciDial installation (v2.12 or later recommended)
- SSH/root access to your ViciDial server
- Basic familiarity with Asterisk CLI commands and SIP protocol
- Access to MySQL/MariaDB database with
asteriskdatabase selected - Knowledge of ViciDial call flow basics (inbound/outbound, IVR, transfer)
- Ability to read Asterisk log files and query ViciDial tables
- A test phone line or internal extension for testing
Understanding DEAD Call Status in ViciDial
What is a DEAD Call?
A DEAD call status in ViciDial occurs when an agent answers the phone expecting to speak with a caller, but hears only silence—dead air. The call appears answered in the system, but no media (audio) is flowing. The agent may wait 10-30 seconds or longer before realizing the line is dead.
DEAD calls are frustrating because:
- Agents waste time on unproductive calls
- Call metrics are skewed (false answers affecting answer rate)
- Customer experience degrades if it's an inbound scenario
- Compliance issues arise (wasted call minutes, dropped conversations)
- Troubleshooting becomes difficult without clear error indicators
Where DEAD Calls Appear in ViciDial
Check your ViciDial database for DEAD status records:
SELECT call_date, vicidial_id, user, phone_number, call_length,
status, call_status, pause_sec, talk_sec, dispo
FROM vicidial_log
WHERE call_status = 'DEAD'
AND call_date > DATE_SUB(NOW(), INTERVAL 1 DAY)
ORDER BY call_date DESC LIMIT 50;
The call_status field records DEAD. Related fields:
status— agent disposition (often blank for DEAD calls)talk_sec— usually very low (2-5 seconds)pause_sec— time agent held the line waitingvicidial_id— unique call ID for cross-referencing logs
Root Causes of DEAD Calls
1. RTP (Audio Stream) Connection Failures
Symptom: Call connects (SIP 200 OK received), but no audio flows.
Root Cause: RTP packets from carrier or endpoint aren't reaching ViciDial's RTP port range (typically 10000-20000).
Common Triggers:
- Firewall blocking RTP ports
- NAT misconfiguration between carrier and ViciDial
- SIP and RTP on different source IPs
- Carrier sending RTP to wrong destination IP
Check Current RTP Config:
grep -i "^rtp" /etc/asterisk/asterisk.conf
Expected output:
[rtp]
rtpstart=10000
rtpend=20000
2. Early Media Handling Issues
Symptom: Call shows as answered, but agent hears ringing, IVR prompt, or silence.
Root Cause: Early media (180 Ringing, 183 Session Progress) is sent before final 200 OK. If ViciDial doesn't properly bridge early media to the agent, dead air results.
Check SIP Trunk Config:
grep -A 5 "context=" /etc/asterisk/sip-vicidial.conf | head -20
Look for missing progressinband or incorrect t38pt_udptl settings.
3. DTMF Tone Negotiation Problems
Symptom: Call connects but DTMF (IVR key presses) fail, freezing call flow.
Root Cause: SIP and RTP codec mismatch, or DTMF mode misconfiguration (RFC 2833 vs. Inband vs. INFO).
4. One-Way Audio
Symptom: Agent can hear caller, but caller hears nothing (or vice versa).
Root Cause: Asymmetric RTP routing—media path from caller to agent differs from agent to caller.
Common Cause: SIP proxy sending RTP invite to wrong IP; agent NIC not matching advertised SIP IP.
5. Carrier SIP Gateway Issues
Symptom: DEAD calls spike after carrier deployment or config change.
Root Cause:
- Carrier not properly handling call state
- Premature call termination (180 Ringing → BYE without 200 OK)
- Carrier stripping or mangling SIP headers
6. CID Timeout or Caller ID Delivery Delay
Symptom: Call answers but agent screen doesn't populate; agent gets dead air.
Root Cause: ViciDial waiting for database lookup (caller name, account info) that times out before bridging.
Check vicidial_campaign config:
SELECT campaign_id, carrier_id, phone_code, lead_filter_id,
cid_filter_id, wait_for_callid_lookup
FROM vicidial_campaigns
WHERE campaign_id = 'TEST_CAMP' \G
If wait_for_callid_lookup = 'Y', increase timeout or disable for high-volume campaigns.
7. Agent Channel Hangup (Premature Disconnect)
Symptom: Call appears answered but agent channel drops immediately.
Root Cause: Agent extension misconfigured, channel type wrong, or agent phone can't sustain SIP registration.
Check Agent Phone Status:
asterisk -rx "sip show peers" | grep -i agent
Look for agents with UNREG (unregistered) or high response time (>500ms).
Diagnostic Tools and Log Analysis
Step 1: Enable ViciDial Call Detail Logging
Ensure verbose logging is enabled in /etc/asterisk/logger.conf:
[general]
dateformat=%F %T
[logfiles]
messages => notice,warning,error,verbose
full => notice,warning,error,verbose,debug,dtmf
verbose_file => verbose(5)
Restart Asterisk:
systemctl restart asterisk
Step 2: Capture Real-Time Call Debug
When a DEAD call occurs, immediately grab Asterisk debug:
asterisk -rx "sip set debug on"
asterisk -rx "core set verbose 3"
Reproduce the issue, then capture logs:
tail -n 1000 /var/log/asterisk/messages | grep -A 20 "DEAD\|BYE\|CANCEL" > /tmp/dead_call_debug.txt
tail -n 500 /var/log/asterisk/full >> /tmp/dead_call_debug.txt
Step 3: Query ViciDial Log for Call Chain
Use the vicidial_id from the DEAD call to trace the entire call:
SELECT call_date, user, phone_number, call_length, talk_sec,
pause_sec, status, call_status, message, vicidial_id
FROM vicidial_log
WHERE vicidial_id = '1234567890-1234567890' \G
Also check vicidial_closer_log (for transferred calls):
SELECT call_date, user, phone_number, closer_sec, status,
call_status, message FROM vicidial_closer_log
WHERE vicidial_id = '1234567890-1234567890' \G
Step 4: Monitor Active Channels During Call
While call is in progress, run:
asterisk -rx "core show channels"
Look for entries like:
Channel State Type Sec Lag
SIP/carrier-00001234 Up SIP 3 0
Local/user123@vicid Up Local 3 0
SIP/user123-00001235 Up SIP 3 0
If one channel shows Down or is missing, RTP negotiation failed.
Step 5: Check RTP Stream Status
ViciDial doesn't natively show RTP stats, but Asterisk does:
asterisk -rx "rtp show stats"
Sample output:
RTP Stats
SSRC Sent(pkts/bytes) Recv(pkts/bytes) Lost(%) RTT(ms)
0x12345678 150/2400 145/2320 3.3 45
High loss (>5%) or missing recv packets = RTP path problem.
Step 6: Examine SIP Trace via PCAP
Capture raw SIP/RTP packets for deep analysis:
tcpdump -i any -s 0 -w /tmp/dead_call.pcap 'sip or rtp' &
sleep 30 && pkill tcpdump
Analyze with Wireshark (on your workstation):
scp root@vicidial-server:/tmp/dead_call.pcap ~/Desktop/
# Open in Wireshark, filter: sip or rtp
# Look for: SIP 200 OK followed by no RTP packets
Fixing DEAD Calls — Configuration Solutions
Fix 1: Verify and Secure RTP Port Range
Problem: Firewall or carrier blocking RTP traffic.
Solution:
- Check firewall rules:
ufw status numbered | grep -i rtp
# Or for iptables:
iptables -L -n | grep -E "10000|20000"
- Open RTP ports (if using ufw):
ufw allow 10000:20000/udp comment "Asterisk RTP"
ufw allow 10000:20000/tcp comment "Asterisk RTP"
ufw reload
- Or with iptables:
iptables -I INPUT 1 -p udp --dport 10000:20000 -j ACCEPT
iptables -I INPUT 1 -p tcp --dport 10000:20000 -j ACCEPT
iptables-save > /etc/iptables/rules.v4
- Increase RTP pool if handling 500+ concurrent calls:
Edit /etc/asterisk/asterisk.conf:
[rtp]
rtpstart=10000
rtpend=30000
rtpbindaddr=0.0.0.0
Restart Asterisk:
systemctl restart asterisk
Fix 2: Configure SIP Trunk for Early Media
Problem: Early media (183 Session Progress) not bridged to agent.
Solution:
Edit /etc/asterisk/sip-vicidial.conf for your carrier trunk:
[carrier_trunk_name]
type=peer
host=carrier.example.com
port=5060
context=from-carrier
disallow=all
allow=ulaw,alaw
dtmfmode=rfc2833
progressinband=yes
tos_sip=af31
tos_audio=ef
videosupport=no
g726nonstandard=no
t38pt_udptl=no
nat=force_rport,comedia
directmedia=no
Key Parameters:
progressinband=yes— routes 183 Session Progress audio to agentdtmfmode=rfc2833— use RFC 2833 for DTMF (most reliable)nat=force_rport,comedia— handles NAT correctlydirectmedia=no— keeps ViciDial in media path
Reload SIP:
asterisk -rx "sip reload"
Fix 3: Check and Fix One-Way Audio
Problem: Asymmetric RTP path.
Solution:
- Verify ViciDial server's advertised SIP IP matches RTP source IP:
ifconfig | grep -A 1 "inet "
- Check SIP bind address in
/etc/asterisk/sip-vicidial.conf:
[general]
bindaddr=10.0.1.50
bindport=5060
Must match your actual NIC IP. Do not use 0.0.0.0 in production.
- For carrier SIP trunks, ensure
externiporlocalnetis set correctly:
[general]
externip=203.0.113.50
localnet=10.0.0.0/255.255.0.0
This tells Asterisk to use externip for external addresses and keep localnet addresses as-is.
- Disable directmedia to force RTP through ViciDial:
[carrier_trunk]
directmedia=no
canreinvite=no
Restart Asterisk and test.
Fix 4: Increase SIP Transaction Timeout
Problem: Slow carrier or network causes call to timeout before answering.
Solution:
Edit /etc/asterisk/sip-vicidial.conf:
[general]
sip_invite_timeout=30
sip_t1=500
sip_t1min=100
Values (in milliseconds):
sip_invite_timeout=30— max 30 seconds to wait for final responsesip_t1=500— retransmit interval (default 500ms)sip_t1min=100— minimum retransmit interval
Reload:
asterisk -rx "sip reload"
Fix 5: Optimize Agent Phone Registration
Problem: Agent SIP phones dropping registration or experiencing jitter.
Solution:
Edit /etc/asterisk/sip-vicidial.conf:
[agent_default]
type=friend
context=from-internal
disallow=all
allow=ulaw
dtmfmode=rfc2833
qualify=yes
qualifyfreq=60
timert1=500
registertimeout=120
session-expires=3600
session-minse=900
sipdebug=no
Parameters:
qualifyfreq=60— check if phone is alive every 60 secondsregistertimeout=120— allow 120-second registration windowsession-expires=3600— keep session alive for 1 hoursession-minse=900— minimum session duration 15 minutes
Restart Asterisk:
systemctl restart asterisk
Monitor agent registration status:
asterisk -rx "sip show peers" | tail -20
Fix 6: Disable ViciDial Caller ID Lookup Timeout
Problem: Database lookup delays cause dead air while agent waits.
Solution:
In /usr/share/astguiclient/ edit the appropriate outbound script. For example, in Vicidial Manager:
- Go to Admin > Campaigns
- Select your campaign
- Set CID Lookup Delay to 0 seconds
- Or via SQL:
UPDATE vicidial_campaigns
SET wait_for_callid_lookup = 'N'
WHERE campaign_id = 'TEST_CAMP';
If you need caller lookups, increase timeout in /etc/astguiclient/astguiclient.conf:
cid_lookup_timeout=5000
Value in milliseconds. Default is often too low (1000-2000ms).
Fix 7: Fix Carrier-Specific DEAD Call Issues
Problem: Specific carrier causing all DEAD calls.
Solution:
Test the carrier trunk directly. Replace CARRIER_CONTEXT with your carrier context:
asterisk -rx "sip debug peer carrier_trunk_name"
Dial a test call and watch for:
- SIP 183 vs. 180 vs. 200 — which does carrier send?
- RTP audio — does it start before or after 200 OK?
- Abnormal headers — is carrier stripping required headers?
Common carrier issues and fixes:
| Symptom | Carrier Behavior | Fix |
|---|---|---|
| DEAD after 5 sec | Sending BYE without proper disconnect | Add sendrpid=yes in trunk config |
| DEAD on every call | Sending 183 but no RTP | Set progressinband=yes |
| One-way audio | Expecting direct RTP | Set directmedia=no and nat=force_rport,comedia |
| Sporadic DEAD | RTP port saturation | Increase rtpstart/rtpend range |
System-Level Fixes
Increase File Descriptors
Problem: Too many open connections causing RTP stream loss.
Solution:
Edit /etc/security/limits.conf:
asterisk soft nofile 65536
asterisk hard nofile 65536
asterisk soft memlock unlimited
asterisk hard memlock unlimited
Verify after restart:
sudo -u asterisk bash -c 'ulimit -n'
# Should output: 65536
Optimize Kernel Network Parameters
Edit /etc/sysctl.conf:
# Increase socket buffer sizes
net.core.rmem_max=134217728
net.core.wmem_max=134217728
net.ipv4.tcp_rmem=4096 87380 67108864
net.ipv4.tcp_wmem=4096 65536 67108864
# Increase connection backlog
net.core.somaxconn=4096
net.ipv4.tcp_max_syn_backlog=4096
# Enable SYN cookies to prevent SYN floods
net.ipv4.tcp_syncookies=1
# Increase UDP buffer sizes
net.core.rmem_max=134217728
net.core.rmem_default=134217728
net.core.wmem_max=134217728
net.core.wmem_default=134217728
Apply changes:
sysctl -p
Monitor Call Quality in Real-Time
Create a monitoring script at /usr/local/bin/monitor_dead_calls.sh:
#!/bin/bash
THRESHOLD=5
INTERVAL=60
while true; do
DEAD_COUNT=$(mysql -u root -p$DB_PASS asterisk -se \
"SELECT COUNT(*) FROM vicidial_log \
WHERE call_status = 'DEAD' \
AND call_date > DATE_SUB(NOW(), INTERVAL 1 MINUTE);")
if [ "$DEAD_COUNT" -gt "$THRESHOLD" ]; then
echo "ALERT: $DEAD_COUNT dead calls in last minute" | \
mail -s "ViciDial DEAD Call Alert" [email protected]
# Capture diagnostics
asterisk -rx "core show channels" >> /tmp/dead_alert_$(date +%s).txt
asterisk -rx "sip show peers" >> /tmp/dead_alert_$(date +%s).txt
fi
sleep $INTERVAL
done
Make executable and run in background:
chmod +x /usr/local/bin/monitor_dead_calls.sh
/usr/local/bin/monitor_dead_calls.sh &
Troubleshooting Guide
Symptom: All Inbound Calls are DEAD
Diagnosis:
SELECT COUNT(*), call_status FROM vicidial_log
WHERE call_date > DATE_SUB(NOW(), INTERVAL 1 HOUR)
GROUP BY call_status;
Checks:
Is carrier sending any audio?
asterisk -rx "rtp show stats"If no stats, RTP isn't flowing.
Is IVR running?
asterisk -rx "core show channels verbose" | grep -i ivrShould show IVR context, not dead channels.
Check inbound context in
/etc/asterisk/extensions-vicidial.conf:grep -A 10 "\[from-carrier\]" /etc/asterisk/extensions-vicidial.conf
Solution: Verify context in carrier SIP trunk matches actual Asterisk context.
Symptom: DEAD Calls Only on Weekdays 9-5
Diagnosis: Pattern suggests call volume issue.
Check Channel Saturation:
asterisk -rx "core show channels" | wc -l
Compare to your max concurrent calls setting. If near limit, increase:
In /etc/asterisk/asterisk.conf:
[rtp]
rtpstart=10000
rtpend=40000
And in /etc/asterisk/sip-vicidial.conf:
[general]
maxforwards=70
channel_limit=1000,warn
Symptom: DEAD Calls from Specific Carrier IP
Diagnosis: Carrier SIP trunk issue, not global.
Fix:
Check if carrier has NAT:
grep -A 10 "host=CARRIER_IP" /etc/asterisk/sip-vicidial.confForce RTP through ViciDial for this trunk:
[carrier_with_nat] host=203.0.113.100 nat=force_rport,comedia directmedia=noRestart Asterisk and test calls from that carrier only.
Symptom: Random DEAD Calls (Not Reproducible)
Diagnosis: Likely RTP packet loss or temporary network issue.
Check Network Stats:
watch -n 1 "cat /proc/net/udp | grep -E '10000|20000' | wc -l"
Monitor if UDP ports are getting congested.
Solution:
Check for packet loss:
ping -c 100 carrier.example.com | grep -i packetIf loss >1%, contact carrier or ISP.
Increase RTP jitter buffer in
/etc/asterisk/asterisk.conf:[rtp] rtpstart=10000 rtpend=20000 rtptimeout=3600 rtpholdtimeout=3600
Symptom: DEAD Calls Only After Call Transfer
Diagnosis: Bridge or transfer context issue.
Check Transfer Extension:
grep -B 5 -A 10 "transfer\|bridge" /etc/asterisk/extensions-vicidial.conf | head -30
Ensure transfer context properly bridges RTP. If using Dial(), verify:
exten => _X.,1,Dial(SIP/${EXTEN}@agent-pool,,g)
The g flag allows graceful hangup. Missing flags can cause dead air.
Summary
DEAD calls in ViciDial stem from misconfigurations across SIP trunks, RTP routing, firewall rules, and database settings. Here's your action plan:
Immediate Steps:
Identify the scope: Is it all calls, one carrier, or one campaign?
SELECT carrier_id, COUNT(*) as dead_count FROM vicidial_log WHERE call_status = 'DEAD' AND call_date > DATE_SUB(NOW(), INTERVAL 24 HOUR) GROUP BY carrier_id;Enable SIP debugging and capture a failed call.
Verify RTP flows: Check
asterisk -rx "rtp show stats"during calls.Check firewall: Ensure ports 10000-20000 UDP are open.
Medium-Term Fixes:
Review carrier trunk config: Ensure
progressinband=yes,nat=force_rport,comedia,directmedia=no.Optimize SIP timeouts: Increase
sip_invite_timeoutif carrier is slow.Disable CID lookup timeouts for high-volume campaigns.
Long-Term Optimization:
Monitor proactively: Use the monitoring script to catch DEAD call spikes.
Load test: Simulate peak call volume to find channel/RTP saturation limits.
Document carrier behaviors: Keep detailed notes on each carrier's SIP/RTP quirks for future troubleshooting.
With these fixes applied systematically, DEAD call rates should drop from 5-10% to <0.1% in production. Test each change individually and measure impact before moving to the next.