diff --git a/agc_2-X/trunk/bin/ADMIN_archive_log_tables.pl b/agc_2-X/trunk/bin/ADMIN_archive_log_tables.pl index 08b6ad5a..b17a438d 100644 --- a/agc_2-X/trunk/bin/ADMIN_archive_log_tables.pl +++ b/agc_2-X/trunk/bin/ADMIN_archive_log_tables.pl @@ -70,6 +70,7 @@ # 230507-0804 - Added vicidial_latency_gaps archiving # 231028-0810 - Added --url-log-only and --url-log-days=x options for purging of vicidial_url_log table only # 231117-1914 - Added vicidial_3way_press_log archiving +# 231126-2227 - Added vicidial_hci_log archiving # $CALC_TEST=0; @@ -3498,6 +3499,59 @@ if (!$T) } + ##### vicidial_hci_log + $stmtA = "SELECT count(*) from vicidial_hci_log;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $vicidial_hci_log_count = $aryA[0]; + } + $sthA->finish(); + + $stmtA = "SELECT count(*) from vicidial_hci_log_archive;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $vicidial_hci_log_archive_count = $aryA[0]; + } + $sthA->finish(); + + if (!$Q) {print "\nProcessing vicidial_hci_log table... ($vicidial_hci_log_count|$vicidial_hci_log_archive_count)\n";} + $stmtA = "INSERT IGNORE INTO vicidial_hci_log_archive SELECT * from vicidial_hci_log;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + + $sthArows = $sthA->rows; + if (!$Q) {print "$sthArows rows inserted into vicidial_hci_log_archive table \n";} + + $rv = $sthA->err(); + if (!$rv) + { + if ($wipe_all > 0) + {$stmtA = "DELETE FROM vicidial_hci_log;";} + else + {$stmtA = "DELETE FROM vicidial_hci_log WHERE call_date < '$del_time';";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows = $sthA->rows; + if (!$Q) {print "$sthArows rows deleted from vicidial_hci_log table \n";} + + $stmtA = "optimize table vicidial_hci_log;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + + $stmtA = "optimize table vicidial_hci_log_archive;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + } + + ##### vicidial_call_notes $stmtA = "SELECT count(*) from vicidial_call_notes;"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; diff --git a/agc_2-X/trunk/bin/ADMIN_keepalive_ALL.pl b/agc_2-X/trunk/bin/ADMIN_keepalive_ALL.pl index 60c3975a..bf51e949 100644 --- a/agc_2-X/trunk/bin/ADMIN_keepalive_ALL.pl +++ b/agc_2-X/trunk/bin/ADMIN_keepalive_ALL.pl @@ -168,9 +168,10 @@ # 230609-1137 - Added VIDPROMPTSPECIAL call menu In-Group dialplan entries # 230909-0846 - Added purging of vicidial_khomp_log records older than 7 days # 230925-1454 - Added -recmon settings +# 231136-2158 - Added hopper_hold_inserts HCI lead reservations clearing for old reservations # -$build = '230925-1454'; +$build = '231136-2158'; $DB=0; # Debug flag $teodDB=0; # flag to log Timeclock End of Day processes to log file @@ -488,7 +489,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA ##### Get the settings from system_settings ##### -$stmtA = "SELECT sounds_central_control_active,active_voicemail_server,custom_dialplan_entry,default_codecs,generate_cross_server_exten,voicemail_timezones,default_voicemail_timezone,call_menu_qualify_enabled,allow_voicemail_greeting,reload_timestamp,meetme_enter_login_filename,meetme_enter_leave3way_filename,allow_chats,enable_auto_reports,enable_drop_lists,expired_lists_inactive,sip_event_logging,call_quota_lead_ranking,inbound_answer_config,log_latency_gaps,demographic_quotas,weekday_resets,highest_lead_id FROM system_settings;"; +$stmtA = "SELECT sounds_central_control_active,active_voicemail_server,custom_dialplan_entry,default_codecs,generate_cross_server_exten,voicemail_timezones,default_voicemail_timezone,call_menu_qualify_enabled,allow_voicemail_greeting,reload_timestamp,meetme_enter_login_filename,meetme_enter_leave3way_filename,allow_chats,enable_auto_reports,enable_drop_lists,expired_lists_inactive,sip_event_logging,call_quota_lead_ranking,inbound_answer_config,log_latency_gaps,demographic_quotas,weekday_resets,highest_lead_id,hopper_hold_inserts FROM system_settings;"; # print "$stmtA\n"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; @@ -519,6 +520,7 @@ if ($sthArows > 0) $SSdemographic_quotas = $aryA[20]; $SSweekday_resets = $aryA[21]; $SShighest_lead_id = $aryA[22]; + $SShopper_hold_inserts = $aryA[23]; } $sthA->finish(); if ($DBXXX > 0) {print "SYSTEM SETTINGS: $sounds_central_control_active|$active_voicemail_server|$SScustom_dialplan_entry|$SSdefault_codecs\n";} @@ -5691,6 +5693,53 @@ if ( ($active_voicemail_server =~ /$server_ip/) && ((length($active_voicemail_se +################################################################################ +##### START HCI lead reserve RQUEUE clearing for reservations longer than 5 minutes +################################################################################ +# only run this on active voicemail server +if ( ($active_voicemail_server =~ /$server_ip/) && ((length($active_voicemail_server)) eq (length($server_ip))) && ($SShopper_hold_inserts > 0) ) + { + ##### gather vicidial_live_agents_details ##### + $stmtA = "SELECT lead_id,user FROM vicidial_hci_reserve where reserve_date < \"$FMSQLdate\";"; + if ($DBX) {print "$stmtA\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $i=0; + while ($sthArows > $i) + { + @aryA = $sthA->fetchrow_array; + $VLADlead_id[$i] = $aryA[0]; + $VLADuser[$i] = $aryA[1]; + $i++; + } + $sthA->finish(); + + if ($DB) {print " old vicidial_hci_reserve entries to clear: $i\n";} + + $i=0; + while ($sthArows > $i) + { + $VALLmin_count_latency=0; $VALLmin_max_latency=0; $VALLmin_avg_latency=0; + $stmtA = "UPDATE vicidial_hopper SET status='RHOLD',user='' where lead_id='$VLADlead_id[$i]' and status='RQUEUE';"; + if ($DBX) {print "$stmtA\n";} + $affected_rows = $dbhA->do($stmtA) or die "Couldn't execute query: |$stmtA|\n"; + if ($DBX) {print "vicidial_live_agents_details update query: |$affected_rows|$stmtA|\n";} + + $i++; + } + + $stmtA = "DELETE FROM vicidial_hci_reserve where reserve_date < \"$FMSQLdate\""; + $affected_rows = $dbhA->do($stmtA) or die "Couldn't execute query: |$stmtA|\n"; + if ($DBX) {print "vicidial_hci_reserve delete query: |$affected_rows|$stmtA|\n";} + } +################################################################################ +##### END HCI lead reserve RQUEUE clearing for reservations longer than 5 minutes +################################################################################ + + + + ################################################################################ ##### START launch Demographic Quotas process, if enabled on any active campaigns ################################################################################ diff --git a/agc_2-X/trunk/bin/AST_VDadapt.pl b/agc_2-X/trunk/bin/AST_VDadapt.pl index 91ef051c..33722ae3 100644 --- a/agc_2-X/trunk/bin/AST_VDadapt.pl +++ b/agc_2-X/trunk/bin/AST_VDadapt.pl @@ -561,7 +561,7 @@ while ($master_loop < $CLIloops) $hopper_ready_count=0; $agents_loggedin_count=0; ### Find out how many leads are in the hopper from a specific campaign - $stmtA = "SELECT count(*) from vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('READY','RHOLD');"; + $stmtA = "SELECT count(*) from vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('READY','RHOLD','RQUEUE');"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthArows=$sthA->rows; diff --git a/agc_2-X/trunk/bin/AST_VDdemographic_quotas.pl b/agc_2-X/trunk/bin/AST_VDdemographic_quotas.pl index 12176356..70552e9f 100644 --- a/agc_2-X/trunk/bin/AST_VDdemographic_quotas.pl +++ b/agc_2-X/trunk/bin/AST_VDdemographic_quotas.pl @@ -1087,7 +1087,7 @@ foreach(@campaign_id) if ($DBX) {print "DQ List AUTO Resets enabled, checking hopper count: $demographic_quotas_list_resets[$i] \n";} $hopper_begin_output .= "DQ List AUTO Resets enabled, checking hopper count: $demographic_quotas_list_resets[$i] \n"; $hopper_leads=0; - $stmtA="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('READY','RHOLD');"; + $stmtA="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('READY','RHOLD','RQUEUE');"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthArows=$sthA->rows; @@ -1524,7 +1524,7 @@ foreach(@campaign_id) if ($ranked_leads > 0) { $hopper_leads=0; - $stmtA="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('READY','RHOLD');"; + $stmtA="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('READY','RHOLD','RQUEUE');"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthArows=$sthA->rows; diff --git a/agc_2-X/trunk/bin/AST_VDhopper.pl b/agc_2-X/trunk/bin/AST_VDhopper.pl index 854c7e29..09cf222a 100644 --- a/agc_2-X/trunk/bin/AST_VDhopper.pl +++ b/agc_2-X/trunk/bin/AST_VDhopper.pl @@ -108,6 +108,7 @@ # 220822-0938 - Change DNC check queries to put phone_number in double-quotes instead of single-quotes # 230428-2017 - Added demographic_quotas code # 231116-0821 - Added hopper_hold_inserts system and campaign settings options +# 231126-1748 - Added RQUEUE hopper status # # constants @@ -1414,7 +1415,7 @@ while ($sthArows > $rec_count) { if ($DB) { print "---------------Auto Trim Hopper Enabled For $campaign_id[$rec_count]---------------------\n"; } - $stmtB = "SELECT COUNT(*) FROM $vicidial_hopper WHERE campaign_id='$campaign_id[$rec_count]' and status IN ('READY','RHOLD') and source IN('S','N');"; + $stmtB = "SELECT COUNT(*) FROM $vicidial_hopper WHERE campaign_id='$campaign_id[$rec_count]' and status IN ('READY','RHOLD','RQUEUE') and source IN('S','N');"; $sthB = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr; $sthB->execute or die "executing: $stmtB ", $dbhA->errstr; @aryLead = $sthB->fetchrow_array; @@ -1430,7 +1431,7 @@ while ($sthArows > $rec_count) if ( $camp_leads > ( 2 * $hopper_level[$rec_count] ) ) { $num_to_delete = $camp_leads - 2 * $hopper_level[$rec_count]; - $stmtB = "DELETE FROM $vicidial_hopper WHERE campaign_id='$campaign_id[$rec_count]' AND source='S' AND status IN ('READY','RHOLD') LIMIT $num_to_delete"; + $stmtB = "DELETE FROM $vicidial_hopper WHERE campaign_id='$campaign_id[$rec_count]' AND source='S' AND status IN ('READY','RHOLD','RQUEUE') LIMIT $num_to_delete"; $affected_rows = $dbhA->do($stmtB); if ($DB) @@ -2212,7 +2213,7 @@ foreach(@campaign_id) ### Find out how many leads are READY in the hopper from a specific campaign $hopper_ready_count=0; - $stmtA = "SELECT count(*) from $vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('READY','RHOLD');"; + $stmtA = "SELECT count(*) from $vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('READY','RHOLD','RQUEUE');"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthArows=$sthA->rows; diff --git a/agc_2-X/trunk/docs/HCI_Human_Call_Indicator_screen.txt b/agc_2-X/trunk/docs/HCI_Human_Call_Indicator_screen.txt new file mode 100644 index 00000000..d745a9e4 --- /dev/null +++ b/agc_2-X/trunk/docs/HCI_Human_Call_Indicator_screen.txt @@ -0,0 +1,131 @@ +HUMAN CALL INDICATOR(HCI) DOC Started: 2023-11-08 Updated: 2023-11-27 + + +This document will go over how to set up the Human Call Indicator screen on your system, with Hopper Hold Inserts for campaigns. + +NOTE: This requires svn/trunk revision 3779 or higher!!! + + + +What is an Human Call Indicator screen? + +The purpose of this feature is to allow a user to log into the HCI screen to manually click on a button and then confirm their choice to enable the initiation of a phone call by the system. This confirmation of each phone call is logged and is visible in the User Stats page and the Admin Modify Lead page. + +On the admin side, to enable the HCI screen, the System Settings "Lead Hopper Hold Inserts Allowed" option must be enabled, and the Campaign "Hopper Hold Inserts" option must be enabled for each campaign that you want this feature activated for. If "Hopper Hold Inserts" is enabled for a campaign, then no non-agent-screen phone calls can be placed from that campaign without first being individually confirmed by a live human user in the HCI screen. + +For a user to log into the HCI screen, they must have their User's "HCI Enabled" option enabled. + +The user can get to the HCI screen from the link on the Welcome page(HOME). Once logged in to the HCI screen, the user must select the campaign that they want to initiate calls from, then they will see the active HCI screen with phone numbers to click on (on the left side), and a summary screen (on the right side). When an agent clicks on one of the phone numbers, they will see a confirmation pop-up panel asking them to confirm that they want this number to be called. If the user confirms this propt, then the call can be placed by the system and the phone number's button will disappear from the left side of the screen and the other phone numbers will shift to fill in the empty space. + +The statistics on the right side of the screen show the following metrics: +1. Calls in Progress - the number of dialed but not-yet-answered calls active at this moment, does not include calls where agents are talking to customers +2. Calls on Hold - the number of leads in the hopper that are on HOLD waiting to be confirmed for calling by an HCI screen user +3. Records Remaining - the number of leads in the hopper that are READY and waiting to be placed through your telco carrier by the system +4. Agents Ready - the number of agents in READY or CLOSER status, waiting for a phone call +5. Calls Offset - the number of calls to be placed by the campaign that will fill the waiting agents above +6. Drop Rate - the drop rate for this campaign for today's calls, taken out of the number of Human Answer phone calls for the campaign + +At the top of the HCI screen, the user also has the option to Change Campaign to another HCI-enabled campaign, or they can LOGOUT of the HCI screen. + + + +How do I configure this on my system? + +No configuration is needed other than activating Hopper Hold Inserts for the system and campaigns, as well as activating the HCI Enabled setting for the users that you want to access the HCI screen. + + + +What are the limitations of the HCI screen? + +The HCI screen will reserve leads from the hopper that are on HOLD for each user that is logged into the HCI screen, these HOLD hopper leads are refreshed as the HCI screen user confirms phone calls, and no more than 40 calls can be initiated within 4 seconds, although in our testing we've never been able to get anywhere close to that rate. + +If the HCI screen user does not confirm any phone calls for 5 minutes, the system will reset their reserved hopper leads and allow their HCI screen to reserve new ones. This is done to ensure the freshness of the hopper leads being confirmed through the HCI screen. + +Since the HCI screen will reserve 40 hopper HOLD leads for each logged-in HCI screen user, you may need to raise your campaign Hopper Level depending on how many HCI screen users you will want to have logged in at any one time. + + + + + + + + + + +------------------------------------------------------------------------- + +DATABASE CHANGES FOR REFERENCE ONLY!!!!!!!!! + + +ALTER TABLE system_settings ADD hopper_hold_inserts ENUM('0','1','2','3','4','5','6','7') default '0'; + +ALTER TABLE vicidial_campaigns ADD hopper_hold_inserts ENUM('ENABLED','DISABLED') default 'DISABLED'; + +ALTER TABLE vicidial_hopper MODIFY status ENUM('READY','QUEUE','INCALL','DONE','HOLD','DNC','RHOLD','RQUEUE') default 'READY'; + +ALTER TABLE vicidial_users ADD hci_enabled ENUM('0','1','2','3','4','5','6') default '0'; + +CREATE TABLE vicidial_hci_live_agents ( +user VARCHAR(20), +campaign_id VARCHAR(8), +user_ip VARCHAR(45) default '', +login_time DATETIME, +last_call_time DATETIME, +last_update_time TIMESTAMP, +status VARCHAR(40), +lead_id INT(9) UNSIGNED default '0', +phone_number VARCHAR(18), +random_id INT(8) UNSIGNED, +index(user), +index(campaign_id), +index(last_update_time) +) ENGINE=MyISAM; + +CREATE TABLE vicidial_hci_agent_log ( +user VARCHAR(20), +campaign_id VARCHAR(8), +user_ip VARCHAR(45) default '', +login_time DATETIME, +last_call_time DATETIME, +status VARCHAR(40), +index(user), +index(login_time) +) ENGINE=MyISAM; + +CREATE TABLE vicidial_hci_reserve ( +user VARCHAR(20), +lead_id INT(9) UNSIGNED, +phone_number VARCHAR(18), +reserve_date DATETIME, +campaign_id VARCHAR(8), +status VARCHAR(40), +index(user), +index(reserve_date), +index(lead_id) +) ENGINE=MyISAM; + +CREATE UNIQUE INDEX vhcir on vicidial_hci_reserve (lead_id,user,campaign_id); + +CREATE TABLE vicidial_hci_log ( +user VARCHAR(20), +lead_id INT(9) UNSIGNED, +phone_number VARCHAR(18), +call_date DATETIME, +campaign_id VARCHAR(8), +status VARCHAR(40), +user_ip VARCHAR(45) default '', +index(user), +index(call_date), +index(lead_id) +) ENGINE=MyISAM; + +CREATE TABLE vicidial_hci_log_archive LIKE vicidial_hci_log; +CREATE UNIQUE INDEX vhlclu on vicidial_hci_log_archive (call_date,lead_id,user); + +CREATE TABLE hci_logs ( +date DATETIME, +user VARCHAR(20) default '', +lead_id INT(9) UNSIGNED NOT NULL, +campaign_id VARCHAR(8), +index(date) +) ENGINE=MyISAM; diff --git a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql index cba7eff8..f17adf26 100644 --- a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql +++ b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql @@ -704,7 +704,8 @@ failed_login_count_today SMALLINT(6) UNSIGNED default '0', failed_last_ip_today VARCHAR(50) default '', failed_last_type_today VARCHAR(20) default '', modify_dial_prefix ENUM('0','1','2','3','4','5','6') default '0', -inbound_credits MEDIUMINT(7) default '-1' +inbound_credits MEDIUMINT(7) default '-1', +hci_enabled ENUM('0','1','2','3','4','5','6') default '0' ) ENGINE=MyISAM; CREATE UNIQUE INDEX user ON vicidial_users (user); @@ -5087,6 +5088,71 @@ index(call_3way_id), index(lead_id) ) ENGINE=MyISAM; +CREATE TABLE vicidial_hci_live_agents ( +user VARCHAR(20), +campaign_id VARCHAR(8), +user_ip VARCHAR(45) default '', +login_time DATETIME, +last_call_time DATETIME, +last_update_time TIMESTAMP, +status VARCHAR(40), +lead_id INT(9) UNSIGNED default '0', +phone_number VARCHAR(18), +random_id INT(8) UNSIGNED, +index(user), +index(campaign_id), +index(last_update_time) +) ENGINE=MyISAM; + +CREATE TABLE vicidial_hci_agent_log ( +user VARCHAR(20), +campaign_id VARCHAR(8), +user_ip VARCHAR(45) default '', +login_time DATETIME, +last_call_time DATETIME, +status VARCHAR(40), +index(user), +index(login_time) +) ENGINE=MyISAM; + +CREATE TABLE vicidial_hci_reserve ( +user VARCHAR(20), +lead_id INT(9) UNSIGNED, +phone_number VARCHAR(18), +reserve_date DATETIME, +campaign_id VARCHAR(8), +status VARCHAR(40), +index(user), +index(reserve_date), +index(lead_id) +) ENGINE=MyISAM; + +CREATE UNIQUE INDEX vhcir on vicidial_hci_reserve (lead_id,user,campaign_id); + +CREATE TABLE vicidial_hci_log ( +user VARCHAR(20), +lead_id INT(9) UNSIGNED, +phone_number VARCHAR(18), +call_date DATETIME, +campaign_id VARCHAR(8), +status VARCHAR(40), +user_ip VARCHAR(45) default '', +index(user), +index(call_date), +index(lead_id) +) ENGINE=MyISAM; + +CREATE TABLE vicidial_hci_log_archive LIKE vicidial_hci_log; +CREATE UNIQUE INDEX vhlclu on vicidial_hci_log_archive (call_date,lead_id,user); + +CREATE TABLE hci_logs ( +date DATETIME, +user VARCHAR(20) default '', +lead_id INT(9) UNSIGNED NOT NULL, +campaign_id VARCHAR(8), +index(date) +) ENGINE=MyISAM; + ALTER TABLE vicidial_email_list MODIFY message text character set utf8; @@ -5486,4 +5552,4 @@ INSERT INTO `wallboard_reports` VALUES ('AGENTS_AND_QUEUES','Agents and Queues', UPDATE system_settings set vdc_agent_api_active='1'; -UPDATE system_settings SET db_schema_version='1700',db_schema_update_date=NOW(),reload_timestamp=NOW(); +UPDATE system_settings SET db_schema_version='1701',db_schema_update_date=NOW(),reload_timestamp=NOW(); diff --git a/agc_2-X/trunk/extras/upgrade_2.14.sql b/agc_2-X/trunk/extras/upgrade_2.14.sql index 914b667a..ceef6bdc 100644 --- a/agc_2-X/trunk/extras/upgrade_2.14.sql +++ b/agc_2-X/trunk/extras/upgrade_2.14.sql @@ -2484,3 +2484,72 @@ CREATE TABLE vicidial_3way_press_log_archive LIKE vicidial_3way_press_log; CREATE UNIQUE INDEX vdpla on vicidial_3way_press_log_archive (call_date,caller_code,user); UPDATE system_settings SET db_schema_version='1700',db_schema_update_date=NOW() where db_schema_version < 1700; + +ALTER TABLE vicidial_users ADD hci_enabled ENUM('0','1','2','3','4','5','6') default '0'; + +CREATE TABLE vicidial_hci_live_agents ( +user VARCHAR(20), +campaign_id VARCHAR(8), +user_ip VARCHAR(45) default '', +login_time DATETIME, +last_call_time DATETIME, +last_update_time TIMESTAMP, +status VARCHAR(40), +lead_id INT(9) UNSIGNED default '0', +phone_number VARCHAR(18), +random_id INT(8) UNSIGNED, +index(user), +index(campaign_id), +index(last_update_time) +) ENGINE=MyISAM; + +CREATE TABLE vicidial_hci_agent_log ( +user VARCHAR(20), +campaign_id VARCHAR(8), +user_ip VARCHAR(45) default '', +login_time DATETIME, +last_call_time DATETIME, +status VARCHAR(40), +index(user), +index(login_time) +) ENGINE=MyISAM; + +CREATE TABLE vicidial_hci_reserve ( +user VARCHAR(20), +lead_id INT(9) UNSIGNED, +phone_number VARCHAR(18), +reserve_date DATETIME, +campaign_id VARCHAR(8), +status VARCHAR(40), +index(user), +index(reserve_date), +index(lead_id) +) ENGINE=MyISAM; + +CREATE UNIQUE INDEX vhcir on vicidial_hci_reserve (lead_id,user,campaign_id); + +CREATE TABLE vicidial_hci_log ( +user VARCHAR(20), +lead_id INT(9) UNSIGNED, +phone_number VARCHAR(18), +call_date DATETIME, +campaign_id VARCHAR(8), +status VARCHAR(40), +user_ip VARCHAR(45) default '', +index(user), +index(call_date), +index(lead_id) +) ENGINE=MyISAM; + +CREATE TABLE vicidial_hci_log_archive LIKE vicidial_hci_log; +CREATE UNIQUE INDEX vhlclu on vicidial_hci_log_archive (call_date,lead_id,user); + +CREATE TABLE hci_logs ( +date DATETIME, +user VARCHAR(20) default '', +lead_id INT(9) UNSIGNED NOT NULL, +campaign_id VARCHAR(8), +index(date) +) ENGINE=MyISAM; + +UPDATE system_settings SET db_schema_version='1701',db_schema_update_date=NOW() where db_schema_version < 1701; diff --git a/agc_2-X/trunk/www/vicidial/AST_VICIDIAL_hopperlist.php b/agc_2-X/trunk/www/vicidial/AST_VICIDIAL_hopperlist.php index cff2989b..609cf9c0 100644 --- a/agc_2-X/trunk/www/vicidial/AST_VICIDIAL_hopperlist.php +++ b/agc_2-X/trunk/www/vicidial/AST_VICIDIAL_hopperlist.php @@ -32,6 +32,7 @@ # 220301-1627 - Added allow_web_debug system setting # 220812-0929 - Added User Group report permissions checking # 231116-0928 - Added option to display RHOLD status hopper entries +# 231127-2001 - Added display of RQUEUE status hopper entries and hold details when displaying HOLD entries # $startMS = microtime(); @@ -322,8 +323,8 @@ echo "