fixed errors in agi-VDAD scripts

git-svn-id: svn://192.168.202.10@155 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2006-08-11 15:12:29 +00:00
parent 660be18d49
commit 84c69ca0b8
4 changed files with 253 additions and 244 deletions
@@ -411,6 +411,10 @@ if ($channel_status < 1)
exit;
}
else
{
print STDERR "NNNNNNNNNN No agent record found!!!\n";
}
}
else
{
@@ -416,11 +416,7 @@ if ($channel_status < 1)
$cbc++;
}
$sthA->finish();
}
else
{
print STDERR "NNNNNNNNNN No agent record found!!!\n";
}
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER' where callerid='$callerid';";
my $affected_rows = $dbhA->do($stmtA);
if ($M) {print STDERR "-- VDCL XFER : |$affected_rows|update of vac table: $callerid\n|$stmtA|\n";}
@@ -471,6 +467,11 @@ if ($channel_status < 1)
exit;
}
else
{
print STDERR "NNNNNNNNNN No agent record found!!!\n";
}
}
else
{
print STDERR "WWWWWWWW VDAD REMOTE XFER WAIT: |$rec_countWAIT|$channel_group|$channel|$callerid|$uniqueid|\n";
@@ -400,6 +400,10 @@ if ($channel_status < 1)
exit;
}
else
{
print STDERR "NNNNNNNNNN No agent record found!!!\n";
}
}
else
{
@@ -497,6 +501,10 @@ if ($channel_status < 1)
exit;
}
else
{
print STDERR "NNNNNNNNNN No agent record found!!!\n";
}
}
else
{
@@ -414,11 +414,7 @@ if ($channel_status < 1)
$cbc++;
}
$sthA->finish();
}
else
{
print STDERR "NNNNNNNNNN No agent record found!!!\n";
}
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER' where callerid='$callerid';";
my $affected_rows = $dbhA->do($stmtA);
if ($M) {print STDERR "-- VDCL XFER : |$affected_rows|update of vac table: $callerid\n|$stmtA|\n";}
@@ -457,6 +453,11 @@ if ($channel_status < 1)
exit;
}
else
{
print STDERR "NNNNNNNNNN No agent record found!!!\n";
}
}
else
{
print STDERR "WWWWWWWW VDAD XFER WAIT: |$rec_countWAIT|$channel_group|$channel|$callerid|$uniqueid|\n";
@@ -509,11 +510,7 @@ if ($channel_status < 1)
$cbc++;
}
$sthA->finish();
}
else
{
print STDERR "NNNNNNNNNN No agent record found!!!\n";
}
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER' where callerid='$callerid';";
my $affected_rows = $dbhA->do($stmtA);
if ($M) {print STDERR "-- VDCL XFER : |$affected_rows|update of vac table: $callerid\n|$stmtA|\n";}
@@ -564,6 +561,11 @@ if ($channel_status < 1)
exit;
}
else
{
print STDERR "NNNNNNNNNN No agent record found!!!\n";
}
}
else
{
print STDERR "WWWWWWWW VDAD REMOTE XFER WAIT: |$rec_countWAITrem|$channel_group|$channel|$callerid|$uniqueid|\n";
@@ -664,12 +666,6 @@ if ($drop_seconds < 1)
my $affected_rows = $dbhA->do($stmtA);
if ($M) {print STDERR "-- VDCL vac record deleted: |$affected_rows| $channel_group|$server_ip\n";}
# $stmtA = "UPDATE vicidial_log set status='DROP',end_epoch='$now_date_epoch',length_in_sec='$drop_seconds' where uniqueid = '$uniqueid';";
# if($M){print STDERR "\n\n|$stmtA|\n";}
# $dbhA->query("$stmtA");
# my $affected_rows = $dbhA->get_affected_rows_length;
# if ($M) {print STDERR "-- VDCL vicidial_log update: |$affected_rows|$uniqueid\n";}
$stmtA = "UPDATE vicidial_closer_log set status='DROP',end_epoch='$now_date_epoch',length_in_sec='$drop_seconds' where lead_id = '$new_lead_id' order by start_epoch desc limit 1;";
if($M){print STDERR "\n\n|$stmtA|\n";}
my $affected_rows = $dbhA->do($stmtA);