Added "Agent Call Hangup Route" campaign settings, allowing you to send calls that an agent is finished with to a Call Menu, In-Group or a pre-recorded message before hanging up the call.
NOTE: After upgrading your system, be sure to set each dialer to "Rebuild conf files" = 'Y' for this feature to work properly. Changed year in admin screens to 2023. git-svn-id: svn://192.168.202.10@3672 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -733,6 +733,13 @@ OTHER CHANGES:
|
||||
206. Added "Webphone Settings" option to Phones, allows for more WebRTC config
|
||||
options to be set through a Settings Container.
|
||||
|
||||
207. Added "Agent Call Hangup Route" campaign settings, allowing you to send
|
||||
calls that an agent is finished with to a Call Menu, In-Group or a
|
||||
pre-recorded message before hanging up the call.
|
||||
|
||||
NOTE: After upgrading your system, be sure to set each dialer to
|
||||
"Rebuild conf files" = 'Y' for this feature to work properly.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
# - Auto reset lists at defined times
|
||||
# - Auto restarts Asterisk process if enabled in servers settings
|
||||
#
|
||||
# Copyright (C) 2022 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2023 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGES
|
||||
# 61011-1348 - First build
|
||||
@@ -158,9 +158,10 @@
|
||||
# 220526-1444 - Fix for CID auto-rotate functions
|
||||
# 220921-1255 - Added vicidial_user_logins_daily TEOD population
|
||||
# 221116-1157 - Added vicidial_long_extensions TEOD truncating
|
||||
# 230118-1623 - Added Playback audio then hangup extension
|
||||
#
|
||||
|
||||
$build = '221116-1157';
|
||||
$build = '230118-1623';
|
||||
|
||||
$DB=0; # Debug flag
|
||||
$teodDB=0; # flag to log Timeclock End of Day processes to log file
|
||||
@@ -2970,7 +2971,17 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
|
||||
{$Vext .= "exten => 83047777777777,2,Playback(\${CALLERID(name)})\n";}
|
||||
$Vext .= "exten => 83047777777777,3,Hangup()\n";
|
||||
|
||||
$Vext .= "; This is a loopback dial-around to allow for immediate answer of outbound calls\n";
|
||||
$Vext .= "\n; Playback audio then hangup extension\n";
|
||||
$Vext .= "exten => _83046777777777*.,1,Answer\n";
|
||||
$Vext .= "exten => _83046777777777*.,n,Playback(sip-silence)\n";
|
||||
$Vext .= "exten => _83046777777777*.,n,Playback(sip-silence)\n";
|
||||
$Vext .= "exten => _83046777777777*.,n,Playback(sip-silence)\n";
|
||||
$Vext .= "exten => _83046777777777*.,n,NoOp(Playing \${EXTEN:15})\n";
|
||||
$Vext .= "exten => _83046777777777*.,n,Playback(\${EXTEN:15})\n";
|
||||
$Vext .= "exten => _83046777777777*.,n,Playback(silence)\n";
|
||||
$Vext .= "exten => _83046777777777*.,n,Hangup()\n";
|
||||
|
||||
$Vext .= "\n; This is a loopback dial-around to allow for immediate answer of outbound calls\n";
|
||||
$Vext .= "exten => _8305888888888888.,1,Answer\n";
|
||||
$Vext .= "exten => _8305888888888888.,n,Wait(\${EXTEN:16:1})\n";
|
||||
$Vext .= "exten => _8305888888888888.,n,Dial(\${TRUNKloop}/\${EXTEN:17},,To)\n";
|
||||
|
||||
@@ -1099,7 +1099,10 @@ agent_hide_hangup ENUM('Y','N') default 'N',
|
||||
ig_xfer_list_sort ENUM('GROUP_ID_UP','GROUP_ID_DOWN','GROUP_NAME_UP','GROUP_NAME_DOWN','PRIORITY_UP','PRIORITY_DOWN') default 'GROUP_ID_UP',
|
||||
script_tab_frame_size VARCHAR(10) default 'DEFAULT',
|
||||
max_logged_in_agents SMALLINT(5) UNSIGNED default '0',
|
||||
user_group_script ENUM('DISABLED','ENABLED') default 'DISABLED'
|
||||
user_group_script ENUM('DISABLED','ENABLED') default 'DISABLED',
|
||||
agent_hangup_route ENUM('HANGUP','MESSAGE','EXTENSION','IN_GROUP','CALLMENU') default 'HANGUP',
|
||||
agent_hangup_value TEXT,
|
||||
agent_hangup_ig_override ENUM('Y','N') default 'N'
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_lists (
|
||||
@@ -5193,4 +5196,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='1674',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
UPDATE system_settings SET db_schema_version='1675',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
|
||||
@@ -2094,3 +2094,10 @@ UPDATE system_settings SET db_schema_version='1673',db_schema_update_date=NOW()
|
||||
ALTER TABLE vicidial_inbound_groups MODIFY on_hook_cid VARCHAR(30) default 'CUSTOMER_PHONE_RINGAGENT';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1674',db_schema_update_date=NOW() where db_schema_version < 1674;
|
||||
|
||||
ALTER TABLE vicidial_campaigns ADD agent_hangup_route ENUM('HANGUP','MESSAGE','EXTENSION','IN_GROUP','CALLMENU') default 'HANGUP';
|
||||
ALTER TABLE vicidial_campaigns ADD agent_hangup_value TEXT;
|
||||
ALTER TABLE vicidial_campaigns ADD agent_hangup_ig_override ENUM('Y','N') default 'N';
|
||||
UPDATE vicidial_campaigns SET agent_hangup_value='' where agent_hangup_value IS NULL;
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1675',db_schema_update_date=NOW() where db_schema_version < 1675;
|
||||
|
||||
+93
-12
@@ -708,10 +708,11 @@
|
||||
# 221116-1059 - Fix for long in-group dialstring extensions
|
||||
# 221116-2159 - Fix for recording buttons ALLFORCE issue #1389
|
||||
# 221206-1520 - Added login form multi-submit prevention ($login_submit_once), Added dialRegExten_enabled webphone option
|
||||
#
|
||||
# 230118-0947 - Added agent_hangup_route features
|
||||
#
|
||||
|
||||
$version = '2.14-676c';
|
||||
$build = '221206-1520';
|
||||
$version = '2.14-677c';
|
||||
$build = '230118-0947';
|
||||
$php_script = 'vicidial.php';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=98;
|
||||
@@ -2440,7 +2441,7 @@ else
|
||||
$HKstatusnames = substr("$HKstatusnames", 0, -1);
|
||||
|
||||
##### grab the campaign settings
|
||||
$stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,manual_preview_dial,api_manual_dial,manual_dial_call_time_check,my_callback_option,per_call_notes,agent_lead_search,agent_lead_search_method,queuemetrics_phone_environment,auto_pause_precall,auto_pause_precall_code,auto_resume_precall,manual_dial_cid,custom_3way_button_transfer,callback_days_limit,disable_dispo_screen,disable_dispo_status,screen_labels,status_display_fields,pllb_grouping,pllb_grouping_limit,in_group_dial,in_group_dial_select,pause_after_next_call,owner_populate,manual_dial_lead_id,dead_max,dispo_max,pause_max,dead_max_dispo,dispo_max_dispo,max_inbound_calls,manual_dial_search_checkbox,hide_call_log_info,timer_alt_seconds,wrapup_bypass,wrapup_after_hotkey,callback_active_limit,callback_active_limit_override,comments_all_tabs,comments_dispo_screen,comments_callback_screen,qc_comment_history,show_previous_callback,clear_script,manual_dial_search_filter,web_form_address_three,manual_dial_override_field,status_display_ingroup,customer_gone_seconds,agent_display_fields,manual_dial_timeout,manual_auto_next,manual_auto_show,allow_required_fields,dead_to_dispo,agent_xfer_validation,ready_max_logout,callback_display_days,three_way_record_stop,hangup_xfer_record_start,max_inbound_calls_outcome,manual_auto_next_options,agent_screen_time_display,pause_max_dispo,script_top_dispo,routing_initiated_recordings,dead_trigger_seconds,dead_trigger_action,dead_trigger_repeat,dead_trigger_filename,scheduled_callbacks_force_dial,callback_hours_block,callback_display_days,scheduled_callbacks_timezones_container,three_way_volume_buttons,manual_dial_validation,mute_recordings,leave_vm_no_dispo,leave_vm_message_group_id,campaign_script_two,browser_alert_sound,browser_alert_volume,three_way_record_stop_exception,pause_max_exceptions,transfer_button_launch,leave_3way_start_recording,leave_3way_start_recording_exception,calls_waiting_vl_one,calls_waiting_vl_two,in_man_dial_next_ready_seconds,in_man_dial_next_ready_seconds_override,transfer_no_dispo,local_call_time,pause_max_url,agent_hide_hangup,ig_xfer_list_sort,script_tab_frame_size,user_group_script FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
|
||||
$stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,manual_preview_dial,api_manual_dial,manual_dial_call_time_check,my_callback_option,per_call_notes,agent_lead_search,agent_lead_search_method,queuemetrics_phone_environment,auto_pause_precall,auto_pause_precall_code,auto_resume_precall,manual_dial_cid,custom_3way_button_transfer,callback_days_limit,disable_dispo_screen,disable_dispo_status,screen_labels,status_display_fields,pllb_grouping,pllb_grouping_limit,in_group_dial,in_group_dial_select,pause_after_next_call,owner_populate,manual_dial_lead_id,dead_max,dispo_max,pause_max,dead_max_dispo,dispo_max_dispo,max_inbound_calls,manual_dial_search_checkbox,hide_call_log_info,timer_alt_seconds,wrapup_bypass,wrapup_after_hotkey,callback_active_limit,callback_active_limit_override,comments_all_tabs,comments_dispo_screen,comments_callback_screen,qc_comment_history,show_previous_callback,clear_script,manual_dial_search_filter,web_form_address_three,manual_dial_override_field,status_display_ingroup,customer_gone_seconds,agent_display_fields,manual_dial_timeout,manual_auto_next,manual_auto_show,allow_required_fields,dead_to_dispo,agent_xfer_validation,ready_max_logout,callback_display_days,three_way_record_stop,hangup_xfer_record_start,max_inbound_calls_outcome,manual_auto_next_options,agent_screen_time_display,pause_max_dispo,script_top_dispo,routing_initiated_recordings,dead_trigger_seconds,dead_trigger_action,dead_trigger_repeat,dead_trigger_filename,scheduled_callbacks_force_dial,callback_hours_block,callback_display_days,scheduled_callbacks_timezones_container,three_way_volume_buttons,manual_dial_validation,mute_recordings,leave_vm_no_dispo,leave_vm_message_group_id,campaign_script_two,browser_alert_sound,browser_alert_volume,three_way_record_stop_exception,pause_max_exceptions,transfer_button_launch,leave_3way_start_recording,leave_3way_start_recording_exception,calls_waiting_vl_one,calls_waiting_vl_two,in_man_dial_next_ready_seconds,in_man_dial_next_ready_seconds_override,transfer_no_dispo,local_call_time,pause_max_url,agent_hide_hangup,ig_xfer_list_sort,script_tab_frame_size,user_group_script,agent_hangup_route,agent_hangup_value,agent_hangup_ig_override FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01013',$VD_login,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
@@ -2624,6 +2625,9 @@ else
|
||||
$ig_xfer_list_sort = $row[176];
|
||||
$script_tab_frame_size = $row[177];
|
||||
$user_group_script = $row[178];
|
||||
$agent_hangup_route = $row[179];
|
||||
$agent_hangup_value = $row[180];
|
||||
$agent_hangup_ig_override = $row[181];
|
||||
|
||||
if ( (strlen($UGscript_id) > 0) and ($user_group_script == 'ENABLED') )
|
||||
{
|
||||
@@ -5913,6 +5917,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
var agent_datetime='';
|
||||
var tempDB2='';
|
||||
var dialRegExten_enabled='<?php echo $dialRegExten_enabled ?>';
|
||||
var agent_hangup_route='<?php echo $agent_hangup_route ?>';
|
||||
var agent_hangup_value='<?php echo $agent_hangup_value ?>';
|
||||
var agent_hangup_ig_override='<?php echo $agent_hangup_ig_override ?>';
|
||||
var DiaLControl_auto_HTML = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready','','','','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_paused.gif") ?>\" border=\"0\" alt=\"You are paused\" /></a>";
|
||||
var DiaLControl_auto_HTML_ready = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADpause','','','','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_active.gif") ?>\" border=\"0\" alt=\"You are active\" /></a>";
|
||||
var DiaLControl_auto_HTML_OFF = "<img src=\"./images/<?php echo _QXZ("vdc_LB_blank_OFF.gif") ?>\" border=\"0\" alt=\"pause button disabled\" />";
|
||||
@@ -7440,7 +7447,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
WaitingForNextStep=0;
|
||||
custchannellive=0;
|
||||
|
||||
if ( (inbound_post_call_survey=='ENABLED') && (inbound_survey_participate=='Y') )
|
||||
if ( (inbound_post_call_survey=='ENABLED') && (inbound_survey_participate=='Y') && (agent_hangup_ig_override=='N') )
|
||||
{
|
||||
document.vicidial_form.xfernumber.value = '83068888888888883999';
|
||||
document.vicidial_form.xferoverride.checked=true;
|
||||
@@ -7449,7 +7456,39 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
}
|
||||
else
|
||||
{
|
||||
dialedcall_send_hangup();
|
||||
if ( (agent_hangup_value.length > 0) && ( (agent_hangup_route=='MESSAGE') || (agent_hangup_route=='EXTENSION') || (agent_hangup_route=='IN_GROUP') || (agent_hangup_route=='CALLMENU') ) )
|
||||
{
|
||||
button_click_log = button_click_log + "" + SQLdate + "-----APIHangupCallRoute---" + agent_hangup_route + " " + agent_hangup_value + " " + document.vicidial_form.xfernumber.value + "|";
|
||||
|
||||
if (agent_hangup_route=='MESSAGE')
|
||||
{
|
||||
document.vicidial_form.xfernumber.value = '83046777777777*' + agent_hangup_value;
|
||||
document.vicidial_form.xferoverride.checked=true;
|
||||
mainxfer_send_redirect('XfeRBLIND',lastcustchannel,lastcustserverip);
|
||||
}
|
||||
if (agent_hangup_route=='EXTENSION')
|
||||
{
|
||||
document.vicidial_form.xfernumber.value = agent_hangup_value;
|
||||
document.vicidial_form.xferoverride.checked=true;
|
||||
mainxfer_send_redirect('XfeRBLIND',lastcustchannel,lastcustserverip);
|
||||
}
|
||||
if (agent_hangup_route=='CALLMENU')
|
||||
{
|
||||
API_selected_callmenu = agent_hangup_value;
|
||||
document.vicidial_form.xfernumber.value = agent_hangup_value;
|
||||
mainxfer_send_redirect('XfeRBLIND',lastcustchannel,lastcustserverip);
|
||||
}
|
||||
if (agent_hangup_route=='IN_GROUP')
|
||||
{
|
||||
API_selected_xfergroup = agent_hangup_value;
|
||||
document.vicidial_form.xfernumber.value = agent_hangup_value;
|
||||
mainxfer_send_redirect('XfeRLOCAL',lastcustchannel,lastcustserverip);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dialedcall_send_hangup();
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( (APIStatuS.length < 1000) && (APIStatuS.length > 0) && (AgentDispoing > 1) && (APIStatuS != '::::::::::') )
|
||||
@@ -10289,7 +10328,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
document.getElementById("ivrParkControl").innerHTML ="<a href=\"#\" onclick=\"mainxfer_send_redirect('ParKivr','" + lastcustchannel + "','" + lastcustserverip + "','','','','YES');return false;\"><img src=\"./images/<?php echo _QXZ("vdc_LB_ivrparkcall.gif"); ?>\" border=\"0\" alt=\"IVR Park Call\" /></a>";
|
||||
}
|
||||
|
||||
document.getElementById("HangupControl").innerHTML = "<a href=\"#\" onclick=\"dialedcall_send_hangup('','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_hangupcustomer.gif"); ?>\" border=\"0\" alt=\"Hangup Customer\" /></a>";
|
||||
document.getElementById("HangupControl").innerHTML = "<a href=\"#\" onclick=\"hangup_customer_button_click('','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_hangupcustomer.gif"); ?>\" border=\"0\" alt=\"Hangup Customer\" /></a>";
|
||||
|
||||
document.getElementById("XferControl").innerHTML = "<a href=\"#\" onclick=\"ShoWTransferMain('ON','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_transferconf.gif"); ?>\" border=\"0\" alt=\"Transfer - Conference\" /></a>";
|
||||
|
||||
@@ -11443,7 +11482,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
MD_channel_look=1;
|
||||
custchannellive=1;
|
||||
|
||||
document.getElementById("HangupControl").innerHTML = "<a href=\"#\" onclick=\"dialedcall_send_hangup('','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_hangupcustomer.gif"); ?>\" border=\"0\" alt=\"Hangup Customer\" /></a>";
|
||||
document.getElementById("HangupControl").innerHTML = "<a href=\"#\" onclick=\"hangup_customer_button_click('','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_hangupcustomer.gif"); ?>\" border=\"0\" alt=\"Hangup Customer\" /></a>";
|
||||
|
||||
if ( (LIVE_campaign_recording == 'ALLCALLS') || (LIVE_campaign_recording == 'ALLFORCE') )
|
||||
{all_record = 'YES';}
|
||||
@@ -12038,7 +12077,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
|
||||
document.getElementById("MainStatuSSpan").innerHTML = " <?php echo _QXZ("Calling:"); ?> " + status_display_number + " " + status_display_content + " <?php echo _QXZ("Waiting for Ring..."); ?>";
|
||||
|
||||
document.getElementById("HangupControl").innerHTML = "<a href=\"#\" onclick=\"dialedcall_send_hangup('','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_hangupcustomer.gif"); ?>\" border=\"0\" alt=\"Hangup Customer\" /></a>";
|
||||
document.getElementById("HangupControl").innerHTML = "<a href=\"#\" onclick=\"hangup_customer_button_click('','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_hangupcustomer.gif"); ?>\" border=\"0\" alt=\"Hangup Customer\" /></a>";
|
||||
}
|
||||
if ( (LIVE_campaign_recording == 'ALLCALLS') || (LIVE_campaign_recording == 'ALLFORCE') )
|
||||
{all_record = 'YES';}
|
||||
@@ -13042,16 +13081,17 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "','','','" + quick_transfer_button_locked + "','YES');return false;\"><img src=\"./images/<?php echo _QXZ("vdc_LB_quickxfer.gif"); ?>\" border=\"0\" alt=\"QUICK TRANSFER\" /></a>";
|
||||
}
|
||||
|
||||
if ( (inbound_post_call_survey=='ENABLED') && (inbound_survey_participate=='Y') )
|
||||
if ( (inbound_post_call_survey=='ENABLED') && (inbound_survey_participate=='Y') && (agent_hangup_ig_override=='N') )
|
||||
{
|
||||
document.vicidial_form.xfernumber.value = '83068888888888883999';
|
||||
document.vicidial_form.xferoverride.checked=true;
|
||||
document.getElementById("HangupControl").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "','','','','YES');return false;\"><img src=\"./images/<?php echo _QXZ("vdc_LB_hangupcustomer.gif"); ?>\" border=\"0\" alt=\"Hangup Customer\" /></a>";
|
||||
button_click_log = button_click_log + "" + SQLdate + "-----AskInGroupSurvey---" + inbound_post_call_survey + " " + inbound_survey_participate + " " + document.vicidial_form.xfernumber.value + "|";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
document.getElementById("HangupControl").innerHTML = "<a href=\"#\" onclick=\"dialedcall_send_hangup('','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_hangupcustomer.gif"); ?>\" border=\"0\" alt=\"Hangup Customer\" /></a>";
|
||||
document.getElementById("HangupControl").innerHTML = "<a href=\"#\" onclick=\"hangup_customer_button_click('','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_hangupcustomer.gif"); ?>\" border=\"0\" alt=\"Hangup Customer\" /></a>";
|
||||
}
|
||||
|
||||
if (custom_3way_button_transfer_enabled > 0)
|
||||
@@ -13797,7 +13837,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
document.getElementById("MainStatuSSpan").innerHTML = " <?php echo _QXZ("Incoming:"); ?> " + dial_display_number + " " + custom_call_id + " " + temp_status_display_ingroup + " " + VDIC_fronter + " " + status_display_content;
|
||||
}
|
||||
|
||||
document.getElementById("HangupControl").innerHTML = "<a href=\"#\" onclick=\"dialedcall_send_hangup('','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_hangupcustomer.gif"); ?>\" border=\"0\" alt=\"Hangup Customer\" /></a>";
|
||||
document.getElementById("HangupControl").innerHTML = "<a href=\"#\" onclick=\"hangup_customer_button_click('','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_hangupcustomer.gif"); ?>\" border=\"0\" alt=\"Hangup Customer\" /></a>";
|
||||
|
||||
// JOEJ - 053018 - PATCH
|
||||
if (lastcustchannel=="EMAIL")
|
||||
@@ -14359,6 +14399,47 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
{xfercall_send_hangup();}
|
||||
}
|
||||
|
||||
|
||||
// ################################################################################
|
||||
// Hangup Customer Button Press
|
||||
function hangup_customer_button_click(dispowindow,hotkeysused,altdispo,nodeletevdac,DSHclick)
|
||||
{
|
||||
if ( (agent_hangup_value.length > 0) && ( (agent_hangup_route=='MESSAGE') || (agent_hangup_route=='EXTENSION') || (agent_hangup_route=='IN_GROUP') || (agent_hangup_route=='CALLMENU') ) )
|
||||
{
|
||||
button_click_log = button_click_log + "" + SQLdate + "-----AgentHangupCallRoute---" + agent_hangup_route + " " + agent_hangup_value + " " + document.vicidial_form.xfernumber.value + "|";
|
||||
|
||||
if (agent_hangup_route=='MESSAGE')
|
||||
{
|
||||
document.vicidial_form.xfernumber.value = '83046777777777*' + agent_hangup_value;
|
||||
document.vicidial_form.xferoverride.checked=true;
|
||||
mainxfer_send_redirect('XfeRBLIND',lastcustchannel,lastcustserverip);
|
||||
}
|
||||
if (agent_hangup_route=='EXTENSION')
|
||||
{
|
||||
document.vicidial_form.xfernumber.value = agent_hangup_value;
|
||||
document.vicidial_form.xferoverride.checked=true;
|
||||
mainxfer_send_redirect('XfeRBLIND',lastcustchannel,lastcustserverip);
|
||||
}
|
||||
if (agent_hangup_route=='CALLMENU')
|
||||
{
|
||||
API_selected_callmenu = agent_hangup_value;
|
||||
document.vicidial_form.xfernumber.value = agent_hangup_value;
|
||||
mainxfer_send_redirect('XfeRBLIND',lastcustchannel,lastcustserverip);
|
||||
}
|
||||
if (agent_hangup_route=='IN_GROUP')
|
||||
{
|
||||
API_selected_xfergroup = agent_hangup_value;
|
||||
document.vicidial_form.xfernumber.value = agent_hangup_value;
|
||||
mainxfer_send_redirect('XfeRLOCAL',lastcustchannel,lastcustserverip);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dialedcall_send_hangup(dispowindow,hotkeysused,altdispo,nodeletevdac,DSHclick);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ################################################################################
|
||||
// Send Hangup command for customer call connected to the conference now to Manager
|
||||
function dialedcall_send_hangup(dispowindow,hotkeysused,altdispo,nodeletevdac,DSHclick)
|
||||
|
||||
+86
-17
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# admin_header.php - VICIDIAL administration header
|
||||
#
|
||||
# Copyright (C) 2022 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2023 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
|
||||
# CHANGES
|
||||
@@ -96,6 +96,7 @@
|
||||
# 220830-2303 - Fix for ADMIN change, issue #1370
|
||||
# 221214-1321 - Added HTML color chooser
|
||||
# 221230-2230 - Added Postal Codes Cities submenu
|
||||
# 230118-0835 - Added Agent Call Hangup Change function
|
||||
#
|
||||
|
||||
$HTMLcolors = 'IndianRed,CD5C5C|LightCoral,F08080|Salmon,FA8072|DarkSalmon,E9967A|LightSalmon,FFA07A|Crimson,DC143C|Red,FF0000|FireBrick,B22222|DarkRed,8B0000|Pink,FFC0CB|LightPink,FFB6C1|HotPink,FF69B4|DeepPink,FF1493|MediumVioletRed,C71585|PaleVioletRed,DB7093|LightSalmon,FFA07A|Coral,FF7F50|Tomato,FF6347|OrangeRed,FF4500|DarkOrange,FF8C00|Orange,FFA500|Gold,FFD700|Yellow,FFFF00|LightYellow,FFFFE0|LemonChiffon,FFFACD|LightGoldenrodYellow,FAFAD2|PapayaWhip,FFEFD5|Moccasin,FFE4B5|PeachPuff,FFDAB9|PaleGoldenrod,EEE8AA|Khaki,F0E68C|DarkKhaki,BDB76B|Lavender,E6E6FA|Thistle,D8BFD8|Plum,DDA0DD|Violet,EE82EE|Orchid,DA70D6|Fuchsia,FF00FF|Magenta,FF00FF|MediumOrchid,BA55D3|MediumPurple,9370DB|RebeccaPurple,663399|BlueViolet,8A2BE2|DarkViolet,9400D3|DarkOrchid,9932CC|DarkMagenta,8B008B|Purple,800080|Indigo,4B0082|SlateBlue,6A5ACD|DarkSlateBlue,483D8B|MediumSlateBlue,7B68EE|GreenYellow,ADFF2F|Chartreuse,7FFF00|LawnGreen,7CFC00|Lime,00FF00|LimeGreen,32CD32|PaleGreen,98FB98|LightGreen,90EE90|MediumSpringGreen,00FA9A|SpringGreen,00FF7F|MediumSeaGreen,3CB371|SeaGreen,2E8B57|ForestGreen,228B22|Green,008000|DarkGreen,006400|YellowGreen,9ACD32|OliveDrab,6B8E23|Olive,808000|DarkOliveGreen,556B2F|MediumAquamarine,66CDAA|DarkSeaGreen,8FBC8B|LightSeaGreen,20B2AA|DarkCyan,008B8B|Teal,008080|Aqua,00FFFF|Cyan,00FFFF|LightCyan,E0FFFF|PaleTurquoise,AFEEEE|Aquamarine,7FFFD4|Turquoise,40E0D0|MediumTurquoise,48D1CC|DarkTurquoise,00CED1|CadetBlue,5F9EA0|SteelBlue,4682B4|LightSteelBlue,B0C4DE|PowderBlue,B0E0E6|LightBlue,ADD8E6|SkyBlue,87CEEB|LightSkyBlue,87CEFA|DeepSkyBlue,00BFFF|DodgerBlue,1E90FF|CornflowerBlue,6495ED|MediumSlateBlue,7B68EE|RoyalBlue,4169E1|Blue,0000FF|MediumBlue,0000CD|DarkBlue,00008B|Navy,000080|MidnightBlue,191970|Cornsilk,FFF8DC|BlanchedAlmond,FFEBCD|Bisque,FFE4C4|NavajoWhite,FFDEAD|Wheat,F5DEB3|BurlyWood,DEB887|Tan,D2B48C|RosyBrown,BC8F8F|SandyBrown,F4A460|Goldenrod,DAA520|DarkGoldenrod,B8860B|Peru,CD853F|Chocolate,D2691E|SaddleBrown,8B4513|Sienna,A0522D|Brown,A52A2A|Maroon,800000|White,FFFFFF|Snow,FFFAFA|HoneyDew,F0FFF0|MintCream,F5FFFA|Azure,F0FFFF|AliceBlue,F0F8FF|GhostWhite,F8F8FF|WhiteSmoke,F5F5F5|SeaShell,FFF5EE|Beige,F5F5DC|OldLace,FDF5E6|FloralWhite,FFFAF0|Ivory,FFFFF0|AntiqueWhite,FAEBD7|Linen,FAF0E6|LavenderBlush,FFF0F5|MistyRose,FFE4E1|Gainsboro,DCDCDC|LightGray,D3D3D3|Silver,C0C0C0|DarkGray,A9A9A9|Gray,808080|DimGray,696969|LightSlateGray,778899|SlateGray,708090|DarkSlateGray,2F4F4F|Black,000000';
|
||||
@@ -693,6 +694,53 @@ if ( ( ($ADD==34) or ($ADD==31) or ($ADD==49) ) and ($SUB==29) and ($LOGmodify_c
|
||||
}
|
||||
<?php
|
||||
}
|
||||
|
||||
if ( ( ($ADD==31) or ($ADD==41) ) and ($LOGmodify_campaigns==1) and ( (preg_match("/$campaign_id/i", $LOGallowed_campaigns)) or (preg_match("/ALL\-CAMPAIGNS/i",$LOGallowed_campaigns)) ) )
|
||||
{
|
||||
?>
|
||||
// Agent Call Hangup Route change trigger
|
||||
function AgentCallHangupRouteChange(ACHR_new_value)
|
||||
{
|
||||
var ACHR_list = document.getElementById("agent_hangup_route");
|
||||
var ACHR_route = ACHR_list.value;
|
||||
var ACHR_value = document.getElementById("agent_hangup_value");
|
||||
var ACHR_title = document.getElementById("agent_hangup_value_title");
|
||||
var ACHR_chooser = document.getElementById("agent_hangup_value_chooser");
|
||||
|
||||
if (ACHR_route=='HANGUP')
|
||||
{
|
||||
ACHR_title.innerHTML = '-<?php echo _QXZ("no value required") ?>-';
|
||||
ACHR_chooser.innerHTML = '';
|
||||
ACHR_value.value='';
|
||||
}
|
||||
if (ACHR_route=='MESSAGE')
|
||||
{
|
||||
ACHR_title.innerHTML = '<?php echo _QXZ("Agent Hangup Message") ?>';
|
||||
ACHR_chooser.innerHTML = " <a href=\"javascript:launch_chooser('agent_hangup_value','date');\"><?php echo _QXZ("audio chooser") ?></a> ";
|
||||
ACHR_value.value='';
|
||||
}
|
||||
if (ACHR_route=='EXTENSION')
|
||||
{
|
||||
ACHR_title.innerHTML = '<?php echo _QXZ("Agent Hangup Dialplan Extension") ?>';
|
||||
ACHR_chooser.innerHTML = '';
|
||||
ACHR_value.value='';
|
||||
}
|
||||
if (ACHR_route=='IN_GROUP')
|
||||
{
|
||||
ACHR_title.innerHTML = '<?php echo _QXZ("Agent Hangup In-Group") ?>';
|
||||
ACHR_chooser.innerHTML = " <a href=\"javascript:launch_ingroup_chooser('agent_hangup_value','group_id');\"><?php echo _QXZ("in-group chooser") ?></a> ";
|
||||
ACHR_value.value='';
|
||||
}
|
||||
if (ACHR_route=='CALLMENU')
|
||||
{
|
||||
ACHR_title.innerHTML = '<?php echo _QXZ("Agent Hangup Call Menu") ?>';
|
||||
ACHR_chooser.innerHTML = " <a href=\"javascript:launch_callmenu_chooser('agent_hangup_value','menu_id');\"><?php echo _QXZ("call menu chooser") ?></a> ";
|
||||
ACHR_value.value='';
|
||||
}
|
||||
}
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
var weak = new Image();
|
||||
@@ -872,6 +920,38 @@ else
|
||||
document.getElementById("audio_chooser_span").innerHTML = Iframe_content;
|
||||
}
|
||||
|
||||
function launch_ingroup_chooser(fieldname,stage)
|
||||
{
|
||||
var h = window.innerHeight;
|
||||
var vposition=mouseY;
|
||||
|
||||
var apilistURL = "./non_agent_api.php";
|
||||
var apilistQuery = "source=admin&function=ingroup_list&user=" + user + "&pass=" + pass + "&format=selectframe&stage=" + stage + "&comments=" + fieldname;
|
||||
var Iframe_content = '<IFRAME SRC="' + apilistURL + '?' + apilistQuery + '" style="width:740;height:440;background-color:white;" scrolling="NO" frameborder="0" allowtransparency="true" id="audio_chooser_frame' + epoch + '" name="audio_chooser_frame" width="740" height="460" STYLE="z-index:2"> </IFRAME>';
|
||||
|
||||
document.getElementById("audio_chooser_span").style.position = "absolute";
|
||||
document.getElementById("audio_chooser_span").style.left = "220px";
|
||||
document.getElementById("audio_chooser_span").style.top = vposition + "px";
|
||||
document.getElementById("audio_chooser_span").style.visibility = 'visible';
|
||||
document.getElementById("audio_chooser_span").innerHTML = Iframe_content;
|
||||
}
|
||||
|
||||
function launch_callmenu_chooser(fieldname,stage)
|
||||
{
|
||||
var h = window.innerHeight;
|
||||
var vposition=mouseY;
|
||||
|
||||
var apilistURL = "./non_agent_api.php";
|
||||
var apilistQuery = "source=admin&function=callmenu_list&user=" + user + "&pass=" + pass + "&format=selectframe&stage=" + stage + "&comments=" + fieldname;
|
||||
var Iframe_content = '<IFRAME SRC="' + apilistURL + '?' + apilistQuery + '" style="width:740;height:440;background-color:white;" scrolling="NO" frameborder="0" allowtransparency="true" id="audio_chooser_frame' + epoch + '" name="audio_chooser_frame" width="740" height="460" STYLE="z-index:2"> </IFRAME>';
|
||||
|
||||
document.getElementById("audio_chooser_span").style.position = "absolute";
|
||||
document.getElementById("audio_chooser_span").style.left = "220px";
|
||||
document.getElementById("audio_chooser_span").style.top = vposition + "px";
|
||||
document.getElementById("audio_chooser_span").style.visibility = 'visible';
|
||||
document.getElementById("audio_chooser_span").innerHTML = Iframe_content;
|
||||
}
|
||||
|
||||
function launch_vm_chooser(fieldname,stage)
|
||||
{
|
||||
var h = window.innerHeight;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# version: 20230112105701
|
||||
# version: 20230117084601
|
||||
users-user User ID <QXZ>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-.</QXZ>
|
||||
users-pass Password <QXZ>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.</QXZ>
|
||||
users-force_change_password Force Change Password <QXZ>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.</QXZ>
|
||||
@@ -319,6 +319,9 @@ campaigns-wrapup_seconds Wrap Up Seconds <QXZ>The number of seconds to force an
|
||||
campaigns-wrapup_message Wrap Up Message <QXZ>This is a campaign-specific message to be displayed on the wrap up screen if wrap up seconds is set. You can use a Script in the system if you use the script id with WUSCRIPT in front of it, so if you wanted to use a script called agent_script, then you would put WUSCRIPTagent_script in this field.</QXZ>
|
||||
campaigns-wrapup_bypass Wrap Up Bypass <QXZ>If set to ENABLED then the agent will be able to click a link to stop the Wrap Up timer before the time is completed. Default is ENABLED.</QXZ>
|
||||
campaigns-wrapup_after_hotkey Wrap Up After Hotkey <QXZ>If set to ENABLED and the campaign has hotkeys configured and the agent terminates a call with a hotkey, then the wrap up settings will be used after that call. Default is DISABLED.</QXZ>
|
||||
campaigns-agent_hangup_route Agent Call Hangup Route <QXZ>This setting will determine what happens when the agent clicks on the Hangup Customer button on the agent screen. HANGUP will hang up the call, MESSAGE will play an audio file to the customer then hang up the call, EXTENSION will blind-transfer the call to the defined dialplan extension, IN_GROUP will blind-transfer the call to the defined inbound Group, CALLMENU will blind-transfer the call to the defined Call Menu. Default is HANGUP.</QXZ>
|
||||
campaigns-agent_hangup_value Agent Call Hangup Value <QXZ>If the Agent Call Hangup Route above is set to MESSAGE, EXTENSION, IN_GROUP or CALLMENU, then this is the value of the selected route that the call will be sent to. If the Agent Call Hangup Route above is set to anything but HANGUP, then this value is required to be populated with a valid option for this function to work properly. Default is blank.</QXZ>
|
||||
campaigns-agent_hangup_ig_override Agent Hangup In-Group Override <QXZ>This option, if enabled, will override any post-call survey options that may be enabled in the In-Groups for calls that go to agents in this campaign. Default is N for disabled.</QXZ>
|
||||
campaigns-agent_hide_hangup Hide Customer Hangup Button <QXZ>This setting will hide the agent screen Hangup Customer button, and the Transfer Conference frame Hangup Both button, for agents logging in to this campaign. This option should only be used if the campaign is using a custom application to hang up customer phone calls through the Agent API. Default is N for disabled.</QXZ>
|
||||
campaigns-disable_dispo_screen Disable Dispo Screen <QXZ>This option allows you to disable the disposition screen in the agent interface. The Disable Dispo Status field below must be filled in for this option to work. Default is DISPO_ENABLED. The DISPO_SELECT_DISABLED option will not disable the dispo screen completely, but will display the dispo screen without any dispositions, this option should only be used if you want to force your agents to use your CRM software which will send the status to the system through the API.</QXZ>
|
||||
campaigns-disable_dispo_status Disable Dispo Status <QXZ>If the Disable Dispo Screen option is set to DISPO_DISABLED, then this field must be filled in. You can use any disposition you want for this field as long as it is 1 to 6 characters in length with only letters and numbers.</QXZ>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# non_agent_api.php
|
||||
#
|
||||
# Copyright (C) 2022 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2023 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# This script is designed as an API(Application Programming Interface) to allow
|
||||
# other programs to interact with all non-agent-screen VICIDIAL functions
|
||||
@@ -198,10 +198,11 @@
|
||||
# 220902-0823 - Added dial_status_add/dial_status_remove options to update_campaign function
|
||||
# 220920-0814 - Added more "XDAY" options to add_lead duplicate checks
|
||||
# 221108-1849 - Added include_ip option for agent_status function
|
||||
# 230118-0833 - Added ingroup_list and callmenu_list functions
|
||||
#
|
||||
|
||||
$version = '2.14-175';
|
||||
$build = '221108-1849';
|
||||
$version = '2.14-176';
|
||||
$build = '230118-0833';
|
||||
$php_script='non_agent_api.php';
|
||||
$api_url_log = 0;
|
||||
|
||||
@@ -1947,6 +1948,254 @@ if ($function == 'vm_list')
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
### ingroup_list - sends a list of the inbound groups in the system
|
||||
################################################################################
|
||||
if ($function == 'ingroup_list')
|
||||
{
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$user' and user_level > 6 and active='Y';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$allowed_user=$row[0];
|
||||
if ($allowed_user < 1)
|
||||
{
|
||||
$result = 'ERROR';
|
||||
$result_reason = "ingroup_list USER DOES NOT HAVE PERMISSION TO VIEW INBOUND GROUPS LIST";
|
||||
echo "$result: $result_reason: |$user|$allowed_user|\n";
|
||||
$data = "$allowed_user";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( (!preg_match("/ $function /",$api_allowed_functions)) and (!preg_match("/ALL_FUNCTIONS/",$api_allowed_functions)) )
|
||||
{
|
||||
$result = 'ERROR';
|
||||
$result_reason = "auth USER DOES NOT HAVE PERMISSION TO USE THIS FUNCTION";
|
||||
echo "$result: $result_reason: |$user|$function|\n";
|
||||
$data = "$allowed_user";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
exit;
|
||||
}
|
||||
$stmt="SELECT allowed_campaigns,admin_viewable_groups from vicidial_user_groups where user_group='$LOGuser_group';";
|
||||
if ($DB>0) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$LOGallowed_campaigns = $row[0];
|
||||
$LOGadmin_viewable_groups = $row[1];
|
||||
|
||||
$LOGadmin_viewable_groupsSQL='';
|
||||
$whereLOGadmin_viewable_groupsSQL='';
|
||||
if ( (!preg_match('/\-\-ALL\-\-/i',$LOGadmin_viewable_groups)) and (strlen($LOGadmin_viewable_groups) > 3) )
|
||||
{
|
||||
$rawLOGadmin_viewable_groupsSQL = preg_replace("/ -/",'',$LOGadmin_viewable_groups);
|
||||
$rawLOGadmin_viewable_groupsSQL = preg_replace("/ /","','",$rawLOGadmin_viewable_groupsSQL);
|
||||
$LOGadmin_viewable_groupsSQL = "and user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')";
|
||||
$whereLOGadmin_viewable_groupsSQL = "where user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')";
|
||||
}
|
||||
|
||||
$server_name = getenv("SERVER_NAME");
|
||||
$server_port = getenv("SERVER_PORT");
|
||||
if (preg_match("/443/i",$server_port)) {$HTTPprotocol = 'https://';}
|
||||
else {$HTTPprotocol = 'http://';}
|
||||
$admDIR = "$HTTPprotocol$server_name:$server_port";
|
||||
|
||||
echo "\n";
|
||||
echo "<HTML><head><title>NON-AGENT API</title>\n";
|
||||
echo "<script language=\"Javascript\">\n";
|
||||
echo "function choose_file(filename,fieldname)\n";
|
||||
echo " {\n";
|
||||
echo " if (filename.length > 0)\n";
|
||||
echo " {\n";
|
||||
echo " parent.document.getElementById(fieldname).value = filename;\n";
|
||||
echo " document.getElementById(\"selectframe\").innerHTML = '';\n";
|
||||
echo " document.getElementById(\"selectframe\").style.visibility = 'hidden';\n";
|
||||
echo " parent.close_chooser();\n";
|
||||
echo " }\n";
|
||||
echo " }\n";
|
||||
echo "function close_file()\n";
|
||||
echo " {\n";
|
||||
echo " document.getElementById(\"selectframe\").innerHTML = '';\n";
|
||||
echo " document.getElementById(\"selectframe\").style.visibility = 'hidden';\n";
|
||||
echo " parent.close_chooser();\n";
|
||||
echo " }\n";
|
||||
echo "</script>\n";
|
||||
echo "</head>\n\n";
|
||||
|
||||
echo "<body>\n";
|
||||
echo "<a href=\"javascript:close_file();\"><font size=1 face=\"Arial,Helvetica\">"._QXZ("close frame")."</font></a>\n";
|
||||
echo "<div id='selectframe' style=\"height:400px;width:710px;overflow:scroll;\">\n";
|
||||
echo "<table border=0 cellpadding=1 cellspacing=2 width=690 bgcolor=white><tr>\n";
|
||||
echo "<td width=30>#</td>\n";
|
||||
echo "<td colspan=2>"._QXZ("Inbound Groups")."</td>\n";
|
||||
echo "<td>"._QXZ("Name")."</td>\n";
|
||||
echo "<td>"._QXZ("Color")."</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
$rowx=array();
|
||||
$group_id=array();
|
||||
$fullname=array();
|
||||
$color=array();
|
||||
|
||||
$stmt="SELECT group_id,group_name,group_color from vicidial_inbound_groups where active='Y' $LOGadmin_viewable_groupsSQL order by group_id";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$vm_to_print = mysqli_num_rows($rslt);
|
||||
$k=0;
|
||||
$sf=0;
|
||||
while ($vm_to_print > $k)
|
||||
{
|
||||
$rowx=mysqli_fetch_row($rslt);
|
||||
$group_id[$k] = $rowx[0];
|
||||
$fullname[$k] = $rowx[1];
|
||||
$color[$k] = $rowx[2];
|
||||
$sf++;
|
||||
if (preg_match("/1$|3$|5$|7$|9$/i", $sf))
|
||||
{$bgcolor='bgcolor="#E6E6E6"';}
|
||||
else
|
||||
{$bgcolor='bgcolor="#F6F6F6"';}
|
||||
echo "<tr $bgcolor><td width=30><font size=1 face=\"Arial,Helvetica\">$sf</td>\n";
|
||||
echo "<td colspan=2><a href=\"javascript:choose_file('$group_id[$k]','$comments');\"><font size=2 face=\"Arial,Helvetica\">$group_id[$k]</a></td>\n";
|
||||
echo "<td><font size=2 face=\"Arial,Helvetica\">$fullname[$k]</td>\n";
|
||||
echo "<td bgcolor=\"$color[$k]\"><font size=2 face=\"Arial,Helvetica\"> </td></tr>\n";
|
||||
|
||||
$k++;
|
||||
}
|
||||
echo "</table></div></body></HTML>\n";
|
||||
|
||||
exit;
|
||||
}
|
||||
}
|
||||
################################################################################
|
||||
### END ingroup_list
|
||||
################################################################################
|
||||
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
### callmenu_list - sends a list of the inbound groups in the system
|
||||
################################################################################
|
||||
if ($function == 'callmenu_list')
|
||||
{
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$user' and user_level > 6 and active='Y';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$allowed_user=$row[0];
|
||||
if ($allowed_user < 1)
|
||||
{
|
||||
$result = 'ERROR';
|
||||
$result_reason = "callmenu_list USER DOES NOT HAVE PERMISSION TO VIEW CALL MENUS LIST";
|
||||
echo "$result: $result_reason: |$user|$allowed_user|\n";
|
||||
$data = "$allowed_user";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( (!preg_match("/ $function /",$api_allowed_functions)) and (!preg_match("/ALL_FUNCTIONS/",$api_allowed_functions)) )
|
||||
{
|
||||
$result = 'ERROR';
|
||||
$result_reason = "auth USER DOES NOT HAVE PERMISSION TO USE THIS FUNCTION";
|
||||
echo "$result: $result_reason: |$user|$function|\n";
|
||||
$data = "$allowed_user";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
exit;
|
||||
}
|
||||
$stmt="SELECT allowed_campaigns,admin_viewable_groups from vicidial_user_groups where user_group='$LOGuser_group';";
|
||||
if ($DB>0) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$LOGallowed_campaigns = $row[0];
|
||||
$LOGadmin_viewable_groups = $row[1];
|
||||
|
||||
$LOGadmin_viewable_groupsSQL='';
|
||||
$whereLOGadmin_viewable_groupsSQL='';
|
||||
if ( (!preg_match('/\-\-ALL\-\-/i',$LOGadmin_viewable_groups)) and (strlen($LOGadmin_viewable_groups) > 3) )
|
||||
{
|
||||
$rawLOGadmin_viewable_groupsSQL = preg_replace("/ -/",'',$LOGadmin_viewable_groups);
|
||||
$rawLOGadmin_viewable_groupsSQL = preg_replace("/ /","','",$rawLOGadmin_viewable_groupsSQL);
|
||||
$LOGadmin_viewable_groupsSQL = "and user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')";
|
||||
$whereLOGadmin_viewable_groupsSQL = "where user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')";
|
||||
}
|
||||
|
||||
$server_name = getenv("SERVER_NAME");
|
||||
$server_port = getenv("SERVER_PORT");
|
||||
if (preg_match("/443/i",$server_port)) {$HTTPprotocol = 'https://';}
|
||||
else {$HTTPprotocol = 'http://';}
|
||||
$admDIR = "$HTTPprotocol$server_name:$server_port";
|
||||
|
||||
echo "\n";
|
||||
echo "<HTML><head><title>NON-AGENT API</title>\n";
|
||||
echo "<script language=\"Javascript\">\n";
|
||||
echo "function choose_file(filename,fieldname)\n";
|
||||
echo " {\n";
|
||||
echo " if (filename.length > 0)\n";
|
||||
echo " {\n";
|
||||
echo " parent.document.getElementById(fieldname).value = filename;\n";
|
||||
echo " document.getElementById(\"selectframe\").innerHTML = '';\n";
|
||||
echo " document.getElementById(\"selectframe\").style.visibility = 'hidden';\n";
|
||||
echo " parent.close_chooser();\n";
|
||||
echo " }\n";
|
||||
echo " }\n";
|
||||
echo "function close_file()\n";
|
||||
echo " {\n";
|
||||
echo " document.getElementById(\"selectframe\").innerHTML = '';\n";
|
||||
echo " document.getElementById(\"selectframe\").style.visibility = 'hidden';\n";
|
||||
echo " parent.close_chooser();\n";
|
||||
echo " }\n";
|
||||
echo "</script>\n";
|
||||
echo "</head>\n\n";
|
||||
|
||||
echo "<body>\n";
|
||||
echo "<a href=\"javascript:close_file();\"><font size=1 face=\"Arial,Helvetica\">"._QXZ("close frame")."</font></a>\n";
|
||||
echo "<div id='selectframe' style=\"height:400px;width:710px;overflow:scroll;\">\n";
|
||||
echo "<table border=0 cellpadding=1 cellspacing=2 width=690 bgcolor=white><tr>\n";
|
||||
echo "<td width=30>#</td>\n";
|
||||
echo "<td colspan=2>"._QXZ("Call Menus")."</td>\n";
|
||||
echo "<td>"._QXZ("Name")."</td>\n";
|
||||
# echo "<td>"._QXZ("Color")."</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
$rowx=array();
|
||||
$group_id=array();
|
||||
$fullname=array();
|
||||
$color=array();
|
||||
|
||||
$stmt="SELECT menu_id,menu_name,menu_prompt from vicidial_call_menu $whereLOGadmin_viewable_groupsSQL order by menu_id";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$vm_to_print = mysqli_num_rows($rslt);
|
||||
$k=0;
|
||||
$sf=0;
|
||||
while ($vm_to_print > $k)
|
||||
{
|
||||
$rowx=mysqli_fetch_row($rslt);
|
||||
$group_id[$k] = $rowx[0];
|
||||
$fullname[$k] = $rowx[1];
|
||||
$color[$k] = $rowx[2];
|
||||
$sf++;
|
||||
if (preg_match("/1$|3$|5$|7$|9$/i", $sf))
|
||||
{$bgcolor='bgcolor="#E6E6E6"';}
|
||||
else
|
||||
{$bgcolor='bgcolor="#F6F6F6"';}
|
||||
echo "<tr $bgcolor><td width=30><font size=1 face=\"Arial,Helvetica\">$sf</td>\n";
|
||||
echo "<td colspan=2><a href=\"javascript:choose_file('$group_id[$k]','$comments');\"><font size=2 face=\"Arial,Helvetica\">$group_id[$k]</a></td>\n";
|
||||
echo "<td><font size=2 face=\"Arial,Helvetica\">$fullname[$k]</td></tr>\n";
|
||||
# echo "<td bgcolor=\"$color[$k]\"><font size=2 face=\"Arial,Helvetica\"> </td></tr>\n";
|
||||
|
||||
$k++;
|
||||
}
|
||||
echo "</table></div></body></HTML>\n";
|
||||
|
||||
exit;
|
||||
}
|
||||
}
|
||||
################################################################################
|
||||
### END callmenu_list
|
||||
################################################################################
|
||||
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
### agent_ingroup_info - displays agent in-group info in an HTML form allowing for changes
|
||||
################################################################################
|
||||
|
||||
Reference in New Issue
Block a user