diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE
index b56c5522..2fa7f149 100644
--- a/agc_2-X/trunk/UPGRADE
+++ b/agc_2-X/trunk/UPGRADE
@@ -160,6 +160,9 @@ OTHER CHANGES:
34. Added logging of Real-Time report monitoring, and report in Admin Utilities
+35. Added Agent Push Events, allowing for HTTP Push events to be sent on agent
+ screen events. See the AGENT_EVENTS.txt doc for more details.
+
diff --git a/agc_2-X/trunk/docs/AGENT_EVENTS_PUSH.txt b/agc_2-X/trunk/docs/AGENT_EVENTS_PUSH.txt
new file mode 100644
index 00000000..c345f5ab
--- /dev/null
+++ b/agc_2-X/trunk/docs/AGENT_EVENTS_PUSH.txt
@@ -0,0 +1,108 @@
+Agent Events Push 2017-05-31
+
+
+This feature allows for selected events in the VICIdial agent screen to push out event triggers through HTTP requests sent to a URL as defined in the System Settings.
+
+
+
+There are two System Settings configurations that need to be set for Agent Events Push to work:
+
+
+Agent Push Events - This setting will enable the sending of events from agent screens to the URL defined below. Default is 0 for disabled.
+
+Agent Push URL - If Agent Push Events are enabled above, this is the URL that the events will be sent to. The variables that you can use within the URL are --A--user--B--, --A--event--B--, --A--message--B--, --A--lead_id--B--. Since this function uses AJAX, it must reference a local script on the web server. If you want to reference an external web address then you should use the get2post.php script that can be found in the extras directory.
+
+
+
+The "agent_events" function operates through AJAX in the agent screen, and as such it can only access web scripts that are local on the web server. So, if you want to send these HTTP Push events to an external server, you will have to use a script like the get2post.php script that is included in the "extras" directory in the source code and copy it to the "agc" web directory on your webserver. Below is an example of how to populate the System Settings "Agent Push URL" field to use the get2post.php script:
+
+get2post.php?uniqueid=--A--epoch--B--.--A--agent_log_id--B--&type=event&HTTPURLTOPOST=192.168.1.3/agc/vdc_call_url_test.php?user=--A--user--B--&lead_id=--A--lead_id--B--&event=--A--event--B--&message=--A--message--B--
+
+
+The above URL is passing the following fields to the external web script: user, lead_id, event, message
+
+
+
+
+
+Here is a list of the supported events that will be pushed out if you have configured Agent Events Push on your system:
+
+
+logged_in - After the agent screen has finished loading, this event will be triggered. The session ID, server_ip, version, build and script will be attached to this event
+
+logged_out - There are a few different types of logouts, the reason for the logout will be attached to this event
+
+state_ready - When the agent state changes to READY or CLOSER, this event will trigger, the state will be attached to the event
+
+state_paused - When the agent status changes to PAUSED, this event will trigger, the state will be attached to the event
+
+call_dialed - For manual dial calls this will trigger when the call is dialed, the number dialed and number type are attached to this event
+
+call_answered - For auto-dial and inbound calls this is the first trigger event. For manual dial it triggers when Answer signal is received. call_id is attached to event
+
+call_dead - This indicates that the customer line has hung up before the agent clicked to hang up the call
+
+call_script - Triggered when the script tab has loaded
+
+other_answered - Triggers if EMAIL or CHAT is received by the agent, type will be attached to event
+
+agent_hangup - This is when the agent hangs up the call
+
+dispo_screen_open - The dispo screen has been opened and is awaiting the agent action to set a disposition
+
+dispo_set - This is when the agent submits a disposition for the call they jsut finished, a message containing the selected disposition will be attached to this event
+
+3way_start - This indicates that the agent has started a 3way call, where the call is going will be attached to this event
+
+3way_answered - This indicates that the 3way party has answered the call
+
+3way_agent_hangup - This indicates that the agent has clicked to hangup the 3way call
+
+3way_agent_leave - This indicates that the agent has clicked to leave the 3way call and move to a new session
+
+transfer_local_closer - The agent has transferred a call to an In-Group using Local Closer, the in-group transferred to will be attached to the event
+
+transfer_blind - The agent has blind transferred a call, the destination transferred to will be attached to the event
+
+park_started - This indicates that the agent has sent the customer to a park
+
+park_retrieved - This indicates that the agent has received the customer back from park
+
+park_ivr_started - This indicates that the agent has sent the customer to a park IVR
+
+park_ivr_retrieved - This indicates that the agent has received the customer back from a park IVR
+
+agent_alert - These are the small box agent alerts that appear to the agent, the message will be attached to this event. Example is "Dial timed out..."
+
+login_invalid - This agent screen was not opened properly
+
+session_disabled - Another live agent session was open using your user ID. It has been disabled. Click OK to continue to the agent screen
+
+blind_monitor_alert - Blind monitor alerts are enabled in the campaign, and someone is monitoring this agent
+
+manual_dial_open - The Manual Dial screen has been opened
+
+callback_select_open - The Scheduled Callbacks date selection screen has been opened
+
+time_sync - There is a Time Synchronization issue on the system
+
+session_disabled - This agent's session has been disabled
+
+customer_gone - The customer has gone screen has been opened
+
+none_in_session - There is noone in the agent session
+
+transfer_panel_open - The transfer conference panel has been opened
+
+transfer_panel_closed - The transfer conference panel has been closed
+
+ingroup_screen_open - The In-Group selection screen has been opened
+
+territory_screen_open - The Territory selection screen has been opened
+
+contact_search_open - The Contact search screen has been opened
+
+lead_search_open - The lead search screen has been opened
+
+pause_code_open - The pause code selection screen has been opened
+
diff --git a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql
index 6d09817d..6b4d049c 100644
--- a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql
+++ b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql
@@ -1712,7 +1712,9 @@ enable_auto_reports ENUM('1','0') default '0',
enable_pause_code_limits ENUM('1','0') default '0',
enable_drop_lists ENUM('0','1','2') default '0',
allow_ip_lists ENUM('0','1','2') default '0',
-system_ip_blacklist VARCHAR(30) default ''
+system_ip_blacklist VARCHAR(30) default '',
+agent_push_events ENUM('0','1') default '0',
+agent_push_url TEXT
) ENGINE=MyISAM;
CREATE TABLE vicidial_campaigns_list_mix (
@@ -4005,4 +4007,4 @@ UPDATE vicidial_configuration set value='1766' where name='qc_database_version';
UPDATE system_settings set vdc_agent_api_active='1';
-UPDATE system_settings SET db_schema_version='1505',db_schema_update_date=NOW(),reload_timestamp=NOW();
+UPDATE system_settings SET db_schema_version='1506',db_schema_update_date=NOW(),reload_timestamp=NOW();
diff --git a/agc_2-X/trunk/extras/get2post.php b/agc_2-X/trunk/extras/get2post.php
index 4ee03033..1243f296 100644
--- a/agc_2-X/trunk/extras/get2post.php
+++ b/agc_2-X/trunk/extras/get2post.php
@@ -14,20 +14,32 @@
# VARhttp://127.0.0.1/agc/get2post.php?uniqueid=--A--uniqueid--B--&type=start&HTTPSURLTOPOST=127.0.0.1/agc/vdc_call_url_test.php?lead_id=--A--lead_id--B--
# VARhttp://127.0.0.1/agc/get2post.php?uniqueid=--A--uniqueid--B--&type=start&headers=HEADERXYZ---XYZvalue-----HEADERABC---ABCvalue&HTTPURLTOPOST=127.0.0.1/agc/vdc_call_url_test.php?lead_id=--A--lead_id--B--
#
+# Example Agent Events Push URL:
+# get2post.php?uniqueid=--A--epoch--B--.--A--agent_log_id--B--&type=event&HTTPURLTOPOST=192.168.1.3/agc/vdc_call_url_test.php?user=--A--user--B--&lead_id=--A--lead_id--B--&event=--A--event--B--&message=--A--message--B--
+#
# CHANGELOG:
# 160302-1159 - First build of script
# 170324-1218 - Added headers options
# 170418-1257 - Added ability to use some special characters in headers
+# 170531-0925 - Added ability to accept POST query string
#
-$version = '2.14-3';
-$build = '170418-1257';
+$version = '2.14-4';
+$build = '170531-0925';
require("dbconnect_mysqli.php");
require("functions.php");
$query_string = getenv("QUERY_STRING");
$request_uri = getenv("REQUEST_URI");
+$POST_URI = '';
+foreach($_POST as $key=>$value)
+ {$POST_URI .= '&'.$key.'='.$value;}
+if (strlen($POST_URI)>1)
+ {$POST_URI = preg_replace("/^&/",'',$POST_URI);}
+$POST_URI = preg_replace("/'|\"|\\\\/","",$POST_URI);
+if ( (strlen($query_string) < 3) and (strlen($POST_URI) > 2) )
+ {$query_string = $POST_URI;}
if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];}
elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];}
@@ -184,7 +196,7 @@ if (preg_match("/HTTPURLTOPOST=|HTTPSURLTOPOST=/",$query_string))
{print "ERROR: post url is invalid"; exit;}
}
else
- {print "ERROR: post url is not populated"; exit;}
+ {print "ERROR: post url is not populated - " . strlen($query_string); exit;}
#$output = '';
diff --git a/agc_2-X/trunk/extras/upgrade_2.14.sql b/agc_2-X/trunk/extras/upgrade_2.14.sql
index 7389ea56..1c80cfdd 100644
--- a/agc_2-X/trunk/extras/upgrade_2.14.sql
+++ b/agc_2-X/trunk/extras/upgrade_2.14.sql
@@ -262,3 +262,8 @@ index (monitor_start_time)
CREATE TABLE vicidial_rt_monitor_log_archive LIKE vicidial_rt_monitor_log;
UPDATE system_settings SET db_schema_version='1505',db_schema_update_date=NOW() where db_schema_version < 1505;
+
+ALTER TABLE system_settings ADD agent_push_events ENUM('0','1') default '0';
+ALTER TABLE system_settings ADD agent_push_url TEXT;
+
+UPDATE system_settings SET db_schema_version='1506',db_schema_update_date=NOW() where db_schema_version < 1506;
diff --git a/agc_2-X/trunk/extras/vdc_call_url_test.php b/agc_2-X/trunk/extras/vdc_call_url_test.php
index 2adbb702..051b480b 100644
--- a/agc_2-X/trunk/extras/vdc_call_url_test.php
+++ b/agc_2-X/trunk/extras/vdc_call_url_test.php
@@ -11,10 +11,11 @@
# 100113-2023 - Added dispo_name
# 130328-0023 - Converted ereg to preg functions
# 170324-1251 - Added more debug output
+# 170529-2239 - Added event/message
#
-$version = '2.14-4';
-$build = '170324-1251';
+$version = '2.14-5';
+$build = '170529-2239';
require("dbconnect.php");
@@ -155,6 +156,10 @@ if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];}
elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];}
if (isset($_GET["dispo_name"])) {$dispo_name=$_GET["dispo_name"];}
elseif (isset($_POST["dispo_name"])) {$dispo_name=$_POST["dispo_name"];}
+if (isset($_GET["event"])) {$event=$_GET["event"];}
+ elseif (isset($_POST["event"])) {$event=$_POST["event"];}
+if (isset($_GET["message"])) {$message=$_GET["message"];}
+ elseif (isset($_POST["message"])) {$message=$_POST["message"];}
header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
@@ -293,6 +298,8 @@ $output .= "$talk_time|";
$output .= "$talk_time_min|";
$output .= "$agent_log_id|";
$output .= "$dispo_name|";
+$output .= "$event|";
+$output .= "$message|";
echo "$output\n$query_string\n";
diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php
index e08e80d1..68c778fb 100644
--- a/agc_2-X/trunk/www/agc/vicidial.php
+++ b/agc_2-X/trunk/www/agc/vicidial.php
@@ -553,10 +553,11 @@
# 170429-0851 - Added callback_display_days option
# 170430-1005 - Added three_way_record_stop and hangup_xfer_record_start campaign options
# 170513-1527 - Added debug logging of all alert boxes
+# 170531-0937 - Added Agent Events Push function
#
-$version = '2.14-523c';
-$build = '170513-1527';
+$version = '2.14-524c';
+$build = '170531-0937';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=87;
$one_mysql_log=0;
@@ -655,7 +656,7 @@ if ($sl_ct > 0)
#############################################
##### START SYSTEM_SETTINGS 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 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 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";}
@@ -695,6 +696,8 @@ if ($qm_conf_ct > 0)
$SSagent_xfer_park_3way = $row[29];
$admin_web_directory = $row[30];
$SSagent_script = $row[31];
+ $agent_push_events = $row[32];
+ $agent_push_url = $row[33];
}
else
{
@@ -4527,6 +4530,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var three_way_record_stop='';
var hangup_xfer_record_start='';
var hangup_both=0;
+ var agent_push_events='';
+ var agent_push_url='';
+ var version='';
+ var build='';
+ var script_name='';
+ var transfer_panel_open=0;
var DiaLControl_auto_HTML = "\" border=\"0\" alt=\"You are paused\" />";
var DiaLControl_auto_HTML_ready = "
\" border=\"0\" alt=\"You are active\" />";
var DiaLControl_auto_HTML_OFF = "
\" border=\"0\" alt=\"pause button disabled\" />";
@@ -4919,6 +4928,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// dialedcall_send_hangup();
// }
+ agent_events('3way_agent_leave', '');
+
if( document.images ) { document.images['livecall'].src = image_livecall_OFF.src;}
}
@@ -5013,6 +5024,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (SMDclick=='YES')
{button_click_log = button_click_log + "" + SQLdate + "-----SendManualDial---" + taskFromConf + " " + agent_dialed_type + " " + manual_string + " " + three_way_call_cid + " " + threeway_cid + " " + dial_conf_exten + " " + sending_preset_name + " ";}
+ agent_events('3way_start', agent_dialed_type + ' ' + manual_string);
+
if (taskFromConf == 'YES')
{
// give extra time for custom fields to commit before consultative transfers
@@ -5431,17 +5444,20 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
button_click_log = button_click_log + "" + SQLdate + "-----agent_disabled---" + AGLogiN + " " + vicidial_agent_disable + "|";
showDiv('AgenTDisablEBoX');
refresh_interval = 7300000;
+ agent_events('session_disabled', 'LIVE_AGENT');
}
if ( (AGLogiN == 'DEAD_EXTERNAL') && ( (vicidial_agent_disable == 'EXTERNAL') || (vicidial_agent_disable == 'ALL') ) )
{
button_click_log = button_click_log + "" + SQLdate + "-----agent_disabled---" + AGLogiN + " " + vicidial_agent_disable + "|";
showDiv('AgenTDisablEBoX');
refresh_interval = 7300000;
+ agent_events('session_disabled', 'DEAD_EXTERNAL');
}
if ( (AGLogiN == 'TIME_SYNC') && (vicidial_agent_disable == 'ALL') )
{
button_click_log = button_click_log + "" + SQLdate + "-----system_disabled---" + AGLogiN + " " + vicidial_agent_disable + "|";
showDiv('SysteMDisablEBoX');
+ agent_events('time_sync', '');
}
if (AGLogiN == 'SHIFT_LOGOUT')
{
@@ -5830,12 +5846,14 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
{
if (CheckDEADcallON < 1)
{
+ agent_events('call_dead', LasTCID);
+
if( document.images )
{ document.images['livecall'].src = image_livecall_DEAD.src;}
CheckDEADcallON=1;
CheckDEADcallCOUNT++;
customer_sec = VD_live_call_secondS;
- button_click_log = button_click_log + "" + SQLdate + "-----dead_call---" + customer_sec + " " + lastcustchannel + " " + lastcustserverip + " " + CalLCID + "|";
+ button_click_log = button_click_log + "" + SQLdate + "-----dead_call---" + customer_sec + " " + lastcustchannel + " " + lastcustserverip + " " + LasTCID + "|";
if ( (xfer_in_call > 0) && (customer_3way_hangup_logging=='ENABLED') )
{
@@ -5852,12 +5870,14 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
{
if (CheckDEADcallON < 1)
{
+ agent_events('call_dead', LasTCID);
+
if( document.images )
{ document.images['livecall'].src = image_livechat_DEAD.src;}
CheckDEADcallON=1;
CheckDEADcallCOUNT++;
customer_sec = VD_live_call_secondS;
- button_click_log = button_click_log + "" + SQLdate + "-----dead_call---" + customer_sec + " " + lastcustchannel + " " + lastcustserverip + " " + CalLCID + "|";
+ button_click_log = button_click_log + "" + SQLdate + "-----dead_call---" + customer_sec + " " + lastcustchannel + " " + lastcustserverip + " " + LasTCID + "|";
}
}
if (InGroupChange > 0)
@@ -6302,6 +6322,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
{redirectvalue = lastcustchannel}
if ( (taskvar == 'XfeRBLIND') || (taskvar == 'XfeRVMAIL') )
{
+ var temp_blind_dialstring='';
if (tasklockedquick > 0)
{document.vicidial_form.xfernumber.value = quick_transfer_button_orig;}
var queryCID = "XBvdcW" + epoch_sec + user_abb;
@@ -6349,6 +6370,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
{
var blindxferdialstring = campaign_am_message_exten + '*' + campaign + '*' + document.vicidial_form.phone_code.value + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value;
no_delete_VDAC=1;
+ temp_blind_dialstring = 'vmail';
}
if (blindxferdialstring.length<'1')
{
@@ -6360,6 +6382,10 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
else
{
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + blindxfercontext + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id + "&nodeletevdac=" + no_delete_VDAC + "&preset_name=" + document.vicidial_form.xfername.value + "&CalLCID=" + CalLCID + "&customerparked=" + customerparked;
+
+ if (temp_blind_dialstring != 'vmail')
+ {temp_blind_dialstring = blindxferdialstring;}
+ agent_events('transfer_blind', temp_blind_dialstring);
}
}
if (taskvar == 'XfeRINTERNAL')
@@ -6389,18 +6415,24 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id + "&CalLCID=" + CalLCID + "&customerparked=" + customerparked;
+
+ agent_events('transfer_local_closer', XfeR_GrouP);
}
if (taskvar == 'XfeR')
{
var queryCID = "LRvdcW" + epoch_sec + user_abb;
var redirectdestination = document.vicidial_form.extension_xfer.value;
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id + "&CalLCID=" + CalLCID + "&customerparked=" + customerparked;
+
+ agent_events('transfer_blind', redirectdestination);
}
if (taskvar == 'VMAIL')
{
var queryCID = "LVvdcW" + epoch_sec + user_abb;
var redirectdestination = document.vicidial_form.extension_xfer.value;
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id + "&CalLCID=" + CalLCID + "&customerparked=" + customerparked;
+
+ agent_events('transfer_vmail', redirectdestination);
}
if (taskvar == 'ENTRY')
{
@@ -6454,6 +6486,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
}
customerparked=1;
customerparkedcounter=0;
+
+ agent_events('park_started', '');
}
if (taskvar == 'FROMParK')
{
@@ -6481,6 +6515,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
}
customerparked=0;
customerparkedcounter=0;
+
+ agent_events('park_retrieved', '');
}
if (taskvar == 'ParKivr')
{
@@ -6502,6 +6538,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
}
customerparked=1;
customerparkedcounter=0;
+
+ agent_events('park_ivr_started', '');
}
if (taskvar == 'FROMParKivr')
{
@@ -6529,6 +6567,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
}
customerparked=0;
customerparkedcounter=0;
+
+ agent_events('park_ivr_retrieved', '');
}
if (taskvar == 'ParKXfeR')
@@ -7207,6 +7247,10 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
var ABtop='50px';
var ABleft='5px';
}
+ else
+ {
+ agent_events('agent_alert', temp_message);
+ }
document.getElementById("AlertBox").style.top = ABtop;
document.getElementById("AlertBox").style.left = ABleft;
@@ -7380,6 +7424,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
}
showDiv('NeWManuaLDiaLBox');
+ agent_events('manual_dial_open', '');
+
document.vicidial_form.search_phone_number.value='';
document.vicidial_form.search_lead_id.value='';
document.vicidial_form.search_vendor_lead_code.value='';
@@ -8230,6 +8276,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
xferchannellive=1;
XDcheck = '';
+
+ agent_events('3way_answered', '');
}
}
else
@@ -8253,7 +8301,6 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
else
{
custchannellive=1;
-
document.vicidial_form.uniqueid.value = MDlookResponse_array[0];
document.getElementById("callchannel").innerHTML = MDlookResponse_array[1];
lastcustchannel = MDlookResponse_array[1];
@@ -8372,6 +8419,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
DialLog("start");
custchannellive=1;
+
+ agent_events('call_answered', CIDcheck);
}
}
}
@@ -8721,6 +8770,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
var man_status = "";
}
+ agent_events('call_dialed', mdnPhonENumbeR + " " + agent_dialed_type);
+
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
@@ -9712,6 +9763,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
else
{VDRP_stage = 'READY';}
}
+ agent_events('state_ready', VDRP_stage);
AutoDialReady = 1;
AutoDialWaiting = 1;
if (dial_method == "INBOUND_MAN")
@@ -9728,6 +9780,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
else
{
VDRP_stage = 'PAUSED';
+ agent_events('state_paused', VDRP_stage);
VDRP_stage_seconds=0;
AutoDialReady = 0;
AutoDialWaiting = 0;
@@ -9906,6 +9959,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
{
new_script_content = xmlhttp.responseText;
document.getElementById(script_span).innerHTML = new_script_content;
+ agent_events('call_script', script_span);
}
}
delete xmlhttp;
@@ -10138,6 +10192,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
document.vicidial_form.SecondS.value = 0;
document.getElementById("SecondSDISP").innerHTML = '0';
+ agent_events('call_answered', CalLCID);
+
if (uniqueid_status_display=='ENABLED')
{custom_call_id = " Call ID " + VDIC_data_VDAC[1];}
if (uniqueid_status_display=='ENABLED_PREFIX')
@@ -10740,8 +10796,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
xmlhttprequestcheckother = new XMLHttpRequest();
}
if (xmlhttprequestcheckother)
- {
-
+ {
checkVDAI_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&orig_pass=" + orig_pass + "&campaign=" + campaign + "&ACTION=VDADcheckINCOMINGother" + "&agent_log_id=" + agent_log_id + "&phone_login=" + phone_login + "&agent_email=" + LOGemail + "&conf_exten=" + session_id + "&camp_script=" + campaign_script + '' + "&in_script=" + CalL_ScripT_id + "&customer_server_ip=" + lastcustserverip + "&exten=" + extension + "&original_phone_login=" + original_phone_login + "&phone_pass=" + phone_pass;
if (!manual_chat_override)
@@ -11438,9 +11493,10 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
var dial_display_number = phone_number_format(callnum);
alert(" " + dial_display_number + "\n - " + VDIC_data_VDIG[1] + " " + VDIC_fronter);
}
+ agent_events('other_answered', CalL_AutO_LauncH);
}
- xmlhttprequestcheckother = undefined;
- delete xmlhttprequestcheckother;
+ xmlhttprequestcheckother = undefined;
+ delete xmlhttprequestcheckother;
}
}
}
@@ -11974,6 +12030,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
// alert(xmlhttp.responseText);
// }
+ agent_events('agent_hangup', '');
}
}
process_post_hangup=1;
@@ -12236,6 +12293,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
Nactiveext = null;
Nactiveext = xmlhttp.responseText;
// alert(xmlhttp.responseText);
+
+ agent_events('3way_agent_hangup', '');
}
}
process_post_hangup=1;
@@ -12575,6 +12634,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
PauseCode_HTML = PauseCode_HTML + "
" + Go_BacK_LinK;
document.getElementById("PauseCodeSelectContent").innerHTML = PauseCode_HTML;
+
+ agent_events('pause_code_open', '');
}
}
if (focus_blur_enabled==1)
@@ -12628,6 +12689,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
showDiv('SearcHForMDisplaYBox');
if ( (VD_live_customer_call!=1) || (inOUT=='OUT') )
{WaitingForNextStep=1;}
+ agent_events('lead_search_open', '');
}
}
@@ -12640,6 +12702,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
{button_click_log = button_click_log + "" + SQLdate + "-----generate_contacts_search---|";}
HidEGenDerPulldown();
showDiv('SearcHContactsDisplaYBox');
+ agent_events('contact_search_open', '');
}
@@ -12937,6 +13000,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
}
showDiv('CallBackSelectBox');
+
+ agent_events('callback_select_open', '');
}
else
{
@@ -12990,6 +13055,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
SendURLs(dispo_urls,"dispo");
}
waiting_on_dispo=0;
+
+ agent_events('dispo_set', DispoChoice);
}
}
delete xmlhttp;
@@ -13634,6 +13701,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
{
showDiv('CustomerGoneBox');
+ agent_events('customer_gone', '');
+
document.getElementById("callchannel").innerHTML = '';
document.vicidial_form.callserverip.value = '';
document.getElementById("CustomerGoneChanneL").innerHTML = lastcustchannel;
@@ -13661,6 +13730,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
function NoneInSession()
{
showDiv('NoneInSessionBox');
+ agent_events('none_in_session', '');
document.getElementById("NoneInSessionID").innerHTML = session_id;
WaitingForNextStep=1;
}
@@ -14206,6 +14276,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
}
else
{
+ agent_events('logged_out', tempreason);
+
document.getElementById("LogouTProcess").innerHTML = "
\" height=\"206px\" width=\"206px\" alt=\"\" />";
// document.getElementById("LogouTProcess").innerHTML = "";
var xmlhttp=false;
@@ -15976,6 +16048,90 @@ function phone_number_format(formatphone) {
}
+// ################################################################################
+// Run the Agent Push Events process
+ function agent_events(event_type,event_msg)
+ {
+ if ( (agent_push_events > 0) && (agent_push_url.length > 10) )
+ {
+ button_click_log = button_click_log + "" + SQLdate + "-----AgentEvent---" + event_type + "|";
+ // if (event_type == 'logged_out')
+ // {check_for_conf_calls(session_id, '0');}
+ var xmlhttp=false;
+ /*@cc_on @*/
+ /*@if (@_jscript_version >= 5)
+ // JScript gives us Conditional compilation, we can cope with old IE versions.
+ // and security blocked creation of the objects.
+ try {
+ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
+ } catch (e) {
+ try {
+ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
+ } catch (E) {
+ xmlhttp = false;
+ }
+ }
+ @end @*/
+ if (!xmlhttp && typeof XMLHttpRequest!='undefined')
+ {
+ xmlhttp = new XMLHttpRequest();
+ }
+ if (xmlhttp)
+ {
+ var RGnl = new RegExp("[\\r]\\n","g");
+ var RGtab = new RegExp("\t","g");
+ var RGplus = new RegExp(" |\\t|\\n","g");
+ var regWF = new RegExp("\\`|\\:|\\;|\\#|\\\"|\\{|\\}|\\^|\\$|\\r|\\t|\\n|","ig");
+
+ var temp_agent_push_url = agent_push_url;
+ var SCuser = user;
+ var SCevent = event_type;
+ var SCmessage = event_msg;
+ var SClead_id = document.vicidial_form.lead_id.value;
+ var SCepoch = UnixTime;
+ var SCagent_log_id = agent_log_id;
+ SCuser = SCuser.replace(RGplus,'+');
+ SCevent = SCevent.replace(RGplus,'+');
+ SCmessage = SCmessage.replace(RGplus,'+');
+ SClead_id = SClead_id.replace(RGplus,'+');
+ var RGuser = new RegExp("--A--user--B--","g");
+ var RGevent = new RegExp("--A--event--B--","g");
+ var RGmessage = new RegExp("--A--message--B--","g");
+ var RGlead_id = new RegExp("--A--lead_id--B--","g");
+ var RGepoch = new RegExp("--A--epoch--B--","g");
+ var RGagent_log_id = new RegExp("--A--agent_log_id--B--","g");
+ temp_agent_push_url = temp_agent_push_url.replace(RGuser, SCuser);
+ temp_agent_push_url = temp_agent_push_url.replace(RGevent, SCevent);
+ temp_agent_push_url = temp_agent_push_url.replace(RGmessage, SCmessage);
+ temp_agent_push_url = temp_agent_push_url.replace(RGlead_id, SClead_id);
+ temp_agent_push_url = temp_agent_push_url.replace(RGepoch, SCepoch);
+ temp_agent_push_url = temp_agent_push_url.replace(RGagent_log_id, SCagent_log_id);
+ temp_agent_push_url = temp_agent_push_url.replace(RGplus, '+');
+ temp_agent_push_url = temp_agent_push_url.replace(RGnl, '+');
+ temp_agent_push_url = temp_agent_push_url.replace(RGtab, '+');
+ temp_agent_push_url = temp_agent_push_url.replace(regWF, '');
+
+ var URL_array = temp_agent_push_url.split('?');
+ var agent_push_script = URL_array[0];
+ var agent_push_data = temp_agent_push_url.split(/\?(.+)/)[1];
+
+ xmlhttp.open('POST', agent_push_script);
+ xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
+ xmlhttp.send(agent_push_data);
+ xmlhttp.onreadystatechange = function()
+ {
+ if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
+ {
+ // alert(xmlhttp.responseText);
+ document.getElementById("debugbottomspan").innerHTML = "AGENT EVENT " + xmlhttp.responseText + "| URL: " + agent_push_script + "| DATA: " + agent_push_data;
+ }
+ }
+ delete xmlhttp;
+ }
+ }
+ }
+
+
// ################################################################################
// Refresh the FORM content
function FormContentsLoad(FRMrefresh)
@@ -16110,7 +16266,8 @@ function phone_number_format(formatphone) {
else
{
HidEGenDerPulldown();
- showDiv('CloserSelectBox')
+ showDiv('CloserSelectBox');
+ agent_events('ingroup_screen_open', '');
}
}
}
@@ -16137,7 +16294,8 @@ function phone_number_format(formatphone) {
}
if (move_on == 1)
{
- showDiv('TerritorySelectBox')
+ showDiv('TerritorySelectBox');
+ agent_events('territory_screen_open', '');
}
}
@@ -16611,6 +16769,7 @@ function phone_number_format(formatphone) {
CloserSelectContent_create();
if (VU_agent_choose_ingroups_DV == "MGRLOCK")
{VU_agent_choose_ingroups_skip_count = mrglock_ig_select_ct;}
+ agent_events('ingroup_screen_open', '');
}
else
{
@@ -16632,6 +16791,7 @@ function phone_number_format(formatphone) {
TerritorySelectContent_create();
if (agent_select_territories == "MGRLOCK")
{agent_select_territories_skip_count=4;}
+ agent_events('territory_screen_open', '');
}
else
{
@@ -16742,6 +16902,7 @@ function phone_number_format(formatphone) {
// alert("IFRAME submitting!");
customsubmit_trigger=1;
}
+ agent_events('dispo_screen_open', '');
}
// trigger custom form submit if standard form has already been submitted or 3 seconds have gone by
if (customsubmit_trigger > 0)
@@ -17054,6 +17215,7 @@ function phone_number_format(formatphone) {
{
document.getElementById("blind_monitor_alert_span_contents").innerHTML = blind_monitor_message;
showDiv('blind_monitor_alert_span');
+ agent_events('blind_monitor_alert', '');
}
if ( (blind_monitor_filename.length > 0) && ( (blind_monitor_warning=='AUDIO') || (blind_monitor_warning=='ALERT_AUDIO')|| (blind_monitor_warning=='NOTICE_AUDIO') || (blind_monitor_warning=='ALL') ) )
{
@@ -17334,11 +17496,17 @@ function phone_number_format(formatphone) {
if (check_n==2)
{
hideDiv('LoadingBox');
+ agent_events('logged_in', session_id + ' ' + server_ip + ' ' + version + ' ' + build + ' ' + script_name);
+ if (deactivated_old_session > 0)
+ {agent_events('session_disabled', '');}
+
if (invalid_opener > 0)
{
refresh_interval = 7300000;
logout_stop_timeouts = 1;
showDiv('InvalidOpenerSpan');
+
+ agent_events('login_invalid', '');
}
}
}
@@ -17528,6 +17696,9 @@ function phone_number_format(formatphone) {
{document.getElementById("QuickXfer").innerHTML = "
\" border=\"0\" alt=\"QUICK TRANSFER\" />";}
if (custom_3way_button_transfer_enabled > 0)
{document.getElementById("CustomXfer").innerHTML = "
\" border=\"0\" alt=\"Custom Transfer\" />";}
+
+ agent_events('transfer_panel_open', '');
+ transfer_panel_open=1;
}
else
{
@@ -17551,6 +17722,11 @@ function phone_number_format(formatphone) {
document.getElementById("CustomXfer").innerHTML = "
\" border=\"0\" alt=\"Custom Transfer\" />";
}
}
+ if (transfer_panel_open > 0)
+ {
+ agent_events('transfer_panel_closed', '');
+ transfer_panel_open=0;
+ }
}
if (three_way_call_cid == 'AGENT_CHOOSE')
{
diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php
index 39c00bd4..deb56edb 100644
--- a/agc_2-X/trunk/www/vicidial/admin.php
+++ b/agc_2-X/trunk/www/vicidial/admin.php
@@ -2245,6 +2245,10 @@ if (isset($_GET["three_way_record_stop"])) {$three_way_record_stop=$_GET["thre
elseif (isset($_POST["three_way_record_stop"])) {$three_way_record_stop=$_POST["three_way_record_stop"];}
if (isset($_GET["hangup_xfer_record_start"])) {$hangup_xfer_record_start=$_GET["hangup_xfer_record_start"];}
elseif (isset($_POST["hangup_xfer_record_start"])) {$hangup_xfer_record_start=$_POST["hangup_xfer_record_start"];}
+if (isset($_GET["agent_push_events"])) {$agent_push_events=$_GET["agent_push_events"];}
+ elseif (isset($_POST["agent_push_events"])) {$agent_push_events=$_POST["agent_push_events"];}
+if (isset($_GET["agent_push_url"])) {$agent_push_url=$_GET["agent_push_url"];}
+ elseif (isset($_POST["agent_push_url"])) {$agent_push_url=$_POST["agent_push_url"];}
if (isset($script_id)) {$script_id= strtoupper($script_id);}
@@ -2655,6 +2659,7 @@ if ($non_latin < 1)
$ignore_ip_list = preg_replace('/[^0-9]/','',$ignore_ip_list);
$dl_minutes = preg_replace('/[^0-9]/','',$dl_minutes);
$callback_display_days = preg_replace('/[^0-9]/','',$callback_display_days);
+ $agent_push_events = preg_replace('/[^0-9]/','',$agent_push_events);
$user_new_lead_limit = preg_replace('/[^-0-9]/','',$user_new_lead_limit);
$drop_call_seconds = preg_replace('/[^-0-9]/','',$drop_call_seconds);
@@ -3449,6 +3454,10 @@ if ($non_latin < 1)
$report_url = preg_replace('/;/','',$report_url);
$report_url = preg_replace('/\r|\n/', '',$report_url);
$report_url = preg_replace('/\'/', '',$report_url);
+ $agent_push_url = preg_replace('/\\\\/', '',$agent_push_url);
+ $agent_push_url = preg_replace('/;/','',$agent_push_url);
+ $agent_push_url = preg_replace('/\r|\n/', '',$agent_push_url);
+ $agent_push_url = preg_replace('/\'/', '',$agent_push_url);
### VARIABLES TO BE mysqli_real_escape_string ###
# $web_form_address
@@ -4124,12 +4133,13 @@ else
# 170430-1001 - Added three_way_record_stop and hangup_xfer_record_start campaign settings
# 170516-0632 - Added Real-Time Monitoring Log Report
# 170527-0041 - Added filtering of browser details before logging
+# 170529-2320 - Added agent events push settings
#
# 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-616a';
-$build = '170527-0041';
+$admin_version = '2.14-617a';
+$build = '170529-2320';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -16814,7 +16824,7 @@ if ($ADD==411111111111111)
}
}
- $stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='$vtiger_url',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',enable_tts_integration='$enable_tts_integration',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit',user_territories_active='$user_territories_active',allow_custom_dialplan='$allow_custom_dialplan',enable_second_webform='$enable_second_webform',default_webphone='$default_webphone',default_external_server_ip='$default_external_server_ip',webphone_url='" . mysqli_real_escape_string($link, $webphone_url) . "',enable_agc_dispo_log='$enable_agc_dispo_log',queuemetrics_loginout='$queuemetrics_loginout',callcard_enabled='$callcard_enabled',queuemetrics_callstatus='$queuemetrics_callstatus',default_codecs='$default_codecs',admin_web_directory='$admin_web_directory',label_title='$label_title',label_first_name='$label_first_name',label_middle_initial='$label_middle_initial',label_last_name='$label_last_name',label_address1='$label_address1',label_address2='$label_address2',label_address3='$label_address3',label_city='$label_city',label_state='$label_state',label_province='$label_province',label_postal_code='$label_postal_code',label_vendor_lead_code='$label_vendor_lead_code',label_gender='$label_gender',label_phone_number='$label_phone_number',label_phone_code='$label_phone_code',label_alt_phone='$label_alt_phone',label_security_phrase='$label_security_phrase',label_email='$label_email',label_comments='$label_comments',custom_fields_enabled='$custom_fields_enabled',slave_db_server='$slave_db_server',reports_use_slave_db='$reports_use_slave_db'$custom_reports_slave_SQL,webphone_systemkey='$webphone_systemkey',first_login_trigger='$first_login_trigger',default_phone_registration_password='$default_phone_registration_password',default_phone_login_password='$default_phone_login_password',default_server_password='$default_server_password',admin_modify_refresh='$admin_modify_refresh',nocache_admin='$nocache_admin',generate_cross_server_exten='$generate_cross_server_exten',queuemetrics_addmember_enabled='$queuemetrics_addmember_enabled',queuemetrics_dispo_pause='$queuemetrics_dispo_pause',label_hide_field_logs='$label_hide_field_logs',queuemetrics_pe_phone_append='$queuemetrics_pe_phone_append',test_campaign_calls='$test_campaign_calls',agents_calls_reset='$agents_calls_reset',default_voicemail_timezone='$default_voicemail_timezone',default_local_gmt='$default_local_gmt',noanswer_log='$noanswer_log',alt_log_server_ip='$alt_log_server_ip',alt_log_dbname='$alt_log_dbname',alt_log_login='$alt_log_login',alt_log_pass='$alt_log_pass',tables_use_alt_log_db='$tables_use_alt_log_db',did_agent_log='$did_agent_log',campaign_cid_areacodes_enabled='$campaign_cid_areacodes_enabled',pllb_grouping_limit='$pllb_grouping_limit',did_ra_extensions_enabled='$did_ra_extensions_enabled',expanded_list_stats='$expanded_list_stats',contacts_enabled='$contacts_enabled',call_menu_qualify_enabled='$call_menu_qualify_enabled',admin_list_counts='$admin_list_counts',allow_voicemail_greeting='$allow_voicemail_greeting',queuemetrics_socket='$queuemetrics_socket',queuemetrics_socket_url='$queuemetrics_socket_url',enhanced_disconnect_logging='$enhanced_disconnect_logging',allow_emails='$allow_emails',level_8_disable_add='$level_8_disable_add',queuemetrics_record_hold='$queuemetrics_record_hold',country_code_list_stats='$country_code_list_stats',queuemetrics_pause_type='$queuemetrics_pause_type',frozen_server_call_clear='$frozen_server_call_clear',callback_time_24hour='$callback_time_24hour',enable_languages='$enable_languages',language_method='$language_method',meetme_enter_login_filename='$meetme_enter_login_filename',meetme_enter_leave3way_filename='$meetme_enter_leave3way_filename',enable_did_entry_list_id='$enable_did_entry_list_id',enable_third_webform='$enable_third_webform',allow_chats='$allow_chats',chat_url='$chat_url',chat_timeout='$chat_timeout',agent_debug_logging='$agent_debug_logging',default_language='$default_language',agent_whisper_enabled='$agent_whisper_enabled',user_hide_realtime_enabled='$user_hide_realtime_enabled',usacan_phone_dialcode_fix='$usacan_phone_dialcode_fix',cache_carrier_stats_realtime='$cache_carrier_stats_realtime',log_recording_access='$log_recording_access',report_default_format='$report_default_format',alt_ivr_logging='$alt_ivr_logging',default_phone_code='$default_phone_code',admin_row_click='$admin_row_click',admin_screen_colors='$admin_screen_colors',ofcom_uk_drop_calc='$ofcom_uk_drop_calc',agent_screen_colors='$agent_screen_colors',script_remove_js='$script_remove_js',manual_auto_next='$manual_auto_next',user_new_lead_limit='$user_new_lead_limit',agent_xfer_park_3way='$agent_xfer_park_3way',agent_soundboards='$agent_soundboards',web_loader_phone_length='$web_loader_phone_length',agent_script='$agent_script',agent_chat_screen_colors='$agent_chat_screen_colors',enable_auto_reports='$enable_auto_reports',enable_pause_code_limits='$enable_pause_code_limits',enable_drop_lists='$enable_drop_lists',allow_ip_lists='$allow_ip_lists',system_ip_blacklist='$system_ip_blacklist'$custom_dialplanSQL;";
+ $stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='$vtiger_url',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',enable_tts_integration='$enable_tts_integration',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit',user_territories_active='$user_territories_active',allow_custom_dialplan='$allow_custom_dialplan',enable_second_webform='$enable_second_webform',default_webphone='$default_webphone',default_external_server_ip='$default_external_server_ip',webphone_url='" . mysqli_real_escape_string($link, $webphone_url) . "',enable_agc_dispo_log='$enable_agc_dispo_log',queuemetrics_loginout='$queuemetrics_loginout',callcard_enabled='$callcard_enabled',queuemetrics_callstatus='$queuemetrics_callstatus',default_codecs='$default_codecs',admin_web_directory='$admin_web_directory',label_title='$label_title',label_first_name='$label_first_name',label_middle_initial='$label_middle_initial',label_last_name='$label_last_name',label_address1='$label_address1',label_address2='$label_address2',label_address3='$label_address3',label_city='$label_city',label_state='$label_state',label_province='$label_province',label_postal_code='$label_postal_code',label_vendor_lead_code='$label_vendor_lead_code',label_gender='$label_gender',label_phone_number='$label_phone_number',label_phone_code='$label_phone_code',label_alt_phone='$label_alt_phone',label_security_phrase='$label_security_phrase',label_email='$label_email',label_comments='$label_comments',custom_fields_enabled='$custom_fields_enabled',slave_db_server='$slave_db_server',reports_use_slave_db='$reports_use_slave_db'$custom_reports_slave_SQL,webphone_systemkey='$webphone_systemkey',first_login_trigger='$first_login_trigger',default_phone_registration_password='$default_phone_registration_password',default_phone_login_password='$default_phone_login_password',default_server_password='$default_server_password',admin_modify_refresh='$admin_modify_refresh',nocache_admin='$nocache_admin',generate_cross_server_exten='$generate_cross_server_exten',queuemetrics_addmember_enabled='$queuemetrics_addmember_enabled',queuemetrics_dispo_pause='$queuemetrics_dispo_pause',label_hide_field_logs='$label_hide_field_logs',queuemetrics_pe_phone_append='$queuemetrics_pe_phone_append',test_campaign_calls='$test_campaign_calls',agents_calls_reset='$agents_calls_reset',default_voicemail_timezone='$default_voicemail_timezone',default_local_gmt='$default_local_gmt',noanswer_log='$noanswer_log',alt_log_server_ip='$alt_log_server_ip',alt_log_dbname='$alt_log_dbname',alt_log_login='$alt_log_login',alt_log_pass='$alt_log_pass',tables_use_alt_log_db='$tables_use_alt_log_db',did_agent_log='$did_agent_log',campaign_cid_areacodes_enabled='$campaign_cid_areacodes_enabled',pllb_grouping_limit='$pllb_grouping_limit',did_ra_extensions_enabled='$did_ra_extensions_enabled',expanded_list_stats='$expanded_list_stats',contacts_enabled='$contacts_enabled',call_menu_qualify_enabled='$call_menu_qualify_enabled',admin_list_counts='$admin_list_counts',allow_voicemail_greeting='$allow_voicemail_greeting',queuemetrics_socket='$queuemetrics_socket',queuemetrics_socket_url='$queuemetrics_socket_url',enhanced_disconnect_logging='$enhanced_disconnect_logging',allow_emails='$allow_emails',level_8_disable_add='$level_8_disable_add',queuemetrics_record_hold='$queuemetrics_record_hold',country_code_list_stats='$country_code_list_stats',queuemetrics_pause_type='$queuemetrics_pause_type',frozen_server_call_clear='$frozen_server_call_clear',callback_time_24hour='$callback_time_24hour',enable_languages='$enable_languages',language_method='$language_method',meetme_enter_login_filename='$meetme_enter_login_filename',meetme_enter_leave3way_filename='$meetme_enter_leave3way_filename',enable_did_entry_list_id='$enable_did_entry_list_id',enable_third_webform='$enable_third_webform',allow_chats='$allow_chats',chat_url='$chat_url',chat_timeout='$chat_timeout',agent_debug_logging='$agent_debug_logging',default_language='$default_language',agent_whisper_enabled='$agent_whisper_enabled',user_hide_realtime_enabled='$user_hide_realtime_enabled',usacan_phone_dialcode_fix='$usacan_phone_dialcode_fix',cache_carrier_stats_realtime='$cache_carrier_stats_realtime',log_recording_access='$log_recording_access',report_default_format='$report_default_format',alt_ivr_logging='$alt_ivr_logging',default_phone_code='$default_phone_code',admin_row_click='$admin_row_click',admin_screen_colors='$admin_screen_colors',ofcom_uk_drop_calc='$ofcom_uk_drop_calc',agent_screen_colors='$agent_screen_colors',script_remove_js='$script_remove_js',manual_auto_next='$manual_auto_next',user_new_lead_limit='$user_new_lead_limit',agent_xfer_park_3way='$agent_xfer_park_3way',agent_soundboards='$agent_soundboards',web_loader_phone_length='$web_loader_phone_length',agent_script='$agent_script',agent_chat_screen_colors='$agent_chat_screen_colors',enable_auto_reports='$enable_auto_reports',enable_pause_code_limits='$enable_pause_code_limits',enable_drop_lists='$enable_drop_lists',allow_ip_lists='$allow_ip_lists',system_ip_blacklist='$system_ip_blacklist',agent_push_events='$agent_push_events',agent_push_url='$agent_push_url'$custom_dialplanSQL;";
$rslt=mysql_to_mysqli($stmt, $link);
if ( ($meetme_enter_login_filename != $SSmeetme_enter_login_filename) or ($meetme_enter_leave3way_filename != $SSmeetme_enter_leave3way_filename) )
@@ -34713,7 +34723,7 @@ if ($ADD==311111111111111)
$ALLagent_count = $rowx[2];
}
- $stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url,enable_agc_xfer_log,db_schema_version,auto_user_add_value,timeclock_end_of_day,timeclock_last_reset_date,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,vdc_agent_api_active,qc_last_pull_time,enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url,qc_features_active,outbound_autodial_active,outbound_calls_per_second,enable_tts_integration,agentonly_callback_campaign_lock,sounds_central_control_active,sounds_web_server,sounds_web_directory,active_voicemail_server,auto_dial_limit,user_territories_active,allow_custom_dialplan,db_schema_update_date,enable_second_webform,default_webphone,default_external_server_ip,webphone_url,enable_agc_dispo_log,custom_dialplan_entry,queuemetrics_loginout,callcard_enabled,queuemetrics_callstatus,default_codecs,admin_web_directory,label_title,label_first_name,label_middle_initial,label_last_name,label_address1,label_address2,label_address3,label_city,label_state,label_province,label_postal_code,label_vendor_lead_code,label_gender,label_phone_number,label_phone_code,label_alt_phone,label_security_phrase,label_email,label_comments,custom_fields_enabled,slave_db_server,reports_use_slave_db,webphone_systemkey,first_login_trigger,default_phone_registration_password,default_phone_login_password,default_server_password,admin_modify_refresh,nocache_admin,generate_cross_server_exten,queuemetrics_addmember_enabled,queuemetrics_dispo_pause,label_hide_field_logs,queuemetrics_pe_phone_append,test_campaign_calls,agents_calls_reset,default_voicemail_timezone,default_local_gmt,noanswer_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_agent_log,campaign_cid_areacodes_enabled,pllb_grouping_limit,did_ra_extensions_enabled,expanded_list_stats,contacts_enabled,call_menu_qualify_enabled,admin_list_counts,allow_voicemail_greeting,svn_revision,queuemetrics_socket,queuemetrics_socket_url,enhanced_disconnect_logging,allow_emails,level_8_disable_add,pass_hash_enabled,pass_key,pass_cost,disable_auto_dial,queuemetrics_record_hold,country_code_list_stats,reload_timestamp,queuemetrics_pause_type,frozen_server_call_clear,callback_time_24hour,allow_chats,chat_url,chat_timeout,enable_languages,language_method,meetme_enter_login_filename,meetme_enter_leave3way_filename,enable_did_entry_list_id,enable_third_webform,agent_debug_logging,default_language,agent_whisper_enabled,user_hide_realtime_enabled,usacan_phone_dialcode_fix,cache_carrier_stats_realtime,oldest_logs_date,log_recording_access,report_default_format,alt_ivr_logging,default_phone_code,admin_row_click,admin_screen_colors,ofcom_uk_drop_calc,agent_screen_colors,script_remove_js,manual_auto_next,user_new_lead_limit,agent_xfer_park_3way,rec_prompt_count,agent_soundboards,web_loader_phone_length,agent_script,agent_chat_screen_colors,enable_auto_reports,enable_pause_code_limits,enable_drop_lists,allow_ip_lists,system_ip_blacklist from system_settings;";
+ $stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url,enable_agc_xfer_log,db_schema_version,auto_user_add_value,timeclock_end_of_day,timeclock_last_reset_date,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,vdc_agent_api_active,qc_last_pull_time,enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url,qc_features_active,outbound_autodial_active,outbound_calls_per_second,enable_tts_integration,agentonly_callback_campaign_lock,sounds_central_control_active,sounds_web_server,sounds_web_directory,active_voicemail_server,auto_dial_limit,user_territories_active,allow_custom_dialplan,db_schema_update_date,enable_second_webform,default_webphone,default_external_server_ip,webphone_url,enable_agc_dispo_log,custom_dialplan_entry,queuemetrics_loginout,callcard_enabled,queuemetrics_callstatus,default_codecs,admin_web_directory,label_title,label_first_name,label_middle_initial,label_last_name,label_address1,label_address2,label_address3,label_city,label_state,label_province,label_postal_code,label_vendor_lead_code,label_gender,label_phone_number,label_phone_code,label_alt_phone,label_security_phrase,label_email,label_comments,custom_fields_enabled,slave_db_server,reports_use_slave_db,webphone_systemkey,first_login_trigger,default_phone_registration_password,default_phone_login_password,default_server_password,admin_modify_refresh,nocache_admin,generate_cross_server_exten,queuemetrics_addmember_enabled,queuemetrics_dispo_pause,label_hide_field_logs,queuemetrics_pe_phone_append,test_campaign_calls,agents_calls_reset,default_voicemail_timezone,default_local_gmt,noanswer_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_agent_log,campaign_cid_areacodes_enabled,pllb_grouping_limit,did_ra_extensions_enabled,expanded_list_stats,contacts_enabled,call_menu_qualify_enabled,admin_list_counts,allow_voicemail_greeting,svn_revision,queuemetrics_socket,queuemetrics_socket_url,enhanced_disconnect_logging,allow_emails,level_8_disable_add,pass_hash_enabled,pass_key,pass_cost,disable_auto_dial,queuemetrics_record_hold,country_code_list_stats,reload_timestamp,queuemetrics_pause_type,frozen_server_call_clear,callback_time_24hour,allow_chats,chat_url,chat_timeout,enable_languages,language_method,meetme_enter_login_filename,meetme_enter_leave3way_filename,enable_did_entry_list_id,enable_third_webform,agent_debug_logging,default_language,agent_whisper_enabled,user_hide_realtime_enabled,usacan_phone_dialcode_fix,cache_carrier_stats_realtime,oldest_logs_date,log_recording_access,report_default_format,alt_ivr_logging,default_phone_code,admin_row_click,admin_screen_colors,ofcom_uk_drop_calc,agent_screen_colors,script_remove_js,manual_auto_next,user_new_lead_limit,agent_xfer_park_3way,rec_prompt_count,agent_soundboards,web_loader_phone_length,agent_script,agent_chat_screen_colors,enable_auto_reports,enable_pause_code_limits,enable_drop_lists,allow_ip_lists,system_ip_blacklist,agent_push_events,agent_push_url from system_settings;";
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
$version = $row[0];
@@ -34878,6 +34888,8 @@ if ($ADD==311111111111111)
$enable_drop_lists = $row[159];
$allow_ip_lists = $row[160];
$system_ip_blacklist = $row[161];
+ $agent_push_events = $row[162];
+ $agent_push_url = $row[163];
if ($pass_hash_enabled > 0) {$pass_hash_enabled = 'ENABLED';}
else {$pass_hash_enabled = 'DISABLED';}
@@ -35203,6 +35215,10 @@ if ($ADD==311111111111111)
echo "