Added Scheduled Callback Calltime Block feature

git-svn-id: svn://192.168.202.10@1747 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2011-10-24 18:11:38 +00:00
parent da5cc4d41f
commit dad564579b
7 changed files with 55 additions and 17 deletions
+3 -1
View File
@@ -749,7 +749,9 @@ OTHER CHANGES:
170. Added Scheduled Callback Hours Block feature to block USERONLY callbacks
from being displayed to an agent within a set number of hours since the
callback was set.
callback was set. Also, added Calltime Block feature which will remove
DIAL links from callback list if the lead is outside of the campaign
selected call time.
@@ -837,7 +837,8 @@ pllb_grouping ENUM('DISABLED','ONE_SERVER_ONLY','CASCADING') default 'DISABLED',
pllb_grouping_limit SMALLINT(5) default '50',
call_count_limit SMALLINT(5) UNSIGNED default '0',
call_count_target SMALLINT(5) UNSIGNED default '3',
callback_hours_block TINYINT(2) default '0'
callback_hours_block TINYINT(2) default '0',
callback_list_calltime ENUM('ENABLED','DISABLED') default 'DISABLED'
);
CREATE TABLE vicidial_lists (
@@ -2702,7 +2703,7 @@ CREATE TABLE vicidial_log_noanswer_archive LIKE vicidial_log_noanswer;
CREATE TABLE vicidial_did_agent_log_archive LIKE vicidial_did_agent_log;
CREATE UNIQUE INDEX vdala on vicidial_did_agent_log_archive (uniqueid,call_date,did_route);
UPDATE system_settings SET db_schema_version='1306',db_schema_update_date=NOW();
UPDATE system_settings SET db_schema_version='1307',db_schema_update_date=NOW();
GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost;
+4
View File
@@ -1133,3 +1133,7 @@ UPDATE system_settings SET db_schema_version='1305',db_schema_update_date=NOW()
ALTER TABLE vicidial_campaigns ADD callback_hours_block TINYINT(2) default '0';
UPDATE system_settings SET db_schema_version='1306',db_schema_update_date=NOW() where db_schema_version < 1306;
ALTER TABLE vicidial_campaigns ADD callback_list_calltime ENUM('ENABLED','DISABLED') default 'DISABLED';
UPDATE system_settings SET db_schema_version='1307',db_schema_update_date=NOW() where db_schema_version < 1307;
@@ -788,6 +788,8 @@ Other Number||
CONTACT NOT MODIFIED||
Scheduled Callbacks Hours Block||
This option allows you to restrict a USERONLY scheduled callback from being displayed on the agent callback list until X hours after it has been set. Default is 0 for no block||
Scheduled Callbacks Calltime Block||
This option if enabled will prevent the scheduled callback in the agent callback list from being dialed if it is outside of the scheduled calltime for the campaign. Default is DISABLED||
lead_report_export.php
+14 -6
View File
@@ -297,10 +297,11 @@
# 111018-1529 - Added more fields to contact search
# 111021-1549 - Added old_CID variable to help clear alt-dial-old calls
# 111021-1707 - Added callback_hours_block feature
# 111024-1238 - Added callback_list_calltime option
#
$version = '2.4-198';
$build = '111021-1707';
$version = '2.4-199';
$build = '111024-1238';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=438;
$one_mysql_log=0;
@@ -9804,14 +9805,16 @@ if ($ACTION == 'CALLSINQUEUEgrab')
if ($ACTION == 'CalLBacKLisT')
{
$campaignCBhoursSQL = '';
$stmt = "select callback_hours_block from vicidial_campaigns where campaign_id='$campaign';";
$stmt = "select callback_hours_block,callback_list_calltime,local_call_time from vicidial_campaigns where campaign_id='$campaign';";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00437',$user,$server_ip,$session_name,$one_mysql_log);}
if ($rslt) {$camp_count = mysql_num_rows($rslt);}
if ($camp_count > 0)
{
$row=mysql_fetch_row($rslt);
$callback_hours_block = $row[0];
$callback_hours_block = $row[0];
$callback_list_calltime = $row[1];
$local_call_time = $row[2];
if ($callback_hours_block > 0)
{
$x_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-$callback_hours_block,date("i"),date("s"),date("m"),date("d"),date("Y")));
@@ -9844,13 +9847,18 @@ if ($ACTION == 'CalLBacKLisT')
$loop_count=0;
while ($callbacks_count>$loop_count)
{
$stmt = "select first_name,last_name,phone_number from vicidial_list where lead_id='$lead_id[$loop_count]';";
$stmt = "select first_name,last_name,phone_number,gmt_offset_now,state from vicidial_list where lead_id='$lead_id[$loop_count]';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00179',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
echo "$row[0] ~$row[1] ~$row[2] ~$callback_id[$loop_count] ~$lead_id[$loop_count] ~$campaign_id[$loop_count] ~$status[$loop_count] ~$entry_time[$loop_count] ~$callback_time[$loop_count] ~$comments[$loop_count]\n";
$PHONEdialable=1;
if ($callback_list_calltime == 'ENABLED')
{
$PHONEdialable = dialable_gmt($DB,$link,$local_call_time,$row[3],$row[4]);
}
echo "$row[0] ~$row[1] ~$row[2] ~$callback_id[$loop_count] ~$lead_id[$loop_count] ~$campaign_id[$loop_count] ~$status[$loop_count] ~$entry_time[$loop_count] ~$callback_time[$loop_count] ~$comments[$loop_count] ~$PHONEdialable\n";
$loop_count++;
}
+12 -3
View File
@@ -369,10 +369,11 @@
# 111015-2037 - Added contact search functions
# 111018-1528 - Added more contact fields, added code to prevent API transfer duplicates
# 111021-1623 - Fix for rare stuck vac issue with manual alt dial
# 111024-1237 - Added callback_list_calltime option
#
$version = '2.4-336c';
$build = '111021-1623';
$version = '2.4-337c';
$build = '111024-1237';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=75;
$one_mysql_log=0;
@@ -5593,13 +5594,21 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
var CB_lastcall_time = call_array[7];
var CB_callback_time = call_array[8];
var CB_comments = call_array[9];
var CB_dialable = call_array[10];
var CB_comments_ten = CB_comments;
if (CB_comments_ten.length > 10)
{
CB_comments_ten = CB_comments_ten.substr(0,10);
CB_comments_ten = CB_comments_ten + '...';
}
CB_HTML = CB_HTML + "<tr bgcolor=\"" + row_color + "\"><td><font class=\"log_text\">" + loop_ct + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_callback_time + "</td><td align=\"right\"><font class=\"log_text\">" + CB_phone + "</td><td align=\"right\"><font class=\"log_text\">" + CB_comments_ten + " - <a href=\"#\" onclick=\"VieWLeaDInfO('" + CB_lead_id + "','" + CB_id + "');return false;\">INFO</a></font></td><td align=\"right\"><font class=\"log_text\">" + CB_name + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_status + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_campaign + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_lastcall_time + "&nbsp;</font></td><td align=\"right\"><font class=\"log_text\"><a href=\"#\" onclick=\"new_callback_call('" + CB_id + "','" + CB_lead_id + "','MAIN');return false;\">DIAL</a>&nbsp;</font></td><td align=\"right\"><font class=\"log_text\"><a href=\"#\" onclick=\"new_callback_call('" + CB_id + "','" + CB_lead_id + "','ALT');return false;\">ALT</a>&nbsp;</font></td></tr>";
if (CB_dialable > 0)
{
CB_HTML = CB_HTML + "<tr bgcolor=\"" + row_color + "\"><td><font class=\"log_text\">" + loop_ct + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_callback_time + "</td><td align=\"right\"><font class=\"log_text\">" + CB_phone + "</td><td align=\"right\"><font class=\"log_text\">" + CB_comments_ten + " - <a href=\"#\" onclick=\"VieWLeaDInfO('" + CB_lead_id + "','" + CB_id + "');return false;\">INFO</a></font></td><td align=\"right\"><font class=\"log_text\">" + CB_name + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_status + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_campaign + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_lastcall_time + "&nbsp;</font></td><td align=\"right\"><font class=\"log_text\"><a href=\"#\" onclick=\"new_callback_call('" + CB_id + "','" + CB_lead_id + "','MAIN');return false;\">DIAL</a>&nbsp;</font></td><td align=\"right\"><font class=\"log_text\"><a href=\"#\" onclick=\"new_callback_call('" + CB_id + "','" + CB_lead_id + "','ALT');return false;\">ALT</a>&nbsp;</font></td></tr>";
}
else
{
CB_HTML = CB_HTML + "<tr bgcolor=\"" + row_color + "\"><td><font class=\"log_text\">" + loop_ct + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_callback_time + "</td><td align=\"right\"><font class=\"log_text\">" + CB_phone + "</td><td align=\"right\"><font class=\"log_text\">" + CB_comments_ten + " - INFO</font></td><td align=\"right\"><font class=\"log_text\">" + CB_name + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_status + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_campaign + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_lastcall_time + "&nbsp;</font></td><td align=\"right\" colspan=2><font class=\"log_text\">NON-DIALABLE&nbsp;</font></td></tr>";
}
}
CB_HTML = CB_HTML + "</table>";
document.getElementById("CallBacKsLisT").innerHTML = CB_HTML;
File diff suppressed because one or more lines are too long