DEV Community

Moisi Trungu
Moisi Trungu

Posted on • Originally published at flixzone.icu

How to Change Campaign Dial Speed in ViciDial

How to Change Campaign Dial Speed in ViciDial

Master dial speed adjustments for ViciDial campaigns to optimize agent productivity, improve call connection rates, and reduce idle time in your production Asterisk environment.

Prerequisites

Before modifying campaign dial speed settings, ensure you have:

  • Root or sudo access to your ViciDial server
  • Access to the ViciDial admin panel with administrative privileges
  • MySQL/MariaDB client access to the asterisk database
  • Familiarity with basic ViciDial campaign configuration
  • Understanding of your current calling volume and agent count
  • Recent backup of your ViciDial database
  • Knowledge of your Asterisk version (tested on 11.x, 13.x, 16.x, 18.x)
  • Access to server command line via SSH or direct console
  • At least one active campaign already created

Understanding Campaign Dial Speed in ViciDial

Dial speed (also called "dial ratio" or "calls per agent") determines how many calls ViciDial will attempt to place for each available agent in a campaign. This setting is critical for both inbound and outbound calling operations.

What Dial Speed Controls

The dial speed parameter governs:

  • Number of simultaneous calls attempted per agent
  • Queue management and call distribution
  • Agent idle time and workload balance
  • System resource consumption on your Asterisk server
  • Connection rates and answer supervision quality
  • Overall dialing efficiency and campaign profitability

Common Dial Speed Values

1.0 - 1.2 (Conservative)

  • One call per agent, minimal preview time
  • Best for complex calls requiring agent preparation
  • Lower abandonment rates
  • Reduced system load

1.3 - 1.5 (Moderate)

  • Standard for most outbound campaigns
  • Balanced productivity and call quality
  • Typical industry standard

1.6 - 2.5 (Aggressive)

  • Multiple calls queued per agent
  • Higher connection rates but increased abandonment
  • Requires experienced agents
  • Higher system resource usage

2.5+ (Power dialing)

  • Maximum throughput mode
  • Primarily for high-volume, simple messaging
  • Risk of high abandonment rates
  • Only for compliant campaigns

Accessing the Admin Panel

Via Web Interface

Launch your browser and navigate to your ViciDial admin URL:

http://your-vicidial-ip/vicidial/admin.php
Enter fullscreen mode Exit fullscreen mode

Log in with your administrator credentials (typically the cron user or administrative account).

Click on Campaigns from the main menu, then select your target campaign from the list.

Locating the Dial Speed Setting

In the Campaign Edit screen, locate the Dial Speed field. In most ViciDial versions, this appears in the main campaign settings section, often labeled:

  • Dial Speed
  • Calls Per Agent
  • Dial Ratio
  • Agent Dial Speed

The field typically accepts decimal values between 0.1 and 5.0.

Method 1: Changing Dial Speed via Web Admin Panel

This is the most user-friendly approach for most administrators.

Step-by-Step Process

  1. Navigate to Campaigns → Select Your Campaign
  2. Scroll to the campaign configuration section
  3. Locate the Dial Speed field
  4. Enter your desired dial speed value (e.g., 1.5)
  5. Click SAVE or UPDATE button
  6. Confirm the change was applied

Example Configuration

Campaign: SALES_OUTBOUND_Q2
Current Dial Speed: 1.2
New Dial Speed: 1.8
Active Agents: 25
Expected simultaneous calls: 45 (25 agents × 1.8)
Enter fullscreen mode Exit fullscreen mode

Immediate Effects

Once saved:

  • The new dial speed takes effect within 1-2 minutes
  • Existing calls continue on previous settings
  • New outbound calls follow the new dial speed
  • No service interruption occurs

Method 2: Direct Database Modification

For bulk changes or scripted deployments, you can modify the ViciDial database directly.

Identifying the Campaign

First, confirm your campaign ID:

SELECT campaign_id, campaign_name, dial_speed 
FROM vicidial_campaigns 
WHERE campaign_name = 'SALES_OUTBOUND_Q2'\G
Enter fullscreen mode Exit fullscreen mode

Example output:

*************************** 1. row ***************************
campaign_id: 1001
campaign_name: SALES_OUTBOUND_Q2
dial_speed: 1.2
Enter fullscreen mode Exit fullscreen mode

Updating Dial Speed via SQL

Connect to the asterisk database and execute:

UPDATE vicidial_campaigns 
SET dial_speed = 1.8 
WHERE campaign_id = '1001';
Enter fullscreen mode Exit fullscreen mode

