dead call detection
Posted: Thu Jul 12, 2012 3:42 pm
Can someone explain the dead call detection to me? I went through the AST_timeonVDADdial.php file and found this snippet of code. Is the script looking for the callerid of the call in the list of active channels and if it doesnt see it it assumes the call is dead?
- Code: Select all
if (eregi("INCALL",$Lstatus))
{
$stmtP="select count(*) from parked_channels where channel_group='$Acallerid[$i]';";
$rsltP=mysql_query($stmtP,$link);
$rowP=mysql_fetch_row($rsltP);
$parked_channel = $rowP[0];
if ($parked_channel > 0)
{
$Astatus[$i] = 'PARK';
$Lstatus = 'PARK';
$status = ' PARK ';
}
else
{
if (!ereg("$Acallerid[$i]\|",$callerids))
{
$Acall_time[$i]=$Astate_change[$i];
$Astatus[$i] = 'DEAD';
$Lstatus = 'DEAD';
$status = ' DEAD ';
}
}