diff --git a/docs/WEB_BROWSER_JAVASCRIPT_THROTTLING.txt b/docs/WEB_BROWSER_JAVASCRIPT_THROTTLING.txt
index d0c9e924..e34831d3 100644
--- a/docs/WEB_BROWSER_JAVASCRIPT_THROTTLING.txt
+++ b/docs/WEB_BROWSER_JAVASCRIPT_THROTTLING.txt
@@ -1,4 +1,4 @@
-WEB BROWSER JAVASCRIPT THROTTLING Started: 2021-03-25 Updated: 2023-03-06
+WEB BROWSER JAVASCRIPT THROTTLING Started: 2021-03-25 Updated: 2023-03-07
@@ -32,6 +32,7 @@ Below are the ways you can prevent Chrome's Intensive Javascript Throttling from
3. Use a WebRTC phone for your agent phone connection(like VICIphone)
4. Enable the VICIdial System Settings for "Agent Hidden Browser Sound"
5. Switch the VICIdial System Setting for "Agent Screen Timer" to 'EventSource'
+6. Switch the VICIdial System Setting for "Agent Screen Timer" to 'setTimeoutAudioLoop'
More information on each of the above...
@@ -104,7 +105,7 @@ We have tested the following settings and found them to be effective on all clie
- Set "volume" to '25'
- Set "Agent Hidden Browser Sound Seconds" to '20' (for Chrome builds 110+ may need to set this to '10' or even '5')
-Another option for using this setting without any click sound at all is to use the "20Hz_tone" sound(added in svn/trunk rev. 3693). This audio is inaudible to most people and the file is 5 seconds long, so if you use a 5 second delay it will be constantly playing in the background.
+Another option for using this setting without any click sound at all is to use the "20Hz_tone" sound(added in svn/trunk rev. 3693). This audio is inaudible to most people and the file is 5 seconds long, so if you use a 5 second delay it will be constantly playing in the background. This constantly-playing method also allows you to lower the Hidden Browser Sound "volume" to '1' and still be effective.
Adding this new feature also required us to add Agent Screen Visibility Logging to VICIdial, so you can now also view statistics of how long your agents' screens were visible to them in the Agent Time Detail report and the User Stats report.
@@ -118,6 +119,13 @@ Thanks to 'fperdomo' on the VICIdial Forums for posting a simple method using SS
+6. SWITCH THE VICIDIAL SYSTEM SETTING FOR "AGENT SCREEN TIMER" TO 'setTimeoutAudioLoop'
+
+Thanks to 'martinch' on the VICIdial Issue Tracker for posting a simple method using an HTML audio tag with the 'loop' option to work-around the Chrome JavasScript Throttling issue by playing of a loop of inaudible 20Hz audio while the agent is logged in. After some fine-tuning and testing in different web browsers, we committed this as another option to the System Setting "Agent Screen Timer" feature in the VICIdial codebase in svn/trunk revision 3694. Since this method will currently disable any other HTML audio sounds playing in the same window, it will break "Agent Browser Call Alerts" if they are enabled on your system.
+
+
+
+
THE FUTURE
diff --git a/www/agc/vicidial.php b/www/agc/vicidial.php
index cb172c84..ca47c997 100644
--- a/www/agc/vicidial.php
+++ b/www/agc/vicidial.php
@@ -713,10 +713,11 @@
# 230220-1802 - Fix for In-Group manual dial issue
# 230304-0806 - Fix for AgentHangupCallRoute on ringing calls
# 230306-1335 - Added 20Hz_tone browser sound, Issue #1448
+# 230306-2034 - Added setTimeoutAudioLoop agent_screen_timer option, Issue #1448
#
-$version = '2.14-681c';
-$build = '230306-1335';
+$version = '2.14-682c';
+$build = '230306-2034';
$php_script = 'vicidial.php';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=98;
@@ -6020,6 +6021,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
image_LB_mute_recording_AVAILABLE.src="./images/";
var image_LB_mute_recording_ON = new Image();
image_LB_mute_recording_ON.src="./images/";
+ var set_timeout_audio_loop = false;
0)
@@ -6267,6 +6269,12 @@ function holiday_display(holiday_name)
// Play MP3 audio file upon call arriving in agent screen or agent hiding screen, if enabled in system settings and campaign/in-group
function play_browser_sound(temp_sound,temp_volume)
{
+ // Do not play sounds if the setTimeoutAudioLoop method is active, Issue #1448
+ if (set_timeout_audio_loop == true)
+ {
+ // Exit!
+ return;
+ }
if ( (temp_sound != '---NONE---') && (temp_sound != '---DISABLED---') && (temp_sound != '') )
{
var temp_selected_element = 'BAS_' + temp_sound;
@@ -20914,6 +20922,11 @@ function phone_number_format(formatphone) {
}
0)
+";
+ echo "";
+ }
- 0) or ($SSagent_hidden_sound_seconds > 0) )
{
$bas=0; $bas_embed_output='';
diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php
index ee0aa56f..fcd21041 100644
--- a/www/vicidial/admin.php
+++ b/www/vicidial/admin.php
@@ -5971,12 +5971,13 @@ if ($SSscript_remove_js > 0)
# 230204-1642 - Added No Agent Call URL "ALT" multi-url options
# 230227-1150 - Updated VERM code and notices
# 230306-1336 - Added 20Hz_tone browser sound, Issue #1448
+# 230306-2050 - Added setTimeoutAudioLoop agent_screen_timer option, Issue #1448
#
# 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-875a';
-$build = '230306-1336';
+$admin_version = '2.14-876a';
+$build = '230306-2050';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -43141,6 +43142,8 @@ if ($ADD==311111111111111)
$bav=100;
while ($bav >= 0)
{
+ if ($bav == 0)
+ {echo "";}
echo "";
$bav = ($bav - 5);
}
@@ -43412,7 +43415,7 @@ if ($ADD==311111111111111)
echo "
"._QXZ("Agent Screen Debug Logging").":
$NWB#settings-agent_debug_logging$NWE
\n";
- echo "
"._QXZ("Agent Screen Timer").":
$NWB#settings-agent_screen_timer$NWE
\n";
+ echo "
"._QXZ("Agent Screen Timer").":
$NWB#settings-agent_screen_timer$NWE
\n";
echo "
"._QXZ("Enhanced Disconnect Logging").":
$NWB#settings-enhanced_disconnect_logging$NWE
\n";
diff --git a/www/vicidial/help_documentation.txt b/www/vicidial/help_documentation.txt
index ddd2b14b..4f928378 100644
--- a/www/vicidial/help_documentation.txt
+++ b/www/vicidial/help_documentation.txt
@@ -1,4 +1,4 @@
-# version: 20230306133801
+# version: 20230306204901
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.
@@ -1149,7 +1149,7 @@ settings-enable_drop_lists Enable Drop Lists This setting if enabled will m
settings-source_id_display Admin Lead Source ID Display This setting will make the Source ID lead field show up in the Admin Modify Lead screen. Default is 0 for disabled.
settings-allow_web_debug Allow Web DB Debug This option will allow the DB query string option to be used in most web pages on this system to show debug output. Default is 0 for disabled.
settings-agent_debug_logging Agent Screen Debug Logging This setting if enabled will log almost all agent screen mouse clicks and AJAX processes triggered by the agent screen. To enable for all agents, set this option to 1. To enable only for one agent on the system, set this option to the user that you want to log. Warning, this feature can log hundreds of entries per phone call, so use with caution. These agent debug records are deleted after 7 days. Default is 0 for disabled.
-settings-agent_screen_timer Agent Screen Timer This will select the method of JavaScript timer to be used by the Agent Screen. The original method is setTimeout, which maintains the timer directly in JavaScript. An alternative method is EventSource, which uses a script on the server to trigger the timer. You may want to use EventSource if your agents are using a Chromium-based web browser that has limitations on how native JavaScript timers work, although using this method may possibly cause issues if you have a poor network connection to the server or are on an older network or proxy that does not handle streaming web services well. Default is setTimeout
+settings-agent_screen_timer Agent Screen Timer This will select the method of JavaScript timer to be used by the Agent Screen. The original method is setTimeout, which maintains the timer directly in JavaScript. An alternative method is setTimeoutAudioLoop, which uses the HTML -audio- tag with the -loop- option to play a 20Hz audio sound repeatedly to keep the browser tab active, this method will break Agent Browser Call Alerts if enabled. Another alternative is EventSource, which uses a script on the server to trigger the timer. You may want to use EventSource if your agents are using a Chromium-based web browser that has limitations on how native JavaScript timers work, although using this method may possibly cause issues if you have a poor network connection to the server or are on an older network or proxy that does not handle streaming web services well. Default is setTimeout
settings-enhanced_disconnect_logging Enhanced Disconnect Logging This setting, set to 1, enables logging of calls that get a CONGESTION signal with a cause code of 1, 19, 21, 34 or 38. Setting this to 2 will additionally log calls with cause codes of 18-CHANUNAVAIL and 102. Setting this to 3 will alternatively prevent some temporary error SIP messages on failed calls from sending the lead to ADC status. Instead, the status will be set as HUCXXX where XXX is the hangup_cause code. Eg. HUC18 for Cause 18 (SIP 408 Request timeout). Default is 0 for disabled.
settings-sip_event_logging SIP Event Logging This setting will enable logging of SIP events on outbound phone calls for servers that are running patched versions of Asterisk 13 or higher. Default is 0 for disabled.
settings-cache_carrier_stats_realtime Cached Realtime Carrier Stats This setting if enabled will change the real-time report from gathering the carrier log stats every time it is refreshed on every screen it is running on, to a cached set of carrier log stats that are refreshed once per minute. Default is 0 for disabled.