Verify the change:

SELECT campaign_id, campaign_name, dial_speed 
FROM vicidial_campaigns 
WHERE campaign_id = '1001'\G
Enter fullscreen mode Exit fullscreen mode

Batch Updates for Multiple Campaigns

To update multiple campaigns at once:

UPDATE vicidial_campaigns 
SET dial_speed = 1.5 
WHERE campaign_id IN ('1001', '1002', '1003', '1004')
AND status = 'ACTIVE';
Enter fullscreen mode Exit fullscreen mode

Reverting a Change

Always preserve the original value:

UPDATE vicidial_campaigns 
SET dial_speed = 1.2 
WHERE campaign_id = '1001';
Enter fullscreen mode Exit fullscreen mode

Method 3: API-Based Modification

For integration with external systems or automated workflows:

ViciDial API Endpoint

ViciDial exposes campaign modification through its API. Example request:

curl -X POST http://your-vicidial-ip/vicidial/non_agent_api.php \
  -d "user=admin_username" \
  -d "pass=admin_password" \
  -d "campaign_id=1001" \
  -d "campaign_name=SALES_OUTBOUND_Q2" \
  -d "dial_speed=1.8" \
  -d "format=json"
Enter fullscreen mode Exit fullscreen mode

Expected Response

{
  "response": "CAMPAIGN UPDATED",
  "campaign_id": "1001",
  "dial_speed": "1.8"
}
Enter fullscreen mode Exit fullscreen mode

Error Handling

#!/bin/bash
RESPONSE=$(curl -s -X POST http://your-vicidial-ip/vicidial/non_agent_api.php \
  -d "user=admin_username" \
  -d "pass=admin_password" \
  -d "campaign_id=1001" \
  -d "dial_speed=1.8" \
  -d "format=json")

echo "$RESPONSE" | grep -q "CAMPAIGN UPDATED"
if [ $? -eq 0 ]; then
  echo "Success: Dial speed updated"
else
  echo "Error: Update failed"
  echo "$RESPONSE"
fi
Enter fullscreen mode Exit fullscreen mode

Monitoring Impact of Dial Speed Changes

Real-Time Call Monitoring

Monitor the immediate effects using Asterisk CLI:

asterisk -rx "core show channels"
Enter fullscreen mode Exit fullscreen mode

Sample output:

Channel              State   Application Data
SIP/1234-00000abc    Up      AppDial
SIP/1235-00000abd    Up      AppDial
SIP/1236-00000abe    Up      VoiceMail
--- 47 active channels
--- 3 active calls
Enter fullscreen mode Exit fullscreen mode

ViciDial Log Analysis

Check the vicidial_log table for real-time statistics:

SELECT 
  campaign_id,
  campaign_name,
  COUNT(*) as total_calls,
  SUM(CASE WHEN status = 'ANSWER' THEN 1 ELSE 0 END) as answered_calls,
  ROUND(100.0 * SUM(CASE WHEN status = 'ANSWER' THEN 1 ELSE 0 END) / COUNT(*), 2) as answer_rate,
  AVG(LENGTH) as avg_call_length,
  SUM(LENGTH) as total_talk_time
FROM vicidial_log 
WHERE campaign_id = '1001'
AND call_date > DATE_SUB(NOW(), INTERVAL 1 HOUR)
GROUP BY campaign_id, campaign_name\G
Enter fullscreen mode Exit fullscreen mode

System Resource Monitoring

Monitor CPU, memory, and disk I/O during and after changes:

top -b -n 1 | head -20
Enter fullscreen mode Exit fullscreen mode

Check Asterisk process specifically:

ps aux | grep -i asterisk | grep -v grep
Enter fullscreen mode Exit fullscreen mode

Monitor database connections:

mysql -u root -p -e "SHOW PROCESSLIST;" | grep -i vicidial
Enter fullscreen mode Exit fullscreen mode

Agent Idle Time Tracking

Query for agent idle statistics:

SELECT 
  user,
  COUNT(*) as total_logins,
  AVG(UNIX_TIMESTAMP(logout_time) - UNIX_TIMESTAMP(login_time)) as avg_session_length,
  SUM(CASE WHEN status = 'IDLE' THEN idle_sec ELSE 0 END) as total_idle_seconds
FROM vicidial_agent_log 
WHERE login_time > DATE_SUB(NOW(), INTERVAL 24 HOUR)
GROUP BY user
ORDER BY total_idle_seconds DESC
LIMIT 15;
Enter fullscreen mode Exit fullscreen mode

