diff --git a/UPGRADE b/UPGRADE index 073463d8..f17f7ecf 100644 --- a/UPGRADE +++ b/UPGRADE @@ -360,6 +360,9 @@ OTHER CHANGES: 99. Added campaign setting to filter ANYONE Scheduled Callbacks by the DNC settings set in the campaign +100. Added _wait_time options to Next Agent Call settings for Campaigns and + Inbound Groups. + diff --git a/agi/agi-VDAD_ALL_inbound.agi b/agi/agi-VDAD_ALL_inbound.agi index c32a9432..82bb3a87 100644 --- a/agi/agi-VDAD_ALL_inbound.agi +++ b/agi/agi-VDAD_ALL_inbound.agi @@ -229,6 +229,7 @@ # 180521-0736 - Changed closer logs for AGENTDIRECT calls to log destination user # 180601-0932 - Added user variable sending option on enter_ingroup_url feature # 180806-0809 - Added CID callback number validation and change features +# 180926-2351 - Added _wait_time options for next_agent_call # $script = 'agi-VDAD_ALL_inbound.agi'; @@ -2679,6 +2680,11 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override if ($CAMP_callorder =~ /campaign_grade_random/i) {$aco_sub=1; $agent_call_order = 'order by random_id';} if ($CAMP_callorder =~ /fewest_calls$/i) {$aco_sub=1; $agent_call_order = 'order by vicidial_live_inbound_agents.calls_today,vicidial_live_inbound_agents.last_call_finish';} if ($CAMP_callorder =~ /ring_all$/i) {$aco_sub=0; $agent_call_order = 'order by vicidial_live_agents.last_state_change';} + if ($CAMP_callorder =~ /overall_user_level_wait_time/i) {$agent_call_order = 'order by user_level desc,vicidial_live_agents.last_state_change';} + if ($CAMP_callorder =~ /campaign_rank_wait_time/i) {$agent_call_order = 'order by campaign_weight desc,vicidial_live_agents.last_state_change';} + if ($CAMP_callorder =~ /fewest_calls_campaign_wait_time/i) {$agent_call_order = 'order by vicidial_live_agents.calls_today,vicidial_live_agents.last_state_change';} + if ($CAMP_callorder =~ /inbound_group_rank_wait_time/i) {$aco_sub=1; $agent_call_order = 'order by group_weight desc,vicidial_live_agents.last_state_change';} + if ($CAMP_callorder =~ /fewest_calls_wait_time$/i) {$aco_sub=1; $agent_call_order = 'order by vicidial_live_inbound_agents.calls_today,vicidial_live_agents.last_state_change';} $vci=0; $INBOUNDcampsSQL="''"; diff --git a/agi/agi-VDAD_ALL_outbound.agi b/agi/agi-VDAD_ALL_outbound.agi index 63e326e3..1f24f250 100644 --- a/agi/agi-VDAD_ALL_outbound.agi +++ b/agi/agi-VDAD_ALL_outbound.agi @@ -46,7 +46,7 @@ #exten => 8366,4,AGI(agi-VDAD_ALL_outbound.agi,SURVEY-----LB-----US_pol_survey_hello-----1238-----8-----US_pol_survey_transfer-----US_thanks_no_contact-----OPTOUT-----DNC) #exten => 8366,5,Hangup # -# Copyright (C) 2017 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2018 Matt Florell LICENSE: AGPLv2 # # changes: # 80218-2027 - First Build @@ -118,6 +118,7 @@ # 161201-1003 - Fixed LRERR logging issue # 170921-2007 - Fix for CALLID in beginning of recording filename # 170930-0913 - Added extension append options +# 180926-2350 - Added _wait_time options for next_agent_call # $script = 'agi-VDAD_ALL_outbound.agi'; @@ -2162,8 +2163,11 @@ while ($drop_timer <= $DROP_TIME) if ($CAMP_callorder =~ /oldest_call_finish/i) {$agent_call_order = 'order by last_call_finish';} if ($CAMP_callorder =~ /random/i) {$agent_call_order = 'order by random_id';} if ($CAMP_callorder =~ /campaign_rank/i) {$agent_call_order = 'order by campaign_weight desc,last_call_finish';} - if ($CAMP_callorder =~ /fewest_calls/i) {$aco_sub=1; $agent_call_order = 'order by calls_today';} + if ($CAMP_callorder =~ /fewest_calls/i) {$aco_sub=1; $agent_call_order = 'order by calls_today,last_call_finish';} if ($CAMP_callorder =~ /campaign_grade_random/i) {$aco_sub=1; $agent_call_order = 'order by random_id';} + if ($CAMP_callorder =~ /overall_user_level_wait_time/i) {$agent_call_order = 'order by user_level desc,last_state_change';} + if ($CAMP_callorder =~ /campaign_rank_wait_time/i) {$agent_call_order = 'order by campaign_weight desc,last_state_change';} + if ($CAMP_callorder =~ /fewest_calls_wait_time/i) {$aco_sub=1; $agent_call_order = 'order by calls_today,last_state_change';} ##### Attempt to send call to an agent on this server only ##### diff --git a/bin/AST_expired_list_exporter.pl b/bin/AST_expired_list_exporter.pl index e0507b64..26e28fd3 100644 --- a/bin/AST_expired_list_exporter.pl +++ b/bin/AST_expired_list_exporter.pl @@ -16,6 +16,8 @@ # seven settings that can be recognized by this script: # --campaign_id (required, name of holding campaign) # --last_call_date_days (required, number of days list must be inactive before purging) +# --last_call_date_days_export (separate date option for exporting only) +# --last_call_date_days_delete (separate date option for deleting only) # --custom_ftp_host (required, FTP host) # --custom_ftp_user (required, FTP user) # --custom_ftp_pwd (required, FTP password) @@ -28,6 +30,7 @@ # # 180307-2120 - First Build # 180625-0211 - Added options to use different date ranges for exports and deletes +# ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); $year = ($year + 1900); diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index dac5c01c..b3869da2 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -749,7 +749,7 @@ web_form_address TEXT, allow_closers ENUM('Y','N'), hopper_level INT(8) UNSIGNED default '1', auto_dial_level VARCHAR(6) default '0', -next_agent_call ENUM('random','oldest_call_start','oldest_call_finish','campaign_rank','overall_user_level','fewest_calls','longest_wait_time','campaign_grade_random') default 'longest_wait_time', +next_agent_call VARCHAR(40) default 'longest_wait_time', local_call_time VARCHAR(10) DEFAULT '9am-9pm', voicemail_ext VARCHAR(10), dial_timeout TINYINT UNSIGNED default '60', @@ -1126,7 +1126,7 @@ group_color VARCHAR(7), active ENUM('Y','N'), web_form_address TEXT, voicemail_ext VARCHAR(10), -next_agent_call VARCHAR(30) default 'longest_wait_time', +next_agent_call VARCHAR(40) default 'longest_wait_time', fronter_display ENUM('Y','N') default 'Y', ingroup_script VARCHAR(20), get_call_launch ENUM('NONE','SCRIPT','WEBFORM','WEBFORMTWO','WEBFORMTHREE','FORM','EMAIL') default 'NONE', @@ -4303,4 +4303,4 @@ INSERT INTO vicidial_settings_containers(container_id,container_notes,container_ UPDATE system_settings set vdc_agent_api_active='1'; -UPDATE system_settings SET db_schema_version='1559',db_schema_update_date=NOW(),reload_timestamp=NOW(); +UPDATE system_settings SET db_schema_version='1560',db_schema_update_date=NOW(),reload_timestamp=NOW(); diff --git a/extras/upgrade_2.14.sql b/extras/upgrade_2.14.sql index c9aef703..ab5c22ec 100644 --- a/extras/upgrade_2.14.sql +++ b/extras/upgrade_2.14.sql @@ -768,3 +768,8 @@ UPDATE system_settings SET db_schema_version='1558',db_schema_update_date=NOW() ALTER TABLE vicidial_campaigns ADD callback_dnc ENUM('ENABLED','DISABLED') default 'DISABLED'; UPDATE system_settings SET db_schema_version='1559',db_schema_update_date=NOW() where db_schema_version < 1559; + +ALTER TABLE vicidial_campaigns MODIFY next_agent_call VARCHAR(40) default 'longest_wait_time'; +ALTER TABLE vicidial_inbound_groups MODIFY next_agent_call VARCHAR(40) default 'longest_wait_time'; + +UPDATE system_settings SET db_schema_version='1560',db_schema_update_date=NOW() where db_schema_version < 1560; diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index c3c35551..28007e4d 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -4455,12 +4455,13 @@ else # 180922-0958 - Added copying of user selected in-groups in copying of an in-group # 180923-2226 - Added three_way_volume_buttons campaign setting # 180924-1731 - Added callback_dnc campaign setting +# 180927-0018 - Added _wait_time options for next agent call options in campaigns and in-groups # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time -$admin_version = '2.14-691a'; -$build = '180924-1731'; +$admin_version = '2.14-692a'; +$build = '180927-0018'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -6679,7 +6680,7 @@ if ($ADD==11) } echo "(0 = off)$NWB#campaigns-auto_dial_level$NWE\n"; } - echo ""._QXZ("Next Agent Call").": $NWB#campaigns-next_agent_call$NWE\n"; + echo ""._QXZ("Next Agent Call").": $NWB#campaigns-next_agent_call$NWE\n"; echo ""._QXZ("Local Call Time").": $NWB#campaigns-local_call_time$NWE\n"; @@ -7442,7 +7443,7 @@ if ($ADD==1111) echo "$NWB#inbound_groups-user_group$NWE\n"; echo ""._QXZ("Web Form").": $NWB#inbound_groups-web_form_address$NWE\n"; echo ""._QXZ("Voicemail").": $NWB#inbound_groups-voicemail_ext$NWE\n"; - echo ""._QXZ("Next Agent Call").": $NWB#inbound_groups-next_agent_call$NWE\n"; + echo ""._QXZ("Next Agent Call").": $NWB#inbound_groups-next_agent_call$NWE\n"; echo ""._QXZ("Fronter Display").": $NWB#inbound_groups-fronter_display$NWE\n"; echo ""._QXZ("Script").": $NWB#inbound_groups-user_group$NWE\n"; echo ""._QXZ("Web Form").": $NWB#inbound_groups-web_form_address$NWE\n"; # echo "Voicemail: $NWB#inbound_groups-voicemail_ext$NWE\n"; - echo ""._QXZ("Next Agent Email").": $NWB#inbound_groups-next_agent_email$NWE\n"; + echo ""._QXZ("Next Agent Email").": $NWB#inbound_groups-next_agent_email$NWE\n"; echo ""._QXZ("Fronter Display").": $NWB#inbound_groups-fronter_display$NWE\n"; echo ""._QXZ("Script").": $NWB#inbound_groups-user_group$NWE\n"; echo ""._QXZ("Web Form").": $NWB#inbound_groups-web_form_address$NWE\n"; # echo "Voicemail: $NWB#inbound_groups-voicemail_ext$NWE\n"; - echo ""._QXZ("Next Agent Chat").": $NWB#inbound_groups-next_agent_chat$NWE\n"; + echo ""._QXZ("Next Agent Chat").": $NWB#inbound_groups-next_agent_chat$NWE\n"; echo ""._QXZ("Fronter Display").": $NWB#inbound_groups-fronter_display$NWE\n"; echo ""._QXZ("Script").": $NWB#campaigns-auto_alt_dial$NWE $ALTmultiLINK\n"; } - echo ""._QXZ("Next Agent Call").": $NWB#campaigns-next_agent_call$NWE\n"; + echo ""._QXZ("Next Agent Call").": $NWB#campaigns-next_agent_call$NWE\n"; echo ""._QXZ("Local Call Time").": $NWB#inbound_groups-web_form_address$NWE\n"; } - echo ""._QXZ("Next Agent Call").": $NWB#inbound_groups-next_agent_call$NWE\n"; + echo ""._QXZ("Next Agent Call").": $NWB#inbound_groups-next_agent_call$NWE\n"; echo ""._QXZ("Queue Priority").": $NWB#inbound_groups-web_form_address$NWE\n"; } - echo ""._QXZ("Next Agent Email").": $NWB#inbound_groups-next_agent_email$NWE\n"; + echo ""._QXZ("Next Agent Email").": $NWB#inbound_groups-next_agent_email$NWE\n"; echo ""._QXZ("Queue Priority").":