Skip to main content

On This Page

ViciDial Lead Recycling and List Management Optimization Guide

3 min read
Share

These articles are AI-generated summaries. Please check the original sources for full details.

ViciDial Lead Recycling & List Management Best Practices

ViciDial 2.14+ utilizes the vicidial_log table to manage complex lead lifecycles through standardized status codes. By implementing intelligent recycling, centers can automate retries for outcomes like BUSY or NOANSWER using specific time intervals ranging from 900 to 86400 seconds.

Why This Matters

In high-volume contact centers, technical reality demands a non-linear state machine to handle contact outcomes that often deviate from ideal sales paths. Without granular recycling rules and automated archiving, systems suffer from list bloat and database deadlocks, leading to significant agent downtime and lost revenue due to inefficient lead penetration.

Key Insights

  • ViciDial uses standardized status codes like NEW, BUSY, and NOANSWER within the vicidial_log table to drive automated recycling decisions.
  • The vicidial_closer_log table allows administrators to define specific seconds_to_next_call intervals, such as 1800 seconds for unanswered calls.
  • Custom recycling logic can be offloaded to Perl-based AGI scripts in the Asterisk Gateway Interface to handle complex multi-attempt strategies.
  • Dynamic list segmentation categorizes leads into FRESH, WARM, and HOT segments based on attempt counts ranging from one to over three.
  • Automated archiving procedures moving DEAD leads older than 60 days to vicidial_list_archive are essential for maintaining query performance.
  • Time-zone aware recycling utilizes the gmt_offset_now field to restrict contact attempts to local business hours between 9 AM and 6 PM.
  • Database optimization requires adding indexes like idx_recycle to the vicidial_list table to prevent locks during high-frequency status updates.

Working Examples

Enables standard recycling for a specific campaign in the ViciDial database.

UPDATE vicidial_campaign SET lead_recycle_method = 1 WHERE campaign_id = 'TESTCAMP';

Snippet from a custom AGI script to update lead status and set a future retry timestamp.

my $sth = $dbh->prepare("UPDATE vicidial_list SET status = ?, last_local_call_time = DATE_ADD(NOW(), INTERVAL ? SECOND) WHERE lead_id = ?"); $sth->execute('RECYCLE', $recycle_seconds, $lead_id);

SQL view for segmenting leads based on the number of previous call attempts.

CREATE OR REPLACE VIEW lead_segments AS SELECT vl.lead_id, CASE WHEN COUNT(*) <= 1 THEN 'FRESH' WHEN COUNT(*) BETWEEN 2 AND 3 THEN 'WARM' ELSE 'HOT' END as segment FROM vicidial_list vl LEFT JOIN vicidial_log vlog ON vl.lead_id = vlog.lead_id GROUP BY vl.lead_id;

Practical Applications

  • Use Case: Multi-timezone campaigns use the recycle_by_timezone procedure to ensure compliance with local calling hours. Pitfall: Stale GMT offset data in the vicidial_list table can lead to calls being placed outside legal hours.
  • Use Case: System admins implement batch updates with a LIMIT clause to recycle NOANSWER leads. Pitfall: Running global updates without batching can cause InnoDB locks that freeze the agent interface.
  • Use Case: Automated archiving via daily cron jobs prevents the vicidial_list table from exceeding performance thresholds. Pitfall: Neglecting to optimize tables after large deletions leads to fragmented indexes and slow hopper loading.

References:

Continue reading

Next article

Mastering Gemma 4 Fine-Tuning: Fixes for ClippableLinear and Multimodal Masking

Related Content