Performance Tuning Considerations

Database Connection Limits

Verify your MySQL max connections setting:

mysql -u root -p -e "SHOW VARIABLES LIKE 'max_connections';"
Enter fullscreen mode Exit fullscreen mode

For high dial speeds (>2.0), ensure adequate connections:

mysql -u root -p -e "SET GLOBAL max_connections = 500;"
Enter fullscreen mode Exit fullscreen mode

Make permanent in /etc/mysql/my.cnf:

[mysqld]
max_connections = 500
max_allowed_packet = 64M
Enter fullscreen mode Exit fullscreen mode

Asterisk Channel Limits

Check current SIP channel limits in /etc/asterisk/sip.conf:

[general]
maxcallbitrate = 384000
dtmfmode = rfc2833
rtptimeout = 60
rtpholdtimeout = 300
sipdebug = no
Enter fullscreen mode Exit fullscreen mode

For high-volume campaigns, modify /etc/asterisk/extensions-vicidial.conf:

[from-vicidial]
exten => _X.,1,NoOp(Vicidial outbound call - ${CALLERID(num)})
exten => _X.,n,Set(CHANNEL_LIMIT=50)
exten => _X.,n,Dial(SIP/${EXTEN}@carrier,180,L(${CHANNEL_LIMIT}):10000)
exten => _X.,n,Hangup()
Enter fullscreen mode Exit fullscreen mode

Asterisk Configuration Reload

After modifying Asterisk configs, reload without dropping calls:

asterisk -rx "module reload chan_sip.so"
Enter fullscreen mode Exit fullscreen mode

Or completely reload dialplan:

asterisk -rx "dialplan reload"
Enter fullscreen mode Exit fullscreen mode

Advanced: Campaign Dial Speed Scheduling

Time-Based Dial Speed Adjustment

Create a scheduled script to adjust dial speed based on time of day:

#!/bin/bash
# /usr/local/bin/adjust_dial_speed.sh

DB_USER="cron"
DB_PASS="yourpassword"
DB_NAME="asterisk"
CAMPAIGN_ID="1001"

HOUR=$(date +%H)

# Morning (9-12): Conservative
if [ $HOUR -ge 9 ] && [ $HOUR -lt 12 ]; then
  DIAL_SPEED="1.2"
fi

# Afternoon (12-17): Moderate
if [ $HOUR -ge 12 ] && [ $HOUR -lt 17 ]; then
  DIAL_SPEED="1.5"
fi

# Evening (17-21): Aggressive
if [ $HOUR -ge 17 ] && [ $HOUR -lt 21 ]; then
  DIAL_SPEED="1.8"
fi

# Late night (21+): Conservative
if [ $HOUR -ge 21 ] || [ $HOUR -lt 9 ]; then
  DIAL_SPEED="1.0"
fi

mysql -u $DB_USER -p$DB_PASS $DB_NAME -e \
  "UPDATE vicidial_campaigns SET dial_speed = $DIAL_SPEED WHERE campaign_id = '$CAMPAIGN_ID';"

echo "$(date): Campaign $CAMPAIGN_ID dial speed set to $DIAL_SPEED" >> /var/log/vicidial_dial_speed.log
Enter fullscreen mode Exit fullscreen mode

Add to crontab for automatic execution:

crontab -e
Enter fullscreen mode Exit fullscreen mode

Add the line:

0 9,12,17,21 * * * /usr/local/bin/adjust_dial_speed.sh
Enter fullscreen mode Exit fullscreen mode

Agent Count-Based Dynamic Adjustment

Adjust dial speed based on currently logged-in agents:

#!/bin/bash
# /usr/local/bin/dynamic_dial_speed.sh

DB_USER="cron"
DB_PASS="yourpassword"
DB_NAME="asterisk"
CAMPAIGN_ID="1001"

# Get active agent count
AGENT_COUNT=$(mysql -u $DB_USER -p$DB_PASS $DB_NAME -sN -e \
  "SELECT COUNT(*) FROM vicidial_users WHERE active = '1' AND user_level > 1;")

# Adjust dial speed based on agent availability
if [ $AGENT_COUNT -lt 10 ]; then
  DIAL_SPEED="1.0"
elif [ $AGENT_COUNT -lt 20 ]; then
  DIAL_SPEED="1.3"
elif [ $AGENT_COUNT -lt 50 ]; then
  DIAL_SPEED="1.5"
else
  DIAL_SPEED="1.8"
fi

