fixed issues with remote agent pl script

added hangup for left 3way vicidial_conferences in conf_update script

git-svn-id: svn://192.168.202.10@958 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2008-10-09 14:11:56 +00:00
parent b61ea16361
commit c54a5b6873
2 changed files with 22 additions and 20 deletions
+7 -13
View File
@@ -35,6 +35,7 @@
# 70222-1606 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL
# 70417-1346 - Fixed bug that would add unneeded simulated agent lines
# 80128-0105 - Fixed calls_today bug
# 81007-1746 - Added debugX output for count statements and changed to if from while
#
### begin parsing run-time options ###
@@ -394,18 +395,16 @@ while($one_day_interval > 0)
{
if (length($DBremote_user[$h])>1)
{
### check to see if the record exists and only needs random number update
$stmtA = "SELECT count(*) FROM vicidial_live_agents where user='$DBremote_user[$h]' and server_ip='$server_ip' and campaign_id='$DBremote_campaign[$h]' and conf_exten='$DBremote_conf_exten[$h]' and closer_campaigns='$DBremote_closer[$h]';";
if ($DBX) {print STDERR "|$stmtA|\n";}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$rec_count=0;
while ($sthArows > $rec_count)
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$loginexistsRANDOM[$h] = "$aryA[0]";
$rec_count++;
}
$sthA->finish();
@@ -419,15 +418,14 @@ while($one_day_interval > 0)
else
{
$stmtA = "SELECT count(*) FROM vicidial_live_agents where user='$DBremote_user[$h]' and server_ip='$server_ip'";
if ($DBX) {print STDERR "|$stmtA|\n";}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$rec_count=0;
while ($sthArows > $rec_count)
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$loginexistsALL[$h] = "$aryA[0]";
$rec_count++;
}
$sthA->finish();
@@ -480,12 +478,10 @@ while($one_day_interval > 0)
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$rec_countLSC=0;
while ($sthArows > $rec_countLSC)
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$LSC_count = "$aryA[0]";
$rec_countLSC++;
}
$sthA->finish();
@@ -567,12 +563,10 @@ while($one_day_interval > 0)
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$rec_count=0;
while ($sthArows > $rec_count)
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$autocallexists[$z] = "$aryA[0]";
$rec_count++;
}
$sthA->finish();