Agc Vicidial.php Jun 2026

The agc/vicidial.php file serves as the primary agent interface in the VICIdial contact center system, managing call handling, dispositioning, and CRM integration. It functions as the main dashboard for agents to manage inbound and outbound calls while relying on backend scripts like vdc_db_query.php for database interaction. For more details, visit vicidial.org . Self develop CRM integration - VICIdial.org

Since agc_vicidial.php is not a core Vicidial file (it is likely a custom or proprietary add-on), this content is structured as a Technical Documentation & Implementation Guide based on common Vicidial architecture and API hooks.

Technical Documentation: agc_vicidial.php 1. Overview File Name: agc_vicidial.php Purpose: Acts as a bridge between the Vicidial AutoDialer engine and an external AGC (Adaptive Content Generator) server or custom carrier logic. Typical Use Cases:

Dynamic message playback based on lead status. Real-time call routing decisions (e.g., carrier failover). Custom API calls before placing an outbound call. Logging custom call events to a secondary database. agc vicidial.php

2. File Location (Standard Vicidial Structure) /var/www/html/agc/agc_vicidial.php # OR /usr/local/src/agc/agc_vicidial.php

3. Core Functionality Flow graph TD A[Vicidial Dial Process] --> B[agc_vicidial.php] B --> C{Call Type?} C -->|Outbound| D[Query AGC for Message/Carrier] C -->|Inbound| E[Route to AGC IVR] D --> F[Apply AGC Response] F --> G[Log Call to AGC DB] E --> G

4. Required Variables (Passed from Vicidial) | Variable Name | Source | Description | |---------------|--------|-------------| | $phone_number | vicidial_list | Destination number | | $lead_id | vicidial_list | Unique lead ID | | $campaign_id | vicidial_campaigns | Current campaign | | $server_ip | vicidial_server | Dialer IP address | | $callerid_number | vicidial_campaigns | Outbound CallerID | | $uniqueid | asterisk_cdr | Asterisk call unique ID | 5. Sample Code Skeleton <?php // agc_vicidial.php // Version: 1.0 // Description: AGC integration script for Vicidial include_once('/etc/astguiclient.conf'); include_once('/usr/share/php/DB.php'); // Connect to Vicidial DB $db = DB::connect("mysql://{$conf['db_user']}:{$conf['db_pass']}@{$conf['db_host']}/{$conf['db_name']}"); // Retrieve incoming variables (from GET/POST or STDIN) $phone_number = $_GET['phone_number'] ?? ''; $lead_id = $_GET['lead_id'] ?? 0; $campaign_id = $_GET['campaign_id'] ?? ''; // Function to query AGC server function get_agc_content($lead_id, $campaign_id) { $agc_api_url = "http://agc-server.local/api/v1/content"; $payload = json_encode([ 'lead_id' => $lead_id, 'campaign' => $campaign_id ]); $ch = curl_init($agc_api_url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); The agc/vicidial

$response = curl_exec($ch); curl_close($ch);

return json_decode($response, true);

} // Main logic if ($phone_number && $lead_id) { $agc_data = get_agc_content($lead_id, $campaign_id); // Example: Override CallerID with AGC provided value if (!empty($agc_data['dynamic_callerid'])) { echo "callerid_number=" . $agc_data['dynamic_callerid'] . "\n"; } Self develop CRM integration - VICIdial

// Example: Inject pre-call audio file if (!empty($agc_data['audio_file'])) { echo "custom_audio=" . $agc_data['audio_file'] . "\n"; }

// Log to AGC database $insert = "INSERT INTO agc_call_log (lead_id, phone_number, campaign_id, response_data, call_time) VALUES (?, ?, ?, ?, NOW())"; $db->query($insert, [$lead_id, $phone_number, $campaign_id, json_encode($agc_data)]);