need help debugging AST_VDauto_dial.pl
Posted: Wed Apr 27, 2016 2:06 am
im trying to understand what the reason for this is. why do we check if the caller id is bigger then 17 characters and has x digits in a row and below if we check calls unique id is bigger then 11 and the CLuniqueid if ever fetched from the call log table is less then 12 we override the epoch and unique id identifier?
matt any light you can shed on this would be greatly appreciated.
thank you
matt any light you can shed on this would be greatly appreciated.
thank you
- Code: Select all
if ( (length($KLcalleridCHECK[$kill_vac]) > 17) && ($KLcalleridCHECK[$kill_vac] =~ /\d\d\d\d\d\d\d\d\d\d\d\d\d\d/) )
{
$stmtA = "SELECT end_epoch,uniqueid,start_epoch FROM call_log where caller_code='$KLcallerid[$kill_vac]' and server_ip='$KLserver_ip[$kill_vac]' order by end_epoch, start_time desc limit 1;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$rec_count=0;
$rec_countCUSTDATA=0;
while ($sthArows > $rec_count)
{
@aryA = $sthA->fetchrow_array;
$end_epoch = $aryA[0];
$CLuniqueid = $aryA[1];
$start_epoch = $aryA[2];
$rec_count++;
}
$sthA->finish();
}
if ( (length($KLuniqueid[$kill_vac]) > 11) && (length($CLuniqueid) < 12) )
{
$stmtA = "SELECT end_epoch,uniqueid,start_epoch FROM call_log where uniqueid='$KLuniqueid[$kill_vac]' and server_ip='$KLserver_ip[$kill_vac]' order by end_epoch, start_time desc limit 1;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$rec_count=0;
$rec_countCUSTDATA=0;
while ($sthArows > $rec_count)
{
@aryA = $sthA->fetchrow_array;
$end_epoch = $aryA[0];
$CLuniqueid = $aryA[1];
$start_epoch = $aryA[2];
$rec_count++;
}
$sthA->finish();
}