Added Call Time after-hours filename override options used by inbound groups

Added Campaign setting for inbound queue no dial that will prohibit outbound auto-dialing if there are any allowed in-group calls in queue if enabled

git-svn-id: svn://192.168.202.10@1436 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2010-05-18 11:19:12 +00:00
parent cdeacb4e8d
commit 567bccedc4
7 changed files with 383 additions and 251 deletions
+10
View File
@@ -23,6 +23,11 @@ REQUIRED STEPS!!!
\. /path/from/root/extras/upgrade_2.4.sql
quit
3. For each of your ViciDial servers, go the Admin -> Servers -> Modify Server
page and set each one to "Rebuild conf files = Y" and click submit.
This will rebuild the conf files to ensure any changes are updated.
OTHER CHANGES:
1. Changed "After hours", "No agent no queue" and "drop timeout reached" DROPs
@@ -139,6 +144,11 @@ OTHER CHANGES:
32. Added several PRESS-1 options to the Hold Time Option settings for In-Groups
33. Added Call Time after-hours filename override option used by inbound groups
34. Added Campaign setting for inbound queue no dial that will prohibit outbound
auto-dialing if there are any allowed in-group calls in queue if enabled
+20 -10
View File
@@ -128,6 +128,7 @@
# 100429-1457 - Remote agent fixes
# 100512-2118 - Added several press-1 hold time options
# 100513-2338 - Changed hold time callback filename to after press filename and now plays after all PRESS-1
# 100518-0710 - Added call time after hours override options
#
$script = 'agi-VDAD_ALL_inbound.agi';
@@ -610,16 +611,16 @@ while ($sthArows > $cbc)
}
$sthA->finish();
if ($wday==0) {$daySQL=',ct_sunday_start,ct_sunday_stop';}
if ($wday==1) {$daySQL=',ct_monday_start,ct_monday_stop';}
if ($wday==2) {$daySQL=',ct_tuesday_start,ct_tuesday_stop';}
if ($wday==3) {$daySQL=',ct_wednesday_start,ct_wednesday_stop';}
if ($wday==4) {$daySQL=',ct_thursday_start,ct_thursday_stop';}
if ($wday==5) {$daySQL=',ct_friday_start,ct_friday_stop';}
if ($wday==6) {$daySQL=',ct_saturday_start,ct_saturday_stop';}
if ($wday==0) {$daySQL=',ct_sunday_start,ct_sunday_stop,sunday_afterhours_filename_override';}
if ($wday==1) {$daySQL=',ct_monday_start,ct_monday_stop,monday_afterhours_filename_override';}
if ($wday==2) {$daySQL=',ct_tuesday_start,ct_tuesday_stop,tuesday_afterhours_filename_override';}
if ($wday==3) {$daySQL=',ct_wednesday_start,ct_wednesday_stop,wednesday_afterhours_filename_override';}
if ($wday==4) {$daySQL=',ct_thursday_start,ct_thursday_stop,thursday_afterhours_filename_override';}
if ($wday==5) {$daySQL=',ct_friday_start,ct_friday_stop,friday_afterhours_filename_override';}
if ($wday==6) {$daySQL=',ct_saturday_start,ct_saturday_stop,saturday_afterhours_filename_override';}
### Grab call_times values from the database
$stmtA = "SELECT ct_default_start,ct_default_stop $daySQL FROM vicidial_call_times where call_time_id = '$call_time_id';";
$stmtA = "SELECT ct_default_start,ct_default_stop,default_afterhours_filename_override $daySQL FROM vicidial_call_times where call_time_id = '$call_time_id';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -627,8 +628,10 @@ $sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
$ct_default_start = $aryA[0];
$ct_default_stop = $aryA[1];
$ct_day_start = $aryA[2];
$ct_day_stop = $aryA[3];
$deafult_afterhours_filename_override = $aryA[2];
$ct_day_start = $aryA[3];
$ct_day_stop = $aryA[4];
$day_afterhours_filename_override = $aryA[5];
$sthA->finish();
if ( ($ct_day_start > 0) || ($ct_day_stop > 0) )
@@ -637,6 +640,11 @@ if ( ($ct_day_start > 0) || ($ct_day_stop > 0) )
$ct_default_stop = $ct_day_stop;
}
if ( (length($deafult_afterhours_filename_override) > 0) && ($deafult_afterhours_filename_override !~ /---NONE---/) )
{$after_hours_message_filename = $deafult_afterhours_filename_override;}
if ( (length($day_afterhours_filename_override) > 0) && ($day_afterhours_filename_override !~ /---NONE---/) )
{$after_hours_message_filename = $day_afterhours_filename_override;}
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
@@ -849,6 +857,7 @@ if ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) )
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02019'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- AH VDCL vac record deleted: |$affected_rows| $VDADcampaign|"; &agi_output;}
if ($AGILOG) {$agi_string = "-- AH action: |$$after_hours_action|$after_hours_exten|$after_hours_message_filename|$after_hours_voicemail|"; &agi_output;}
if ($after_hours_action =~ /EXTENSION|VOICEMAIL|IN_GROUP/)
{
@@ -2990,6 +2999,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
if ($drop_timer >= 2) {$drop_timer = ($drop_timer + 10);} # add prompt play time to total queue time
$AGI->stream_file('sip-silence'); # stop music-on-hold process
$AGI->stream_file('sip-silence'); # stop music-on-hold process
$AGI->stream_file('sip-silence'); # stop music-on-hold process
+38 -2
View File
@@ -299,6 +299,8 @@ while($one_day_interval > 0)
@DBIPcampaigncid=@MT;
@DBIPexistcalls=@MT;
@DBIPexistcalls_IN=@MT;
@DBIPexistcalls_IN_ALL=@MT;
@DBIPexistcalls_IN_LIVE=@MT;
@DBIPexistcalls_OUT=@MT;
@DBIPgoalcalls=@MT;
@DBIPmakecalls=@MT;
@@ -315,6 +317,7 @@ while($one_day_interval > 0)
@DBIPqueue_priority=@MT;
@DBIPdial_method=@MT;
@DBIPuse_custom_cid=@MT;
@DBIPinbound_queue_no_dial=@MT;
$active_line_counter=0;
$user_counter=0;
@@ -509,7 +512,7 @@ while($one_day_interval > 0)
### grab the dial_level and multiply by active agents to get your goalcalls
$DBIPadlevel[$user_CIPct]=0;
$stmtA = "SELECT auto_dial_level,local_call_time,dial_timeout,dial_prefix,campaign_cid,active,campaign_vdad_exten,closer_campaigns,omit_phone_code,available_only_ratio_tally,auto_alt_dial,campaign_allow_inbound,queue_priority,dial_method,use_custom_cid FROM vicidial_campaigns where campaign_id='$DBIPcampaign[$user_CIPct]'";
$stmtA = "SELECT auto_dial_level,local_call_time,dial_timeout,dial_prefix,campaign_cid,active,campaign_vdad_exten,closer_campaigns,omit_phone_code,available_only_ratio_tally,auto_alt_dial,campaign_allow_inbound,queue_priority,dial_method,use_custom_cid,inbound_queue_no_dial FROM vicidial_campaigns where campaign_id='$DBIPcampaign[$user_CIPct]'";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -540,6 +543,7 @@ while($one_day_interval > 0)
$DBIPqueue_priority[$user_CIPct] = $aryA[12];
$DBIPdial_method[$user_CIPct] = $aryA[13];
$DBIPuse_custom_cid[$user_CIPct] = $aryA[14];
$DBIPinbound_queue_no_dial[$user_CIPct] = $aryA[15];
$rec_count++;
}
@@ -593,6 +597,28 @@ while($one_day_interval > 0)
$DBIPexistcalls_IN[$user_CIPct] = $aryA[0];
}
$sthA->finish();
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where (call_type='IN' and campaign_id IN($DBIPclosercamp[$user_CIPct])) and status IN('SENT','RINGING','LIVE','XFER','CLOSER');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$DBIPexistcalls_IN_ALL[$user_CIPct] = $aryA[0];
}
$sthA->finish();
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where call_type='IN' and campaign_id IN($DBIPclosercamp[$user_CIPct]) and status IN('LIVE');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$DBIPexistcalls_IN_LIVE[$user_CIPct] = $aryA[0];
}
$sthA->finish();
}
else
{$DBIPexistcalls_IN[$user_CIPct]=0;}
@@ -609,6 +635,8 @@ while($one_day_interval > 0)
$sthA->finish();
$DBIPexistcalls[$user_CIPct] = ($DBIPexistcalls_IN[$user_CIPct] + $DBIPexistcalls_OUT[$user_CIPct]);
if ($DBIPinbound_queue_no_dial[$user_CIPct] =~ /ALL_SERVERS/)
{$DBIPexistcalls[$user_CIPct] = ($DBIPexistcalls_IN_ALL[$user_CIPct] + $DBIPexistcalls_OUT[$user_CIPct]);}
if ( ($DBIPcampaign_ready_agents[$user_CIPct] > 0) && ($DBIPexistcalls_IN[$user_CIPct] > 0) )
{
@@ -666,7 +694,7 @@ while($one_day_interval > 0)
if ($DBIPmakecalls[$user_CIPct] > 0)
{$active_line_counter = ($DBIPmakecalls[$user_CIPct] + $active_line_counter);}
$event_string="$DBIPcampaign[$user_CIPct] $DBIPaddress[$user_CIPct]: Calls to place: $DBIPmakecalls[$user_CIPct] ($DBIPgoalcalls[$user_CIPct] - $DBIPexistcalls[$user_CIPct] [$DBIPexistcalls_IN[$user_CIPct] + $DBIPexistcalls_OUT[$user_CIPct]]) $active_line_counter $MVT_msg";
$event_string="$DBIPcampaign[$user_CIPct] $DBIPaddress[$user_CIPct]: Calls to place: $DBIPmakecalls[$user_CIPct] ($DBIPgoalcalls[$user_CIPct] - $DBIPexistcalls[$user_CIPct] [$DBIPexistcalls_IN[$user_CIPct] + $DBIPexistcalls_OUT[$user_CIPct]|$DBIPexistcalls_IN_ALL[$user_CIPct]|$DBIPexistcalls_IN_LIVE[$user_CIPct]]) $active_line_counter $MVT_msg";
&event_logger;
### Calculate campaign-wide agent waiting and calls waiting differential
@@ -802,6 +830,13 @@ while($one_day_interval > 0)
$event_string="$DBIPcampaign[$user_CIPct] $DBIPaddress[$user_CIPct]: MANUAL DIAL CAMPAIGN, NO DIALING";
&event_logger;
}
else
{
if ( ($DBIPinbound_queue_no_dial[$user_CIPct] =~ /ENABLED/) && ($DBIPexistcalls_IN_LIVE[$user_CIPct] > 0) )
{
$event_string="$DBIPcampaign[$user_CIPct] $DBIPexistcalls_IN_LIVE[$user_CIPct]: INBOUND QUEUE NO DIAL, NO DIALING";
&event_logger;
}
else
{
$event_string="$DBIPcampaign[$user_CIPct] $DBIPaddress[$user_CIPct]: CALLING";
@@ -1038,6 +1073,7 @@ while($one_day_interval > 0)
}
}
}
}
$user_CIPct++;
}
@@ -746,7 +746,8 @@ scheduled_callbacks_count ENUM('LIVE','ALL_ACTIVE') default 'ALL_ACTIVE',
manual_dial_override ENUM('NONE','ALLOW_ALL','DISABLE_ALL') default 'NONE',
blind_monitor_warning ENUM('DISABLED','ALERT','NOTICE','AUDIO','ALERT_NOTICE','ALERT_AUDIO','NOTICE_AUDIO','ALL') default 'DISABLED',
blind_monitor_message VARCHAR(255) default 'Someone is blind monitoring your session',
blind_monitor_filename VARCHAR(100) default ''
blind_monitor_filename VARCHAR(100) default '',
inbound_queue_no_dial ENUM('DISABLED','ENABLED','ALL_SERVERS') default 'DISABLED'
);
CREATE TABLE vicidial_lists (
@@ -1078,7 +1079,15 @@ ct_friday_start SMALLINT(4) unsigned default '0',
ct_friday_stop SMALLINT(4) unsigned default '0',
ct_saturday_start SMALLINT(4) unsigned default '0',
ct_saturday_stop SMALLINT(4) unsigned default '0',
ct_state_call_times TEXT default ''
ct_state_call_times TEXT default '',
default_afterhours_filename_override VARCHAR(255) default '',
sunday_afterhours_filename_override VARCHAR(255) default '',
monday_afterhours_filename_override VARCHAR(255) default '',
tuesday_afterhours_filename_override VARCHAR(255) default '',
wednesday_afterhours_filename_override VARCHAR(255) default '',
thursday_afterhours_filename_override VARCHAR(255) default '',
friday_afterhours_filename_override VARCHAR(255) default '',
saturday_afterhours_filename_override VARCHAR(255) default ''
);
CREATE TABLE vicidial_state_call_times (
@@ -2232,7 +2241,7 @@ ALTER TABLE vicidial_agent_log_archive MODIFY agent_log_id INT(9) UNSIGNED NOT N
CREATE TABLE vicidial_carrier_log_archive LIKE vicidial_carrier_log;
UPDATE system_settings SET db_schema_version='1222',db_schema_update_date=NOW();
UPDATE system_settings SET db_schema_version='1223',db_schema_update_date=NOW();
GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost;
+16
View File
@@ -330,3 +330,19 @@ UPDATE vicidial_inbound_groups SET hold_time_option_press_filename='to-be-called
UPDATE system_settings SET db_schema_version='1222',db_schema_update_date=NOW();
ALTER TABLE vicidial_campaigns ADD inbound_queue_no_dial ENUM('DISABLED','ENABLED','ALL_SERVERS') default 'DISABLED';
ALTER TABLE vicidial_call_times ADD default_afterhours_filename_override VARCHAR(255) default '';
ALTER TABLE vicidial_call_times ADD sunday_afterhours_filename_override VARCHAR(255) default '';
ALTER TABLE vicidial_call_times ADD monday_afterhours_filename_override VARCHAR(255) default '';
ALTER TABLE vicidial_call_times ADD tuesday_afterhours_filename_override VARCHAR(255) default '';
ALTER TABLE vicidial_call_times ADD wednesday_afterhours_filename_override VARCHAR(255) default '';
ALTER TABLE vicidial_call_times ADD thursday_afterhours_filename_override VARCHAR(255) default '';
ALTER TABLE vicidial_call_times ADD friday_afterhours_filename_override VARCHAR(255) default '';
ALTER TABLE vicidial_call_times ADD saturday_afterhours_filename_override VARCHAR(255) default '';
UPDATE system_settings SET db_schema_version='1223',db_schema_update_date=NOW();
@@ -190,6 +190,10 @@ If Hold Time Option is set to one of the PRESS_ options, this is the filename pr
If one of the PRESS_ options is selected, it will play the Press Filename defined below and give the customer the option to press 1 on their phone to leave the queue and run the selected option||
Hold Time Option After Press Filename||
If Hold Time Option is set to one of the PRESS_ options or CALLERID_CALLBACK, this is the filename prompt that is played after the customer has pressed 1 or the call has been added to the callback list||
Inbound Queue No Dial||
This feature if set to ENABLED allows you to prevent outbound auto-dialing of this campaign if there are any inbound calls waiting in queue that are part of the allowed inbound groups set in this campaign. Setting this to ALL_SERVERS will change the algorithm to calculate all inbound calls as active calls on this server even if they are on another server which will reduce the chance of placing unnecessary outbound calls if you have calls coming in on another server. Default is DISABLED||
After Hours Filename Override||
These fields allow you to override the After Hours message for inbound groups if it is set to something. Default is empty||
AST_VICIDIAL_ingrouplist.php
File diff suppressed because one or more lines are too long