mysql -u $DB_USER -p$DB_PASS $DB_NAME -e \
  "UPDATE vicidial_campaigns SET dial_speed = $DIAL_SPEED WHERE campaign_id = '$CAMPAIGN_ID';"

echo "$(date): Agents: $AGENT_COUNT, Dial Speed: $DIAL_SPEED" >> /var/log/vicidial_dynamic.log
Enter fullscreen mode Exit fullscreen mode

Troubleshooting

Issue: Dial Speed Change Not Taking Effect

Symptoms: Campaign shows updated dial speed in admin panel, but calling behavior unchanged.

Solution:

  1. Verify the change was saved to the database:
SELECT campaign_id, campaign_name, dial_speed 
FROM vicidial_campaigns 
WHERE campaign_id = '1001'\G
Enter fullscreen mode Exit fullscreen mode
  1. Check if campaign is paused:
SELECT campaign_id, campaign_name, active, dial_speed 
FROM vicidial_campaigns 
WHERE campaign_id = '1001'\G
Enter fullscreen mode Exit fullscreen mode

If active = '0', enable the campaign:

UPDATE vicidial_campaigns SET active = '1' WHERE campaign_id = '1001';
Enter fullscreen mode Exit fullscreen mode
  1. Restart the vicidial_agent_api service:
systemctl restart vicidial_agent_api
Enter fullscreen mode Exit fullscreen mode

Or if using older init:

/etc/init.d/vicidial_agent_api restart
Enter fullscreen mode Exit fullscreen mode
  1. Wait 2-3 minutes for the change to propagate through the system.

Issue: Calls Connecting Too Slowly Despite High Dial Speed

Symptoms: Dial speed set to 2.0 or higher, but agents still idle frequently.

Diagnosis:

  1. Check for failed/abandoned calls:
SELECT 
  status,
  COUNT(*) as count
FROM vicidial_log 
WHERE campaign_id = '1001'
AND call_date > DATE_SUB(NOW(), INTERVAL 1 HOUR)
GROUP BY status;
Enter fullscreen mode Exit fullscreen mode

High counts of 'CANCEL', 'NO ANSWER', or 'BUSY' indicate connection issues, not dial speed problems.

  1. Verify carrier/trunk capacity:
asterisk -rx "sip show peers"
Enter fullscreen mode Exit fullscreen mode

Look for registration status and call count per carrier.

  1. Check for dialplan errors:
tail -f /var/log/asterisk/messages | grep -i error
Enter fullscreen mode Exit fullscreen mode

Solutions:

  • Reduce dial speed to improve call quality and answer rates
  • Add additional trunks/carriers
  • Optimize dialplan rules in extensions-vicidial.conf
  • Increase available bandwidth for better SIP handling

Issue: High System Load After Increasing Dial Speed

Symptoms: CPU usage spikes to 100%, increased latency, database slowness.

Diagnosis:

top -b -n 1 | head -30
Enter fullscreen mode Exit fullscreen mode

Check database query performance:

mysql -u root -p -e "SHOW FULL PROCESSLIST\G" | grep -i Query_time
Enter fullscreen mode Exit fullscreen mode

Check Asterisk CPU usage:

asterisk -rx "core show calls"
Enter fullscreen mode Exit fullscreen mode

Solutions:

  1. Reduce dial speed:
UPDATE vicidial_campaigns SET dial_speed = 1.2 WHERE campaign_id = '1001';
Enter fullscreen mode Exit fullscreen mode
  1. Optimize database:
mysql -u root -p asterisk -e "OPTIMIZE TABLE vicidial_log;"
mysql -u root -p asterisk -e "OPTIMIZE TABLE vicidial_agent_log;"
Enter fullscreen mode Exit fullscreen mode
  1. Increase server resources (CPU, RAM, disk I/O)

  2. Distribute load across multiple Asterisk boxes

  3. Enable connection pooling in my.cnf:

[mysqld]
innodb_buffer_pool_size = 4G
thread_cache_size = 128
query_cache_size = 512M
query_cache_type = 1
Enter fullscreen mode Exit fullscreen mode

Issue: Abandonment Rate Increased After Speed Change

Symptoms: Dial speed increased, but customer abandonment rate (calls hung up before agent pickup) jumped.

Analysis:

SELECT 
  campaign_id,
  COUNT(*) as total_calls,
  SUM(CASE WHEN status = 'ABANDON' THEN 1 ELSE 0 END) as abandoned,
  ROUND(100.0 * SUM(CASE WHEN status = 'ABANDON' THEN 1 ELSE 0 END) / COUNT(*), 2) as abandon_rate
