Added refresh_panel Agent API function
git-svn-id: svn://192.168.202.10@3785 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -835,7 +835,9 @@ OTHER CHANGES:
|
||||
Intervention on phone calls placed out of a campaign. See the
|
||||
HCI_Human_Call_Indicator_screen.txt document for more info.
|
||||
|
||||
237. Added the Daily Phone Number Call Limit System-wide campaign option
|
||||
236. Added the Daily Phone Number Call Limit System-wide campaign option
|
||||
|
||||
237. Added "refresh_panel" Agent API function
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ force_fronter_leave_3way - will send a command to fronter agent to leave-3way ca
|
||||
force_fronter_audio_stop - will send a command to fronter agent session to stop any audio_playback playing on it
|
||||
send_notification - will send text alerts and/or confetti effects to agent interface
|
||||
vm_message - set a custom voicemail message to be played when agent clicks the VM button on the agent screen
|
||||
refresh_panel - refresh one of the panels on the agent script: script, script2, callbacks, etc...
|
||||
|
||||
|
||||
New scripts:
|
||||
@@ -478,6 +479,38 @@ SUCCESS: update_fields lead updated - 6666|1234|87498|vendor_lead_code='1234567'
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
refresh_panel -
|
||||
|
||||
DESCRIPTION:
|
||||
Refresh/Reload/Reset one or more of the panels on the agent script: script, script 2, callbacks, etc...
|
||||
|
||||
VALUES:
|
||||
agent_user -
|
||||
REQUIRED alphanumeric string for agent user
|
||||
|
||||
OPTIONAL PANEL REFRESH TRIGGERS (these still require a lead to be on the agent screen) -
|
||||
formreload
|
||||
scriptreload
|
||||
script2reload
|
||||
emailreload
|
||||
chatreload
|
||||
callbacksreload
|
||||
|
||||
EXAMPLE URLS:
|
||||
http://server/agc/api.php?source=test&user=6666&pass=1234&function=refresh_panel&agent_user=6666&scriptreload=1&script2reload=1&callbacksreload=1
|
||||
http://server/agc/api.php?source=test&user=6666&pass=1234&function=refresh_panel&agent_user=6666&formreload=1
|
||||
|
||||
RESPONSES:
|
||||
ERROR: agent_user not valid - 6666
|
||||
ERROR: agent_user is not logged in - 6666
|
||||
ERROR: no panels have been defined - 6666
|
||||
SUCCESS: refresh_panel request sent - 6666|1234|1|scriptreload,script2reload
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
set_timer_action -
|
||||
|
||||
|
||||
+113
-3
@@ -110,10 +110,11 @@
|
||||
# 230412-0945 - Added send_notification function
|
||||
# 230413-1957 - Fix for send_notification user group permissions
|
||||
# 230519-0731 - Fix for input variable filtering
|
||||
# 231129-1457 - Added refresh_panel function
|
||||
#
|
||||
|
||||
$version = '2.14-75';
|
||||
$build = '230519-0731';
|
||||
$version = '2.14-76';
|
||||
$build = '231129-1457';
|
||||
$php_script = 'api.php';
|
||||
|
||||
$startMS = microtime();
|
||||
@@ -2762,7 +2763,7 @@ if ($function == 'update_fields')
|
||||
if (strlen($agent_user)<1)
|
||||
{
|
||||
$result = _QXZ("ERROR");
|
||||
$result_reason = _QXZ("st_login_log not valid");
|
||||
$result_reason = _QXZ("agent_user not valid");
|
||||
$data = "$agent_user";
|
||||
echo "$result: $result_reason - $data\n";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
@@ -3097,6 +3098,115 @@ if ($function == 'update_fields')
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
### BEGIN - refresh_panel
|
||||
################################################################################
|
||||
if ($function == 'refresh_panel')
|
||||
{
|
||||
if (strlen($agent_user)<1)
|
||||
{
|
||||
$result = _QXZ("ERROR");
|
||||
$result_reason = _QXZ("agent_user not valid");
|
||||
$data = "$agent_user";
|
||||
echo "$result: $result_reason - $data\n";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( (!preg_match("/ $function /",$VUapi_allowed_functions)) and (!preg_match("/ALL_FUNCTIONS/",$VUapi_allowed_functions)) )
|
||||
{
|
||||
$result = _QXZ("ERROR");
|
||||
$result_reason = _QXZ("auth USER DOES NOT HAVE PERMISSION TO USE THIS FUNCTION");
|
||||
echo "$result: $result_reason - $value|$user|$function|$VUuser_group\n";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
exit;
|
||||
}
|
||||
$stmt = "select count(*) from vicidial_live_agents where user='$agent_user';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
if ($row[0] > 0)
|
||||
{
|
||||
$fieldsLISTS='';
|
||||
$agent_update=0;
|
||||
|
||||
if (preg_match('/formreload/i',$query_string))
|
||||
{
|
||||
if ($DB) {echo _QXZ("form reload triggered")."\n";}
|
||||
$fieldsLIST .= "formreload,";
|
||||
$agent_update++;
|
||||
}
|
||||
if (preg_match('/scriptreload/i',$query_string))
|
||||
{
|
||||
if ($DB) {echo _QXZ("script reload triggered")."\n";}
|
||||
$fieldsLIST .= "scriptreload,";
|
||||
$agent_update++;
|
||||
}
|
||||
if (preg_match('/script2reload/i',$query_string))
|
||||
{
|
||||
if ($DB) {echo _QXZ("script 2 reload triggered")."\n";}
|
||||
$fieldsLIST .= "script2reload,";
|
||||
$agent_update++;
|
||||
}
|
||||
if (preg_match('/emailreload/i',$query_string))
|
||||
{
|
||||
if ($DB) {echo _QXZ("email reload triggered")."\n";}
|
||||
$fieldsLIST .= "emailreload,";
|
||||
$agent_update++;
|
||||
}
|
||||
if (preg_match('/chatreload/i',$query_string))
|
||||
{
|
||||
if ($DB) {echo _QXZ("chat reload triggered")."\n";}
|
||||
$fieldsLIST .= "chatreload,";
|
||||
$agent_update++;
|
||||
}
|
||||
if (preg_match('/callbacksreload/i',$query_string))
|
||||
{
|
||||
if ($DB) {echo _QXZ("callbacks reload triggered")."\n";}
|
||||
$fieldsLIST .= "callbacksreload,";
|
||||
$agent_update++;
|
||||
}
|
||||
if ( ($field_set > 0) or ($agent_update > 0) )
|
||||
{
|
||||
$fieldsLIST = preg_replace("/,$/","",$fieldsLIST);
|
||||
|
||||
$affected_rowsVLA=0;
|
||||
$stmt="UPDATE vicidial_live_agents set external_update_fields='1',external_update_fields_data='$fieldsLIST' where user='$agent_user';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$affected_rowsVLA = mysqli_affected_rows($link);
|
||||
|
||||
$result = _QXZ("SUCCESS");
|
||||
$result_reason = _QXZ("refresh_panel request sent");
|
||||
$data = "$user|$agent_user|$affected_rowsVLA|$fieldsLIST|";
|
||||
echo "$result: $result_reason - $data\n";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = _QXZ("ERROR");
|
||||
$result_reason = _QXZ("no panels have been defined");
|
||||
echo "$result: $result_reason - $agent_user\n";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = _QXZ("ERROR");
|
||||
$result_reason = _QXZ("agent_user is not logged in");
|
||||
echo "$result: $result_reason - $agent_user\n";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
}
|
||||
}
|
||||
}
|
||||
################################################################################
|
||||
### END - refresh_panel
|
||||
################################################################################
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
### BEGIN - set_timer_action
|
||||
################################################################################
|
||||
|
||||
@@ -543,10 +543,11 @@
|
||||
# 231115-1851 - Added allow_vlc_lookup options.php setting
|
||||
# 231129-1048 - Added daily_phone_number_call_limit campaign setting
|
||||
# 231129-1403 - Fix for ConfBridge blind monitoring issue #1494
|
||||
# 231129-1541 - Added refresh_panel agent API function
|
||||
#
|
||||
|
||||
$version = '2.14-436';
|
||||
$build = '231129-1403';
|
||||
$version = '2.14-437';
|
||||
$build = '231129-1541';
|
||||
$php_script = 'vdc_db_query.php';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=913;
|
||||
@@ -2149,6 +2150,7 @@ if ($ACTION == 'UpdateFields')
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "NO LEAD\n";
|
||||
echo "ERROR: "._QXZ("no lead info in system:")." $lead_id\n";
|
||||
}
|
||||
}
|
||||
|
||||
+47
-6
@@ -730,10 +730,11 @@
|
||||
# 231115-1618 - Added default_consultative options.php setting
|
||||
# 231129-0952 - Added phone number daily call limits
|
||||
# 231129-1359 - Fix for Dial-In-Group user-group issue #1493
|
||||
# 231129-1540 - Added refresh_panel agent API function
|
||||
#
|
||||
|
||||
$version = '2.14-696c';
|
||||
$build = '231129-1359';
|
||||
$version = '2.14-697c';
|
||||
$build = '231129-1540';
|
||||
$php_script = 'vicidial.php';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=103;
|
||||
@@ -11647,7 +11648,6 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
RefresHScript2('','YES');
|
||||
event_data = event_data + '--- script2reload ';
|
||||
}
|
||||
|
||||
// JOEJ 082812 - new for email feature
|
||||
var regUDemailreload = new RegExp("emailreload,","ig");
|
||||
if (fields_list.match(regUDemailreload))
|
||||
@@ -11655,7 +11655,6 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
EmailContentsLoad();
|
||||
event_data = event_data + '--- emailreload ';
|
||||
}
|
||||
|
||||
// JOEJ 060514 - new for chat feature
|
||||
var regUDchatreload = new RegExp("chatreload,","ig");
|
||||
if (fields_list.match(regUDchatreload))
|
||||
@@ -11712,8 +11711,50 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
}
|
||||
else
|
||||
{
|
||||
alert_box("Update Fields Error!: " + xmlhttp.responseText);
|
||||
button_click_log = button_click_log + "" + SQLdate + "-----UpdateFieldsError---" + xmlhttp.responseText + " " + "|";
|
||||
if (UDresponse_status == 'NO LEAD')
|
||||
{
|
||||
var regUDformreload = new RegExp("formreload,","ig");
|
||||
if (fields_list.match(regUDformreload))
|
||||
{
|
||||
FormContentsLoad();
|
||||
event_data = event_data + '--- formreload ';
|
||||
}
|
||||
var regUDscriptreload = new RegExp("scriptreload,","ig");
|
||||
if (fields_list.match(regUDscriptreload))
|
||||
{
|
||||
RefresHScript('','YES');
|
||||
event_data = event_data + '--- scriptreload ';
|
||||
}
|
||||
var regUDscript2reload = new RegExp("script2reload,","ig");
|
||||
if (fields_list.match(regUDscript2reload))
|
||||
{
|
||||
RefresHScript2('','YES');
|
||||
event_data = event_data + '--- script2reload ';
|
||||
}
|
||||
var regUDemailreload = new RegExp("emailreload,","ig");
|
||||
if (fields_list.match(regUDemailreload))
|
||||
{
|
||||
EmailContentsLoad();
|
||||
event_data = event_data + '--- emailreload ';
|
||||
}
|
||||
var regUDchatreload = new RegExp("chatreload,","ig");
|
||||
if (fields_list.match(regUDchatreload))
|
||||
{
|
||||
CustomerChatContentsLoad();
|
||||
event_data = event_data + '--- chatreload ';
|
||||
}
|
||||
var regUDcallbacksreload = new RegExp("callbacksreload,","ig");
|
||||
if (fields_list.match(regUDcallbacksreload))
|
||||
{
|
||||
CalLBacKsLisTCheck();
|
||||
event_data = event_data + '--- callbacksreload ';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
alert_box("Update Fields Error!: " + xmlhttp.responseText);
|
||||
button_click_log = button_click_log + "" + SQLdate + "-----UpdateFieldsError---" + xmlhttp.responseText + " " + "|";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ $UGreports = 'ALL REPORTS, NONE, Real-Time Main Report, Real-Time Campaign Summa
|
||||
|
||||
$Vtables = 'NONE,log_noanswer,did_agent_log,contact_information';
|
||||
|
||||
$APIfunctions = 'ALL_FUNCTIONS add_group_alias add_lead add_list add_phone add_phone_alias add_user agent_ingroup_info agent_stats_export agent_status audio_playback blind_monitor call_agent callid_info change_ingroups check_phone_number copy_user did_log_export external_add_lead external_dial external_hangup external_pause external_status in_group_status logout moh_list ingroup_list campaigns_list callmenu_list hopper_list call_dispo_report agent_campaigns park_call pause_code preview_dial_action ra_call_control recording recording_lookup send_dtmf server_refresh set_timer_action sounds_list st_get_agent_active_lead st_login_log transfer_conference update_fields update_lead batch_update_lead update_list list_info list_custom_fields update_log_entry update_phone update_phone_alias update_user user_group_status vm_list vm_message webphone_url webserver logged_in_agents update_campaign update_alt_url update_presets add_did update_did lead_field_info lead_all_info lead_callback_info phone_number_log switch_lead ccc_lead_info lead_status_search lead_search lead_dearchive call_status_stats calls_in_queue_count force_fronter_leave_3way force_fronter_audio_stop update_cid_group_entry add_dnc_phone add_fpg_phone send_notification';
|
||||
$APIfunctions = 'ALL_FUNCTIONS add_group_alias add_lead add_list add_phone add_phone_alias add_user agent_ingroup_info agent_stats_export agent_status audio_playback blind_monitor call_agent callid_info change_ingroups check_phone_number copy_user did_log_export external_add_lead external_dial external_hangup external_pause external_status in_group_status logout moh_list ingroup_list campaigns_list callmenu_list hopper_list call_dispo_report agent_campaigns park_call pause_code preview_dial_action ra_call_control recording recording_lookup send_dtmf server_refresh set_timer_action sounds_list st_get_agent_active_lead st_login_log transfer_conference update_fields update_lead batch_update_lead update_list list_info list_custom_fields update_log_entry update_phone update_phone_alias update_user user_group_status vm_list vm_message webphone_url webserver logged_in_agents update_campaign update_alt_url update_presets add_did update_did lead_field_info lead_all_info lead_callback_info phone_number_log switch_lead ccc_lead_info lead_status_search lead_search lead_dearchive call_status_stats calls_in_queue_count force_fronter_leave_3way force_fronter_audio_stop update_cid_group_entry add_dnc_phone add_fpg_phone send_notification refresh_panel';
|
||||
|
||||
$browser_alert_sounds_list = 'bark_dog,beep_double,beep_five,beep_up,bell_double,bell_school,bird,blaster1,blaster2,buzz1,buzz2,cash_register,chat_alert,click_single,click_double,click_quiet,close_encounter,confirmation,ding,droplet,droplet_double,elephant,email_alert,hold_tone,horn_bike,horn_car,horn_car_triple,horn_clown,horn_double,horn_train,meow_cat,scream_wilhelm,silence_quick,siren,slide_down,slide_up,swish,teleport1,teleport2,ticking_two,ticking_four,ticking_six,whip,whistle_up,whistle_two,whistle_three,whoosh,xylophone1,xylophone2,xylophone3,xylophone4,20Hz_tone';
|
||||
|
||||
@@ -6121,12 +6121,13 @@ if ($SSscript_remove_js > 0)
|
||||
# 231115-1636 - Added vm_view_messages_link options.php setting, hopper_hold_inserts system and campaign settings
|
||||
# 231119-1520 - Added hci_enabled user setting
|
||||
# 231129-0936 - Added daily_phone_number_call_limit campaign setting
|
||||
# 231129-1541 - Added refresh_panel Agent API function
|
||||
#
|
||||
|
||||
# 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-902a';
|
||||
$build = '231129-0936';
|
||||
$admin_version = '2.14-903a';
|
||||
$build = '231129-1541';
|
||||
|
||||
$STARTtime = date("U");
|
||||
$SQLdate = date("Y-m-d H:i:s");
|
||||
|
||||
Reference in New Issue
Block a user