changed PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL for queue_log compatibility

git-svn-id: svn://192.168.202.10@540 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2007-02-22 21:15:22 +00:00
parent 50a8e65520
commit 26755a64de
3 changed files with 17 additions and 14 deletions
+4 -3
View File
@@ -32,6 +32,7 @@
# 61110-1443 - Added user_level from vicidial_user record into vicidial_live_agents
# 70213-1306 - Added queuemetrics logging
# 70214-1243 - Added queuemetrics_log_id field to queue_log logging
# 70222-1606 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL
#
### begin parsing run-time options ###
@@ -559,7 +560,7 @@ while($one_day_interval > 0)
if ($DBX) {print "CONNECTED TO DATABASE: $queuemetrics_server_ip|$queuemetrics_dbname\n";}
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$secX',call_id='NONE',queue='$VD_campaign_id[$z]',agent='Agent/$VD_user[$z]',verb='PAUSE',serverid='$queuemetrics_log_id';";
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$secX',call_id='NONE',queue='NONE',agent='Agent/$VD_user[$z]',verb='PAUSEALL',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
$stmtB = "SELECT time_id FROM queue_log where agent='Agent/$VD_user[$z]' and verb='AGENTLOGIN' order by time_id desc limit 1;";
@@ -605,10 +606,10 @@ while($one_day_interval > 0)
if ($DBX) {print "CONNECTED TO DATABASE: $queuemetrics_server_ip|$queuemetrics_dbname\n";}
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$secX',call_id='NONE',queue='$VD_campaign_id[$z]',agent='Agent/$VD_user[$z]',verb='PAUSE',serverid='$queuemetrics_log_id';";
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$secX',call_id='NONE',queue='NONE',agent='Agent/$VD_user[$z]',verb='PAUSEALL',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$secX',call_id='NONE',queue='$VD_campaign_id[$z]',agent='Agent/$VD_user[$z]',verb='UNPAUSE',serverid='$queuemetrics_log_id';";
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$secX',call_id='NONE',queue='NONE',agent='Agent/$VD_user[$z]',verb='UNPAUSEALL',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
$dbhB->disconnect();
+8 -7
View File
@@ -123,10 +123,11 @@
# 70214-1231 - Added queuemetrics_log_id field for server_id in queue_log
# 70215-1210 - Added queuemetrics COMPLETEAGENT action
# 70216-1051 - Fixed double call complete queuemetrics logging
# 70222-1616 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL
#
$version = '2.0.50';
$build = '70216-1051';
$version = '2.0.51';
$build = '70222-1616';
require("dbconnect.php");
@@ -1066,7 +1067,7 @@ if ($stage == "end")
$linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
mysql_select_db("$queuemetrics_dbname", $linkB);
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='PAUSE',serverid='$queuemetrics_log_id';";
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='PAUSEALL',serverid='$queuemetrics_log_id';";
if ($DB) {echo "$stmt\n";}
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
$rslt=mysql_query($stmt, $linkB);
@@ -1130,7 +1131,7 @@ if ($stage == "end")
$linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
mysql_select_db("$queuemetrics_dbname", $linkB);
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='PAUSE',serverid='$queuemetrics_log_id';";
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='PAUSEALL',serverid='$queuemetrics_log_id';";
if ($DB) {echo "$stmt\n";}
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
$rslt=mysql_query($stmt, $linkB);
@@ -1987,12 +1988,12 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') )
###########################################
if ($enable_queuemetrics_logging > 0)
{
if (ereg('READY',$stage)) {$QMstatus='UNPAUSE';}
if (ereg('PAUSE',$stage)) {$QMstatus='PAUSE';}
if (ereg('READY',$stage)) {$QMstatus='UNPAUSEALL';}
if (ereg('PAUSE',$stage)) {$QMstatus='PAUSEALL';}
$linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
mysql_select_db("$queuemetrics_dbname", $linkB);
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='$QMstatus',serverid='$queuemetrics_log_id';";
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='$QMstatus',serverid='$queuemetrics_log_id';";
if ($DB) {echo "$stmt\n";}
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
$rslt=mysql_query($stmt, $linkB);
+5 -4
View File
@@ -149,10 +149,11 @@
# 70213-1018 - Changed CXFER and AXFER to update customer information before transfer
# 70214-1233 - Added queuemetrics_log_id field for server_id in queue_log
# 70215-1240 - Added queuemetrics_log_id field for server_id in queue_log
# 70222-1617 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL
#
$version = '2.0.120';
$build = '70215-1240';
$version = '2.0.121';
$build = '70222-1617';
require("dbconnect.php");
@@ -1067,7 +1068,7 @@ else
$affected_rows = mysql_affected_rows($linkB);
print "<!-- queue_log AGENTLOGIN entry added: $VD_login|$affected_rows -->\n";
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='PAUSE',serverid='$queuemetrics_log_id';";
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='PAUSEALL',serverid='$queuemetrics_log_id';";
if ($DB) {echo "$stmt\n";}
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
$rslt=mysql_query($stmt, $linkB);
@@ -1107,7 +1108,7 @@ else
$affected_rows = mysql_affected_rows($linkB);
print "<!-- queue_log AGENTLOGIN entry added: $VD_login|$affected_rows -->\n";
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='PAUSE',serverid='$queuemetrics_log_id';";
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='PAUSEALL',serverid='$queuemetrics_log_id';";
if ($DB) {echo "$stmt\n";}
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
$rslt=mysql_query($stmt, $linkB);