By running
- Code: Select all
show create table vicidial_closer_log;
the following result would be displayed
- Code: Select all
CREATE TABLE `vicidial_closer_log` (
`closecallid` int(9) unsigned NOT NULL AUTO_INCREMENT,
`lead_id` bigint(20) unsigned NOT NULL,
`list_id` bigint(14) unsigned DEFAULT NULL,
`campaign_id` varchar(20) DEFAULT NULL,
`call_date` datetime DEFAULT NULL,
`start_epoch` int(10) unsigned DEFAULT NULL,
`end_epoch` int(10) unsigned DEFAULT NULL,
`length_in_sec` int(10) DEFAULT NULL,
`status` varchar(6) DEFAULT NULL,
`phone_code` varchar(10) DEFAULT NULL,
`phone_number` varchar(18) DEFAULT NULL,
`user` varchar(20) DEFAULT NULL,
`comments` varchar(255) DEFAULT NULL,
`processed` enum('Y','N') DEFAULT NULL,
`queue_seconds` decimal(7,2) DEFAULT 0.00,
`user_group` varchar(20) DEFAULT NULL,
`xfercallid` int(9) unsigned DEFAULT NULL,
`term_reason` enum('CALLER','AGENT','QUEUETIMEOUT','ABANDON','AFTERHOURS','HOLDRECALLXFER','HOLDTIME','NOAGENT','NONE','MAXCALLS','ACFILTER','CLOSETIME') DEFAULT 'NONE',
`uniqueid` varchar(20) NOT NULL DEFAULT '',
`agent_only` varchar(20) DEFAULT '',
`queue_position` smallint(4) unsigned DEFAULT 1,
`called_count` smallint(5) unsigned DEFAULT 0,
`insert_record_dt` timestamp NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`closecallid`),
KEY `lead_id` (`lead_id`),
KEY `call_date` (`call_date`),
KEY `campaign_id` (`campaign_id`),
KEY `uniqueid` (`uniqueid`),
KEY `phone_number` (`phone_number`),
KEY `date_user` (`call_date`,`user`),
KEY `usr_dt_st` (`user`,`call_date`,`status`)
) ENGINE=MyISAM AUTO_INCREMENT=1033139 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci
The primary key on vicidial_closer_log is the closecallid column. The lead_id is a primary key on vicidial_list table.
uniqueid it is supposed to be unique for each call, it's like a vin number on the cars. From my experience I have never seen two different calls have the same uniqueid, I guess it might be a problem if two different calls have the same uniqueid.
In simple words different uniqueids might have the same lead_id , but not the opposite. One phone_number which has a lead_id might have been called more than once , this means that the same lead_id have different uniqueid.
The scripts which inserts into vicidial_closer_log are:
agi-VDAD_ALL_inbound.agi --- > uniqueid is an asterisk channel parameter which is unique . See
https://docs.asterisk.org/Configuration ... Variables/vdc_db_query.php --- > uniqueid is $uniqueid=date("U").".".rand(1, 9999);
closer_dispo.php --- > does not insert an uniqueid value
admin_modify_lead.php --- > does not insert an uniqueid value
qc_modify_lead.php --- > does not insert an uniqueid value