Fix for rare vicidial_closer_log issue on Voicemail transfers in manager_send.php
git-svn-id: svn://192.168.202.10@3744 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -153,13 +153,14 @@
|
||||
# 220312-0936 - Added vicidial_dial_cid_log logging
|
||||
# 221116-1051 - Fix for long in-group dialstring extensions
|
||||
# 230418-1022 - Added dial_override_limit options.php setting
|
||||
# 230726-0857 - Fix for rare vicidial_closer_log issue on Voicemail transfers
|
||||
#
|
||||
|
||||
$version = '2.14-100';
|
||||
$build = '230418-1022';
|
||||
$version = '2.14-101';
|
||||
$build = '230726-0857';
|
||||
$php_script = 'manager_send.php';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=160;
|
||||
$mysql_log_count=161;
|
||||
$one_mysql_log=0;
|
||||
$SSagent_debug_logging=0;
|
||||
$startMS = microtime();
|
||||
@@ -1156,18 +1157,26 @@ if ($ACTION=="RedirectVD")
|
||||
else
|
||||
{
|
||||
if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;}
|
||||
$stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';";
|
||||
$stmt = "SELECT count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02021',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
if ($row[0] > 0)
|
||||
{
|
||||
$four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y")));
|
||||
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec=(queue_seconds + $secondS),status='XFER' where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by closecallid desc limit 1;";
|
||||
$stmt = "SELECT count(*) from vicidial_auto_calls where lead_id='$lead_id' and callerid LIKE \"Y%\";";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02022',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02161',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$rowx=mysqli_fetch_row($rslt);
|
||||
if ($rowx[0] > 0)
|
||||
{
|
||||
$four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y")));
|
||||
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec=(queue_seconds + $secondS),status='XFER' where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by closecallid desc limit 1;";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02022',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
}
|
||||
|
||||
$stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where uniqueid='$uniqueid';";
|
||||
|
||||
Reference in New Issue
Block a user