Added pause code time limits warning feature

git-svn-id: svn://192.168.202.10@2709 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2017-03-21 16:16:45 +00:00
parent 20651c0652
commit addce196c9
7 changed files with 103 additions and 26 deletions
+6
View File
@@ -124,6 +124,12 @@ OTHER CHANGES:
22. Added CHAT option to Inbound Queue No Dial campaign setting to prevent
outbound auto-dialing if a chat is waiting for an agent
23. Added qualify option to phones for IAX type phones
24. Added Pause Code Time Limits to allow you to set a time limit on the number
of seconds an agent can be in a specific pause code before the real-time
report will show them in a different color.
@@ -1527,6 +1527,7 @@ pause_code VARCHAR(6) NOT NULL,
pause_code_name VARCHAR(30),
billable ENUM('NO','YES','HALF') default 'NO',
campaign_id VARCHAR(8),
time_limit SMALLINT(5) UNSIGNED default '65000',
index (campaign_id)
) ENGINE=MyISAM;
@@ -1696,7 +1697,8 @@ web_loader_phone_length VARCHAR(10) default 'DISABLED',
agent_script VARCHAR(50) default 'vicidial.php',
vdad_debug_logging ENUM('1','0') default '0',
agent_chat_screen_colors VARCHAR(20) default 'default',
enable_auto_reports ENUM('1','0') default '0'
enable_auto_reports ENUM('1','0') default '0',
enable_pause_code_limits ENUM('1','0') default '0'
) ENGINE=MyISAM;
CREATE TABLE vicidial_campaigns_list_mix (
@@ -3900,4 +3902,4 @@ UPDATE vicidial_configuration set value='1766' where name='qc_database_version';
UPDATE system_settings set vdc_agent_api_active='1';
UPDATE system_settings SET db_schema_version='1495',db_schema_update_date=NOW(),reload_timestamp=NOW();
UPDATE system_settings SET db_schema_version='1496',db_schema_update_date=NOW(),reload_timestamp=NOW();
+6
View File
@@ -123,3 +123,9 @@ UPDATE system_settings SET db_schema_version='1494',db_schema_update_date=NOW()
ALTER TABLE phones ADD conf_qualify ENUM('Y','N') default 'Y';
UPDATE system_settings SET db_schema_version='1495',db_schema_update_date=NOW() where db_schema_version < 1495;
ALTER TABLE system_settings ADD enable_pause_code_limits ENUM('1','0') default '0';
ALTER TABLE vicidial_pause_codes ADD time_limit SMALLINT(5) UNSIGNED default '65000';
UPDATE system_settings SET db_schema_version='1496',db_schema_update_date=NOW() where db_schema_version < 1496;
@@ -1,7 +1,7 @@
<?php
# AST_timeonVDADall.php
#
# Copyright (C) 2016 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2017 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# live real-time stats for the VICIDIAL Auto-Dialer all servers
#
@@ -104,10 +104,11 @@
# 160418-2141 - Fixed issue with WALL displays
# 160515-1300 - Added UK OFCOM feature
# 160803-1901 - Fixed issue with ERROR in campaign/ingroup name
# 170321-1145 - Added pause code time limits colors
#
$version = '2.12-92';
$build = '160803-1901';
$version = '2.14-93';
$build = '170321-1145';
header ("Content-type: text/html; charset=utf-8");
@@ -194,7 +195,7 @@ $db_source = 'M';
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,outbound_autodial_active,slave_db_server,reports_use_slave_db,enable_languages,language_method,agent_whisper_enabled,allow_chats,cache_carrier_stats_realtime,report_default_format,ofcom_uk_drop_calc FROM system_settings;";
$stmt = "SELECT use_non_latin,outbound_autodial_active,slave_db_server,reports_use_slave_db,enable_languages,language_method,agent_whisper_enabled,allow_chats,cache_carrier_stats_realtime,report_default_format,ofcom_uk_drop_calc,enable_pause_code_limits FROM system_settings;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysqli_num_rows($rslt);
@@ -212,6 +213,7 @@ if ($qm_conf_ct > 0)
$cache_carrier_stats_realtime = $row[8];
$SSreport_default_format = $row[9];
$SSofcom_uk_drop_calc = $row[10];
$SSenable_pause_code_limits = $row[11];
}
##### END SETTINGS LOOKUP #####
###########################################
@@ -1090,6 +1092,7 @@ else
.orange {color: black; background-color: orange}
.black {color: white; background-color: black}
.salmon {color: white; background-color: #FA8072}
.darkred {color: white; background-color: #990000}
.r1 {color: black; background-color: #FFCCCC}
.r2 {color: black; background-color: #FF9999}
@@ -3200,9 +3203,25 @@ if ($talking_to_print > 0)
$rowC=mysqli_fetch_row($rsltC);
$pausecode = sprintf("%-6s", $rowC[0]);
$pausecode="$pausecode ";
if ($SSenable_pause_code_limits > 0)
{
$pause_limit_stmt="SELECT time_limit from vicidial_pause_codes where campaign_id='$Acampaign_id[$i]' and pause_code='$rowC[0]'";
$pause_limit_rslt=mysql_to_mysqli($pause_limit_stmt, $link);
if (mysqli_num_rows($pause_limit_rslt)>0)
{
$pause_limit_row=mysqli_fetch_row($pause_limit_rslt);
$pause_limit=$pause_limit_row[0];
}
else
{
$pause_limit="999999";
}
}
else
{$pause_limit="999999";}
}
else
{$pausecode='';}
{$pausecode=''; $pause_limit="999999";}
if ($call_time_S >= 21600)
{$j++; continue;}
@@ -3213,6 +3232,7 @@ if ($talking_to_print > 0)
if ($call_time_S >= 10) {$G='<SPAN class="khaki"><B>'; $EG='</B></SPAN>'; $tr_class='TRkhaki';}
if ($call_time_S >= 60) {$G='<SPAN class="yellow"><B>'; $EG='</B></SPAN>'; $tr_class='TRyellow';}
if ($call_time_S >= 300) {$G='<SPAN class="olive"><B>'; $EG='</B></SPAN>'; $tr_class='TRolive';}
if ($call_time_S >= $pause_limit) {$G='<SPAN class="darkred"><B>'; $EG='</B></SPAN>'; $tr_class='TRdarkred';}
}
}
# if ( (strlen($Acall_server_ip[$i])> 4) and ($Acall_server_ip[$i] != "$Aserver_ip[$i]") )
@@ -3391,6 +3411,10 @@ if ($talking_to_print > 0)
$Aecho .= " <SPAN class=\"olive\"><B> </SPAN> - "._QXZ("Agent Paused > 5 minutes")."</B>\n";
$Aecho .= " <SPAN class=\"lime\"><B> </SPAN> - "._QXZ("Agent in 3-WAY > 10 seconds")."</B>\n";
$Aecho .= " <SPAN class=\"black\"><B> </SPAN> - "._QXZ("Agent on a dead call")."</B>\n";
if ($SSenable_pause_code_limits > 0)
{
$Aecho .= " <SPAN class=\"darkred\"><B> </SPAN> - "._QXZ("Agent over pause limit")."</B>\n";
}
if ($ring_agents > 0)
{
File diff suppressed because one or more lines are too long
+7 -1
View File
@@ -115,6 +115,7 @@
# 170309-1212 - Added agent_xfer_validation and populate_state_areacode entries
# 170313-2012 - Added CHAT option to inbound_queue_no_dial entry
# 170320-1346 - Added phones conf_qualify entry
# 170321-1130 - Added pause code limits entries
#
@@ -3424,7 +3425,7 @@ if ($SSoutbound_autodial_active > 0)
<B><FONT SIZE=3>AGENT PAUSE CODES</FONT></B><BR><BR>
<A NAME="pause_codes">
<BR>
<B><?php echo _QXZ("If the Agent Pause Codes Active field is set to active then the agents will be able to select from these pause codes when they click on the PAUSE button on their screens. This data is then stored in the agent log. The Pause code must contain only letters and numbers and be less than 7 characters long. The pause code name can be no longer than 30 characters."); ?></B>
<B><?php echo _QXZ("If the Agent Pause Codes Active field is set to active then the agents will be able to select from these pause codes when they click on the PAUSE button on their screens. This data is then stored in the agent log. The Pause code must contain only letters and numbers and be less than 7 characters long. The pause code name can be no longer than 30 characters.") . ' ' . _QXZ("The Time Limit field, if enabled in System Settings, will change the color of the agent on the Real-Time Report if they are in that pause code for more than the defined amount of seconds."); ?></B>
@@ -5016,6 +5017,11 @@ FR_SPAC 00 00 00 00 00 - <?php echo _QXZ("France space separated phone number");
<BR>
<B><?php echo _QXZ("Agent Soundboards"); ?> -</B><?php echo _QXZ("This option allows you to create agent soundboards that allow an agent in the user screen to click on audio files to have them play in their session. Default is 0 for disabled."); ?>
<BR>
<A NAME="settings-enable_pause_code_limits">
<BR>
<B><?php echo _QXZ("Enable Pause Code Time Limits"); ?> -</B><?php echo _QXZ("This option allows you to be able to set the Time Limit field in campaign pause codes, which will change the color of the agent on the Real-Time Report if they are in that pause code for more than the defined amount of seconds. Default is 0 for disabled."); ?>
<BR>
<A NAME="settings-agentonly_callback_campaign_lock">
<BR>
@@ -37,12 +37,13 @@
# 160413-2003 - Added WALL_4 option
# 160803-1902 - Fixed issue with ERROR in campaign/ingroup name
# 170318-0942 - Added websocket variable for embedded webphone
# 170321-1145 - Added pause code time limits colors
#
$startMS = microtime();
$version = '2.14-25';
$build = '170318-0942';
$version = '2.14-26';
$build = '170321-1145';
header ("Content-type: text/html; charset=utf-8");
@@ -122,7 +123,7 @@ $db_source = 'M';
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,outbound_autodial_active,slave_db_server,reports_use_slave_db,enable_languages,language_method,agent_whisper_enabled,report_default_format FROM system_settings;";
$stmt = "SELECT use_non_latin,outbound_autodial_active,slave_db_server,reports_use_slave_db,enable_languages,language_method,agent_whisper_enabled,report_default_format,enable_pause_code_limits FROM system_settings;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysqli_num_rows($rslt);
@@ -137,6 +138,7 @@ if ($qm_conf_ct > 0)
$SSlanguage_method = $row[5];
$agent_whisper_enabled = $row[6];
$SSreport_default_format = $row[7];
$SSenable_pause_code_limits = $row[8];
}
##### END SETTINGS LOOKUP #####
###########################################
@@ -1580,6 +1582,7 @@ function update_variables(task_option,task_choice,force_reload)
.orange {color: black; background-color: orange;}
.black {color: white; background-color: black;}
.salmon {color: white; background-color: #FA8072;}
.darkred {color: white; background-color: #990000}
.Hblank {color: black; background-color: white; font-size: 11;}
.Hgreen {color: white; background-color: green; font-size: 11;}
@@ -1597,6 +1600,7 @@ function update_variables(task_option,task_choice,force_reload)
.Horange {color: black; background-color: orange; font-size: 11;}
.Hblack {color: white; background-color: black; font-size: 11;}
.Hsalmon {color: white; background-color: #FA8072; font-size: 11;}
.Hdarkred {color: white; background-color: #990000}
tr.TRblank {background-color: white}
tr.TRgreen {background-color: green}
@@ -1614,6 +1618,7 @@ function update_variables(task_option,task_choice,force_reload)
tr.TRorange {background-color: orange}
tr.TRblack {background-color: black}
tr.TRsalmon {background-color: #FA8072}
tr.TRdarkred {color: white; background-color: #990000}
.r1 {color: black; background-color: #FFCCCC}
.r2 {color: black; background-color: #FF9999}