From b523754914de42c16b34823433bfb3b1d974f8bf Mon Sep 17 00:00:00 2001 From: mattf Date: Tue, 21 Feb 2023 05:42:32 +0000 Subject: [PATCH] Fix for In-Group manual dial logging issue in the agent screen. git-svn-id: svn://192.168.202.10@3686 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/www/agc/conf_exten_check.php | 13 +++++++++---- agc_2-X/trunk/www/agc/vicidial.php | 13 +++++++------ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/agc_2-X/trunk/www/agc/conf_exten_check.php b/agc_2-X/trunk/www/agc/conf_exten_check.php index c08daeea..6454e327 100644 --- a/agc_2-X/trunk/www/agc/conf_exten_check.php +++ b/agc_2-X/trunk/www/agc/conf_exten_check.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2023 Matt Florell LICENSE: AGPLv2 # # This script is designed purely to send whether the meetme conference has live channels connected and which they are # This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table @@ -92,10 +92,11 @@ # 210825-0907 - Fix for XSS security issue # 220219-2328 - Added allow_web_debug system setting # 220310-0934 - Added more time-sync detailed logging +# 230220-1759 - Fix for In-Group manual dial issue # -$version = '2.14-66'; -$build = '220310-0934'; +$version = '2.14-67'; +$build = '230220-1759'; $php_script = 'conf_exten_check.php'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=51; @@ -155,6 +156,8 @@ if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} if (isset($_GET["visibility"])) {$visibility=$_GET["visibility"];} elseif (isset($_POST["visibility"])) {$visibility=$_POST["visibility"];} +if (isset($_GET["active_ingroup_dial"])) {$active_ingroup_dial=$_GET["active_ingroup_dial"];} + elseif (isset($_POST["active_ingroup_dial"])) {$active_ingroup_dial=$_POST["active_ingroup_dial"];} $DB=preg_replace("/[^0-9a-zA-Z]/","",$DB); @@ -235,12 +238,14 @@ if ($non_latin < 1) $user=preg_replace("/[^-_0-9a-zA-Z]/","",$user); $pass=preg_replace("/[^-\.\+\/\=_0-9a-zA-Z]/","",$pass); $campaign = preg_replace("/[^-_0-9a-zA-Z]/","",$campaign); + $active_ingroup_dial = preg_replace("/[^-_0-9a-zA-Z]/","",$active_ingroup_dial); } else { $user = preg_replace('/[^-_0-9\p{L}]/u','',$user); $pass = preg_replace('/[^-\.\+\/\=_0-9\p{L}]/u','',$pass); $campaign = preg_replace('/[^-_0-9\p{L}]/u', '', $campaign); + $active_ingroup_dial = preg_replace('/[^-_0-9\p{L}]/u',"",$active_ingroup_dial); } if (strlen($SSagent_debug_logging) > 1) @@ -825,7 +830,7 @@ if ($ACTION == 'refresh') $retry_count++; } - if ( ( ($Acomments != 'CHAT') and ($Acomments != 'EMAIL') ) or ($live_call_seconds > 4) ) + if ( ( ($Acomments != 'CHAT') and ($Acomments != 'EMAIL') and (strlen($active_ingroup_dial) < 1) ) or ($live_call_seconds > 4) ) { ##### BEGIN DEAD logging section ##### if ( ( (strlen($customer_chat_id > 0) ) and ($customer_chat_id > 0) ) or ($Acomments == 'EMAIL') ) diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index cdb921d8..841e42de 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -710,10 +710,11 @@ # 221206-1520 - Added login form multi-submit prevention ($login_submit_once), Added dialRegExten_enabled webphone option # 230118-0947 - Added agent_hangup_route features # 230131-0826 - Added filtering of 3-way number to dial to remove non-diable characters +# 230220-1802 - Fix for In-Group manual dial issue # -$version = '2.14-678c'; -$build = '230131-0826'; +$version = '2.14-679c'; +$build = '230220-1802'; $php_script = 'vicidial.php'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=98; @@ -7083,7 +7084,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } if (xmlhttprequestcheckconf) { - checkconf_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&client=vdc&conf_exten=" + taskconfnum + "&auto_dial_level=" + auto_dial_level + "&campagentstdisp=" + campagentstdisp + "&customer_chat_id=" + document.vicidial_form.customer_chat_id.value + "&live_call_seconds=" + VD_live_call_secondS + "&xferchannel=" + document.vicidial_form.xferchannel.value + "&check_for_answer=" + MDcheck_for_answer + "&MDnextCID=" + MDnextCID + "&campaign=" + campaign + "&phone_number=" + dialed_number + "&visibility=" + visibility_log + "&clicks=" + button_click_log; + checkconf_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&client=vdc&conf_exten=" + taskconfnum + "&auto_dial_level=" + auto_dial_level + "&campagentstdisp=" + campagentstdisp + "&customer_chat_id=" + document.vicidial_form.customer_chat_id.value + "&live_call_seconds=" + VD_live_call_secondS + "&active_ingroup_dial=" + active_ingroup_dial + "&xferchannel=" + document.vicidial_form.xferchannel.value + "&check_for_answer=" + MDcheck_for_answer + "&MDnextCID=" + MDnextCID + "&campaign=" + campaign + "&phone_number=" + dialed_number + "&visibility=" + visibility_log + "&clicks=" + button_click_log; button_click_log=''; visibility_log=''; xmlhttprequestcheckconf.open('POST', 'conf_exten_check.php'); @@ -7670,7 +7671,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } } - if ( (CheckDEADcall > 0) && (VD_live_customer_call==1) && (currently_in_email_or_chat < 1) ) + if ( (CheckDEADcall > 0) && (VD_live_customer_call==1) && (currently_in_email_or_chat < 1) && ( ( (active_ingroup_dial.length > 0) && (VD_live_call_secondS > 2) ) || (active_ingroup_dial.length < 1) ) ) { if (CheckDEADcallON < 1) { @@ -7681,7 +7682,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) CheckDEADcallON=1; CheckDEADcallCOUNT++; customer_sec = VD_live_call_secondS; - button_click_log = button_click_log + "" + SQLdate + "-----dead_call---" + customer_sec + " " + lastcustchannel + " " + lastcustserverip + " " + LasTCID + "|"; + button_click_log = button_click_log + "" + SQLdate + "-----dead_call---" + customer_sec + " " + active_ingroup_dial + " " + lastcustchannel + " " + lastcustserverip + " " + LasTCID + "|"; if ( (xfer_in_call > 0) && (customer_3way_hangup_logging=='ENABLED') ) { @@ -7705,7 +7706,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) CheckDEADcallON=1; CheckDEADcallCOUNT++; customer_sec = VD_live_call_secondS; - button_click_log = button_click_log + "" + SQLdate + "-----dead_call---" + customer_sec + " " + lastcustchannel + " " + lastcustserverip + " " + LasTCID + "|"; + button_click_log = button_click_log + "" + SQLdate + "-----dead_call_chat---" + customer_sec + " " + lastcustchannel + " " + lastcustserverip + " " + LasTCID + "|"; } } if (InGroupChange > 0)