How to Change Campaign in VICIdial — Complete Guide for Admins & Agents
Introduction
This guide explains how to change campaign in VICIdial for both administrators and agents. It covers UI methods, when a logout/login is required, quick SQL techniques for advanced admins, and safe troubleshooting steps to avoid dropped calls or misconfigured agent settings. Use these procedures in your staging environment first and always backup your database before running queries.
Table of Contents
ToggleWho should read this
- Call-center admins managing VICIdial deployments.
- Telephony engineers and sysadmins who configure campaigns and lists.
- System integrators building custom agent workflows.
Quick answer (short)
- Admins can change an agent’s campaign via the Real-Time interface (User Status) or by updating vicidial_live_agents records.
- Some campaign settings are loaded at agent login; changing certain settings without logout may not apply until the agent reconnects.
Understanding VICIdial campaign architecture
VICIdial ties several tables and UI settings together to define campaign behavior:
- vicidial_campaigns — stores campaign configuration (dial method, wrapup, auto dial level).
- vicidial_live_agents — contains current agent sessions and campaign_id.
- vicidial_campaign_agents — maps agents to campaigns and controls permissions.
- Agent UI loads many campaign-specific settings at login; these settings are then cached for that session. Changing the database alone will not always refresh the agent UI in real time.
Understanding this link between DB tables and the agent session is critical before attempting a live change.
Change campaign via Real-Time Agent screen (recommended)
This is the safest, UI-driven method for switching an agent’s active campaign.
Steps (Admin dashboard)
- Log into VICIdial as an admin with appropriate permissions.
- Navigate to Reports → Real-Time → Agents (or Real-Time screen depending on UI version).
- Click the agent row you want to modify — a User Status or agent pop-up opens.
- In that modal, locate Current Campaign (or Campaign selection) and pick the new campaign from the dropdown.
- Click Update/Save. If the change is supported for that session, the agent will begin receiving calls for the new campaign shortly.
Notes
- After changing, confirm the agent appears in the new campaign’s live agents list.
- If call routing or dial method doesn’t change, instruct the agent to refresh their browser or re-login (see section 5).
- Use the Real-Time screen to avoid unintended SQL mistakes.
Change campaign via Admin → Campaigns (for configuration)
If you need to modify campaign definitions (not just assigning an agent), follow these steps:
Steps (modify campaign settings)
- Admin → Campaigns (from the VICIdial admin menu).
- Select the campaign you want to edit.
- Update desired fields: campaign name, dial method, lists assigned, caller ID, and campaign-specific settings.
- Save changes.
- If agents are already logged in and you changed settings that are loaded at login, apply a rolling re-login or use targeted refresh (see section 5).
Common edits
- Add/remove lists to a campaign (useful if you want agents to keep the campaign but change the list).
- Update campaign caller ID (note: changes may not reflect until agent session refresh).
Advanced: change campaign using SQL (use with extreme caution)
Advanced admins sometimes update vicidial_live_agents directly to move live sessions between campaigns. Use only in controlled environments and always backup the DB first.
Example SQL (illustrative only)
-- Backup first (example)
CREATE TABLE backup_vla_$(date +%s) AS SELECT * FROM vicidial_live_agents WHERE user='1001';
-- Change campaign_id for a live agent (replace '1001' and '200' with real values)
UPDATE vicidial_live_agents
SET campaign_id='NEW_CAMPAIGN_ID'
WHERE user='AGENT_USERNAME'
AND server_ip='YOUR_SERVER_IP';
Warnings
- This updates the DB record but may not refresh the agent UI or session variables. Some settings are read at login only.
- Incorrect queries can corrupt live data and cause routing issues.
- Prefer scripted API methods or the Real-Time UI when possible.
When you must logout and why
Many VICIdial settings are read and cached during the agent login process. Changing the campaign_id in the backend doesn’t always force the agent UI to reload dial methods, callbacks, or preview modes.
Cases where logout/login is required
- You changed the campaign dial method (e.g., from MANUAL to AUTO).
- You updated campaign-specific agent settings that alter the UI layout or functionality.
- Agents do not see updated scripts, caller IDs, or list scripts after DB updates.
How to perform minimal-impact re-login
- Schedule short re-login windows (low-traffic time).
- Use staggered re-logins (small batches) to avoid call spikes.
- Inform agents and managers before action.
Common problems and troubleshooting
- This updates the DB record but may not refresh the agent UI or session variables. Some settings are read at login only.
Problem: Agent still receiving calls from old campaign
- Confirm vicidial_live_agents.campaign_id value.
- Check the agent browser console for JS errors.
- Force a UI refresh or re-login if campaign settings are cached.
Problem: New campaign settings not applied
- Identify which settings are dynamic vs login-loaded. Many are login-loaded.
Problem: Calls not routing to the agent after change
- Verify lists assigned to the campaign still contain active leads.
- Check dial level and campaign status (active/inactive).
Useful logs and queries
- Review Asterisk console logs and ASTVDINSTALL logs for errors.
- Query vicidial_list and vicidial_campaigns to ensure lists and campaigns are correctly mapped.
Best practices & rollback plan
- Backup: Always backup vicidial_live_agents and vicidial_campaigns before mass changes.
- Test Staging: Try changes on a staging server first.
- Use the UI: Prefer Real-Time UI operations for single-agent changes.
- Document: Keep a change log with timestamps, admin user, and reason.
- Rollback: Keep the backup SQL ready to revert vicidial_live_agents if needed.
Checklist before changing campaigns
- Backup vicidial_live_agents and vicidial_campaigns.
- Notify agents & supervisors.
- Test change on 1-2 agents.
- Monitor Asterisk and VICIdial logs post-change.
- Have rollback SQL ready.
FAQ
Q: Can agents switch campaigns without logging out?
A: Not reliably. Some campaign elements are fixed at login; while DB edits can switch campaign_id, session behavior may not fully update without logout.
Q: Is it safe to change campaign_id via SQL?
A: Only for experienced DB admins, and only with backups. The UI may not update live.
Q: Can I schedule campaigns to start/stop automatically?
A: VICIdial supports scheduling approaches via campaign scheduler discussions and community plugins; behavior can differ by version.
Conclusion
Changing campaigns in VICIdial might seem complex at first, but once you understand the core settings — from agent-level switching to admin campaign configuration — it becomes a routine process. Whether you’re managing multiple outbound campaigns or fine-tuning inbound performance, mastering this process ensures your call center operates efficiently and without downtime.
Always remember to:
- Verify campaign IDs and active statuses before switching.
- Train agents on how to change campaigns properly to avoid call routing errors.
- Backup your configuration data before making system-wide changes.
- Use test campaigns to validate new setups before deploying them live.
By following the structured steps in this guide, you can switch or modify campaigns in VICIdial safely, maintain uptime, and improve agent productivity. With regular audits and campaign management discipline, your VICIdial system will stay optimized for performance and scalability.
- Confirm vicidial_live_agents.campaign_id value.