FROM vicidial_log 
WHERE campaign_id = '1001'
AND call_date > DATE_SUB(NOW(), INTERVAL 24 HOUR)
GROUP BY campaign_id;
Enter fullscreen mode Exit fullscreen mode

Solutions:

  • Reduce dial speed incrementally (e.g., from 1.8 to 1.5)
  • Implement answer supervision to filter busy/no-answer calls
  • Add agent headsets to speed up connect time
  • Train agents on faster call acceptance
  • Increase agent count to handle call volume

Issue: Cannot Connect to Database to Update Dial Speed

Error: ERROR 1045 (28000): Access denied for user 'cron'@'localhost'

Solution:

Verify database credentials in /etc/astguiclient/astguiclient.conf:

grep -i password /etc/astguiclient/astguiclient.conf
Enter fullscreen mode Exit fullscreen mode

If using wrong credentials, update:

vi /etc/astguiclient/astguiclient.conf
Enter fullscreen mode Exit fullscreen mode

Or test connection directly:

mysql -h localhost -u cron -p asterisk -e "SELECT 1;"
Enter fullscreen mode Exit fullscreen mode

If cron user doesn't exist, create it:

mysql -u root -p mysql -e \
  "GRANT ALL ON asterisk.* TO 'cron'@'localhost' IDENTIFIED BY 'newpassword';"
Enter fullscreen mode Exit fullscreen mode

Best Practices

Monitoring and Documentation

Always document dial speed changes:

# /var/log/vicidial_changes.log
2024-01-15 10:30:00 - Campaign SALES_Q1: dial_speed 1.2 → 1.5 (reason: 20 new agents)
2024-01-15 14:00:00 - Campaign SALES_Q1: dial_speed 1.5 → 1.3 (reason: high abandonment)
Enter fullscreen mode Exit fullscreen mode

Incremental Changes

Never jump from 1.2 to 2.0. Increase in small steps:

-- Day 1
UPDATE vicidial_campaigns SET dial_speed = 1.3 WHERE campaign_id = '1001';

-- Day 2 (after monitoring)
UPDATE vicidial_campaigns SET dial_speed = 1.5 WHERE campaign_id = '1001';

-- Day 3
UPDATE vicidial_campaigns SET dial_speed = 1.7 WHERE campaign_id = '1001';
Enter fullscreen mode Exit fullscreen mode

Regular Performance Reviews

Schedule weekly reviews:

-- Weekly dial speed effectiveness report
SELECT 
  DATE(call_date) as date,
  campaign_id,
  campaign_name,
  COUNT(*) as total_calls,
  SUM(CASE WHEN status = 'ANSWER' THEN 1 ELSE 0 END) as answered,
  ROUND(100.0 * SUM(CASE WHEN status = 'ANSWER' THEN 1 ELSE 0 END) / COUNT(*), 2) as answer_rate,
  AVG(LENGTH) as avg_duration,
  SUM(CASE WHEN status = 'ABANDON' THEN 1 ELSE 0 END) as abandoned
FROM vicidial_log 
WHERE campaign_id = '1001'
AND call_date > DATE_SUB(NOW(), INTERVAL 7 DAY)
GROUP BY DATE(call_date)
ORDER BY call_date DESC;
Enter fullscreen mode Exit fullscreen mode

Compliance Considerations

Check FCC/TCPA regulations for your campaign type. Some call types have maximum abandonment limits. Document dial speed choices to demonstrate compliance efforts.

Summary

Changing campaign dial speed in ViciDial is a straightforward process with three primary methods:

  1. Web Admin Panel - Best for manual, single-campaign changes
  2. Direct Database Updates - Fastest for bulk changes or scripted deployments
  3. API-Based Modifications - Ideal for system integration and automation

The key to successful dial speed optimization is:

  • Monitor incrementally - Small changes with monitoring periods
  • Track metrics - Answer rates, abandonment, agent idle time
  • Document changes - Maintain audit trail of all adjustments
  • Consider context - Agent experience, system resources, compliance requirements
  • Test thoroughly - Always have a rollback plan
  • Automate responsibly - Use scheduling for predictable patterns

A well-tuned dial speed balances agent productivity with call quality and customer satisfaction. Start conservative (1.2-1.3) and gradually increase based on your specific operational metrics and constraints. Your optimal dial speed depends on your agents' experience, your calling list quality, your system resources, and your business goals.

Top comments (0)