Added pause_max_exceptions campaign feature

Fixed issue #1235

git-svn-id: svn://192.168.202.10@3302 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2020-10-04 16:30:04 +00:00
parent ffc9d9716b
commit dc7c372ef1
6 changed files with 117 additions and 33 deletions
+3
View File
@@ -537,6 +537,9 @@ OTHER CHANGES:
151. Added system settings allowing you to remove digits from the beginning of
a phone number when it is manual dialed or through the web lead loader.
152. Added Pause Max Exceptions campaign setting, allowing for exceptions to the
Agent Pause Max feature for specified Pause Codes.
+3 -2
View File
@@ -1044,7 +1044,8 @@ opensips_cid_name VARCHAR(15) default '',
amd_agent_route_options ENUM('ENABLED','DISABLED','PENDING') default 'DISABLED',
browser_alert_sound VARCHAR(20) default '---NONE---',
browser_alert_volume TINYINT(3) UNSIGNED default '50',
three_way_record_stop_exception VARCHAR(40) default 'DISABLED'
three_way_record_stop_exception VARCHAR(40) default 'DISABLED',
pause_max_exceptions VARCHAR(40) default ''
) ENGINE=MyISAM;
CREATE TABLE vicidial_lists (
@@ -4668,4 +4669,4 @@ INSERT INTO vicidial_settings_containers VALUES ('INTERNATIONAL_DNC_IMPORT','Pro
UPDATE system_settings set vdc_agent_api_active='1';
UPDATE system_settings SET db_schema_version='1607',db_schema_update_date=NOW(),reload_timestamp=NOW();
UPDATE system_settings SET db_schema_version='1608',db_schema_update_date=NOW(),reload_timestamp=NOW();
+4
View File
@@ -1320,3 +1320,7 @@ ALTER TABLE system_settings ADD web_loader_phone_strip VARCHAR(10) default 'DISA
ALTER TABLE system_settings ADD manual_dial_phone_strip VARCHAR(10) default 'DISABLED';
UPDATE system_settings SET db_schema_version='1607',db_schema_update_date=NOW() where db_schema_version < 1607;
ALTER TABLE vicidial_campaigns ADD pause_max_exceptions VARCHAR(40) default '';
UPDATE system_settings SET db_schema_version='1608',db_schema_update_date=NOW() where db_schema_version < 1608;
+62 -25
View File
@@ -645,10 +645,11 @@
# 200912-1426 - Added more get_call_launch PREVIEW_ options
# 200913-0817 - Added UNSELECTED options for campaign alt_number_dialing
# 200922-0948 - Added manual_dial_phone_strip system setting feature
# 201004-1112 - Added pause_max_exceptions campaign feature
#
$version = '2.14-613c';
$build = '200922-0948';
$version = '2.14-614c';
$build = '201004-1112';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=92;
$one_mysql_log=0;
@@ -2011,7 +2012,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 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 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";}
@@ -2180,6 +2181,7 @@ else
$browser_alert_sound = $row[161];
$browser_alert_volume = $row[162];
$three_way_record_stop_exception = $row[163];
$pause_max_exceptions = $row[164];
$TWRSEcontainer_entry='';
if ( (strlen($three_way_record_stop_exception) > 1) and ($three_way_record_stop_exception != 'DISABLED') )
@@ -2255,6 +2257,24 @@ else
{$pause_max=0;}
if ( ($pause_max > 9) and ($pause_max <= $dial_timeout) )
{$pause_max = ($dial_timeout + 10);}
if ( (strlen($pause_max_exceptions) > 1) and ($pause_max > 10) )
{
# Gather details on Pause Codes Max Exceptions settings container
$stmt = "SELECT container_entry FROM vicidial_settings_containers where container_id='$pause_max_exceptions';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$SCinfo_ct = mysqli_num_rows($rslt);
if ($SCinfo_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$PMEcontainer_entry = $row[0];
$PMEcontainer_entry = preg_replace("/\r|\t|\'|\"/",'',$PMEcontainer_entry);
$PMEcontainer_entry = preg_replace("/\n/",'-',$PMEcontainer_entry);
if (strlen($PMEcontainer_entry) > 2) {$PMEcontainer_entry = '-'.$PMEcontainer_entry.'-';}
echo "<!-- PAUSE MAX EXEPTION CODES: |$pause_max_exceptions($PMEcontainer_entry)| -->\n";
}
}
if ( ($queuemetrics_pe_phone_append > 0) and (strlen($qm_phone_environment)>0) )
{$qm_phone_environment .= "-$qm_extension";}
@@ -4945,12 +4965,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var agent_select_territories_skip_count=0;
var last_recording_filename='';
var dead_max='<?php echo $dead_max ?>';
var dead_max_dispo='<?php echo $dead_max_dispo ?>';
var dead_to_dispo='<?php echo $dead_to_dispo ?>';
var dispo_max='<?php echo $dispo_max ?>';
var pause_max='<?php echo $pause_max ?>';
var dead_max_dispo='<?php echo $dead_max_dispo ?>';
var dispo_max_dispo='<?php echo $dispo_max_dispo ?>';
var pause_max='<?php echo $pause_max ?>';
var pause_max_dispo='<?php echo $pause_max_dispo ?>';
var pause_max_exceptions='<?php echo $PMEcontainer_entry ?>';
var current_pause_code='';
var script_top_dispo='<?php echo $script_top_dispo ?>';
var script_span_zindex=0;
var dead_auto_dispo_count=0;
@@ -10967,6 +10989,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
VDRP_stage = 'READY';
VDRP_stage_seconds=0;
safe_pause_counter=0;
temp_auto_code='';
if (INgroupCOUNT > 0)
{
if (VICIDiaL_closer_blended == 0)
@@ -11016,7 +11039,10 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
if (temp_auto == '1')
{
add_pause_code = "&sub_status=" + temp_auto_code;
current_pause_code = temp_auto_code;
}
else
{temp_auto_code='';}
}
var xmlhttp=false;
@@ -15144,6 +15170,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
{
if (agent_log_id.length > 0) {previous_agent_log_id = agent_log_id;}
agent_log_id = check_PC_array[2];
current_pause_code = newpausecode;
}
// alert(VMCpausecode_query);
// alert(xmlhttp.responseText + "\n|" + check_PC_array[1] + "\n|" + check_PC_array[2] + "|" + agent_log_id + "|" + pause_code_counter);
@@ -19621,36 +19648,46 @@ function phone_number_format(formatphone) {
if ( (pause_max > 0) && (VDRP_stage_seconds > pause_max) )
{
// document.getElementById("debugbottomspan").innerHTML = "PAUSED SECONDS " + VDRP_stage_seconds;
if (alt_dial_status_display==1)
// check for paus max codes exceptions
var tempRegPC = '-' + current_pause_code + '-';
var regPMEmatch = new RegExp(tempRegPC);
// document.getElementById("debugbottomspan").innerHTML = "PAUSED MAX DEBUG: " + VDRP_stage_seconds + '|' + pause_max + '-' + tempRegPC + '-' + pause_max_exceptions + '|';
if ( (pause_max_exceptions.length > 2) && (current_pause_code.length > 0) && (pause_max_exceptions.match(regPMEmatch)) )
{
button_click_log = button_click_log + "" + SQLdate + "-----PauseMaxAltState---" + pause_max + "|";
alt_dial_dispo_count=5;
ManualDialAltDonE();
// do nothing, pause code exception match
}
else
{
if (alt_dial_dispo_count > 0)
if (alt_dial_status_display==1)
{
if (alt_dial_dispo_count == 4)
{
button_click_log = button_click_log + "" + SQLdate + "-----PauseMaxDispo---" + pause_max + " " + pause_max_dispo + "|";
button_click_log = button_click_log + "" + SQLdate + "-----PauseMaxAltState---" + pause_max + "|";
alt_dial_dispo_count=5;
document.vicidial_form.DispoSelectStop.checked=true;
document.vicidial_form.DispoSelection.value = pause_max_dispo;
DispoSelect_submit('1',pause_max_dispo);
pause_max_finish=2;
}
alt_dial_dispo_count--;
ManualDialAltDonE();
}
else
{
button_click_log = button_click_log + "" + SQLdate + "-----PauseMax---" + pause_max + " " + VDRP_stage_seconds + "|";
if (alt_dial_dispo_count > 0)
{
if (alt_dial_dispo_count == 4)
{
button_click_log = button_click_log + "" + SQLdate + "-----PauseMaxDispo---" + pause_max + " " + pause_max_dispo + "|";
pause_max_finish=1;
VDRP_stage_seconds=0;
document.vicidial_form.DispoSelectStop.checked=true;
document.vicidial_form.DispoSelection.value = pause_max_dispo;
DispoSelect_submit('1',pause_max_dispo);
pause_max_finish=2;
}
alt_dial_dispo_count--;
}
else
{
button_click_log = button_click_log + "" + SQLdate + "-----PauseMax---" + pause_max + " " + VDRP_stage_seconds + "|";
pause_max_finish=1;
VDRP_stage_seconds=0;
}
}
}
}
+43 -5
View File
File diff suppressed because one or more lines are too long
+2 -1
View File
@@ -1,4 +1,4 @@
# version: 202001002154101
# version: 202001004105201
users-user User ID <QXZ>This field is where you put the users ID number, can be up to 8 digits in length, Must be at least 2 characters in length.</QXZ>
users-pass Password <QXZ>This field is where you put the users password. Must be at least 2 characters in length. 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. Default is N.</QXZ>
@@ -307,6 +307,7 @@ campaigns-dispo_max Dispo Call Max Seconds <QXZ>If this is set to greater than 0
campaigns-dispo_max_dispo Dispo Call Max Status <QXZ>If Dispo Call Max Seconds is enabled, this is the status set for the call when the agent has not selected a status past the number of seconds set above. Default is DISMX.</QXZ>
campaigns-pause_max Agent Pause Max Seconds <QXZ>If this is set to greater than 0, and the agent has not gone out of PAUSED status in this number of seconds, the agent will automatically be logged out of the agent screen. Default is 0 for disabled.</QXZ>
campaigns-pause_max_dispo Agent Pause Max Status <QXZ>If Agent Pause Max Seconds is enabled, this is the status set for the call when the agent has not selected a status past the number of seconds set above. This situation can happen when manual alt dial is enabled and the agent has not finished the lead they are on. Default is PAUSMX.</QXZ>
campaigns-pause_max_exceptions Agent Pause Max Exceptions <QXZ>This setting will allow you to define a set of Pause Codes that do not trigger the Agent Pause Max Seconds feature if it is active if the agent has selected one of them as their current pause code. These pause codes must be defined within a Settings Container of the PAUSE_CODES_LIST type with one pause code per line. Default is blank for disabled.</QXZ>
campaigns-ready_max_logout Agent Ready Max Seconds Logout <QXZ>If this is set to greater than 0, and the agent has not gone out of READY or CLOSER status in this number of seconds, the agent will automatically be logged out of the agent screen. Default is 0 for disabled.</QXZ>
campaigns-customer_gone_seconds Customer Gone Warning Seconds <QXZ>This setting controls the number of seconds after a customer hangs up before a warning that the customer has hung up will appear on the agent screen. Default is 30.</QXZ>
campaigns-sip_event_logging SIP Event Actions <QXZ>SIP Event Logging Actions allows you to select a SIP_EVENT_ACTIONS Settings Container that contains all of the rules that you want followed for calls based upon different SIP Event Log triggers. Default is DISABLED.</QXZ>