diff --git a/bin/AST_VDauto_dial_FILL.pl b/bin/AST_VDauto_dial_FILL.pl index 96d9085f..ed11ce82 100644 --- a/bin/AST_VDauto_dial_FILL.pl +++ b/bin/AST_VDauto_dial_FILL.pl @@ -12,7 +12,7 @@ # # Should only be run on one server in a multi-server Asterisk/VICIDIAL cluster # -# Copyright (C) 2022 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2023 Matt Florell LICENSE: AGPLv2 # # CHANGELOG: # 61115-1246 - First build, framework setup, non-functional @@ -52,6 +52,7 @@ # 210731-0951 - Added cid_group_id_two campaign option # 220311-1922 - Added List CID Group Override option # 220623-1622 - Added List dial_prefix override +# 230830-1056 - Changed outbound_calls_per_second max to allow up to 1000 CPS # ### begin parsing run-time options ### @@ -340,7 +341,7 @@ while($one_day_interval > 0) } $sthA->finish(); - if ( ($outbound_calls_per_second > 0) && ($outbound_calls_per_second < 201) ) + if ( ($outbound_calls_per_second > 0) && ($outbound_calls_per_second < 1001) ) {$per_call_delay = (1000 / $outbound_calls_per_second);} else {$per_call_delay = '25';} diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index 18717c49..522d63a3 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -5337,6 +5337,8 @@ CREATE UNIQUE INDEX vdalsla on vicidial_agent_latency_summary_log_archive (user, CREATE TABLE vicidial_latency_gaps_archive LIKE vicidial_latency_gaps; CREATE UNIQUE INDEX vdlga on vicidial_latency_gaps_archive (user,gap_date); +CREATE TABLE vicidial_daily_rt_monitoring_log LIKE vicidial_rt_monitor_log; + GRANT RELOAD ON *.* TO cron@'%'; GRANT RELOAD ON *.* TO cron@localhost; @@ -5435,4 +5437,4 @@ INSERT INTO `wallboard_reports` VALUES ('AGENTS_AND_QUEUES','Agents and Queues', UPDATE system_settings set vdc_agent_api_active='1'; -UPDATE system_settings SET db_schema_version='1693',db_schema_update_date=NOW(),reload_timestamp=NOW(); +UPDATE system_settings SET db_schema_version='1694',db_schema_update_date=NOW(),reload_timestamp=NOW(); diff --git a/extras/upgrade_2.14.sql b/extras/upgrade_2.14.sql index 1ad79b35..10110ff3 100644 --- a/extras/upgrade_2.14.sql +++ b/extras/upgrade_2.14.sql @@ -2405,3 +2405,7 @@ ALTER TABLE vicidial_inbound_groups ADD third_alert_container VARCHAR(40) defaul ALTER TABLE vicidial_inbound_groups ADD third_alert_only VARCHAR(40) default 'DISABLED'; UPDATE system_settings SET db_schema_version='1693',db_schema_update_date=NOW() where db_schema_version < 1693; + +CREATE TABLE vicidial_daily_rt_monitoring_log LIKE vicidial_rt_monitor_log; + +UPDATE system_settings SET db_schema_version='1694',db_schema_update_date=NOW() where db_schema_version < 1694; diff --git a/www/VERM/VERM_AGENTS_DT_rpt.inc b/www/VERM/VERM_AGENTS_DT_rpt.inc index 9258b8eb..b2f7c070 100644 --- a/www/VERM/VERM_AGENTS_DT_rpt.inc +++ b/www/VERM/VERM_AGENTS_DT_rpt.inc @@ -12,10 +12,10 @@ # TIMEOT, unanswered even though it was dropped into a call that was picked up # Warm transfers count as two calls -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF); +# $PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +# $PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +# $PHP_SELF=$_SERVER['PHP_SELF']; +# $PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF); $vicidial_agent_log_table="vicidial_agent_log"; diff --git a/www/VERM/VERM_AGENTS_rpt.inc b/www/VERM/VERM_AGENTS_rpt.inc index 5915ce6d..125b0467 100644 --- a/www/VERM/VERM_AGENTS_rpt.inc +++ b/www/VERM/VERM_AGENTS_rpt.inc @@ -12,10 +12,10 @@ # TIMEOT, unanswered even though it was dropped into a call that was picked up # Warm transfers count as two calls -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF); +# $PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +# $PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +# $PHP_SELF=$_SERVER['PHP_SELF']; +# $PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF); $startMS = microtime(); diff --git a/www/VERM/VERM_ANSWERED_rpt.inc b/www/VERM/VERM_ANSWERED_rpt.inc index db1b5aec..58cb19d1 100644 --- a/www/VERM/VERM_ANSWERED_rpt.inc +++ b/www/VERM/VERM_ANSWERED_rpt.inc @@ -9,10 +9,10 @@ # # DROP, WAITTO, TIMEOT are unanswered statuses, not NANQUE -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF); +# $PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +# $PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +# $PHP_SELF=$_SERVER['PHP_SELF']; +# $PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF); $startMS = microtime(); diff --git a/www/VERM/VERM_ATT_rpt.inc b/www/VERM/VERM_ATT_rpt.inc index c7c56ab9..015d8bcb 100644 --- a/www/VERM/VERM_ATT_rpt.inc +++ b/www/VERM/VERM_ATT_rpt.inc @@ -11,7 +11,7 @@ # if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} # elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} -$PHP_SELF=$_SERVER['PHP_SELF']; +# $PHP_SELF=$_SERVER['PHP_SELF']; $ACD_queue_counts=array(); $ACD_terminal_counts=array(); diff --git a/www/VERM/VERM_DOW_rpt.inc b/www/VERM/VERM_DOW_rpt.inc index 2e43bd9a..a987bcef 100644 --- a/www/VERM/VERM_DOW_rpt.inc +++ b/www/VERM/VERM_DOW_rpt.inc @@ -11,10 +11,10 @@ # TIMEOT, unanswered even though it was dropped into a call that was picked up # Warm transfers count as two calls -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF); +# $PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +# $PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +# $PHP_SELF=$_SERVER['PHP_SELF']; +# $PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF); $vicidial_user_log_table="vicidial_user_log"; diff --git a/www/VERM/VERM_HOUR_rpt.inc b/www/VERM/VERM_HOUR_rpt.inc index f7c4b248..bdb89be0 100644 --- a/www/VERM/VERM_HOUR_rpt.inc +++ b/www/VERM/VERM_HOUR_rpt.inc @@ -12,10 +12,10 @@ # TIMEOT, unanswered even though it was dropped into a call that was picked up # Warm transfers count as two calls -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF); +# $PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +# $PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +# $PHP_SELF=$_SERVER['PHP_SELF']; +# $PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF); $vicidial_user_log_table="vicidial_user_log"; diff --git a/www/VERM/VERM_OUTCOMES_rpt.inc b/www/VERM/VERM_OUTCOMES_rpt.inc index a018417c..7aa96b51 100644 --- a/www/VERM/VERM_OUTCOMES_rpt.inc +++ b/www/VERM/VERM_OUTCOMES_rpt.inc @@ -13,10 +13,10 @@ # TIMEOT, unanswered even though it was dropped into a call that was picked up # Warm transfers count as two calls -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF); +# $PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +# $PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +# $PHP_SELF=$_SERVER['PHP_SELF']; +# $PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF); # if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} # elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} diff --git a/www/VERM/VERM_STATS_rpt.inc b/www/VERM/VERM_STATS_rpt.inc index 53cf5d3a..f0c3ce72 100644 --- a/www/VERM/VERM_STATS_rpt.inc +++ b/www/VERM/VERM_STATS_rpt.inc @@ -8,10 +8,10 @@ # # DROP, WAITTO, TIMEOT are unanswered statuses, not NANQUE -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF); +# $PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +# $PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +# $PHP_SELF=$_SERVER['PHP_SELF']; +# $PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF); if (isset($_GET["sort_agents_on_queue"])) {$sort_agents_on_queue=$_GET["sort_agents_on_queue"];} elseif (isset($_POST["sort_agents_on_queue"])) {$sort_agents_on_queue=$_POST["sort_agents_on_queue"];} diff --git a/www/VERM/VERM_custom_report.php b/www/VERM/VERM_custom_report.php index 3efc5bc2..09aa0809 100644 --- a/www/VERM/VERM_custom_report.php +++ b/www/VERM/VERM_custom_report.php @@ -16,7 +16,6 @@ header ("Content-type: text/html; charset=utf-8"); require("dbconnect_mysqli.php"); require("functions.php"); -require("VERM_global_vars.inc"); if (isset($_GET["start_date"])) {$start_date=$_GET["start_date"];} elseif (isset($_POST["start_date"])) {$start_date=$_POST["start_date"];} @@ -139,35 +138,6 @@ else $custom_report_name = preg_replace('/[^-_0-9\p{L}/u','',$custom_report_name); } -##### Look up custom report parameters from prior use ##### -$custom_rpt_stmt="select * from verm_custom_report_holder where user='$PHP_AUTH_USER' and ((report_name!='' and report_name='$custom_report_name') or modify_date>=now()-INTERVAL 8 HOUR) limit 1"; -$custom_rpt_rslt=mysql_to_mysqli($custom_rpt_stmt, $link); -$dow=array(); -while ($custom_rpt_row=mysqli_fetch_array($custom_rpt_rslt)) - { - $custom_rpt_parameters=$custom_rpt_row["report_parameters"]; - $custom_rpt_array=explode("|", $custom_rpt_parameters); - for ($i=0; $i0) - { - $var_value=preg_replace('/^undefined$/i', '', $var_value); - if (preg_match('/^dow/', $var_name)) - { - array_push($dow, $var_value); - } - else - { - $$var_name=$var_value; - } - } - } - } -########################################################### - if (file_exists('options.php')) { require('options.php'); @@ -287,6 +257,38 @@ else exit; } +require("VERM_global_vars.inc"); + +##### Look up custom report parameters from prior use ##### +$custom_rpt_stmt="select * from verm_custom_report_holder where user='$PHP_AUTH_USER' and ((report_name!='' and report_name='$custom_report_name') or modify_date>=now()-INTERVAL 8 HOUR) limit 1"; +$custom_rpt_rslt=mysql_to_mysqli($custom_rpt_stmt, $link); +$dow=array(); +while ($custom_rpt_row=mysqli_fetch_array($custom_rpt_rslt)) + { + $custom_rpt_parameters=$custom_rpt_row["report_parameters"]; + $custom_rpt_array=explode("|", $custom_rpt_parameters); + for ($i=0; $i0) + { + $var_value=preg_replace('/^undefined$/i', '', $var_value); + if (preg_match('/^dow/', $var_name)) + { + array_push($dow, $var_value); + } + else + { + $$var_name=$var_value; + } + } + } + } +########################################################### + + ##### BEGIN log visit to the vicidial_report_log table ##### $LOGip = getenv("REMOTE_ADDR"); $LOGbrowser = getenv("HTTP_USER_AGENT"); diff --git a/www/VERM/VERM_global_vars.inc b/www/VERM/VERM_global_vars.inc index f741ea8b..11e7ea26 100644 --- a/www/VERM/VERM_global_vars.inc +++ b/www/VERM/VERM_global_vars.inc @@ -39,6 +39,9 @@ $did = preg_replace('/[^0-9]/','',$did); if ($non_latin < 1) { + $PHP_AUTH_USER = preg_replace('/[^-_0-9a-zA-Z]/','',$PHP_AUTH_USER); + $PHP_AUTH_PW = preg_replace('/[^-_0-9a-zA-Z]/','',$PHP_AUTH_PW); + $campaigns = preg_replace('/[^-_0-9a-zA-Z]/','',$campaigns); $ingroups = preg_replace('/[^-_0-9a-zA-Z]/','',$ingroups); $users = preg_replace('/[^-_0-9a-zA-Z]/','',$users); @@ -47,6 +50,9 @@ if ($non_latin < 1) } else { + $PHP_AUTH_USER = preg_replace('/[^-_0-9a-zA-Z]/','',$PHP_AUTH_USER); + $PHP_AUTH_PW = preg_replace('/[^-_0-9a-zA-Z]/','',$PHP_AUTH_PW); + $campaigns = preg_replace('/[^-_0-9\p{L}]/u','',$campaigns); $ingroups = preg_replace('/[^-_0-9\p{L}]/u','',$ingroups); $users = preg_replace('/[^-_0-9\p{L}]/u','',$users); diff --git a/www/VERM/VERM_inbound_comparison_report.php b/www/VERM/VERM_inbound_comparison_report.php index c30728ad..c497014c 100644 --- a/www/VERM/VERM_inbound_comparison_report.php +++ b/www/VERM/VERM_inbound_comparison_report.php @@ -17,7 +17,6 @@ require("dbconnect_mysqli.php"); require("functions.php"); require("VERM_options.php"); -require("VERM_global_vars.inc"); if (isset($_GET["start_date"])) {$start_date=$_GET["start_date"];} elseif (isset($_POST["start_date"])) {$start_date=$_POST["start_date"];} @@ -32,13 +31,25 @@ if (isset($_GET["submit_report"])) {$submit_report=$_GET["submit_report"];} if (isset($_GET["DB"])) {$DB=$_GET["DB"];} elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -$DB=preg_replace("/[^0-9a-zA-Z]/","",$DB); $PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; $PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; $PHP_SELF=$_SERVER['PHP_SELF']; $PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF); +if ($non_latin < 1) + { + $DB=preg_replace("/[^0-9a-zA-Z]/","",$DB); + $PHP_AUTH_USER = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHP_AUTH_USER); + $PHP_AUTH_PW = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHP_AUTH_PW); + } +else + { + $DB=preg_replace("/[^0-9\p{L}]/u","",$DB); + $PHP_AUTH_USER = preg_replace('/[^-_0-9\p{L}]/u', '', $PHP_AUTH_USER); + $PHP_AUTH_PW = preg_replace('/[^-_0-9\p{L}]/u', '', $PHP_AUTH_PW); + } + $report_name = 'Vox Enhanced Reporting Module'; $db_source = 'M'; @@ -70,10 +81,10 @@ if ($SSallow_web_debug < 1) {$DB=0;} ##### END SETTINGS LOOKUP ##### ########################################### -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF); +# $PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +# $PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +# $PHP_SELF=$_SERVER['PHP_SELF']; +# $PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF); $start_date=preg_replace('/[^-0-9]/', '', $start_date); $end_date=preg_replace('/[^-0-9]/', '', $end_date); @@ -88,6 +99,83 @@ $survey_ivr_group_names=array("PRS-Survey-Overall-iVR", "PRS-Survey-NPS-iVR"); if (!$vicidial_queue_groups) {$vicidial_queue_groups=$default_queue_groups;} if (!$vicidial_queue_group_names) {$vicidial_queue_group_names=$default_queue_group_names;} +$stmt="SELECT selected_language from vicidial_users where user='$PHP_AUTH_USER';"; +if ($DB) {echo "|$stmt|\n";} +$rslt=mysql_to_mysqli($stmt, $link); +$sl_ct = mysqli_num_rows($rslt); +if ($sl_ct > 0) + { + $row=mysqli_fetch_row($rslt); + $VUselected_language = $row[0]; + } + +$auth=0; +$reports_auth=0; +$admin_auth=0; +$auth_message = user_authorization($PHP_AUTH_USER,$PHP_AUTH_PW,'REPORTS',0,0); +if ( ($auth_message == 'GOOD') or ($auth_message == '2FA') ) + { + $auth=1; + if ($auth_message == '2FA') + { + header ("Content-type: text/html; charset=utf-8"); + echo _QXZ("Your session is expired").". "._QXZ("Click here to log in").".\n"; + exit; + } + } + +if ($auth > 0) + { + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 7 and view_reports='1';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_to_mysqli($stmt, $link); + $row=mysqli_fetch_row($rslt); + $admin_auth=$row[0]; + + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 6 and view_reports='1';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_to_mysqli($stmt, $link); + $row=mysqli_fetch_row($rslt); + $reports_auth=$row[0]; + + if ($reports_auth < 1) + { + $VDdisplayMESSAGE = _QXZ("You are not allowed to view reports"); + Header ("Content-type: text/html; charset=utf-8"); + echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n"; + exit; + } + if ( ($reports_auth > 0) and ($admin_auth < 1) ) + { + $ADD=999999; + $reports_only_user=1; + } + } +else + { + $VDdisplayMESSAGE = _QXZ("Login incorrect, please try again"); + if ($auth_message == 'LOCK') + { + $VDdisplayMESSAGE = _QXZ("Too many login attempts, try again in 15 minutes"); + Header ("Content-type: text/html; charset=utf-8"); + echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n"; + exit; + } + if ($auth_message == 'IPBLOCK') + { + $VDdisplayMESSAGE = _QXZ("Your IP Address is not allowed") . ": $ip"; + Header ("Content-type: text/html; charset=utf-8"); + echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n"; + exit; + } + Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\""); + Header("HTTP/1.0 401 Unauthorized"); + echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$PHP_AUTH_PW|$auth_message|\n"; + exit; + } + +require("VERM_global_vars.inc"); # Must be after user_authorization for sanitization/security + $stmt="select *, if(queue_group in ('".implode("', '", $default_queue_groups)."'), 0, 1) as priority from vicidial_queue_groups where active='Y' $LOGallowed_queue_groupsSQL order by priority, queue_group, queue_group_name;"; $rslt=mysql_to_mysqli($stmt, $link); # echo $stmt; diff --git a/www/VERM/display_agent_details.php b/www/VERM/display_agent_details.php index 0ca90ac7..0e3e28d7 100644 --- a/www/VERM/display_agent_details.php +++ b/www/VERM/display_agent_details.php @@ -17,7 +17,6 @@ $PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF); require("dbconnect_mysqli.php"); require("functions.php"); require("VERM_options.php"); -require("VERM_global_vars.inc"); if (isset($_GET["user"])) {$user=$_GET["user"];} elseif (isset($_POST["user"])) {$user=$_POST["user"];} @@ -189,6 +188,8 @@ else exit; } +require("VERM_global_vars.inc"); # Must be after user_authorization for sanitization/security + ##### BEGIN log visit to the vicidial_report_log table ##### $LOGip = getenv("REMOTE_ADDR"); $LOGbrowser = getenv("HTTP_USER_AGENT"); diff --git a/www/VERM/display_call_details.php b/www/VERM/display_call_details.php index a9d10c2c..c1549104 100644 --- a/www/VERM/display_call_details.php +++ b/www/VERM/display_call_details.php @@ -17,7 +17,6 @@ $PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF); require("dbconnect_mysqli.php"); require("functions.php"); -require("VERM_global_vars.inc"); if (isset($_GET["detail_id"])) {$detail_id=$_GET["detail_id"];} elseif (isset($_POST["detail_id"])) {$detail_id=$_POST["detail_id"];} @@ -53,6 +52,24 @@ if ($SSallow_web_debug < 1) {$DB=0;} ##### END SETTINGS LOOKUP ##### ########################################### +$detail_id = preg_replace('/[^0-9\.\|]/','',$detail_id); +$detail_span_height = preg_replace('/[^0-9]/','',$detail_span_height); + +if ($non_latin < 1) + { + $DB=preg_replace("/[^0-9a-zA-Z]/","",$DB); + $PHP_AUTH_USER = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHP_AUTH_USER); + $PHP_AUTH_PW = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHP_AUTH_PW); + $call_type = preg_replace('/[^a-zA-Z]/','',$call_type); + } +else + { + $DB=preg_replace("/[^0-9\p{L}]/u","",$DB); + $PHP_AUTH_USER = preg_replace('/[^-_0-9\p{L}]/u', '', $PHP_AUTH_USER); + $PHP_AUTH_PW = preg_replace('/[^-_0-9\p{L}]/u', '', $PHP_AUTH_PW); + $call_type = preg_replace('/[^\p{L}]/u','',$call_type); + } + $stmt="SELECT selected_language from vicidial_users where user='$PHP_AUTH_USER';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); @@ -128,6 +145,8 @@ else exit; } +require("VERM_global_vars.inc"); # Must be after user_authorization for sanitization/security + ##### BEGIN log visit to the vicidial_report_log table ##### $LOGip = getenv("REMOTE_ADDR"); $LOGbrowser = getenv("HTTP_USER_AGENT"); @@ -189,18 +208,6 @@ if (!$detail_id) {echo "Beat it."; die;} if (!$detail_span_height) {$detail_span_height="70";} $detail_span_height-=15; # account for headers; -$detail_id = preg_replace('/[^0-9\.\|]/','',$detail_id); -$detail_span_height = preg_replace('/[^0-9]/','',$detail_span_height); - -if ($non_latin < 1) - { - $call_type = preg_replace('/[^a-zA-Z]/','',$call_type); - } -else - { - $call_type = preg_replace('/[^\p{L}]/u','',$call_type); - } - # $report_name="Vox Enhanced Reporting Module - Call detail display"; $NWB = "\n"; - echo"\n"; + echo"\n"; echo "$report_name: $group\n"; $short_header=1; @@ -1526,9 +1530,9 @@ if ($RTajax < 1) echo "\n"; echo "   "; echo "\n"; - echo ""._QXZ("STOP")." | "; - echo ""._QXZ("SLOW")." | "; - echo ""._QXZ("GO").""; + echo ""._QXZ("STOP")." | "; + echo ""._QXZ("SLOW")." | "; + echo ""._QXZ("GO").""; if (preg_match('/ALL\-ACTIVE/i',$group_string)) { echo "       "._QXZ("MODIFY")." | \n"; @@ -2462,53 +2466,53 @@ if ( ($report_display_type!='WALL_1') and ($report_display_type!='WALL_2') and ( { if ($adastats<2) { - echo "+ "._QXZ("VIEW MORE").""; + echo "+ "._QXZ("VIEW MORE").""; } else { - echo "- "._QXZ("VIEW LESS").""; + echo "- "._QXZ("VIEW LESS").""; } } if ($UGdisplay>0) { - echo "       "._QXZ("HIDE USER GROUP").""; + echo "       "._QXZ("HIDE USER GROUP").""; } else { - echo "       "._QXZ("VIEW USER GROUP").""; + echo "       "._QXZ("VIEW USER GROUP").""; } if ($SERVdisplay>0) { - echo "       "._QXZ("HIDE SERVER INFO").""; + echo "       "._QXZ("HIDE SERVER INFO").""; } else { - echo "       "._QXZ("SHOW SERVER INFO").""; + echo "       "._QXZ("SHOW SERVER INFO").""; } if ($CALLSdisplay>0) { - echo "       "._QXZ("HIDE WAITING CALLS").""; + echo "       "._QXZ("HIDE WAITING CALLS").""; } else { - echo "       "._QXZ("SHOW WAITING CALLS").""; + echo "       "._QXZ("SHOW WAITING CALLS").""; } if ($ALLINGROUPstats>0) { - echo "       "._QXZ("HIDE IN-GROUP STATS").""; + echo "       "._QXZ("HIDE IN-GROUP STATS").""; } else { - echo "       "._QXZ("SHOW IN-GROUP STATS").""; + echo "       "._QXZ("SHOW IN-GROUP STATS").""; } if ($PHONEdisplay>0) { - echo "       "._QXZ("HIDE PHONES").""; + echo "       "._QXZ("HIDE PHONES").""; } else { - echo "       "._QXZ("SHOW PHONES").""; + echo "       "._QXZ("SHOW PHONES").""; } if ($CUSTPHONEdisplay>0) { @@ -2522,11 +2526,11 @@ if ( ($report_display_type!='WALL_1') and ($report_display_type!='WALL_2') and ( { if ($CUSTINFOdisplay>0) { - echo "       "._QXZ("HIDE FULL CUST INFO").""; + echo "       "._QXZ("HIDE FULL CUST INFO").""; } else { - echo "       "._QXZ("SHOW FULL CUST INFO").""; + echo "       "._QXZ("SHOW FULL CUST INFO").""; } } } @@ -3088,12 +3092,12 @@ if ($report_display_type=='TEXT') $HDstation = "----------------+"; $HTstation = " "._QXZ("STATION", 14)." |"; $HDphone = "-------------------+"; - $HTphone = " "._QXZ("PHONE",11)." |"; + $HTphone = " "._QXZ("PHONE",11)." |"; if ($RTajax > 0) {$HTphone = " "._QXZ("PHONE",11)." |";} $HDuser = "------------------------+"; - $HTuser = " "._QXZ("USER",5)." "; + $HTuser = " "._QXZ("USER",5)." "; if ($RTajax > 0) {$HTuser = " "._QXZ("USER",5)." ";} if ($UidORname>0) @@ -3102,7 +3106,7 @@ if ($report_display_type=='TEXT') {$HTuser .= ""._QXZ("SHOW ID",8)." ";} else { - $HTuser .= ""._QXZ("SHOW ID",8)." "; + $HTuser .= ""._QXZ("SHOW ID",8)." "; } } else @@ -3111,13 +3115,13 @@ if ($report_display_type=='TEXT') {$HTuser .= ""._QXZ("SHOW NAME",9)."";} else { - $HTuser .= ""._QXZ("SHOW NAME",9).""; + $HTuser .= ""._QXZ("SHOW NAME",9).""; } } $HTuser .= " "._QXZ("INFO",6)." |"; $HDusergroup = "--------------+"; - $HTusergroup = " "._QXZ("USER GROUP",12)." |"; + $HTusergroup = " "._QXZ("USER GROUP",12)." |"; if ($RTajax > 0) {$HTusergroup = " "._QXZ("USER GROUP",12)." |";} $HDsessionid = "-----------+"; @@ -3128,6 +3132,8 @@ if ($report_display_type=='TEXT') $HTbarge = " "._QXZ("BARGE",5)." |"; $HDwhisper = "---------+"; $HTwhisper = " "._QXZ("WHISPER",7)." |"; + $HDmonitor = "-----------------+----------+"; + $HTmonitor = " "._QXZ("MONITOR",15)." | "._QXZ("MON TYPE",8)." |"; $HDstatus = "----------+"; $HTstatus = " "._QXZ("STATUS",8)." |"; $HDcustphone = "-----------------+"; @@ -3139,11 +3145,11 @@ if ($report_display_type=='TEXT') $HDcall_server_ip = "-----------------+"; $HTcall_server_ip = " "._QXZ("CALL SERVER IP",15)." |"; $HDtime = "---------+"; - $HTtime = " MM:SS |"; + $HTtime = " MM:SS |"; if ($RTajax > 0) {$HTtime = " MM:SS |";} $HDcampaign = "------------+"; - $HTcampaign = " "._QXZ("CAMPAIGN",10)." |"; + $HTcampaign = " "._QXZ("CAMPAIGN",10)." |"; if ($RTajax > 0) {$HTcampaign = " "._QXZ("CAMPAIGN",10)." |";} $HDcalls = "-------+"; @@ -3208,12 +3214,12 @@ if ( ($report_display_type=='HTML') or ($report_display_type=='LIMITED') ) $HDstation = ""; $HTstation = "  "._QXZ("STATION")." "; $HDphone = ""; - $HTphone = " "._QXZ("PHONE")." "; + $HTphone = " "._QXZ("PHONE")." "; if ($RTajax > 0) {$HTphone = " "._QXZ("PHONE")." ";} $HDuser = ""; - $HTuser = " "._QXZ("USER")." "; + $HTuser = " "._QXZ("USER")." "; if ($RTajax > 0) {$HTuser = "   "._QXZ("USER")." ";} if ($UidORname>0) @@ -3222,7 +3228,7 @@ if ( ($report_display_type=='HTML') or ($report_display_type=='LIMITED') ) {$HTuser .= " "._QXZ("SHOW ID")." ";} else { - $HTuser .= " "._QXZ("SHOW ID")." "; + $HTuser .= " "._QXZ("SHOW ID")." "; } } else @@ -3231,13 +3237,13 @@ if ( ($report_display_type=='HTML') or ($report_display_type=='LIMITED') ) {$HTuser .= " "._QXZ("SHOW NAME")." ";} else { - $HTuser .= "  "._QXZ("SHOW NAME")." "; + $HTuser .= "  "._QXZ("SHOW NAME")." "; } } $HTuser .= " "._QXZ("INFO",6)." "; $HDusergroup = ""; - $HTusergroup = " "._QXZ("USER GROUP")." "; + $HTusergroup = " "._QXZ("USER GROUP")." "; if ($RTajax > 0) {$HTusergroup = " "._QXZ("USER GROUP")." ";} $HDsessionid = ""; @@ -3248,6 +3254,8 @@ if ( ($report_display_type=='HTML') or ($report_display_type=='LIMITED') ) $HTbarge = "  "._QXZ("BARGE")." "; $HDwhisper = ""; $HTwhisper = "  "._QXZ("WHISPER")." "; + $HDmonitor = ""; + $HTmonitor = "  "._QXZ("MONITOR")."   "._QXZ("MON TYPE")." "; $HDstatus = ""; $HTstatus = "  "._QXZ("STATUS")."  "; $HDcustphone = ""; @@ -3259,11 +3267,11 @@ if ( ($report_display_type=='HTML') or ($report_display_type=='LIMITED') ) $HDcall_server_ip = ""; $HTcall_server_ip = "  "._QXZ("CALL SERVER IP")." "; $HDtime = ""; - $HTtime = " MM:SS "; + $HTtime = " MM:SS "; if ($RTajax > 0) {$HTtime = " MM:SS ";} $HDcampaign = ""; - $HTcampaign = " "._QXZ("CAMPAIGN")." "; + $HTcampaign = " "._QXZ("CAMPAIGN")." "; if ($RTajax > 0) {$HTcampaign = " "._QXZ("CAMPAIGN",10)." ";} $HDcalls = ""; @@ -3320,6 +3328,11 @@ if ($PHONEdisplay < 1) $HDphone = ''; $HTphone = ''; } +if ($MONITORdisplay < 1) + { + $HDmonitor = ''; + $HTmonitor = ''; + } if ($CUSTPHONEdisplay < 1) { $HDcustphone = ''; @@ -3361,13 +3374,13 @@ if ($SERVdisplay < 1) if ($realtime_block_user_info > 0) { - $Aline = "$HDbegin$HDusergroup$HDsessionid$HDlisten$HDbarge$HDwhisper$HDstatus$HDpause$HDcustphone$HDcustinfo$HDserver_ip$HDcall_server_ip$HDtime$HDcampaign$HDcalls$HDlatency$HDastcall$HDigcall$\n"; - $Bline = "$HTbegin$HTusergroup$HTsessionid$HDlisten$HTbarge$HTwhisper$HTstatus$HTpause$HTcustphone$HTcustinfo$HTserver_ip$HTcall_server_ip$HTtime$HTcampaign$HTcalls$HTlatency$HTastcall$HTigcall\n"; + $Aline = "$HDbegin$HDusergroup$HDsessionid$HDlisten$HDbarge$HDwhisper$HDmonitor$HDstatus$HDpause$HDcustphone$HDcustinfo$HDserver_ip$HDcall_server_ip$HDtime$HDcampaign$HDcalls$HDlatency$HDastcall$HDigcall$\n"; + $Bline = "$HTbegin$HTusergroup$HTsessionid$HDlisten$HTbarge$HTwhisper$HTmonitor$HTstatus$HTpause$HTcustphone$HTcustinfo$HTserver_ip$HTcall_server_ip$HTtime$HTcampaign$HTcalls$HTlatency$HTastcall$HTigcall\n"; } else { - $Aline = "$HDbegin$HDstation$HDphone$HDuser$HDusergroup$HDsessionid$HDlisten$HDbarge$HDwhisper$HDstatus$HDpause$HDcustphone$HDcustinfo$HDserver_ip$HDcall_server_ip$HDtime$HDcampaign$HDcalls$HDlatency$HDastcall$HDigcall\n"; - $Bline = "$HTbegin$HTstation$HTphone$HTuser$HTusergroup$HTsessionid$HTlisten$HTbarge$HTwhisper$HTstatus$HTpause$HTcustphone$HTcustinfo$HTserver_ip$HTcall_server_ip$HTtime$HTcampaign$HTcalls$HTlatency$HTastcall$HTigcall\n"; + $Aline = "$HDbegin$HDstation$HDphone$HDuser$HDusergroup$HDsessionid$HDlisten$HDbarge$HDwhisper$HDmonitor$HDstatus$HDpause$HDcustphone$HDcustinfo$HDserver_ip$HDcall_server_ip$HDtime$HDcampaign$HDcalls$HDlatency$HDastcall$HDigcall\n"; + $Bline = "$HTbegin$HTstation$HTphone$HTuser$HTusergroup$HTsessionid$HTlisten$HTbarge$HTwhisper$HTmonitor$HTstatus$HTpause$HTcustphone$HTcustinfo$HTserver_ip$HTcall_server_ip$HTtime$HTcampaign$HTcalls$HTlatency$HTastcall$HTigcall\n"; } $Aecho .= "$Aline"; $Aecho .= "$Bline"; @@ -3433,6 +3446,44 @@ $Alatency_today_avg=array(); $Alatency_today_peak=array(); $Alatency_now=array(); +### Monitoring check ### + +if ($MONITORdisplay) + { + $monitoring_users=array(); + $monitoring_types=array(); + $monitoring_agents=array(); + $monitoring_sessions=array(); + $monitoring_codes=array(); + $monitoring_times=array(); + $monitoring_phones=array(); + $monitoring_manager_ips=array(); + $monitoring_ips=array(); + $monitor_stmt="select manager_user, agent_user, agent_session, caller_code, monitor_type, monitor_start_time, agent_server_ip, manager_server_ip, manager_phone from vicidial_daily_rt_monitor_log where monitor_start_time>=curdate() and monitor_end_time is null order by monitor_start_time desc"; + if ($DB) {echo $monitor_stmt."\n";} + $monitor_rslt=mysql_to_mysqli($monitor_stmt, $link); + while($monitor_row=mysqli_fetch_array($monitor_rslt)) + { + $manager_user=$monitor_row["manager_user"]; + if(!in_array($manager_user, $monitoring_users)) + { + array_push($monitoring_users, $manager_user); + array_push($monitoring_types, $monitor_row["monitor_type"]); + array_push($monitoring_agents, $monitor_row["agent_user"]); + array_push($monitoring_sessions, $monitor_row["agent_session"]); + array_push($monitoring_codes, $monitor_row["caller_code"]); + array_push($monitoring_times, $monitor_row["monitor_start_time"]); + array_push($monitoring_manager_ips, $monitor_row["manager_server_ip"]); + array_push($monitoring_phones, $monitor_row["manager_phone"]); + array_push($monitoring_ips, $monitor_row["agent_server_ip"]); + } + } + } + +# select * from live_channels where +######################## + + $stmt="SELECT extension,vicidial_live_agents.user,conf_exten,vicidial_live_agents.status,vicidial_live_agents.server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,vicidial_live_agents.campaign_id,vicidial_users.user_group,vicidial_users.full_name,vicidial_live_agents.comments,vicidial_live_agents.calls_today,vicidial_live_agents.callerid,lead_id,UNIX_TIMESTAMP(last_state_change),on_hook_agent,ring_callerid,agent_log_id,vicidial_live_agents.closer_campaigns from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user and vicidial_users.user_hide_realtime='0' $UgroupSQL $usergroupSQL $user_group_filter_SQL order by $orderSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} @@ -3441,6 +3492,7 @@ if ($talking_to_print > 0) { $i=0; $va=0; + $mc=0; while ($i < $talking_to_print) { $row=mysqli_fetch_row($rslt); @@ -3488,6 +3540,8 @@ if ($talking_to_print > 0) $Aagent_log_id[$va] = $row[18]; $Acloser_campaigns[$va] = $row[19]; $Aring_note[$va] = ' '; + $Amonitors[$va] = ' '; + $Amonitor_types[$va] = ' '; if ($Aon_hook_agent[$va] == 'Y') { @@ -3511,6 +3565,88 @@ if ($talking_to_print > 0) } ### END 3-WAY Check ### + ### Monitor search ### + # Check if this agent ties to an unfinished monitoring session + if ($MONITORdisplay > 0) + { + # Get indices of active monitoring sessions for this user, if any + $active_monitoring_indices=array_keys($monitoring_agents, $Auser[$va]); + for ($m=0; $m0) + { + $followup_row=mysqli_fetch_array($followup_rslt); + $extension=$followup_row["extension"]; + $channel_data=$followup_row["channel_data"]; + + $channel_data=preg_replace('/,.*$/', '', $channel_data); + $monitor_stmtB="select * from live_sip_channels where channel='$channel_data' and extension='$monitoring_session' UNION select * from live_sip_channels where channel='$channel_data' and extension='$monitoring_session'"; + $monitor_rsltB=mysql_to_mysqli($monitor_stmtB, $link); + $monitor_match+=mysqli_num_rows($monitor_rsltB); + + } + } + } + if ($DB) + { + $Aecho.=""; + $Aecho.=""; + $Aecho.=""; + } + if ($monitor_match>0) + { + $Amonitors[$va].="$monitoring_user, "; + $Amonitor_types[$va].="$monitoring_type, "; + $mc++; + } + } + } + $Amonitors[$va]=trim(preg_replace('/\,\s+$/', '', $Amonitors[$va])); + $Amonitor_types[$va]=trim(preg_replace('/\,\s+$/', '', $Amonitor_types[$va])); + } + ### END Monitor search ### + ### Latency Check ### if ( ($AGENTlatency != 0) and ($RS_UGlatencyALLOWED > 0) ) { @@ -3720,6 +3856,8 @@ if ($talking_to_print > 0) $campaign_id = sprintf("%-10s", $Acampaign_id[$i]); $comments= $Acomments[$i]; $calls_today = sprintf("%-5s", $Acalls_today[$i]); + $monitor_info = sprintf("%-15s", $Amonitors[$i]); + $monitor_type = sprintf("%-8s", $Amonitor_types[$i]); if ($agent_pause_codes_active > 0) { @@ -4004,6 +4142,9 @@ if ($talking_to_print > 0) if ( (strlen($monitor_phone)>1) and (preg_match("/WHISPER/",$monitor_active) ) and (preg_match("/WHISPER/",$RS_ListenBarge) ) ) {$R=" | WHISPER";} + if ($MONITORdisplay > 0) {$MO = " $G$monitor_info$EG | $G$monitor_type$EG |";} + else {$MO = "";} + if ($CUSTPHONEdisplay > 0) {$CP = " $G$custphone$EG |";} else {$CP = "";} @@ -4172,11 +4313,11 @@ if ($talking_to_print > 0) { if ($realtime_block_user_info > 0) { - $Aecho .= "|$UGD $G$sessionid$EG$L$R$Aring_note[$i]| $G"._QXZ("$status",6)."$EG $CM $pausecode|$CP$CI$SVD$G$call_time_MS$EG | $G$campaign_id$EG | $G$calls_today$EG |$LATENCY$ASTCT$INGRP\n"; + $Aecho .= "|$UGD $G$sessionid$EG$L$R$Aring_note[$i]|$MO $G"._QXZ("$status",6)."$EG $CM $pausecode|$CP$CI$SVD$G$call_time_MS$EG | $G$campaign_id$EG | $G$calls_today$EG |$LATENCY$ASTCT$INGRP\n"; } if ($realtime_block_user_info < 1) { - $Aecho .= "| $G$extension$EG$Aring_note[$i]|$phoneD$G$user$EG + |$UGD $G$sessionid$EG$L$R | $G"._QXZ("$status",6)."$EG $CM $pausecode|$CP$CI$SVD$G$call_time_MS$EG | $G$campaign_id$EG | $G$calls_today$EG |$LATENCY$ASTCT$INGRP\n"; + $Aecho .= "| $G$extension$EG$Aring_note[$i]|$phoneD$G$user$EG + |$UGD $G$sessionid$EG$L$R |$MO $G"._QXZ("$status",6)."$EG $CM $pausecode|$CP$CI$SVD$G$call_time_MS$EG | $G$campaign_id$EG | $G$calls_today$EG |$LATENCY$ASTCT$INGRP\n"; } } @@ -4201,6 +4342,9 @@ if ($talking_to_print > 0) if ( (strlen($monitor_phone)>1) and (preg_match("/WHISPER/",$monitor_active) ) and (preg_match("/WHISPER/",$RS_ListenBarge) ) ) {$R=" WHISPER";} + if ($MONITORdisplay > 0) {$MO = " $G$monitor_info$EG $G$monitor_type$EG ";} + else {$MO = "";} + if ($CUSTPHONEdisplay > 0) {$CP = " $G$custphone$EG ";} else {$CP = "";} @@ -4367,11 +4511,11 @@ if ($talking_to_print > 0) { if ($realtime_block_user_info > 0) { - $Aecho .= "$UGD $G$sessionid$EG$L$R$Aring_note[$i] $G"._QXZ("$status",6)."$EG$CM$pausecodeHTML$CP$CI$SVD$G$call_time_MS$EG $G$campaign_id$EG $G$calls_today$EG $LATENCY$ASTCT$INGRP\n"; + $Aecho .= "$UGD $G$sessionid$EG$L$R$Aring_note[$i]$MO $G"._QXZ("$status",6)."$EG$CM$pausecodeHTML$CP$CI$SVD$G$call_time_MS$EG $G$campaign_id$EG $G$calls_today$EG $LATENCY$ASTCT$INGRP\n"; } if ($realtime_block_user_info < 1) { - $Aecho .= " $G$extension$EG$Aring_note[$i]$phoneD$G$user$EG $G+$EG $UGD $G$sessionid$EG$L$R $G"._QXZ("$status",6)."$EG$CM$pausecodeHTML$CP$CI$SVD$G$call_time_MS$EG $G$campaign_id$EG $G$calls_today$EG $LATENCY$ASTCT$INGRP\n"; + $Aecho .= " $G$extension$EG$Aring_note[$i]$phoneD$G$user$EG $G+$EG $UGD $G$sessionid$EG$L$R $MO $G"._QXZ("$status",6)."$EG$CM$pausecodeHTML$CP$CI$SVD$G$call_time_MS$EG $G$campaign_id$EG $G$calls_today$EG $LATENCY$ASTCT$INGRP\n"; } } } diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 3ec363b9..c797c3fb 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -6093,12 +6093,13 @@ if ($SSscript_remove_js > 0) # 230726-0922 - Added manual_vm_status_updates campaign setting # 230810-1617 - Added force_per_call_notes campaign setting # 230810-2005 - Added third_alert_trigger features +# 230830-1059 - Changed settings-outbound_calls_per_second max to allow up to 1000 CPS # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time -$admin_version = '2.14-894a'; -$build = '230810-2005'; +$admin_version = '2.14-895a'; +$build = '230830-1059'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -43821,7 +43822,7 @@ if ($ADD==311111111111111) echo ""._QXZ("Disable Auto-Dial").": $disable_auto_dial   $NWB#settings-disable_auto_dial$NWE\n"; - echo ""._QXZ("Max FILL Calls per Second").": $NWB#settings-outbound_calls_per_second$NWE\n"; + echo ""._QXZ("Max FILL Calls per Second").": $NWB#settings-outbound_calls_per_second$NWE\n"; echo ""._QXZ("Web Lead Loader Phone Length").": $NWB#settings-web_loader_phone_length$NWE\n"; diff --git a/www/vicidial/help_documentation.txt b/www/vicidial/help_documentation.txt index 3a0201f8..e7cd48d5 100644 --- a/www/vicidial/help_documentation.txt +++ b/www/vicidial/help_documentation.txt @@ -1,4 +1,4 @@ -# version: 20230810200701 +# version: 20230830105701 users-user User ID This field is where you put the users ID number, can be up to 20 digits in length, Must be at least 2 characters in length. We strongly recommend not reusing user accounts for different users, for reporting accuracy. To disable a user account, set the Active option to -N-. users-pass Password This field is where you put the users password. Must be at least 2 characters in length. Only letters and numbers are allowed in user passwords. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters. users-force_change_password Force Change Password If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage or the agent screen. Default is N. @@ -1139,7 +1139,7 @@ settings-ofcom_uk_drop_calc UK OFCOM Drop Calculation This option allows yo settings-disable_auto_dial Disable Auto-Dial This option is only editable by a system administrator. It will not remove any options from the management web interface, but it will prevent any auto-dialing of leads from happening on the system. Only Manual Dial outbound calls triggered directly by agents will function if this option is enabled. Default is 0 for inactive. settings-auto_dial_limit Auto Dial Limit This is the maximum limit of the auto dial level in the campaign screen. settings-max_logged_in_agents Allow Campaign Agent Limits If enabled, this setting will allow you to set the maximum number of agents that can be logged in to a single campaign at one time, defined at the campaign level. Default is 0 for disabled. -settings-outbound_calls_per_second Max FILL Calls per Second This setting determines the maximum number of calls that can be placed by the auto-FILL outbound auto-dialing script on for all servers, per second. Must be from 1 to 200. Default is 40. +settings-outbound_calls_per_second Max FILL Calls per Second This setting determines the maximum number of calls that can be placed by the auto-FILL outbound auto-dialing script on for all servers, per second. Must be from 1 to 1000. Default is 40. settings-web_loader_phone_length Web Lead Loader Phone Length This setting allows you to only allow phone numbers of a specific length into the system when loading leads with the web lead loader. The CHOOSE option allows a manager to optionally select a number of phone number digits to check the length by when loading leads one file at a time. Selecting a number option will not allow a manager to choose while loading leads, the check will be used every time the web lead loader is used. Default is DISABLED. settings-web_loader_phone_strip Web Lead Loader Phone Prefix Strip If not DISABLED, this setting will strip the entered characters from the beginning of the phone number of a lead when it is loaded into the system by the web lead loader. For example, if this field is set to 0 and the phone number in a lead file is 0123456789, then the phone number would be imported into the system as 123456789. Default is DISABLED. settings-manual_dial_phone_strip Manual Dial Phone Prefix Strip If not DISABLED, this setting will strip the entered characters from the beginning of the phone number of a lead when it is manual dialed by the agent in the agent screen. For example, if this field is set to 0 and the phone number the agent enters to manual dial is 0123456789, then the phone number would be changed to 123456789 before it is dialed and entered into the system. Default is DISABLED. diff --git a/www/vicidial/realtime_report.php b/www/vicidial/realtime_report.php index 29533f78..45cc83a9 100644 --- a/www/vicidial/realtime_report.php +++ b/www/vicidial/realtime_report.php @@ -60,12 +60,13 @@ # 230308-0215 - Added option to show customer phone code # 230421-0106 - Added AGENTlatency display # 230421-1625 - Added RS_UGlatencyRESTRICT options.php setting +# 230811-1530 - Added monitoring display information # $startMS = microtime(); -$version = '2.14-46'; -$build = '230421-0106'; +$version = '2.14-47'; +$build = '230811-1530'; header ("Content-type: text/html; charset=utf-8"); @@ -116,6 +117,8 @@ if (isset($_GET["CALLSdisplay"])) {$CALLSdisplay=$_GET["CALLSdisplay"];} elseif (isset($_POST["CALLSdisplay"])) {$CALLSdisplay=$_POST["CALLSdisplay"];} if (isset($_GET["PHONEdisplay"])) {$PHONEdisplay=$_GET["PHONEdisplay"];} elseif (isset($_POST["PHONEdisplay"])) {$PHONEdisplay=$_POST["PHONEdisplay"];} +if (isset($_GET["MONITORdisplay"])) {$MONITORdisplay=$_GET["MONITORdisplay"];} + elseif (isset($_POST["MONITORdisplay"])) {$MONITORdisplay=$_POST["MONITORdisplay"];} if (isset($_GET["CUSTPHONEdisplay"])) {$CUSTPHONEdisplay=$_GET["CUSTPHONEdisplay"];} elseif (isset($_POST["CUSTPHONEdisplay"])) {$CUSTPHONEdisplay=$_POST["CUSTPHONEdisplay"];} if (isset($_GET["CUSTINFOdisplay"])) {$CUSTINFOdisplay=$_GET["CUSTINFOdisplay"];} @@ -252,6 +255,11 @@ if (!isset($PHONEdisplay)) if (!isset($RS_PHONEdisplay)) {$PHONEdisplay=0;} else {$PHONEdisplay = $RS_PHONEdisplay;} } +if (!isset($MONITORdisplay)) + { + if (!isset($RS_MONITORdisplay)) {$MONITORdisplay=0;} + else {$MONITORdisplay = $RS_MONITORdisplay;} + } if (!isset($CUSTPHONEdisplay)) { if (!isset($RS_CUSTPHONEdisplay)) {$CUSTPHONEdisplay=0;} @@ -378,6 +386,7 @@ $orderby = preg_replace('/[^-_0-9a-zA-Z]/', '', $orderby); $SERVdisplay = preg_replace('/[^-_0-9a-zA-Z]/', '', $SERVdisplay); $CALLSdisplay = preg_replace('/[^-_0-9a-zA-Z]/', '', $CALLSdisplay); $PHONEdisplay = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHONEdisplay); +$MONITORdisplay = preg_replace('/[^-_0-9a-zA-Z]/', '', $MONITORdisplay); $CUSTPHONEdisplay = preg_replace('/[^-_0-9a-zA-Z]/', '', $CUSTPHONEdisplay); $CUSTINFOdisplay = preg_replace('/[^-_0-9a-zA-Z]/', '', $CUSTINFOdisplay); if ($CUSTINFOdisplay==1) {$CUSTPHONEdisplay=0;} # only one of these should be on at one time @@ -1408,6 +1417,7 @@ var orderby = ''; var SERVdisplay = ''; var CALLSdisplay = ''; var PHONEdisplay = ''; +var MONITORdisplay = ''; var CUSTPHONEdisplay = ''; var CUSTINFOdisplay = ''; var with_inbound = ''; @@ -1715,7 +1725,7 @@ function gather_realtime_content() } if (xmlhttp) { - RTupdate_query = "RTajax=1&DB=" + DB + "" + groupQS + usergroupQS + ingroupQS + "&adastats=" + adastats + "&SIPmonitorLINK=" + SIPmonitorLINK + "&IAXmonitorLINK=" + IAXmonitorLINK + "&usergroup=" + usergroup + "&UGdisplay=" + UGdisplay + "&UidORname=" + UidORname + "&orderby=" + orderby + "&SERVdisplay=" + SERVdisplay + "&CALLSdisplay=" + CALLSdisplay + "&PHONEdisplay=" + PHONEdisplay + "&CUSTPHONEdisplay=" + CUSTPHONEdisplay + "&CUSTINFOdisplay=" + CUSTINFOdisplay + "&with_inbound=" + with_inbound + "&monitor_active=" + monitor_active + "&monitor_phone=" + monitor_phone + "&ALLINGROUPstats=" + ALLINGROUPstats + "&DROPINGROUPstats=" + DROPINGROUPstats + "&NOLEADSalert=" + NOLEADSalert + "&ShowCustPhoneCode=" + ShowCustPhoneCode + "&CARRIERstats=" + CARRIERstats + "&PRESETstats=" + PRESETstats + "&AGENTtimeSTATS=" + AGENTtimeSTATS + "&AGENTlatency=" + AGENTlatency + "&parkSTATS=" + parkSTATS + "&SLAinSTATS=" + SLAinSTATS + "&INGROUPcolorOVERRIDE=" + INGROUPcolorOVERRIDE + "&droppedOFtotal=" + droppedOFtotal + "&report_display_type=" + report_display_type + ""; + RTupdate_query = "RTajax=1&DB=" + DB + "" + groupQS + usergroupQS + ingroupQS + "&adastats=" + adastats + "&SIPmonitorLINK=" + SIPmonitorLINK + "&IAXmonitorLINK=" + IAXmonitorLINK + "&usergroup=" + usergroup + "&UGdisplay=" + UGdisplay + "&UidORname=" + UidORname + "&orderby=" + orderby + "&SERVdisplay=" + SERVdisplay + "&CALLSdisplay=" + CALLSdisplay + "&PHONEdisplay=" + PHONEdisplay + "&MONITORdisplay=" + MONITORdisplay + "&CUSTPHONEdisplay=" + CUSTPHONEdisplay + "&CUSTINFOdisplay=" + CUSTINFOdisplay + "&with_inbound=" + with_inbound + "&monitor_active=" + monitor_active + "&monitor_phone=" + monitor_phone + "&ALLINGROUPstats=" + ALLINGROUPstats + "&DROPINGROUPstats=" + DROPINGROUPstats + "&NOLEADSalert=" + NOLEADSalert + "&ShowCustPhoneCode=" + ShowCustPhoneCode + "&CARRIERstats=" + CARRIERstats + "&PRESETstats=" + PRESETstats + "&AGENTtimeSTATS=" + AGENTtimeSTATS + "&AGENTlatency=" + AGENTlatency + "&parkSTATS=" + parkSTATS + "&SLAinSTATS=" + SLAinSTATS + "&INGROUPcolorOVERRIDE=" + INGROUPcolorOVERRIDE + "&droppedOFtotal=" + droppedOFtotal + "&report_display_type=" + report_display_type + ""; xmlhttp.open('POST', 'AST_timeonVDADall.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -1805,6 +1815,11 @@ function update_variables(task_option,task_choice,force_reload) if (PHONEdisplay == '1') {PHONEdisplay='0'; document.getElementById("PHONEdisplayTXT").innerHTML = "";} else {PHONEdisplay='1'; document.getElementById("PHONEdisplayTXT").innerHTML = "";} } + if (task_option == 'MONITORdisplay') + { + if (MONITORdisplay == '1') {MONITORdisplay='0'; document.getElementById("MONITORdisplayTXT").innerHTML = "";} + else {MONITORdisplay='1'; document.getElementById("MONITORdisplayTXT").innerHTML = "";} + } if (task_option == 'CUSTPHONEdisplay') { if (CUSTPHONEdisplay == '1') @@ -1948,7 +1963,7 @@ function update_variables(task_option,task_choice,force_reload) // force a reload if the phone is changed if ( (temp_monitor_phone != monitor_phone) || (force_reload=='YES') ) { - reload_url = PHP_SELF + "?RR=" + RR + "&DB=" + DB + "" + groupQS + usergroupQS + ingroupQS + "&adastats=" + adastats + "&SIPmonitorLINK=" + SIPmonitorLINK + "&IAXmonitorLINK=" + IAXmonitorLINK + "&usergroup=" + usergroup + "&UGdisplay=" + UGdisplay + "&UidORname=" + UidORname + "&orderby=" + orderby + "&SERVdisplay=" + SERVdisplay + "&CALLSdisplay=" + CALLSdisplay + "&PHONEdisplay=" + PHONEdisplay + "&CUSTPHONEdisplay=" + CUSTPHONEdisplay + "&with_inbound=" + with_inbound + "&monitor_active=" + monitor_active + "&monitor_phone=" + temp_monitor_phone + "&ALLINGROUPstats=" + ALLINGROUPstats + "&DROPINGROUPstats=" + DROPINGROUPstats + "&NOLEADSalert=" + NOLEADSalert + "&ShowCustPhoneCode=" + ShowCustPhoneCode + "&CARRIERstats=" + CARRIERstats + "&PRESETstats=" + PRESETstats + "&AGENTtimeSTATS=" + AGENTtimeSTATS + "&AGENTlatency=" + AGENTlatency + "&parkSTATS=" + parkSTATS + "&SLAinSTATS=" + SLAinSTATS + "&INGROUPcolorOVERRIDE=" + INGROUPcolorOVERRIDE + "&droppedOFtotal=" + droppedOFtotal + "&report_display_type=" + report_display_type + ""; + reload_url = PHP_SELF + "?RR=" + RR + "&DB=" + DB + "" + groupQS + usergroupQS + ingroupQS + "&adastats=" + adastats + "&SIPmonitorLINK=" + SIPmonitorLINK + "&IAXmonitorLINK=" + IAXmonitorLINK + "&usergroup=" + usergroup + "&UGdisplay=" + UGdisplay + "&UidORname=" + UidORname + "&orderby=" + orderby + "&SERVdisplay=" + SERVdisplay + "&CALLSdisplay=" + CALLSdisplay + "&PHONEdisplay=" + PHONEdisplay + "&MONITORdisplay=" + MONITORdisplay + "&CUSTPHONEdisplay=" + CUSTPHONEdisplay + "&with_inbound=" + with_inbound + "&monitor_active=" + monitor_active + "&monitor_phone=" + temp_monitor_phone + "&ALLINGROUPstats=" + ALLINGROUPstats + "&DROPINGROUPstats=" + DROPINGROUPstats + "&NOLEADSalert=" + NOLEADSalert + "&ShowCustPhoneCode=" + ShowCustPhoneCode + "&CARRIERstats=" + CARRIERstats + "&PRESETstats=" + PRESETstats + "&AGENTtimeSTATS=" + AGENTtimeSTATS + "&AGENTlatency=" + AGENTlatency + "&parkSTATS=" + parkSTATS + "&SLAinSTATS=" + SLAinSTATS + "&INGROUPcolorOVERRIDE=" + INGROUPcolorOVERRIDE + "&droppedOFtotal=" + droppedOFtotal + "&report_display_type=" + report_display_type + ""; // alert('|' + temp_monitor_phone + '|' + monitor_phone + '|\n' + reload_url); window.location.href = reload_url; @@ -2207,11 +2222,14 @@ if (!preg_match("/WALL|LIMITED/",$report_display_type)) {echo "       "._QXZ("HIDE PHONES")."";} else {echo "       "._QXZ("SHOW PHONES")."";} + if ($MONITORdisplay>0) + {echo "       "._QXZ("HIDE MONITORS")."";} + else + {echo "       "._QXZ("SHOW MONITORS")."";} if ($CUSTPHONEdisplay>0) {echo "       "._QXZ("HIDE CUSTPHONES")."";} else {echo "       "._QXZ("SHOW CUSTPHONES")."";} - if ($LOGuser_level >= $CUSTINFOminUL) { if ($CUSTINFOdisplay>0)