added adaptive_latest_target_gmt field for ADAPT_TAPERED dial method predictive

modified gmt for phones and servers to allow negative double-digit timezones

git-svn-id: svn://192.168.202.10@211 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2006-08-24 17:49:32 +00:00
parent 970b9ed795
commit f33f8764e1
5 changed files with 29 additions and 7 deletions
+4 -1
View File
@@ -251,6 +251,7 @@ while ($sthArows > $rec_count)
$available_only_ratio_tally[$rec_count] = $aryA[47];
$adaptive_dropped_percentage[$rec_count] = $aryA[48];
$adaptive_maximum_level[$rec_count] = $aryA[49];
$adaptive_latest_target_gmt[$rec_count] = $aryA[50];
$rec_count++;
}
@@ -902,10 +903,12 @@ foreach(@campaign_id)
# $available_only_ratio_tally[$rec_count] = $aryA[47];
# $adaptive_dropped_percentage[$rec_count] = $aryA[48];
# $adaptive_maximum_level[$rec_count] = $aryA[49];
# $adaptive_latest_target_gmt[$rec_count] = $aryA[50];
# $adaptive_latest_target_gmt
$stmtA = "UPDATE vicidial_campaign_stats SET calls_today='$VCScalls_today',drops_today='$VCSdrops_today',drops_today_pct='$VCSdrops_today_pct',calls_hour='$VCScalls_hour',drops_hour='$VCSdrops_hour',drops_hour_pct='$VCSdrops_hour_pct',calls_halfhour='$VCScalls_halfhour',drops_halfhour='$VCSdrops_halfhour',drops_halfhour_pct='$VCSdrops_halfhour_pct',calls_fivemin='$VCScalls_five',drops_fivemin='$VCSdrops_five',drops_fivemin_pct='$VCSdrops_five_pct',calls_onemin='$VCScalls_one',drops_onemin='$VCSdrops_one',drops_onemin_pct='$VCSdrops_one_pct' where campaign_id='$campaign_id[$i]';";
$affected_rows = $dbhA->do($stmtA);
$adaptive_string = "|AGENTS: $VCSagents|ACTIVE: $VCSagents_active|CALC: $VCSagents_calc|INCALL: $VCSINCALL|READY: $VCSREADY|LEVEL: $auto_dial_level[$i]|$dial_method[$i]|$available_only_ratio_tally[$i]|$adaptive_dropped_percentage[$i]|$adaptive_maximum_level[$i]| |$VCScalls_today|$VCSdrops_today|$VCSdrops_today_pct| |$VCScalls_hour|$VCSdrops_hour|$VCSdrops_hour_pct| |$VCScalls_halfhour|$VCSdrops_halfhour|$VCSdrops_halfhour_pct| |$VCScalls_five|$VCSdrops_five|$VCSdrops_five_pct| |$VCScalls_one|$VCSdrops_one|$VCSdrops_one_pct| $campaign_id[$i]|";
$adaptive_string = "|AGENTS: $VCSagents|ACTIVE: $VCSagents_active|CALC: $VCSagents_calc|INCALL: $VCSINCALL|READY: $VCSREADY|LEVEL: $auto_dial_level[$i]|$dial_method[$i]|$available_only_ratio_tally[$i]|$adaptive_dropped_percentage[$i]|$adaptive_maximum_level[$i]|$adaptive_latest_target_gmt[$i] |$VCScalls_today|$VCSdrops_today|$VCSdrops_today_pct| |$VCScalls_hour|$VCSdrops_hour|$VCSdrops_hour_pct| |$VCScalls_halfhour|$VCSdrops_halfhour|$VCSdrops_halfhour_pct| |$VCScalls_five|$VCSdrops_five|$VCSdrops_five_pct| |$VCScalls_one|$VCSdrops_one|$VCSdrops_one_pct| $campaign_id[$i]|";
if ($DB) {print "campaign stats updated: $campaign_id[$i] $adaptive_string\n";}
&adaptive_logger;
+4 -3
View File
@@ -16,7 +16,7 @@ picture VARCHAR(19),
messages INT(4),
old_messages INT(4),
protocol ENUM('SIP','Zap','IAX2','EXTERNAL') default 'SIP',
local_gmt TINYINT(2) default '-5',
local_gmt VARCHAR(6) default '-5',
ASTmgrUSERNAME VARCHAR(20) default 'cron',
ASTmgrSECRET VARCHAR(20) default '1234',
login_user VARCHAR(20),
@@ -82,7 +82,7 @@ ASTmgrSECRET VARCHAR(20) NOT NULL default '1234',
ASTmgrUSERNAMEupdate VARCHAR(20) NOT NULL default 'updatecron',
ASTmgrUSERNAMElisten VARCHAR(20) NOT NULL default 'listencron',
ASTmgrUSERNAMEsend VARCHAR(20) NOT NULL default 'sendcron',
local_gmt VARCHAR(5) default '-5',
local_gmt VARCHAR(6) default '-5',
voicemail_dump_exten VARCHAR(20) NOT NULL default '85026666666666',
answer_transfer_agent VARCHAR(20) NOT NULL default '8365',
ext_context VARCHAR(20) NOT NULL default 'default',
@@ -478,7 +478,8 @@ omit_phone_code ENUM('Y','N') default 'N',
dial_method ENUM('MANUAL','RATIO','ADAPT_HARD_LIMIT','ADAPT_TAPERED','ADAPT_AVERAGE') default 'MANUAL',
available_only_ratio_tally ENUM('Y','N') default 'N',
adaptive_dropped_percentage SMALLINT(3) default '3',
adaptive_maximum_level VARCHAR(6) default '3.0'
adaptive_maximum_level VARCHAR(6) default '3.0',
adaptive_latest_target_gmt VARCHAR(6) default '-7'
);
CREATE TABLE vicidial_lists (
+4
View File
@@ -14,8 +14,12 @@ ALTER TABLE vicidial_list_pins MODIFY phone_number VARCHAR(12);
ALTER TABLE vicidial_dnc MODIFY phone_number VARCHAR(12);
ALTER TABLE vicidial_list MODIFY alt_phone VARCHAR(12);
ALTER TABLE phones MODIFY local_gmt VARCHAR(6) default '-5';
ALTER TABLE servers MODIFY local_gmt VARCHAR(6) default '-5';
ALTER TABLE vicidial_campaigns MODIFY auto_dial_level VARCHAR(6) default '0';
ALTER TABLE vicidial_campaigns ADD dial_method ENUM('MANUAL','RATIO','ADAPT_HARD_LIMIT','ADAPT_TAPERED','ADAPT_AVERAGE') default 'MANUAL';
ALTER TABLE vicidial_campaigns ADD available_only_ratio_tally ENUM('Y','N') default 'N';
ALTER TABLE vicidial_campaigns ADD adaptive_dropped_percentage SMALLINT(3) default '3';
ALTER TABLE vicidial_campaigns ADD adaptive_maximum_level VARCHAR(6) default '3.0';
ALTER TABLE vicidial_campaigns ADD adaptive_latest_target_gmt VARCHAR(6) default '-7';
@@ -11,6 +11,7 @@ Dial Method -<\/B> This field is the way to define how dialing is to take place.
Available Only Tally -<\/B> This field if set to Y will leave out INCALL and QUEUE status agents when calculating the number of calls to dial when not in MANUAL dial mode. Default is N
Drop Percentage Limit -<\/B> This field is where you set the limit of the percentage of dropped calls you would like while using an adaptive-predictive dial method, not MANUAL or RATIO
Maximum Adapt Dial Level -<\/B> This field is where you set the limit of the limit to the numbr of lines you would like dialed per agent while using an adaptive-predictive dial method, not MANUAL or RATIO. This number can be higher than the Auto Dial Level if your hardware will support it. Value must be a positive number greater than one and can have decimal places Default 3.0
Latest Target Timezone -<\/B> This field is only used by the ADAPT_TAPERED dial method. You should select the current GMT offset value or timezone of the latest region that you will be calling. This allows the Tapered algorithm to decide how aggressively to dial by how long you have until you will be finished calling. NOTE- If you are calling in the USA and you have a very small amount of leads in Alaska or Hawaii but many leads in Pacific time zone, you should choose the pacific time zone for this field for the ADAPT_TAPERED dial method to work properly
System Performance
Server Logs
@@ -22,6 +23,7 @@ Dial Method
Available Only Tally
Drop Percentage Limit
Maximum Adapt Dial Level
Latest Target Timezone
############################################################ CLIENT
+15 -3
View File
@@ -286,6 +286,8 @@ if (isset($_GET["available_only_ratio_tally"])) {$available_only_ratio_tally=$
elseif (isset($_POST["available_only_ratio_tally"])){$available_only_ratio_tally=$_POST["available_only_ratio_tally"];}
if (isset($_GET["dial_method"])) {$dial_method=$_GET["dial_method"];}
elseif (isset($_POST["dial_method"])) {$dial_method=$_POST["dial_method"];}
if (isset($_GET["adaptive_latest_target_gmt"])) {$adaptive_latest_target_gmt=$_GET["adaptive_latest_target_gmt"];}
elseif (isset($_POST["adaptive_latest_target_gmt"])){$adaptive_latest_target_gmt=$_POST["adaptive_latest_target_gmt"];}
if (isset($script_id)) {$script_id= strtoupper($script_id);}
if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);}
@@ -444,6 +446,7 @@ $lead_filter_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_comm
$campaign_rec_filename = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_rec_filename);
$call_time_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_name);
$call_time_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_comments);
$adaptive_latest_target_gmt = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_latest_target_gmt);
### remove semi-colons ###
$lead_filter_sql = ereg_replace(";","",$lead_filter_sql);
@@ -520,12 +523,13 @@ $lead_filter_sql = ereg_replace(";","",$lead_filter_sql);
# 60821-1543 - added option to Omit Phone Code while dialing in vicidial
# 60821-1625 - added ALLFORCE recording option for campaign_recording
# 60823-1154 - added fields for adaptive dialing
# 60824-1326 - added adaptive_latest_target_gmt for ADAPT_TAPERED dial method
#
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time
$version = '2.0.61';
$build = '60823-1154';
$version = '2.0.62';
$build = '60824-1326';
$STARTtime = date("U");
@@ -1127,6 +1131,11 @@ echo "<TABLE WIDTH=98% BGCOLOR=#E6E6E6 cellpadding=2 cellspacing=0><TR><TD ALIGN
<BR>
<B>Maximum Adapt Dial Level -</B> This field is where you set the limit of the limit to the numbr of lines you would like dialed per agent while using an adaptive-predictive dial method, not MANUAL or RATIO. This number can be higher than the Auto Dial Level if your hardware will support it. Value must be a positive number greater than one and can have decimal places Default 3.0.
<BR>
<A NAME="vicidial_campaigns-adaptive_latest_target_gmt">
<BR>
<B>Latest Target Timezone -</B> This field is only used by the ADAPT_TAPERED dial method. You should select the current GMT offset value or timezone of the latest region that you will be calling. This allows the Tapered algorithm to decide how aggressively to dial by how long you have until you will be finished calling. NOTE- If you are calling in the USA and you have a very small amount of leads in Alaska or Hawaii but many leads in Pacific time zone, you should choose the pacific time zone for this field for the ADAPT_TAPERED dial method to work properly.
<BR>
<A NAME="vicidial_campaigns-next_agent_call">
<BR>
@@ -2891,7 +2900,7 @@ if ($ADD==41)
}
}
}
$stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',safe_harbor_message='$safe_harbor_message',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level' where campaign_id='$campaign_id';";
$stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',safe_harbor_message='$safe_harbor_message',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_target_gmt='$adaptive_latest_target_gmt' where campaign_id='$campaign_id';";
$rslt=mysql_query($stmtA, $link);
if ($reset_hopper == 'Y')
@@ -4321,6 +4330,7 @@ echo "<TABLE><TR><TD>\n";
$available_only_ratio_tally = $row[47];
$adaptive_dropped_percentage = $row[48];
$adaptive_maximum_level = $row[49];
$adaptive_latest_target_gmt = $row[50];
echo "<br>MODIFY A CAMPAIGNS RECORD: $row[0] - <a href=\"$PHP_SELF?ADD=34&campaign_id=$campaign_id\">Basic View</a>";
echo " | Detail View</a> | ";
@@ -4417,6 +4427,8 @@ echo "<option SELECTED>$adaptive_dropped_percentage</option></select>% $NWB#vici
echo "<tr bgcolor=#BDFFBD><td align=right>Maximum Adapt Dial Level: </td><td align=left><input type=text name=adaptive_maximum_level size=6 maxlength=6 value=\"$adaptive_maximum_level\"><i>number only</i> $NWB#vicidial_campaigns-adaptive_maximum_level$NWE</td></tr>\n";
echo "<tr bgcolor=#BDFFBD><td align=right>Latest Target Timezone: </td><td align=left><select size=1 name=adaptive_latest_target_gmt><option>12.75</option><option>12.00</option><option>11.00</option><option>10.00</option><option>9.50</option><option>9.00</option><option>8.00</option><option>7.00</option><option>6.50</option><option>6.00</option><option>5.75</option><option>5.50</option><option>5.00</option><option>4.50</option><option>4.00</option><option>3.50</option><option>3.00</option><option>2.00</option><option>1.00</option><option>0.00</option><option>-1.00</option><option>-2.00</option><option>-2.50</option><option>-3.00</option><option>-3.50</option><option>-4.00</option><option>-4.50</option><option>-5.00</option><option>-6.00</option><option>-7.00</option><option>-8.00</option><option>-9.00</option><option>-10.00</option><option>-11.00</option><option>-12.00</option><option selected>$adaptive_latest_target_gmt</option></select> (MUST Adjust for DST) $NWB#vicidial_campaigns-adaptive_latest_target_gmt$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Next Agent Call: </td><td align=left><select size=1 name=next_agent_call><option >random</option><option>oldest_call_start</option><option>oldest_call_finish</option><option>overall_user_level</option><option SELECTED>$next_agent_call</option></select>$NWB#vicidial_campaigns-next_agent_call$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=311111111&call_time_id=$local_call_time\">Local Call Time: </a></td><td align=left><select size=1 name=local_call_time>\n";