added list agent script override

fixed minor bugs

git-svn-id: svn://192.168.202.10@1211 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2009-08-28 04:26:33 +00:00
parent 4df5a61d35
commit f87d2c4830
10 changed files with 657 additions and 486 deletions
+3
View File
@@ -203,6 +203,9 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
51. Rewrote how scripts are displayed in the ViciDial agent interface 51. Rewrote how scripts are displayed in the ViciDial agent interface
52. Added List agent script override setting allowing different scripts to be
used for each list ID even within the same campaign
+19 -5
View File
@@ -67,6 +67,7 @@
# 90702-2240 - Added option to send to remote agent as phone*vendor_id # 90702-2240 - Added option to send to remote agent as phone*vendor_id
# 90721-1137 - Added rank and owner as vicidial_list fields # 90721-1137 - Added rank and owner as vicidial_list fields
# 90808-0307 - Added longest_wait_time as agent routing option # 90808-0307 - Added longest_wait_time as agent routing option
# 90827-1535 - Added proper logging of list_id in vicidial_log table
# #
$script = 'agi-VDAD_ALL_outbound.agi'; $script = 'agi-VDAD_ALL_outbound.agi';
@@ -594,7 +595,20 @@ if ($affected_rows > 0)
} }
} }
$stmtA = "INSERT INTO vicidial_log (uniqueid,lead_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,processed,alt_dial) values('$uniqueid','$CIDlead_id','$VDADcampaign','$SQLdate','$now_date_epoch','$vdlog_status','$VDADphone_code','$VDADphone','VDAD','N','$VDADalt_dial')"; $xCLlist_id=0;
$stmtA = "SELECT list_id from vicidial_list where lead_id='$CIDlead_id' limit 1;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsLI=$sthA->rows;
$dbhP=$dbhA; $mysql_count='010XX'; $MEL_aff_rows=$sthArowsLI; &mysql_error_logging;
if ($sthArowsLI > 0)
{
@aryA = $sthA->fetchrow_array;
$xCLlist_id = "$aryA[0]";
}
$sthA->finish();
$stmtA = "INSERT INTO vicidial_log (uniqueid,lead_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,processed,alt_dial,list_id) values('$uniqueid','$CIDlead_id','$VDADcampaign','$SQLdate','$now_date_epoch','$vdlog_status','$VDADphone_code','$VDADphone','VDAD','N','$VDADalt_dial','$xCLlist_id')";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA); $affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01008'; $MEL_aff_rows=$affected_rows; &mysql_error_logging; $dbhP=$dbhA; $mysql_count='01008'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
@@ -634,10 +648,10 @@ if ($affected_rows > 0)
$rec_count=0; $rec_count=0;
while ($sthArows > $rec_count) while ($sthArows > $rec_count)
{ {
@aryA = $sthA->fetchrow_array; @aryA = $sthA->fetchrow_array;
$phone_number = "$aryA[0]"; $phone_number = "$aryA[0]";
$data2 = "$phone_number"; $data2 = "$phone_number";
$rec_count++; $rec_count++;
} }
$sthA->finish(); $sthA->finish();
+30 -3
View File
@@ -79,6 +79,7 @@
# 90619-1948 - Format fixing # 90619-1948 - Format fixing
# 90630-2252 - Added Sangoma CDP pre-Answer call processing # 90630-2252 - Added Sangoma CDP pre-Answer call processing
# 90816-0057 - Changed default vicidial_log time to 0 from 1 second # 90816-0057 - Changed default vicidial_log time to 0 from 1 second
# 90827-1227 - Added list_id logging in vicidial_log on NA calls
# #
@@ -1193,7 +1194,20 @@ while($one_day_interval > 0)
$end_epoch = $now_date_epoch; $end_epoch = $now_date_epoch;
if ($insertVLcount < 1) if ($insertVLcount < 1)
{ {
$stmtA = "INSERT INTO vicidial_log (uniqueid,lead_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,processed,length_in_sec,end_epoch,alt_dial) values('$CLuniqueid','$CLlead_id','$CLcampaign_id','$SQLdate','$now_date_epoch','$CLnew_status','$CLphone_code','$CLphone_number','$insertVLuser','N','$CLstage','$end_epoch','$CLalt_dial')"; $xCLlist_id=0;
$stmtA="SELECT list_id from vicidial_list where lead_id='$CLlead_id' limit 1;";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsVLL=$sthA->rows;
if ($sthArowsVLL > 0)
{
@aryA = $sthA->fetchrow_array;
$xCLlist_id = "$aryA[0]";
}
$sthA->finish();
$stmtA = "INSERT INTO vicidial_log (uniqueid,lead_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,processed,length_in_sec,end_epoch,alt_dial,list_id) values('$CLuniqueid','$CLlead_id','$CLcampaign_id','$SQLdate','$now_date_epoch','$CLnew_status','$CLphone_code','$CLphone_number','$insertVLuser','N','$CLstage','$end_epoch','$CLalt_dial','$xCLlist_id')";
if($M){print STDERR "\n|$stmtA|\n";} if($M){print STDERR "\n|$stmtA|\n";}
$affected_rows = $dbhA->do($stmtA); $affected_rows = $dbhA->do($stmtA);
@@ -1651,14 +1665,27 @@ while($one_day_interval > 0)
if ( ($affected_rows > 0) && ($CLlead_id > 0) ) if ( ($affected_rows > 0) && ($CLlead_id > 0) )
{ {
$jam_string = "| lagged call vdac call DELETED $affected_rows|$BDtsSQLdate|$auto_call_id|$CLcallerid|$CLuniqueid|$CLphone_number|$CLstatus|"; $xCLlist_id=0;
$stmtA="SELECT list_id from vicidial_list where lead_id='$CLlead_id' limit 1;";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsVLL=$sthA->rows;
if ($sthArowsVLL > 0)
{
@aryA = $sthA->fetchrow_array;
$xCLlist_id = "$aryA[0]";
}
$sthA->finish();
$jam_string = "| lagged call vdac call DELETED $affected_rows|$BDtsSQLdate|$auto_call_id|$CLcallerid|$CLuniqueid|$CLphone_number|$CLstatus|$xCLlist_id|";
&jam_event_logger; &jam_event_logger;
$CLstage =~ s/LIVE|-//gi; $CLstage =~ s/LIVE|-//gi;
if ($CLstage < 0.25) {$CLstage=0;} if ($CLstage < 0.25) {$CLstage=0;}
$end_epoch = $now_date_epoch; $end_epoch = $now_date_epoch;
$stmtA = "INSERT INTO vicidial_log (uniqueid,lead_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,processed,length_in_sec,end_epoch,alt_dial) values('$CLuniqueid','$CLlead_id','$CLcampaign_id','$SQLdate','$now_date_epoch','DROP','$CLphone_code','$CLphone_number','VDAD','N','$CLstage','$end_epoch','$CLalt_dial')"; $stmtA = "INSERT INTO vicidial_log (uniqueid,lead_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,processed,length_in_sec,end_epoch,alt_dial,list_id) values('$CLuniqueid','$CLlead_id','$CLcampaign_id','$SQLdate','$now_date_epoch','DROP','$CLphone_code','$CLphone_number','VDAD','N','$CLstage','$end_epoch','$CLalt_dial','$xCLlist_id')";
if($M){print STDERR "\n|$stmtA|\n";} if($M){print STDERR "\n|$stmtA|\n";}
$affected_rows = $dbhA->do($stmtA); $affected_rows = $dbhA->do($stmtA);
@@ -682,7 +682,8 @@ active ENUM('Y','N'),
list_description VARCHAR(255), list_description VARCHAR(255),
list_changedate DATETIME, list_changedate DATETIME,
list_lastcalldate DATETIME, list_lastcalldate DATETIME,
reset_time VARCHAR(100) default '' reset_time VARCHAR(100) default '',
agent_script_override VARCHAR(10) default ''
); );
CREATE TABLE vicidial_statuses ( CREATE TABLE vicidial_statuses (
@@ -1890,7 +1891,7 @@ CREATE INDEX phone_number on vicidial_closer_log (phone_number);
CREATE INDEX date_user on vicidial_closer_log (call_date,user); CREATE INDEX date_user on vicidial_closer_log (call_date,user);
CREATE INDEX comment_a on live_inbound_log (comment_a); CREATE INDEX comment_a on live_inbound_log (comment_a);
UPDATE system_settings SET db_schema_version='1168'; UPDATE system_settings SET db_schema_version='1169';
GRANT RELOAD ON *.* TO cron@'%'; GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost; GRANT RELOAD ON *.* TO cron@localhost;
+4
View File
@@ -489,3 +489,7 @@ UPDATE system_settings SET db_schema_version='1167';
ALTER TABLE vicidial_campaigns MODIFY drop_call_seconds TINYINT(3) default '5'; ALTER TABLE vicidial_campaigns MODIFY drop_call_seconds TINYINT(3) default '5';
UPDATE system_settings SET db_schema_version='1168'; UPDATE system_settings SET db_schema_version='1168';
ALTER TABLE vicidial_lists ADD agent_script_override VARCHAR(10) default '';
UPDATE system_settings SET db_schema_version='1169';
@@ -259,6 +259,8 @@ VICIDIAL Balance Rank||
This field allows you to set the order in which this server is to be used for balance dialing, if balance dialing is enabled. The server with the highest rank will be used first in placing Balance fill calls. Default is 0|| This field allows you to set the order in which this server is to be used for balance dialing, if balance dialing is enabled. The server with the highest rank will be used first in placing Balance fill calls. Default is 0||
Inbound Summary Hourly Report|| Inbound Summary Hourly Report||
orders by the amount of time agent has been actively waiting for a call|| orders by the amount of time agent has been actively waiting for a call||
Agent Script Override||
If this field is set, this will be the script that the agent sees on their screen instead of the campaign script when the lead is from this list. Default is not set||
add-file: user_territories.php add-file: user_territories.php
+22 -4
View File
@@ -7,10 +7,11 @@
# #
# CHANGELOG: # CHANGELOG:
# 90824-1435 - First build of script # 90824-1435 - First build of script
# 90827-1548 - Added list override script option
# #
$version = '2.2.0-1'; $version = '2.2.0-2';
$build = '90824-1435'; $build = '90827-1548';
require("dbconnect.php"); require("dbconnect.php");
@@ -72,6 +73,8 @@ if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];}
elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];}
if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];}
elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];}
if (isset($_GET["original_phone_login"])) {$original_phone_login=$_GET["original_phone_login"];}
elseif (isset($_POST["original_phone_login"])) {$original_phone_login=$_POST["original_phone_login"];}
if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];}
elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];}
if (isset($_GET["fronter"])) {$fronter=$_GET["fronter"];} if (isset($_GET["fronter"])) {$fronter=$_GET["fronter"];}
@@ -122,11 +125,14 @@ if (isset($_GET["script_width"])) {$script_width=$_GET["script_width"];}
elseif (isset($_POST["script_width"])) {$script_width=$_POST["script_width"];} elseif (isset($_POST["script_width"])) {$script_width=$_POST["script_width"];}
if (isset($_GET["script_height"])) {$script_height=$_GET["script_height"];} if (isset($_GET["script_height"])) {$script_height=$_GET["script_height"];}
elseif (isset($_POST["script_height"])) {$script_height=$_POST["script_height"];} elseif (isset($_POST["script_height"])) {$script_height=$_POST["script_height"];}
if (isset($_GET["ScrollDIV"])) {$ScrollDIV=$_GET["ScrollDIV"];}
elseif (isset($_POST["ScrollDIV"])) {$ScrollDIV=$_POST["ScrollDIV"];}
if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];} if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];}
elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];} elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];}
if (isset($_GET["ScrollDIV"])) {$ScrollDIV=$_GET["ScrollDIV"];}
elseif (isset($_POST["ScrollDIV"])) {$ScrollDIV=$_POST["ScrollDIV"];}
if (isset($_GET["ignore_list_script"])) {$ignore_list_script=$_GET["ignore_list_script"];}
elseif (isset($_POST["ignore_list_script"])) {$ignore_list_script=$_POST["ignore_list_script"];}
header ("Content-type: text/html; charset=utf-8"); header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header ("Pragma: no-cache"); // HTTP/1.0 header ("Pragma: no-cache"); // HTTP/1.0
@@ -214,6 +220,16 @@ if (strlen($in_script) < 1)
else else
{$call_script = $in_script;} {$call_script = $in_script;}
if ($ignore_list_script < 1)
{
$stmt="SELECT agent_script_override from vicidial_lists where list_id='$list_id';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$agent_script_override = $row[0];
if (strlen($agent_script_override) > 0)
{$call_script = $agent_script_override;}
}
$stmt="SELECT script_name,script_text from vicidial_scripts where script_id='$call_script';"; $stmt="SELECT script_name,script_text from vicidial_scripts where script_id='$call_script';";
$rslt=mysql_query($stmt, $link); $rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt); $row=mysql_fetch_row($rslt);
@@ -252,6 +268,7 @@ if (eregi("iframe src",$script_text))
$pass = eregi_replace(' ','+',$pass); $pass = eregi_replace(' ','+',$pass);
$campaign = eregi_replace(' ','+',$campaign); $campaign = eregi_replace(' ','+',$campaign);
$phone_login = eregi_replace(' ','+',$phone_login); $phone_login = eregi_replace(' ','+',$phone_login);
$original_phone_login = eregi_replace(' ','+',$original_phone_login);
$phone_pass = eregi_replace(' ','+',$phone_pass); $phone_pass = eregi_replace(' ','+',$phone_pass);
$fronter = eregi_replace(' ','+',$fronter); $fronter = eregi_replace(' ','+',$fronter);
$closer = eregi_replace(' ','+',$closer); $closer = eregi_replace(' ','+',$closer);
@@ -309,6 +326,7 @@ $script_text = eregi_replace('--A--user--B--',"$user",$script_text);
$script_text = eregi_replace('--A--pass--B--',"$pass",$script_text); $script_text = eregi_replace('--A--pass--B--',"$pass",$script_text);
$script_text = eregi_replace('--A--campaign--B--',"$campaign",$script_text); $script_text = eregi_replace('--A--campaign--B--',"$campaign",$script_text);
$script_text = eregi_replace('--A--phone_login--B--',"$phone_login",$script_text); $script_text = eregi_replace('--A--phone_login--B--',"$phone_login",$script_text);
$script_text = eregi_replace('--A--original_phone_login--B--',"$original_phone_login",$script_text);
$script_text = eregi_replace('--A--phone_pass--B--',"$phone_pass",$script_text); $script_text = eregi_replace('--A--phone_pass--B--',"$phone_pass",$script_text);
$script_text = eregi_replace('--A--fronter--B--',"$fronter",$script_text); $script_text = eregi_replace('--A--fronter--B--',"$fronter",$script_text);
$script_text = eregi_replace('--A--closer--B--',"$closer",$script_text); $script_text = eregi_replace('--A--closer--B--',"$closer",$script_text);
+15 -4
View File
@@ -248,10 +248,11 @@
# 90812-0046 - Added no-delete-sessions = 1 as default, unused sessions cleared out at timeclock end of day # 90812-0046 - Added no-delete-sessions = 1 as default, unused sessions cleared out at timeclock end of day
# 90814-0829 - Moved mute button next to hotkeys button # 90814-0829 - Moved mute button next to hotkeys button
# 90827-0133 - Reworked Script display code # 90827-0133 - Reworked Script display code
# 90827-1549 - Added list script override option, original_phone_login variable
# #
$version = '2.2.0-225'; $version = '2.2.0-226';
$build = '90827-0133'; $build = '90827-1549';
$mel=1; # Mysql Error Log enabled = 1 $mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=61; $mysql_log_count=61;
$one_mysql_log=0; $one_mysql_log=0;
@@ -1399,6 +1400,8 @@ $VDloginDISPLAY=0;
exit; exit;
} }
$original_phone_login = $phone_login;
# code for parsing load-balanced agent phone allocation where agent interface # code for parsing load-balanced agent phone allocation where agent interface
# will send multiple phones-table logins so that the script can determine the # will send multiple phones-table logins so that the script can determine the
# server that has the fewest agents logged into it. # server that has the fewest agents logged into it.
@@ -2305,6 +2308,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var VU_closer_default_blended = '<?php echo $VU_closer_default_blended ?>'; var VU_closer_default_blended = '<?php echo $VU_closer_default_blended ?>';
var VDstop_rec_after_each_call = '<?php echo $VDstop_rec_after_each_call ?>'; var VDstop_rec_after_each_call = '<?php echo $VDstop_rec_after_each_call ?>';
var phone_login = '<?php echo $phone_login ?>'; var phone_login = '<?php echo $phone_login ?>';
var original_phone_login = '<?php echo $original_phone_login ?>';
var phone_pass = '<?php echo $phone_pass ?>'; var phone_pass = '<?php echo $phone_pass ?>';
var user = '<?php echo $VD_login ?>'; var user = '<?php echo $VD_login ?>';
var user_abb = '<?php echo $user_abb ?>'; var user_abb = '<?php echo $user_abb ?>';
@@ -4623,6 +4627,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&pass=" + pass + "&pass=" + pass +
"&campaign=" + campaign + "&campaign=" + campaign +
"&phone_login=" + phone_login + "&phone_login=" + phone_login +
"&original_phone_login=" + original_phone_login +
"&phone_pass=" + phone_pass + "&phone_pass=" + phone_pass +
"&fronter=" + fronter + "&fronter=" + fronter +
"&closer=" + user + "&closer=" + user +
@@ -5610,6 +5615,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&pass=" + pass + "&pass=" + pass +
"&campaign=" + campaign + "&campaign=" + campaign +
"&phone_login=" + phone_login + "&phone_login=" + phone_login +
"&original_phone_login=" + original_phone_login +
"&phone_pass=" + phone_pass + "&phone_pass=" + phone_pass +
"&fronter=" + fronter + "&fronter=" + fronter +
"&closer=" + user + "&closer=" + user +
@@ -5754,6 +5760,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&pass=" + pass + "&pass=" + pass +
"&campaign=" + campaign + "&campaign=" + campaign +
"&phone_login=" + phone_login + "&phone_login=" + phone_login +
"&original_phone_login=" + original_phone_login +
"&phone_pass=" + phone_pass + "&phone_pass=" + phone_pass +
"&fronter=" + fronter + "&fronter=" + fronter +
"&closer=" + user + "&closer=" + user +
@@ -7020,7 +7027,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (tempreason=='SHIFT') if (tempreason=='SHIFT')
{logout_content='Your Shift is over or has changed, you have been logged out of your session<BR><BR>';} {logout_content='Your Shift is over or has changed, you have been logged out of your session<BR><BR>';}
document.getElementById("LogouTBoxLink").innerHTML = logout_content + "<a href=\"" + agcPAGE + "?relogin=YES&session_epoch=" + epoch_sec + "&session_id=" + session_id + "&session_name=" + session_name + "&VD_login=" + user + "&VD_campaign=" + campaign + "&phone_login=" + phone_login + "&phone_pass=" + phone_pass + "&VD_pass=" + pass + "\">CLICK HERE TO LOG IN AGAIN</a>\n"; document.getElementById("LogouTBoxLink").innerHTML = logout_content + "<a href=\"" + agcPAGE + "?relogin=YES&session_epoch=" + epoch_sec + "&session_id=" + session_id + "&session_name=" + session_name + "&VD_login=" + user + "&VD_campaign=" + campaign + "&phone_login=" + original_phone_login + "&phone_pass=" + phone_pass + "&VD_pass=" + pass + "\">CLICK HERE TO LOG IN AGAIN</a>\n";
logout_stop_timeouts = 1; logout_stop_timeouts = 1;
@@ -7195,6 +7202,7 @@ encoded=utf8_decode(xtest);
var SClead_id = document.vicidial_form.lead_id.value; var SClead_id = document.vicidial_form.lead_id.value;
var SCcampaign = campaign; var SCcampaign = campaign;
var SCphone_login = phone_login; var SCphone_login = phone_login;
var SCoriginal_phone_login = original_phone_login;
var SCgroup = group; var SCgroup = group;
var SCchannel_group = group; var SCchannel_group = group;
var SCSQLdate = SQLdate; var SCSQLdate = SQLdate;
@@ -7249,6 +7257,7 @@ encoded=utf8_decode(xtest);
SClead_id = SClead_id.replace(RGplus,'+'); SClead_id = SClead_id.replace(RGplus,'+');
SCcampaign = SCcampaign.replace(RGplus,'+'); SCcampaign = SCcampaign.replace(RGplus,'+');
SCphone_login = SCphone_login.replace(RGplus,'+'); SCphone_login = SCphone_login.replace(RGplus,'+');
SCoriginal_phone_login = SCoriginal_phone_login.replace(RGplus,'+');
SCgroup = SCgroup.replace(RGplus,'+'); SCgroup = SCgroup.replace(RGplus,'+');
SCchannel_group = SCchannel_group.replace(RGplus,'+'); SCchannel_group = SCchannel_group.replace(RGplus,'+');
SCSQLdate = SCSQLdate.replace(RGplus,'+'); SCSQLdate = SCSQLdate.replace(RGplus,'+');
@@ -7300,6 +7309,7 @@ encoded=utf8_decode(xtest);
var RGlead_id = new RegExp("--A--lead_id--B--","g"); var RGlead_id = new RegExp("--A--lead_id--B--","g");
var RGcampaign = new RegExp("--A--campaign--B--","g"); var RGcampaign = new RegExp("--A--campaign--B--","g");
var RGphone_login = new RegExp("--A--phone_login--B--","g"); var RGphone_login = new RegExp("--A--phone_login--B--","g");
var RGoriginal_phone_login = new RegExp("--A--original_phone_login--B--","g");
var RGgroup = new RegExp("--A--group--B--","g"); var RGgroup = new RegExp("--A--group--B--","g");
var RGchannel_group = new RegExp("--A--channel_group--B--","g"); var RGchannel_group = new RegExp("--A--channel_group--B--","g");
var RGSQLdate = new RegExp("--A--SQLdate--B--","g"); var RGSQLdate = new RegExp("--A--SQLdate--B--","g");
@@ -7352,6 +7362,7 @@ encoded=utf8_decode(xtest);
encoded = encoded.replace(RGlead_id, SClead_id); encoded = encoded.replace(RGlead_id, SClead_id);
encoded = encoded.replace(RGcampaign, SCcampaign); encoded = encoded.replace(RGcampaign, SCcampaign);
encoded = encoded.replace(RGphone_login, SCphone_login); encoded = encoded.replace(RGphone_login, SCphone_login);
encoded = encoded.replace(RGoriginal_phone_login, SCoriginal_phone_login);
encoded = encoded.replace(RGgroup, SCgroup); encoded = encoded.replace(RGgroup, SCgroup);
encoded = encoded.replace(RGchannel_group, SCchannel_group); encoded = encoded.replace(RGchannel_group, SCchannel_group);
encoded = encoded.replace(RGSQLdate, SCSQLdate); encoded = encoded.replace(RGSQLdate, SCSQLdate);
@@ -8862,7 +8873,7 @@ if ($view_calls_in_queue > 0)
<span style="position:absolute;left:<?php echo $SBwidth ?>px;top:0px;height:500;overflow:scroll;z-index:25;background-color:<?php echo $SIDEBAR_COLOR ?>;" id="AgentViewSpan"><TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0><TR><TD width=5 ROWSPAN=2>&nbsp;</TD><TD ALIGN=CENTER><font class="body_text"> <span style="position:absolute;left:<?php echo $SBwidth ?>px;top:0px;height:500;overflow:scroll;z-index:25;background-color:<?php echo $SIDEBAR_COLOR ?>;" id="AgentViewSpan"><TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0><TR><TD width=5 ROWSPAN=2>&nbsp;</TD><TD ALIGN=CENTER><font class="body_text">
Other Agents Status: &nbsp; </font></TD></TR><TR><TD ALIGN=CENTER><span id="AgentViewStatus">&nbsp;</span></TD></TR></TABLE></span> Other Agents Status: &nbsp; </font></TD></TR><TR><TD ALIGN=CENTER><span id="AgentViewStatus">&nbsp;</span></TD></TR></TABLE></span>
<span style="position:absolute;left:60px;top:<?php echo $BPheight ?>px;width:400;height:500;overflow:scroll;z-index:26;background-color:<?php echo $SIDEBAR_COLOR ?>;" id="AgentXferViewSpan"><CENTER><font class="body_text"> <span style="position:absolute;left:60px;top:<?php echo $BPheight ?>px;width:400;height:500;overflow:scroll;z-index:32;background-color:<?php echo $SIDEBAR_COLOR ?>;" id="AgentXferViewSpan"><CENTER><font class="body_text">
Available Agents Transfer: <span id="AgentXferViewSelect"></span></CENTER></font></span> Available Agents Transfer: <span id="AgentXferViewSelect"></span></CENTER></font></span>
<span style="position:absolute;left:<?php echo $SCwidth ?>px;top:<?php echo $SLheight ?>px;z-index:27;" id="AgentViewLinkSpan"><TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH=91><TR><TD ALIGN=RIGHT><font class="body_small"><span id="AgentViewLink"><a href="#" onclick="AgentsViewOpen('AgentViewSpan','open');return false;">Agents View +</a></span></font></TD></TR></TABLE></span> <span style="position:absolute;left:<?php echo $SCwidth ?>px;top:<?php echo $SLheight ?>px;z-index:27;" id="AgentViewLinkSpan"><TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH=91><TR><TD ALIGN=RIGHT><font class="body_small"><span id="AgentViewLink"><a href="#" onclick="AgentsViewOpen('AgentViewSpan','open');return false;">Agents View +</a></span></font></TD></TR></TABLE></span>
@@ -21,6 +21,7 @@
# 90524-2231 - Changed to use functions.php for seconds to HH:MM:SS conversion # 90524-2231 - Changed to use functions.php for seconds to HH:MM:SS conversion
# 90608-0251 - Added optional carrier codes stats, made graph at bottom optional # 90608-0251 - Added optional carrier codes stats, made graph at bottom optional
# 90806-0001 - Added CI(Customer Interaction/Human Answered) stats, added option to add inbound rollover stats to these # 90806-0001 - Added CI(Customer Interaction/Human Answered) stats, added option to add inbound rollover stats to these
# 90827-1154 - Added List ID breakdown of calls
# #
header ("Content-type: text/html; charset=utf-8"); header ("Content-type: text/html; charset=utf-8");
@@ -824,6 +825,63 @@ else
##############################
######### LIST ID BREAKDOWN STATS
$TOTALcalls = 0;
$OUToutput .= "\n";
$OUToutput .= "---------- LIST ID STATS\n";
$OUToutput .= "+------------------------------------------+------------+\n";
$OUToutput .= "| LIST | CALLS |\n";
$OUToutput .= "+------------------------------------------+------------+\n";
$stmt="select count(*),list_id from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand group by list_id;";
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
$rslt=mysql_query($stmt, $link);
if ($DB) {$OUToutput .= "$stmt\n";}
$listids_to_print = mysql_num_rows($rslt);
$i=0;
while ($i < $listids_to_print)
{
$row=mysql_fetch_row($rslt);
$LISTIDcalls[$i] = $row[0];
$LISTIDlists[$i] = $row[1];
$i++;
}
$i=0;
while ($i < $listids_to_print)
{
$stmt="select list_name from vicidial_lists where list_id='$LISTIDlists[$i]';";
$rslt=mysql_query($stmt, $link);
if ($DB) {$OUToutput .= "$stmt\n";}
$list_name_to_print = mysql_num_rows($rslt);
if ($list_name_to_print > 0)
{
$row=mysql_fetch_row($rslt);
$LISTIDlist_names[$i] = $row[0];
}
$TOTALcalls = ($TOTALcalls + $LISTIDcalls[$i]);
$LISTIDcount = sprintf("%10s", $LISTIDcalls[$i]);while(strlen($LISTIDcount)>10) {$LISTIDcount = substr("$LISTIDcount", 0, -1);}
$LISTIDname = sprintf("%-40s", "$LISTIDlists[$i] - $LISTIDlist_names[$i]");while(strlen($LISTIDname)>40) {$LISTIDname = substr("$LISTIDname", 0, -1);}
$OUToutput .= "| $LISTIDname | $LISTIDcount |\n";
$i++;
}
$TOTALcalls = sprintf("%10s", $TOTALcalls);
$OUToutput .= "+------------------------------------------+------------+\n";
$OUToutput .= "| TOTAL: | $TOTALcalls |\n";
$OUToutput .= "+------------------------------------------+------------+\n";
if ( ($carrier_logging_active > 0) and ($carrier_stats == 'YES') ) if ( ($carrier_logging_active > 0) and ($carrier_stats == 'YES') )
{ {
File diff suppressed because it is too large Load Diff