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
git-svn-id: svn://192.168.202.10@1746 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -747,6 +747,10 @@ OTHER CHANGES:
|
||||
The purpose of this feature is to be used for a receptionist or operator
|
||||
that needs to transfer calls to non-agents.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -836,7 +836,8 @@ survey_recording ENUM('Y','N','Y_WITH_AMD') default 'N',
|
||||
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'
|
||||
call_count_target SMALLINT(5) UNSIGNED default '3',
|
||||
callback_hours_block TINYINT(2) default '0'
|
||||
);
|
||||
|
||||
CREATE TABLE vicidial_lists (
|
||||
@@ -2701,7 +2702,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='1305',db_schema_update_date=NOW();
|
||||
UPDATE system_settings SET db_schema_version='1306',db_schema_update_date=NOW();
|
||||
|
||||
GRANT RELOAD ON *.* TO cron@'%';
|
||||
GRANT RELOAD ON *.* TO cron@localhost;
|
||||
|
||||
@@ -1129,3 +1129,7 @@ ALTER TABLE contact_information ADD job_title VARCHAR(100) default '';
|
||||
ALTER TABLE contact_information ADD location VARCHAR(100) default '';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1305',db_schema_update_date=NOW() where db_schema_version < 1305;
|
||||
|
||||
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;
|
||||
|
||||
@@ -786,6 +786,8 @@ Office Number||
|
||||
Cell Number||
|
||||
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||
|
||||
|
||||
|
||||
lead_report_export.php
|
||||
|
||||
@@ -296,12 +296,13 @@
|
||||
# 111015-2104 - Added SEARCHCONTACTSRESULTSview function
|
||||
# 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
|
||||
#
|
||||
|
||||
$version = '2.4-197';
|
||||
$build = '111021-1549';
|
||||
$version = '2.4-198';
|
||||
$build = '111021-1707';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=436;
|
||||
$mysql_log_count=438;
|
||||
$one_mysql_log=0;
|
||||
|
||||
require("dbconnect.php");
|
||||
@@ -9802,11 +9803,26 @@ if ($ACTION == 'CALLSINQUEUEgrab')
|
||||
################################################################################
|
||||
if ($ACTION == 'CalLBacKLisT')
|
||||
{
|
||||
$campaignCBhoursSQL = '';
|
||||
$stmt = "select callback_hours_block 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];
|
||||
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")));
|
||||
$campaignCBhoursSQL = "and entry_time < \"$x_hours_ago\"";
|
||||
}
|
||||
}
|
||||
$campaignCBsql = '';
|
||||
if ($agentonly_callback_campaign_lock > 0)
|
||||
{$campaignCBsql = "and campaign_id='$campaign'";}
|
||||
else
|
||||
{$campaignCBsql = '';}
|
||||
$stmt = "select callback_id,lead_id,campaign_id,status,entry_time,callback_time,comments from vicidial_callbacks where recipient='USERONLY' and user='$user' $campaignCBsql and status NOT IN('INACTIVE','DEAD') order by callback_time;";
|
||||
|
||||
$stmt = "select callback_id,lead_id,campaign_id,status,entry_time,callback_time,comments from vicidial_callbacks where recipient='USERONLY' and user='$user' $campaignCBsql $campaignCBhoursSQL and status NOT IN('INACTIVE','DEAD') order by callback_time;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00178',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -9846,18 +9862,33 @@ if ($ACTION == 'CalLBacKLisT')
|
||||
################################################################################
|
||||
if ($ACTION == 'CalLBacKCounT')
|
||||
{
|
||||
$campaignCBhoursSQL = '';
|
||||
$stmt = "select callback_hours_block from vicidial_campaigns where campaign_id='$campaign';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00438',$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];
|
||||
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")));
|
||||
$campaignCBhoursSQL = "and entry_time < \"$x_hours_ago\"";
|
||||
}
|
||||
}
|
||||
$campaignCBsql = '';
|
||||
if ($agentonly_callback_campaign_lock > 0)
|
||||
{$campaignCBsql = "and campaign_id='$campaign'";}
|
||||
else
|
||||
{$campaignCBsql = '';}
|
||||
$stmt = "select count(*) from vicidial_callbacks where recipient='USERONLY' and user='$user' $campaignCBsql and status NOT IN('INACTIVE','DEAD');";
|
||||
|
||||
$stmt = "select count(*) from vicidial_callbacks where recipient='USERONLY' and user='$user' $campaignCBsql $campaignCBhoursSQL and status NOT IN('INACTIVE','DEAD');";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00180',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$cbcount=$row[0];
|
||||
|
||||
$stmt = "select count(*) from vicidial_callbacks where recipient='USERONLY' and user='$user' $campaignCBsql and status IN('LIVE');";
|
||||
$stmt = "select count(*) from vicidial_callbacks where recipient='USERONLY' and user='$user' $campaignCBsql $campaignCBhoursSQL and status IN('LIVE');";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00332',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user