Added Max Inbound Calls Outcome to allow for different behaviors when an agent reaches their maximum inbound calls for the day

git-svn-id: svn://192.168.202.10@2859 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2017-11-24 17:07:47 +00:00
parent 83d153d46e
commit 5cd372989a
8 changed files with 130 additions and 29 deletions
+3
View File
@@ -223,6 +223,9 @@ OTHER CHANGES:
56. Added the ability to include duplicate custom text fields in a custom fields 56. Added the ability to include duplicate custom text fields in a custom fields
form in the agent screen. form in the agent screen.
57. Added Max Inbound Calls Outcome to allow for different behaviors when an
agent reaches their maximum inbound calls for the day
+35 -7
View File
@@ -218,6 +218,7 @@
# 170921-2008 - Fix for CALLID in beginning of recording filename # 170921-2008 - Fix for CALLID in beginning of recording filename
# 170930-0913 - Added extension append options # 170930-0913 - Added extension append options
# 171011-1312 - Bug fix for on-hook agents using Asterisk 1.8 & 11 # 171011-1312 - Bug fix for on-hook agents using Asterisk 1.8 & 11
# 171124-1159 - Added max_inbound_calls_outcome options
# #
$script = 'agi-VDAD_ALL_inbound.agi'; $script = 'agi-VDAD_ALL_inbound.agi';
@@ -3560,7 +3561,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
@aryA = $sthA->fetchrow_array; @aryA = $sthA->fetchrow_array;
$VU_max_inbound_calls = $aryA[0]; $VU_max_inbound_calls = $aryA[0];
} }
$stmtA = "SELECT max_inbound_calls FROM vicidial_campaigns where campaign_id='$log_campaign';"; $stmtA = "SELECT max_inbound_calls,max_inbound_calls_outcome FROM vicidial_campaigns where campaign_id='$log_campaign';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsMIC=$sthA->rows; $sthArowsMIC=$sthA->rows;
@@ -3569,6 +3570,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
{ {
@aryA = $sthA->fetchrow_array; @aryA = $sthA->fetchrow_array;
$CP_max_inbound_calls = $aryA[0]; $CP_max_inbound_calls = $aryA[0];
$max_inbound_calls_outcome = $aryA[1];
} }
if ( ($VU_max_inbound_calls > 0) || ($CP_max_inbound_calls > 0) ) if ( ($VU_max_inbound_calls > 0) || ($CP_max_inbound_calls > 0) )
@@ -3590,7 +3592,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
if ($max_inbound_count >= $max_inbound_calls) if ($max_inbound_count >= $max_inbound_calls)
{ {
$outbound_autodial='0'; $outbound_autodial='0';
$stmtA = "SELECT outbound_autodial FROM vicidial_live_agents where user='$VDADuser';"; $stmtA = "SELECT outbound_autodial,closer_campaigns FROM vicidial_live_agents where user='$VDADuser';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsVLA=$sthA->rows; $sthArowsVLA=$sthA->rows;
@@ -3600,20 +3602,46 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
@aryA = $sthA->fetchrow_array; @aryA = $sthA->fetchrow_array;
if ($aryA[0] =~ /Y/) if ($aryA[0] =~ /Y/)
{$outbound_autodial = '1';} {$outbound_autodial = '1';}
$closer_campaigns = $aryA[1];
} }
$stmtA = "UPDATE vicidial_live_agents set external_ingroups=' -',external_blended='$outbound_autodial',external_igb_set_user='VDIC',manager_ingroup_set='SET' where user='$VDADuser'"; $stmtA = "UPDATE vicidial_live_agents set external_ingroups=' -',external_blended='$outbound_autodial',external_igb_set_user='VDIC',manager_ingroup_set='SET' where user='$VDADuser'";
$stmtB = "DELETE FROM vicidial_live_inbound_agents where user='$VDADuser';";
if ($max_inbound_calls_outcome =~ /ALLOW_AGENTDIRECT/)
{
$closer_campaigns =~ s/^ | -$//gi;
@ADcloser_campaignsARY = split(/ /,$closer_campaigns);
$ADcloser_campaignsARYct = scalar(@ADcloser_campaignsARY);
$ADc=0;
$ADcloser_campaigns='';
while ($ADc < $ADcloser_campaignsARYct)
{
if ($ADcloser_campaignsARY[$ADc] =~ /AGENTDIRECT/i)
{$ADcloser_campaigns .= "$ADcloser_campaignsARY[$ADc] ";}
$ADc++;
}
if (length($ADcloser_campaigns) > 3)
{$ADcloser_campaigns = " ".$ADcloser_campaigns."-";}
else
{$ADcloser_campaigns = " -";}
$stmtA = "UPDATE vicidial_live_agents set external_ingroups='$ADcloser_campaigns',external_blended='$outbound_autodial',external_igb_set_user='VDIC',manager_ingroup_set='SET' where user='$VDADuser'";
$stmtB = "DELETE FROM vicidial_live_inbound_agents where user='$VDADuser' and group_id NOT LIKE\"%AGENTDIRECT%\";";
}
$affected_rows = $dbhA->do($stmtA); $affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02202'; $MEL_aff_rows=$affected_rows; &mysql_error_logging; $dbhP=$dbhA; $mysql_count='02202'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtA = "DELETE FROM vicidial_live_inbound_agents where user='$VDADuser';"; $affected_rows = $dbhA->do($stmtB);
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02203'; $MEL_aff_rows=$affected_rows; &mysql_error_logging; $dbhP=$dbhA; $mysql_count='02203'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtA = "INSERT INTO vicidial_admin_log set event_date=NOW(), user='$VDADuser', ip_address='$VARserver_ip', event_section='USERS', event_type='MODIFY', record_id='$VDADuser', event_code='MAX IN CALLS MODIFY USER', event_sql='DELETE FROM vicidial_live_inbound_agents where user=$VDADuser', event_notes='|$max_inbound_count|$max_inbound_calls|$VDADuser|$callerid|IC|';"; $SQL_log = "$stmtA|$stmtB";
$affected_rows = $dbhA->do($stmtA); $SQL_log =~ s/'|%//gi;
$stmtC = "INSERT INTO vicidial_admin_log set event_date=NOW(), user='$VDADuser', ip_address='$VARserver_ip', event_section='USERS', event_type='MODIFY', record_id='$VDADuser', event_code='MAX IN CALLS MODIFY USER', event_sql='$SQL_log', event_notes='|$max_inbound_count|$max_inbound_calls|$VDADuser|$callerid|IC|$max_inbound_calls_outcome|$closer_campaigns|$ADcloser_campaignsARYct|';";
$affected_rows = $dbhA->do($stmtC);
$dbhP=$dbhA; $mysql_count='02204'; $MEL_aff_rows=$affected_rows; &mysql_error_logging; $dbhP=$dbhA; $mysql_count='02204'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- MAX INBOUND AGENT CALLS TRIGGER: |$max_inbound_count|$max_inbound_calls|$VDADuser|$callerid|"; &agi_output;} if ($AGILOG) {$agi_string = "-- MAX INBOUND AGENT CALLS TRIGGER: |$max_inbound_count|$max_inbound_calls|$VDADuser|$callerid|$max_inbound_calls_outcome|$closer_campaigns|$ADcloser_campaignsARYct|"; &agi_output;}
} }
} }
##### END check for user max inbound calls ##### ##### END check for user max inbound calls #####
@@ -989,7 +989,8 @@ ready_max_logout MEDIUMINT(7) default '0',
callback_display_days SMALLINT(3) default '0', callback_display_days SMALLINT(3) default '0',
three_way_record_stop ENUM('Y','N') default 'N', three_way_record_stop ENUM('Y','N') default 'N',
hangup_xfer_record_start ENUM('Y','N') default 'N', hangup_xfer_record_start ENUM('Y','N') default 'N',
scheduled_callbacks_email_alert ENUM('Y', 'N') default 'N' scheduled_callbacks_email_alert ENUM('Y', 'N') default 'N',
max_inbound_calls_outcome ENUM('DEFAULT','ALLOW_AGENTDIRECT','ALLOW_MI_PAUSE','ALLOW_AGENTDIRECT_AND_MI_PAUSE') default 'DEFAULT'
) ENGINE=MyISAM; ) ENGINE=MyISAM;
CREATE TABLE vicidial_lists ( CREATE TABLE vicidial_lists (
@@ -4097,4 +4098,4 @@ INSERT INTO vicidial_settings_containers(container_id,container_notes,container_
UPDATE system_settings set vdc_agent_api_active='1'; UPDATE system_settings set vdc_agent_api_active='1';
UPDATE system_settings SET db_schema_version='1524',db_schema_update_date=NOW(),reload_timestamp=NOW(); UPDATE system_settings SET db_schema_version='1525',db_schema_update_date=NOW(),reload_timestamp=NOW();
+4
View File
@@ -433,3 +433,7 @@ UPDATE system_settings SET db_schema_version='1523',db_schema_update_date=NOW()
ALTER TABLE vicidial_lists_fields ADD field_duplicate ENUM('Y','N') default 'N'; ALTER TABLE vicidial_lists_fields ADD field_duplicate ENUM('Y','N') default 'N';
UPDATE system_settings SET db_schema_version='1524',db_schema_update_date=NOW() where db_schema_version < 1524; UPDATE system_settings SET db_schema_version='1524',db_schema_update_date=NOW() where db_schema_version < 1524;
ALTER TABLE vicidial_campaigns ADD max_inbound_calls_outcome ENUM('DEFAULT','ALLOW_AGENTDIRECT','ALLOW_MI_PAUSE','ALLOW_AGENTDIRECT_AND_MI_PAUSE') default 'DEFAULT';
UPDATE system_settings SET db_schema_version='1525',db_schema_update_date=NOW() where db_schema_version < 1525;
+32 -5
View File
@@ -439,10 +439,11 @@
# 171018-1310 - Added code for campaign scheduled callback email alerts # 171018-1310 - Added code for campaign scheduled callback email alerts
# 171026-0107 - Added optional queue_log logging # 171026-0107 - Added optional queue_log logging
# 171116-2334 - Added code for duplicate fields # 171116-2334 - Added code for duplicate fields
# 171124-1158 - Added max_inbound_calls_outcome options
# #
$version = '2.14-333'; $version = '2.14-334';
$build = '171116-2334'; $build = '171124-1158';
$php_script = 'vdc_db_query.php'; $php_script = 'vdc_db_query.php';
$mel=1; # Mysql Error Log enabled = 1 $mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=700; $mysql_log_count=700;
@@ -1412,6 +1413,7 @@ if ($ACTION == 'regCLOSER')
} }
else else
{ {
$orig_closer_choice = $closer_choice;
$stmt = "SELECT max_inbound_calls FROM vicidial_users where user='$user';"; $stmt = "SELECT max_inbound_calls FROM vicidial_users where user='$user';";
$rslt=mysql_to_mysqli($stmt, $link); $rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00587',$user,$server_ip,$session_name,$one_mysql_log);} if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00587',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -1422,7 +1424,7 @@ if ($ACTION == 'regCLOSER')
$row=mysqli_fetch_row($rslt); $row=mysqli_fetch_row($rslt);
$VU_max_inbound_calls = $row[0]; $VU_max_inbound_calls = $row[0];
} }
$stmt = "SELECT max_inbound_calls FROM vicidial_campaigns where campaign_id='$campaign';"; $stmt = "SELECT max_inbound_calls,max_inbound_calls_outcome FROM vicidial_campaigns where campaign_id='$campaign';";
$rslt=mysql_to_mysqli($stmt, $link); $rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00589',$user,$server_ip,$session_name,$one_mysql_log);} if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00589',$user,$server_ip,$session_name,$one_mysql_log);}
if ($format=='debug') {echo "\n<!-- $rowx[0]|$stmt -->";} if ($format=='debug') {echo "\n<!-- $rowx[0]|$stmt -->";}
@@ -1431,6 +1433,7 @@ if ($ACTION == 'regCLOSER')
{ {
$row=mysqli_fetch_row($rslt); $row=mysqli_fetch_row($rslt);
$CP_max_inbound_calls = $row[0]; $CP_max_inbound_calls = $row[0];
$max_inbound_calls_outcome = $row[1];
} }
if ( ($VU_max_inbound_calls > 0) or ($CP_max_inbound_calls > 0) ) if ( ($VU_max_inbound_calls > 0) or ($CP_max_inbound_calls > 0) )
@@ -1461,11 +1464,35 @@ if ($ACTION == 'regCLOSER')
if (preg_match('/INBOUND_MAN|MANUAL/',$dial_method)) if (preg_match('/INBOUND_MAN|MANUAL/',$dial_method))
{$vla_autodial = 'N';} {$vla_autodial = 'N';}
$standard_closer_update=1;
if ( ($closer_choice == "MGRLOCK-") or ($closer_choice == "MAXLOCK-") ) if ( ($closer_choice == "MGRLOCK-") or ($closer_choice == "MAXLOCK-") )
{ {
$standard_closer_update=0;
if ($closer_choice == "MAXLOCK-") if ($closer_choice == "MAXLOCK-")
{ {
$closer_choice = " -"; if (preg_match("/ALLOW_AGENTDIRECT/",$max_inbound_calls_outcome))
{
$standard_closer_update=1;
$ADcloser_campaigns = preg_replace("/^ | -$/",'',$orig_closer_choice);
$ADcloser_campaignsARY = explode(" ",$ADcloser_campaigns);
$ADcloser_campaignsARYct = count($ADcloser_campaignsARY);
$ADc=0;
$ADcloser_campaigns='';
while ($ADc < $ADcloser_campaignsARYct)
{
if (preg_match("/AGENTDIRECT/i",$ADcloser_campaignsARY[$ADc]))
{$ADcloser_campaigns .= "$ADcloser_campaignsARY[$ADc] ";}
$ADc++;
}
if (strlen($ADcloser_campaigns) > 3)
{$ADcloser_campaigns = " ".$ADcloser_campaigns."-";}
else
{$ADcloser_campaigns = " -";}
$closer_choice = $ADcloser_campaigns;
}
else
{$closer_choice = " -";}
} }
else else
{ {
@@ -1510,7 +1537,7 @@ if ($ACTION == 'regCLOSER')
$rslt=mysql_to_mysqli($stmt, $link); $rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00008',$user,$server_ip,$session_name,$one_mysql_log);} if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00008',$user,$server_ip,$session_name,$one_mysql_log);}
} }
else if ($standard_closer_update > 0)
{ {
$stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice',last_state_change='$NOW_TIME',outbound_autodial='$vla_autodial' where user='$user' and server_ip='$server_ip';"; $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice',last_state_change='$NOW_TIME',outbound_autodial='$vla_autodial' where user='$user' and server_ip='$server_ip';";
if ($format=='debug') {echo "\n<!-- $stmt -->";} if ($format=='debug') {echo "\n<!-- $stmt -->";}
+30 -4
View File
@@ -569,10 +569,11 @@
# 171011-1524 - Added webphone_layout options # 171011-1524 - Added webphone_layout options
# 171026-0109 - Small change for email queue_log logging # 171026-0109 - Small change for email queue_log logging
# 171115-0713 - Hide preview call if preview campaign option is disabled # 171115-0713 - Hide preview call if preview campaign option is disabled
# 171124-1057 - Added max_inbound_calls_outcome options
# #
$version = '2.14-539c'; $version = '2.14-540c';
$build = '171115-0713'; $build = '171124-1057';
$mel=1; # Mysql Error Log enabled = 1 $mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=87; $mysql_log_count=87;
$one_mysql_log=0; $one_mysql_log=0;
@@ -1791,7 +1792,7 @@ else
$HKstatusnames = substr("$HKstatusnames", 0, -1); $HKstatusnames = substr("$HKstatusnames", 0, -1);
##### grab the campaign settings ##### 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 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 FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
$rslt=mysql_to_mysqli($stmt, $link); $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 ($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";} if ($DB) {echo "$stmt\n";}
@@ -1937,6 +1938,11 @@ else
$callback_display_days = $row[138]; $callback_display_days = $row[138];
$three_way_record_stop = $row[139]; $three_way_record_stop = $row[139];
$hangup_xfer_record_start = $row[140]; $hangup_xfer_record_start = $row[140];
$max_inbound_calls_outcome= $row[141];
$MI_PAUSE = 0;
if (preg_match("/MI_PAUSE/",$max_inbound_calls_outcome))
{$MI_PAUSE = 1;}
if ($VU_ready_max_logout >= 0) if ($VU_ready_max_logout >= 0)
{$ready_max_logout = $VU_ready_max_logout;} {$ready_max_logout = $VU_ready_max_logout;}
@@ -2206,7 +2212,21 @@ else
$closer_campaigns = preg_replace("/^ | -$/","",$closer_campaigns); $closer_campaigns = preg_replace("/^ | -$/","",$closer_campaigns);
$closer_campaigns = preg_replace("/ /","','",$closer_campaigns); $closer_campaigns = preg_replace("/ /","','",$closer_campaigns);
$ADcloser_campaigns = preg_replace("/'/",'',$closer_campaigns);
$closer_campaigns = "'$closer_campaigns'"; $closer_campaigns = "'$closer_campaigns'";
$ADcloser_campaignsARY = explode(',',$ADcloser_campaigns);
$ADcloser_campaignsARYct = count($ADcloser_campaignsARY);
$ADc=0;
$ADcloser_campaigns='';
while ($ADc < $ADcloser_campaignsARYct)
{
if (preg_match("/AGENTDIRECT/i",$ADcloser_campaignsARY[$ADc]))
{$ADcloser_campaigns .= "'$ADcloser_campaignsARY[$ADc]',";}
$ADc++;
}
if (strlen($ADcloser_campaigns) > 3)
{$ADcloser_campaigns = preg_replace("/,$/","",$ADcloser_campaigns);}
if ( (preg_match('/Y/',$agent_pause_codes_active)) or (preg_match('/FORCE/',$agent_pause_codes_active)) ) if ( (preg_match('/Y/',$agent_pause_codes_active)) or (preg_match('/FORCE/',$agent_pause_codes_active)) )
{ {
@@ -2258,9 +2278,14 @@ else
$max_inbound_count = $row[0]; $max_inbound_count = $row[0];
if ($max_inbound_count >= $max_inbound_calls) if ($max_inbound_count >= $max_inbound_calls)
{
if (preg_match("/ALLOW_AGENTDIRECT/",$max_inbound_calls_outcome))
{$closer_campaigns = $ADcloser_campaigns;}
else
{$closer_campaigns = "''";} {$closer_campaigns = "''";}
} }
} }
}
$VARingroups=''; $VARingroups='';
$VARingroup_handlers=''; $VARingroup_handlers='';
@@ -4561,6 +4586,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var inbound_post_call_survey=''; var inbound_post_call_survey='';
var inbound_survey_participate=''; var inbound_survey_participate='';
var left_3way_timeout=0; var left_3way_timeout=0;
var MI_PAUSE='<?php echo $MI_PAUSE ?>';
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 = "<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_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\" />"; var DiaLControl_auto_HTML_OFF = "<img src=\"./images/<?php echo _QXZ("vdc_LB_blank_OFF.gif") ?>\" border=\"0\" alt=\"pause button disabled\" />";
@@ -17056,7 +17082,7 @@ function phone_number_format(formatphone) {
agent_events('ingroup_screen_closed', '', aec); aec++; agent_events('ingroup_screen_closed', '', aec); aec++;
MainPanelToFront(); MainPanelToFront();
var CloserSelecting = 0; var CloserSelecting = 0;
if (dial_method == "INBOUND_MAN") if ( (dial_method == "INBOUND_MAN") && (MI_PAUSE != '1') )
{ {
dial_method = "MANUAL"; dial_method = "MANUAL";
auto_dial_level=0; auto_dial_level=0;
File diff suppressed because one or more lines are too long
+6 -1
View File
@@ -142,9 +142,9 @@
# 171020-0028 - Added whiteboard report entry # 171020-0028 - Added whiteboard report entry
# 171114-1255 - Updated definitions of SALEs to specifically mention status flag of SALE set to Y # 171114-1255 - Updated definitions of SALEs to specifically mention status flag of SALE set to Y
# 171116-1727 - Added lists_fields-field_duplicate entry # 171116-1727 - Added lists_fields-field_duplicate entry
# 171124-1045 - Added campaigns-max_inbound_calls_outcome entry
# #
require("dbconnect_mysqli.php"); require("dbconnect_mysqli.php");
require("functions.php"); require("functions.php");
@@ -2088,6 +2088,11 @@ if ($SSqc_features_active > 0)
<BR> <BR>
<B><?php echo _QXZ("Max Inbound Calls"); ?> -</B><?php echo _QXZ("If this setting is set to a number greater than 0, then it will be the maximum number of inbound calls that an agent can handle across all inbound groups in one day. If the agent reaches their maximum number of inbound calls, then they will not be able to select inbound groups to take calls from until the next day. This setting can be overridden by the User setting of the same name. Default is 0 for disabled."); ?> <B><?php echo _QXZ("Max Inbound Calls"); ?> -</B><?php echo _QXZ("If this setting is set to a number greater than 0, then it will be the maximum number of inbound calls that an agent can handle across all inbound groups in one day. If the agent reaches their maximum number of inbound calls, then they will not be able to select inbound groups to take calls from until the next day. This setting can be overridden by the User setting of the same name. Default is 0 for disabled."); ?>
<BR>
<A NAME="campaigns-max_inbound_calls_outcome">
<BR>
<B><?php echo _QXZ("Max Inbound Calls Outcome"); ?> -</B><?php echo _QXZ("If the Max Inbound Calls setting above is enabled, this will be the outcome of what happens to the agent when the maximum number of inbound calls is reached. DEFAULT will halt all inbound call handling to the agent, and if the agent is in an INBOUND_MAN campaign, it will only allow them to manual dial, with no pausing ability. ALLOW_AGENTDIRECT will allow the agent to continue to receive AGENTDIRECT in-group calls after they have reached the max inbound calls count. ALLOW_MI_PAUSE will allow an agent in an INBOUND_MAN campaign to continue to pause after they have reached the max inbound calls count. Default is DEFAULT."); ?>