Fix for issue when agent goes ready, one of the fixes from Issue #1473

git-svn-id: svn://192.168.202.10@3739 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2023-06-17 20:16:45 +00:00
parent 2eb3773d04
commit 64d644bfc7
+9 -4
View File
@@ -536,10 +536,11 @@
# 230513-2043 - Fix for manual dial errors # 230513-2043 - Fix for manual dial errors
# 230518-1033 - Added in-group and campaign custom fields 1-5, for script/webform/dispo-call-url use # 230518-1033 - Added in-group and campaign custom fields 1-5, for script/webform/dispo-call-url use
# 230523-0827 - Added User inbound_credits feature # 230523-0827 - Added User inbound_credits feature
# 230617-1605 - Fix for issue when agent goes ready, one of the fixes from Issue #1473
# #
$version = '2.14-429'; $version = '2.14-430';
$build = '230523-0827'; $build = '230617-1605';
$php_script = 'vdc_db_query.php'; $php_script = 'vdc_db_query.php';
$mel=1; # Mysql Error Log enabled = 1 $mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=913; $mysql_log_count=913;
@@ -16540,11 +16541,15 @@ if ( ($ACTION == 'VDADpause') or ($ACTION == 'VDADready') or ($pause_trigger ==
{ {
$vla_autodialSQL=''; $vla_autodialSQL='';
$vla_pausecodeSQL=''; $vla_pausecodeSQL='';
$vla_statusSQL='';
if (preg_match('/INBOUND_MAN/',$dial_method)) if (preg_match('/INBOUND_MAN/',$dial_method))
{$vla_autodialSQL = ",outbound_autodial='N'";} {$vla_autodialSQL = ",outbound_autodial='N'";}
if ($ACTION == 'VDADready') if ($ACTION == 'VDADready')
{$vla_pausecodeSQL = ",pause_code='',external_pause_code=''";} {
$stmt="UPDATE vicidial_live_agents set uniqueid=0,callerid='',channel='', random_id='$random',comments='',last_state_change='$NOW_TIME' $vla_autodialSQL $vla_pausecodeSQL where user='$user' and server_ip='$server_ip';"; $vla_pausecodeSQL = ",pause_code='',external_pause_code=''";
$vla_statusSQL = "and status != 'QUEUE'";
}
$stmt="UPDATE vicidial_live_agents set uniqueid=0,callerid='',channel='', random_id='$random',comments='',last_state_change='$NOW_TIME' $vla_autodialSQL $vla_pausecodeSQL where user='$user' and server_ip='$server_ip' $vla_statusSQL;";
if ($format=='debug') {echo "\n<!-- $stmt -->";} if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link); $rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {$errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00165',$user,$server_ip,$session_name,$one_mysql_log);} if ($mel > 0) {$errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00165',$user,$server_ip,$session_name,$one_mysql_log);}