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 2753d0797f
commit 9674e4a6b9
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();
+3 -1
View File
@@ -6730,7 +6730,7 @@ if ($ACTION == 'manDiaLlookCaLL')
if ($affected_rowsX > 0)
{
$dial_time = 0;
$stmt = "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='$MDnextCID' LIMIT 1;";
$stmt = "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='$MDnextCID' LIMIT 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00795',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -6745,6 +6745,8 @@ if ($ACTION == 'manDiaLlookCaLL')
$dial_time = $row[4];
$time_to_progress = $row[5];
$time_to_ring = $row[6];
if ( ($first_180_date > 0) and ($first_180_date != 'NULL') and ($first_183_date > 0) and ($first_183_date != 'NULL'))
{if ($first_180_date > $first_183_date) {$time_to_progress=$time_to_ring;}}
if ( ($dial_time > 0) and ($dial_time != 'NULL') )
{