diff --git a/agc_2-X/trunk/www/agc/vdc_db_query.php b/agc_2-X/trunk/www/agc/vdc_db_query.php
index 0ac8a9a2..52616ff5 100644
--- a/agc_2-X/trunk/www/agc/vdc_db_query.php
+++ b/agc_2-X/trunk/www/agc/vdc_db_query.php
@@ -117,10 +117,11 @@
# 70202-1438 - Added pause code submit function
# 70203-0930 - Added dialed_number to lead info output
# 70203-1030 - Added dialed_label to lead info output
+# 70206-1126 - Added INBOUND status for inbound/closer calls in vicidial_live_agents
#
-$version = '2.0.44';
-$build = '70203-1030';
+$version = '2.0.45';
+$build = '70206-1126';
require("dbconnect.php");
@@ -1315,6 +1316,11 @@ if ($ACTION == 'VDADcheckINCOMING')
$VDCL_xferconf_a_number = $row[11];
$VDCL_xferconf_b_dtmf = $row[12];
$VDCL_xferconf_b_number = $row[13];
+
+ ### update the comments in vicidial_live_agents record
+ $stmt = "UPDATE vicidial_live_agents set comments='INBOUND' where user='$user' and server_ip='$server_ip';";
+ if ($DB) {echo "$stmt\n";}
+ $rslt=mysql_query($stmt, $link);
}
else
{
@@ -1444,6 +1450,7 @@ if ($ACTION == 'VDADcheckINCOMING')
if ($format=='debug') {echo "\n";}
$rslt=mysql_query($stmt, $link);
}
+
}
else
{
diff --git a/agc_2-X/trunk/www/vicidial/AST_VDADstats.php b/agc_2-X/trunk/www/vicidial/AST_VDADstats.php
index 3639375e..7f37b877 100644
--- a/agc_2-X/trunk/www/vicidial/AST_VDADstats.php
+++ b/agc_2-X/trunk/www/vicidial/AST_VDADstats.php
@@ -217,6 +217,7 @@ echo "| AGENT | CALLS | TIME M | AVRG M |\n";
echo "+--------------------------+------------+----------+--------+\n";
$stmt="select vicidial_log.user,full_name,count(*),sum(length_in_sec),avg(length_in_sec) from vicidial_log,vicidial_users where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_log.user is not null and length_in_sec is not null and length_in_sec > 4 and vicidial_log.user=vicidial_users.user group by vicidial_log.user;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$users_to_print = mysql_num_rows($rslt);
@@ -228,8 +229,15 @@ while ($i < $users_to_print)
$TOTcalls = ($TOTcalls + $row[2]);
$TOTtime = ($TOTtime + $row[3]);
- $user = sprintf("%-6s", $row[0]);
- $full_name = sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
+ $user = sprintf("%-6s", $row[0]);while(strlen($user)>6) {$user = substr("$user", 0, -1);}
+ if ($non_latin < 1)
+ {
+ $full_name = sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
+ }
+ else
+ {
+ $full_name = sprintf("%-45s", $row[1]); while(mb_strlen($full_name,'utf-8')>15) {$full_name = mb_substr("$full_name", 0, -1,'utf-8');}
+ }
$USERcalls = sprintf("%10s", $row[2]);
$USERtotTALK = $row[3];
$USERavgTALK = $row[4];
diff --git a/agc_2-X/trunk/www/vicidial/AST_agent_performance.php b/agc_2-X/trunk/www/vicidial/AST_agent_performance.php
index 7bb71b19..eb2ceac4 100644
--- a/agc_2-X/trunk/www/vicidial/AST_agent_performance.php
+++ b/agc_2-X/trunk/www/vicidial/AST_agent_performance.php
@@ -31,6 +31,7 @@ $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW);
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
if ($DB) {echo "|$stmt|\n";}
+ if ($non_latin > 0) { $rslt=mysql_query("SET NAMES 'UTF8'");}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$auth=$row[0];
@@ -144,7 +145,24 @@ while ($i < $rows_to_print)
$TOTcalls=($TOTcalls + $row[0]);
$TOTtotTALK=($TOTtotTALK + $row[1]);
$calls[$i] = sprintf("%-6s", $row[0]);
- $full_name[$i]= sprintf("%-15s", $row[2]); while(strlen($full_name[$i])>15) {$full_name[$i] = substr("$full_name[$i]", 0, -1);}
+
+ if ($non_latin < 1)
+ {
+ $full_name[$i]= sprintf("%-15s", $row[2]);
+ while(strlen($full_name[$i])>15) {$full_name[$i] = substr("$full_name[$i]", 0, -1);}
+
+ $user[$i] = sprintf("%-6s", $row[3]);
+ while(strlen($user[$i])>6) {$user[$i] = substr("$user[$i]", 0, -1);}
+ }
+ else
+ {
+ $full_name[$i]= sprintf("%-45s", $row[2]);
+ while(mb_strlen($full_name[$i],'utf-8')>15) {$full_name[$i] = mb_substr("$full_name[$i]", 0, -1,'utf-8');}
+
+ $user[$i] = sprintf("%-18s", $row[3]);
+ while(mb_strlen($user[$i],'utf-8')>6) {$user[$i] = mb_substr("$user[$i]", 0, -1,'utf-8');}
+ }
+
$user[$i] = sprintf("%-8s", $row[3]);
$USERtotTALK = $row[1];
$USERavgTALK = $row[4];
diff --git a/agc_2-X/trunk/www/vicidial/AST_agent_performance_detail.php b/agc_2-X/trunk/www/vicidial/AST_agent_performance_detail.php
index e46b4a69..72779f6e 100644
--- a/agc_2-X/trunk/www/vicidial/AST_agent_performance_detail.php
+++ b/agc_2-X/trunk/www/vicidial/AST_agent_performance_detail.php
@@ -36,6 +36,7 @@ $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW);
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
if ($DB) {echo "|$stmt|\n";}
+ if ($non_latin > 0) { $rslt=mysql_query("SET NAMES 'UTF8'");}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$auth=$row[0];
@@ -188,7 +189,24 @@ while ($i < $rows_to_print)
$TOTtotPAUSE=($TOTtotPAUSE + $row[5]);
$TOTtotDISPO=($TOTtotDISPO + $row[9]);
$calls[$i] = sprintf("%-6s", $row[0]);
- $full_name[$i]= sprintf("%-15s", $row[2]); while(strlen($full_name[$i])>15) {$full_name[$i] = substr("$full_name[$i]", 0, -1);}
+
+ if ($non_latin < 1)
+ {
+ $full_name[$i]= sprintf("%-15s", $row[2]);
+ while(strlen($full_name[$i])>15) {$full_name[$i] = substr("$full_name[$i]", 0, -1);}
+
+ $user[$i] = sprintf("%-6s", $row[3]);
+ while(strlen($user[$i])>6) {$user[$i] = substr("$user[$i]", 0, -1);}
+ }
+ else
+ {
+ $full_name[$i]= sprintf("%-45s", $row[2]);
+ while(mb_strlen($full_name[$i],'utf-8')>15) {$full_name[$i] = mb_substr("$full_name[$i]", 0, -1,'utf-8');}
+
+ $user[$i] = sprintf("%-18s", $row[3]);
+ while(mb_strlen($user[$i],'utf-8')>6) {$user[$i] = mb_substr("$user[$i]", 0, -1,'utf-8');}
+ }
+
$user[$i] = sprintf("%-8s", $row[3]);
$USERtime = ($row[1] + $row[5] + $row[7] + $row[9]);
$USERtotTALK = $row[1];
diff --git a/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php b/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php
index 337d61ab..26390480 100644
--- a/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php
+++ b/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php
@@ -7,7 +7,7 @@
#
# STOP=4000, SLOW=40, GO=4 seconds refresh interval
#
-# changes:
+# CHANGELOG:
# 50406-0920 - Added Paused agents < 1 min (Chris Doyle)
# 51130-1218 - Modified layout and info to show all servers in a vicidial system
# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES
@@ -21,10 +21,11 @@
# 61002-1642 - Added TRUNK SHORT/FILL stats
# 61101-1318 - Added SIP and IAX Listen and Barge links option
# 61101-1647 - Added Usergroup column and user name option as well as sorting
-# 61102-1155 - made display of columns more modular, added ability to hide server info
-# 61215-1131 - added answered calls and drop percent taken from answered calls
-# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns
-# 70123-1151 - added non_latin options for substr in display variables, thanks Marin Blu
+# 61102-1155 - Made display of columns more modular, added ability to hide server info
+# 61215-1131 - Added answered calls and drop percent taken from answered calls
+# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns
+# 70123-1151 - Added non_latin options for substr in display variables, thanks Marin Blu
+# 70206-1140 - Added call-type statuses to display(A-Auto, M-Manual, I-Inbound/Closer)
#
header ("Content-type: text/html; charset=utf-8");
@@ -528,8 +529,8 @@ $HDsessionid = "------------------+";
$HTsessionid = " SESSIONID |";
$HDbarge = "-------+";
$HTbarge = " BARGE |";
-$HDstatus = "--------+";
-$HTstatus = " STATUS |";
+$HDstatus = "----------+";
+$HTstatus = " STATUS |";
$HDserver_ip = "-----------------+";
$HTserver_ip = " SERVER IP |";
$HDcall_server_ip = "-----------------+";
@@ -592,7 +593,7 @@ else {$groupSQL = " and campaign_id='" . mysql_real_escape_string($group) . "'";
if (strlen($usergroup)<1) {$usergroupSQL = '';}
else {$usergroupSQL = " and user_group='" . mysql_real_escape_string($usergroup) . "'";}
-$stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id,vicidial_users.user_group,vicidial_users.full_name from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user $groupSQL $usergroupSQL order by $orderSQL;";
+$stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id,vicidial_users.user_group,vicidial_users.full_name,vicidial_live_agents.comments from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user $groupSQL $usergroupSQL order by $orderSQL;";
#$stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id,vicidial_users.user_group,vicidial_users.full_name from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user and campaign_id='" . mysql_real_escape_string($group) . "' order by $orderSQL;";
@@ -634,7 +635,23 @@ $talking_to_print = mysql_num_rows($rslt);
$status = sprintf("%-6s", $row[3]);
$server_ip = sprintf("%-15s", $row[4]);
$call_server_ip = sprintf("%-15s", $row[7]);
- $campaign_id = sprintf("%-10s", $row[8]);
+ $campaign_id = sprintf("%-10s", $row[8]);
+ $comments= $row[11];
+
+ if (eregi("INCALL",$Lstatus))
+ {
+ if ( (eregi("AUTO",$comments)) or (strlen($comments)<1) )
+ {$CM='A';}
+ else
+ {
+ if (eregi("INBOUND",$comments))
+ {$CM='I';}
+ else
+ {$CM='M';}
+ }
+ }
+ else {$CM=' ';}
+
if ($UGdisplay > 0)
{
if ($non_latin < 1)
@@ -723,7 +740,7 @@ $talking_to_print = mysql_num_rows($rslt);
$agentcount++;
- $Aecho .= "| $G$extension$EG | $G$user$EG |$UGD $G$sessionid$EG$L$R | $G$status$EG | $SVD$G$call_time_MS$EG | $G$campaign_id$EG |\n";
+ $Aecho .= "| $G$extension$EG | $G$user$EG |$UGD $G$sessionid$EG$L$R | $G$status$EG $CM | $SVD$G$call_time_MS$EG | $G$campaign_id$EG |\n";
$i++;
}