I noticed there was a problem on broadcast calls that was not saving correct STOP_EPOCH and DURATION of the calls, I read the code on FastLog perl script and found a , what I think, little bug that I want to share with comunity...
in IF condition it is using rec_countCUSTDATA instead of epc_countCUSTDATA, I changed it and now all is working OK
ORIGINAL CODE:
########## FIND AND UPDATE vicidial_log ##########
$stmtA = "SELECT start_epoch,status FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$VD_lead_id' limit 1;";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$epc_countCUSTDATA=0;
$VD_closecallid='';
while ($sthArows > $rec_countCUSTDATA)
{
@aryA = $sthA->fetchrow_array;
$VD_start_epoch = "$aryA[0]";
$VD_status = "$aryA[1]";
$epc_countCUSTDATA++;
}
$sthA->finish();
MODIFIED CODE:
########## FIND AND UPDATE vicidial_log ##########
$stmtA = "SELECT start_epoch,status FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$VD_lead_id' limit 1;";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$epc_countCUSTDATA=0;
$VD_closecallid='';
while ($sthArows > $epc_countCUSTDATA)
{
@aryA = $sthA->fetchrow_array;
$VD_start_epoch = "$aryA[0]";
$VD_status = "$aryA[1]";
$epc_countCUSTDATA++;
}
$sthA->finish();