diff --git a/docs/AGENT_API.txt b/docs/AGENT_API.txt
index 1c0fd7e8..ce25e3f7 100644
--- a/docs/AGENT_API.txt
+++ b/docs/AGENT_API.txt
@@ -451,7 +451,7 @@ LEAD DATA (must populate at least one)
vendor_lead_code
rank
owner
-OPTIONAL NON-LEAD TRIGGERS -
+OPTIONAL NON-LEAD TRIGGERS (these still require a lead to be on the agent screen) -
formreload
scriptreload
script2reload
diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql
index b238c2f1..322a8c47 100644
--- a/extras/MySQL_AST_CREATE_tables.sql
+++ b/extras/MySQL_AST_CREATE_tables.sql
@@ -2020,7 +2020,8 @@ agent_notifications ENUM('0','1','2','3','4','5','6','7') default '0',
demographic_quotas ENUM('0','1','2','3','4','5','6','7') default '0',
log_latency_gaps ENUM('0','1','2','3','4','5','6','7') default '1',
inbound_credits ENUM('0','1','2','3','4','5','6','7') default '0',
-weekday_resets ENUM('0','1','2','3','4','5','6','7') default '0'
+weekday_resets ENUM('0','1','2','3','4','5','6','7') default '0',
+two_factor_auth_agent_hours SMALLINT(5) default '0'
) ENGINE=MyISAM;
CREATE TABLE vicidial_campaigns_list_mix (
@@ -5441,4 +5442,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='1697',db_schema_update_date=NOW(),reload_timestamp=NOW();
+UPDATE system_settings SET db_schema_version='1698',db_schema_update_date=NOW(),reload_timestamp=NOW();
diff --git a/extras/upgrade_2.14.sql b/extras/upgrade_2.14.sql
index 7f11ad7d..3a02ace4 100644
--- a/extras/upgrade_2.14.sql
+++ b/extras/upgrade_2.14.sql
@@ -2427,3 +2427,7 @@ ALTER TABLE phones MODIFY conf_secret VARCHAR(100) default 'test';
ALTER TABLE servers MODIFY conf_secret VARCHAR(100) default 'test';
UPDATE system_settings SET db_schema_version='1697',db_schema_update_date=NOW() where db_schema_version < 1697;
+
+ALTER TABLE system_settings ADD two_factor_auth_agent_hours SMALLINT(5) default '0';
+
+UPDATE system_settings SET db_schema_version='1698',db_schema_update_date=NOW() where db_schema_version < 1698;
diff --git a/www/agc/css/style.css b/www/agc/css/style.css
index bbe14745..4e3ff056 100644
--- a/www/agc/css/style.css
+++ b/www/agc/css/style.css
@@ -35,6 +35,12 @@ div.text_input { overflow: auto; font-size: 10px; font-family: sans-serif; }
animation: blink .75s linear infinite;
}
+.adminmenu_style_selected
+ {
+ background-color: white;
+ }
+.adminmenu_style_selected:hover{background-color: #E6E6E6;}
+
@-webkit-keyframes blink {
0% { opacity: 1; }
50% { opacity: 1; }
diff --git a/www/agc/images/2FA_icon.png b/www/agc/images/2FA_icon.png
new file mode 100644
index 00000000..c77b11d3
Binary files /dev/null and b/www/agc/images/2FA_icon.png differ
diff --git a/www/agc/images/2FA_icon_white.png b/www/agc/images/2FA_icon_white.png
new file mode 100644
index 00000000..d2ce1f27
Binary files /dev/null and b/www/agc/images/2FA_icon_white.png differ
diff --git a/www/agc/images/icon_black_inbound.png b/www/agc/images/icon_black_inbound.png
new file mode 100644
index 00000000..5674f91b
Binary files /dev/null and b/www/agc/images/icon_black_inbound.png differ
diff --git a/www/agc/images/icon_chat.png b/www/agc/images/icon_chat.png
new file mode 100644
index 00000000..a5ba95b0
Binary files /dev/null and b/www/agc/images/icon_chat.png differ
diff --git a/www/agc/images/icon_email.png b/www/agc/images/icon_email.png
new file mode 100644
index 00000000..2f36041c
Binary files /dev/null and b/www/agc/images/icon_email.png differ
diff --git a/www/agc/options-example.php b/www/agc/options-example.php
index db2baa6e..7a04c3be 100644
--- a/www/agc/options-example.php
+++ b/www/agc/options-example.php
@@ -28,6 +28,7 @@
# 230418-1008 - Added astguiclient_disabled option
# 230418-1548 - Added dial_override_limit option
# 230617-0815 - Added dead_logging_version option
+# 231109-0830 - Changed link_to_grey_version to disabled by default
#
$conf_silent_prefix = '5'; # vicidial_conferences prefix to enter silently and muted for recording
@@ -63,7 +64,7 @@ $conf_check_attempts = '3'; # number of attempts to try before loosing webserver
$focus_blur_enabled = '0'; # set to 1 to enable the focus/blur enter key blocking(some IE instances have issues)
$consult_custom_delay = '2'; # number of seconds to delay consultative transfers when custom fields are active
$mrglock_ig_select_ct = '4'; # number of seconds to leave in-group select screen open if agent select is disabled
-$link_to_grey_version = '1'; # show link to old grey version of agent screen at login screen, next to timeclock link
+$link_to_grey_version = '0'; # show link to old grey version of agent screen at login screen, next to timeclock link
$use_agent_colors = '1'; # agent chat colors
$no_empty_session_warnings=0; # set to 1 to disable empty session warnings on agent screen
$logged_in_refresh_link = '0'; # set to 1 to allow clickable "Logged in as..." link at top to force Javascript refresh
diff --git a/www/agc/vdc_db_query.php b/www/agc/vdc_db_query.php
index bfd7a0f5..d7302e51 100644
--- a/www/agc/vdc_db_query.php
+++ b/www/agc/vdc_db_query.php
@@ -539,10 +539,11 @@
# 230617-1605 - Fix for issue when agent goes ready, one of the fixes from Issue #1473
# 230801-0810 - More useful error output for manDiaLskip
# 230927-2037 - Added agent_search_ingroup_list campaign and agent_search_list ingroup options
+# 231108-0819 - Added several fields to update_settings related to manual dial calls
#
-$version = '2.14-432';
-$build = '230927-2037';
+$version = '2.14-433';
+$build = '231108-0819';
$php_script = 'vdc_db_query.php';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=913;
@@ -2182,7 +2183,7 @@ if ($ACTION == 'update_settings')
##### grab the data from vicidial_campaigns for the campaign
- $stmt="SELECT wrapup_seconds,dead_max,dispo_max,pause_max,dead_max_dispo,dispo_max_dispo,dial_timeout,wrapup_bypass,wrapup_message,wrapup_after_hotkey,manual_dial_timeout,in_man_dial_next_ready_seconds,in_man_dial_next_ready_seconds_override FROM vicidial_campaigns where campaign_id='$campaign' LIMIT 1;";
+ $stmt="SELECT wrapup_seconds,dead_max,dispo_max,pause_max,dead_max_dispo,dispo_max_dispo,dial_timeout,wrapup_bypass,wrapup_message,wrapup_after_hotkey,manual_dial_timeout,in_man_dial_next_ready_seconds,in_man_dial_next_ready_seconds_override,campaign_cid,omit_phone_code,use_internal_dnc,use_campaign_dnc,dial_prefix,manual_dial_prefix,three_way_dial_prefix FROM vicidial_campaigns where campaign_id='$campaign' LIMIT 1;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00594',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
@@ -2203,6 +2204,18 @@ if ($ACTION == 'update_settings')
$manual_dial_timeout = trim("$row[10]");
$in_man_dial_next_ready_seconds = trim("$row[11]");
$in_man_dial_next_ready_seconds_override = trim("$row[12]");
+ $campaign_cid = trim("$row[13]");
+ $omit_phone_code = trim("$row[14]");
+ $use_internal_dnc = trim("$row[15]");
+ $use_campaign_dnc = trim("$row[16]");
+ $dial_prefix = trim("$row[17]");
+ $manual_dial_prefix = trim("$row[18]");
+ $three_way_dial_prefix = trim("$row[19]");
+
+ if (strlen($manual_dial_prefix) < 1)
+ {$manual_dial_prefix = $dial_prefix;}
+ if (strlen($three_way_dial_prefix) < 1)
+ {$three_way_dial_prefix = $dial_prefix;}
}
if ( ($manual_dial_timeout < 1) or (strlen($manual_dial_timeout) < 1) )
@@ -2262,6 +2275,13 @@ if ($ACTION == 'update_settings')
$SettingS_InfO .= "wrapup_after_hotkey: " . $wrapup_after_hotkey . "\n";
$SettingS_InfO .= "manual_dial_timeout: " . $manual_dial_timeout . "\n";
$SettingS_InfO .= "in_man_dial_next_ready_seconds: " . $in_man_dial_next_ready_seconds . "\n";
+ $SettingS_InfO .= "campaign_cid: " . $campaign_cid . "\n";
+ $SettingS_InfO .= "omit_phone_code: " . $omit_phone_code . "\n";
+ $SettingS_InfO .= "use_internal_dnc: " . $use_internal_dnc . "\n";
+ $SettingS_InfO .= "use_campaign_dnc: " . $use_campaign_dnc . "\n";
+ $SettingS_InfO .= "dial_prefix: " . $dial_prefix . "\n";
+ $SettingS_InfO .= "dial_manual_prefix: " . $manual_dial_prefix . "\n";
+ $SettingS_InfO .= "dial_three_way_prefix: " . $three_way_dial_prefix . "\n";
$SettingS_InfO .= "\n";
}
echo $SettingS_InfO;
diff --git a/www/agc/vicidial.php b/www/agc/vicidial.php
index 6ca25488..f49c14a4 100644
--- a/www/agc/vicidial.php
+++ b/www/agc/vicidial.php
@@ -725,10 +725,12 @@
# 230615-0842 - Added dead_stop_recording feature
# 230810-1652 - Added force_per_call_notes campaign setting
# 230927-2036 - Added agent_search_ingroup_list campaign and agent_search_list ingroup options
+# 231108-0820 - Added several fields to update_settings related to manual dial calls
+# 231109-0827 - Added 2FA for agent screen logins
#
-$version = '2.14-692c';
-$build = '230927-2036';
+$version = '2.14-693c';
+$build = '231109-0827';
$php_script = 'vicidial.php';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=103;
@@ -780,6 +782,12 @@ if (isset($_GET["new_pass1"])) {$new_pass1=$_GET["new_pass1"];}
elseif (isset($_POST["new_pass1"])) {$new_pass1=$_POST["new_pass1"];}
if (isset($_GET["new_pass2"])) {$new_pass2=$_GET["new_pass2"];}
elseif (isset($_POST["new_pass2"])) {$new_pass2=$_POST["new_pass2"];}
+if (isset($_GET["stage"])) {$stage=$_GET["stage"];}
+ elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];}
+if (isset($_GET["rank"])) {$rank=$_GET["rank"];}
+ elseif (isset($_POST["rank"])) {$rank=$_POST["rank"];}
+if (isset($_GET["auth_entry"])) {$auth_entry=$_GET["auth_entry"];}
+ elseif (isset($_POST["auth_entry"])) {$auth_entry=$_POST["auth_entry"];}
if (!isset($phone_login))
{
@@ -804,6 +812,9 @@ if (!isset($flag_channels))
$DB=preg_replace("/[^0-9a-z]/","",$DB);
$VD_login = preg_replace('/[^-_0-9\p{L}]/u','',$VD_login);
+$stage = preg_replace('/[^-_0-9\p{L}]/u','',$stage);
+$rank = preg_replace('/[^-_0-9\p{L}]/u','',$rank);
+$auth_entry = preg_replace('/[^-_0-9\p{L}]/u','',$auth_entry);
$forever_stop=0;
@@ -828,7 +839,7 @@ $random = (rand(1000000, 9999999) + 10000000);
#############################################
##### START SYSTEM_SETTINGS AND USER LANGUAGE LOOKUP #####
-$stmt = "SELECT use_non_latin,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,webroot_writable,timeclock_end_of_day,vtiger_url,enable_vtiger_integration,outbound_autodial_active,enable_second_webform,user_territories_active,static_agent_url,custom_fields_enabled,pllb_grouping_limit,qc_features_active,allow_emails,callback_time_24hour,enable_languages,language_method,meetme_enter_login_filename,meetme_enter_leave3way_filename,enable_third_webform,default_language,active_modules,allow_chats,chat_url,default_phone_code,agent_screen_colors,manual_auto_next,agent_xfer_park_3way,admin_web_directory,agent_script,agent_push_events,agent_push_url,agent_logout_link,agentonly_callback_campaign_lock,manual_dial_validation,mute_recordings,enable_second_script,enable_first_webform,recording_buttons,outbound_cid_any,browser_call_alerts,manual_dial_phone_strip,require_password_length,pass_hash_enabled,agent_hidden_sound_seconds,agent_hidden_sound,agent_hidden_sound_volume,agent_screen_timer,agent_hide_hangup,allow_web_debug,max_logged_in_agents,login_kickall,agent_notifications,inbound_credits FROM system_settings;";
+$stmt = "SELECT use_non_latin,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,webroot_writable,timeclock_end_of_day,vtiger_url,enable_vtiger_integration,outbound_autodial_active,enable_second_webform,user_territories_active,static_agent_url,custom_fields_enabled,pllb_grouping_limit,qc_features_active,allow_emails,callback_time_24hour,enable_languages,language_method,meetme_enter_login_filename,meetme_enter_leave3way_filename,enable_third_webform,default_language,active_modules,allow_chats,chat_url,default_phone_code,agent_screen_colors,manual_auto_next,agent_xfer_park_3way,admin_web_directory,agent_script,agent_push_events,agent_push_url,agent_logout_link,agentonly_callback_campaign_lock,manual_dial_validation,mute_recordings,enable_second_script,enable_first_webform,recording_buttons,outbound_cid_any,browser_call_alerts,manual_dial_phone_strip,require_password_length,pass_hash_enabled,agent_hidden_sound_seconds,agent_hidden_sound,agent_hidden_sound_volume,agent_screen_timer,agent_hide_hangup,allow_web_debug,max_logged_in_agents,login_kickall,agent_notifications,inbound_credits,two_factor_auth_agent_hours,two_factor_container FROM system_settings;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01001',$VD_login,$server_ip,$session_name,$one_mysql_log);}
#if ($DB) {echo "$stmt\n";}
@@ -892,6 +903,8 @@ if ($qm_conf_ct > 0)
$SSlogin_kickall = $row[53];
$SSagent_notifications = $row[54];
$SSinbound_credits = $row[55];
+ $SStwo_factor_auth_hours = $row[56];
+ $SStwo_factor_container = $row[57];
if ( ($SSagent_hidden_sound == '---NONE---') or ($SSagent_hidden_sound == '') ) {$SSagent_hidden_sound_seconds=0;}
}
else
@@ -1006,7 +1019,7 @@ $conf_check_attempts = '3'; # number of attempts to try before loosing webserver
$focus_blur_enabled = '0'; # set to 1 to enable the focus/blur enter key blocking(some IE instances have issues)
$consult_custom_delay = '2'; # number of seconds to delay consultative transfers when customfields are active
$mrglock_ig_select_ct = '4'; # number of seconds to leave in-group select screen open if agent select is disabled
-$link_to_grey_version = '1'; # show link to old grey version of agent screen at login screen, next to timeclock link
+$link_to_grey_version = '0'; # show link to old grey version of agent screen at login screen, next to timeclock link
$no_empty_session_warnings=0; # set to 1 to disable empty session warnings on agent screen
$logged_in_refresh_link = '0'; # set to 1 to allow clickable "Logged in as..." link at top to force Javascript refresh
$webphone_call_seconds = '0'; # set to 1 or higher to have the agent phone(if set to webphone) called X seconds after login
@@ -1750,6 +1763,587 @@ else
if($auth>0)
{
+ # check for 2FA being active, and if so, see if there is a non-expired 2FA auth
+ $VALID_2FA=1;
+
+ if ( ($SStwo_factor_auth_hours > 0) and ($SStwo_factor_container != '') and ($SStwo_factor_container != '---DISABLED---') )
+ {
+ $stmt="SELECT count(*) from vicidial_two_factor_auth where user='$VD_login' and auth_stage='1' and auth_exp_date > NOW();";
+ if ($DB) {echo "$stmt\n";}
+ $rslt=mysql_to_mysqli($stmt, $link);
+ if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01XXX',$VD_login,$server_ip,$session_name,$one_mysql_log);}
+ $auth_check_to_print = mysqli_num_rows($rslt);
+ if ($auth_check_to_print < 1)
+ {$VALID_2FA=0;}
+ else
+ {
+ $row=mysqli_fetch_row($rslt);
+ $VALID_2FA = $row[0];
+ }
+ }
+ if ($VALID_2FA < 1)
+ {
+ $subhead_font = "style=\"font-family:HELVETICA;font-size:14;color:BLACK;font-weight:bold;\"";
+
+ echo "
"._QXZ("Two-Factor-Authentication"),"
| \n"; + echo "\n"; + echo "\n"; + echo "$DBoutput"; + echo " |