Small change to sip-event logging code in agent screen and routing AGI

git-svn-id: svn://192.168.202.10@3110 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2019-05-31 21:49:05 +00:00
parent 86f4e69c24
commit ecf6000ec6
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -415,7 +415,7 @@ if ($SSsip_event_logging > 0)
if ($affected_rows > 0)
{
$dial_time = 0;
$stmtA = "SELECT invite_date,first_180_date,first_183_date,200_date,TIMESTAMPDIFF(MICROSECOND,invite_date,200_date) as dial,TIMESTAMPDIFF(MICROSECOND,invite_date,first_180_date) as prog,TIMESTAMPDIFF(MICROSECOND,invite_date,first_183_date) as pdd from vicidial_sip_event_recent where caller_code='$callerid' LIMIT 1;";
$stmtA = "SELECT invite_date,UNIX_TIMESTAMP(first_180_date),UNIX_TIMESTAMP(first_183_date),UNIX_TIMESTAMP(200_date),TIMESTAMPDIFF(MICROSECOND,invite_date,200_date) as dial,TIMESTAMPDIFF(MICROSECOND,invite_date,first_180_date) as prog,TIMESTAMPDIFF(MICROSECOND,invite_date,first_183_date) as pdd from vicidial_sip_event_recent where caller_code='$callerid' LIMIT 1;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsVSER=$sthA->rows;
@@ -430,6 +430,8 @@ if ($SSsip_event_logging > 0)
$dial_time = $aryA[4];
$time_to_progress = $aryA[5];
$time_to_ring = $aryA[6];
if ( ($first_180_date > 0) && ($first_180_date != 'NULL') && ($first_183_date > 0) && ($first_183_date != 'NULL'))
{if ($first_180_date > $first_183_date) {$time_to_progress=$time_to_ring;}}
}
$sthA->finish();