Added USER_CUSTOM_ options to campaign custom callerID setting to allow for

custom caller IDs to be used per agent in MANUAL and INBOUND_MAN modes

git-svn-id: svn://192.168.202.10@2715 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2017-03-27 21:10:56 +00:00
parent c5a734ccf6
commit 5eed8b273c
6 changed files with 65 additions and 13 deletions
+3
View File
@@ -133,6 +133,9 @@ OTHER CHANGES:
25. Added Drop Lists feature, allowing you to add new leads to a list built from
DROPped calls from inbound groups on a scheduled basis.
26. Added USER_CUSTOM_ options to campaign custom callerID setting to allow for
custom caller IDs to be used per agent in MANUAL and INBOUND_MAN modes
+2 -2
View File
@@ -861,7 +861,7 @@ dispo_call_url TEXT,
xferconf_c_number VARCHAR(50) default '',
xferconf_d_number VARCHAR(50) default '',
xferconf_e_number VARCHAR(50) default '',
use_custom_cid ENUM('Y','N','AREACODE') default 'N',
use_custom_cid ENUM('Y','N','AREACODE','USER_CUSTOM_1','USER_CUSTOM_2','USER_CUSTOM_3','USER_CUSTOM_4','USER_CUSTOM_5') default 'N',
scheduled_callbacks_alert ENUM('NONE','BLINK','RED','BLINK_RED','BLINK_DEFER','RED_DEFER','BLINK_RED_DEFER') default 'NONE',
queuemetrics_callstatus_override ENUM('DISABLED','NO','YES') default 'DISABLED',
extension_appended_cidname ENUM('Y','N') default 'N',
@@ -3940,4 +3940,4 @@ UPDATE vicidial_configuration set value='1766' where name='qc_database_version';
UPDATE system_settings set vdc_agent_api_active='1';
UPDATE system_settings SET db_schema_version='1497',db_schema_update_date=NOW(),reload_timestamp=NOW();
UPDATE system_settings SET db_schema_version='1498',db_schema_update_date=NOW(),reload_timestamp=NOW();
+4
View File
@@ -170,3 +170,7 @@ DROP INDEX drop_date on vicidial_drop_log_archive;
CREATE UNIQUE INDEX vicidial_drop_log_archive_key on vicidial_drop_log_archive(drop_date, uniqueid);
UPDATE system_settings SET db_schema_version='1497',db_schema_update_date=NOW() where db_schema_version < 1497;
ALTER TABLE vicidial_campaigns MODIFY use_custom_cid ENUM('Y','N','AREACODE','USER_CUSTOM_1','USER_CUSTOM_2','USER_CUSTOM_3','USER_CUSTOM_4','USER_CUSTOM_5') default 'N';
UPDATE system_settings SET db_schema_version='1498',db_schema_update_date=NOW() where db_schema_version < 1498;
+49 -6
View File
@@ -425,13 +425,14 @@
# 170228-1625 - Fix to prevent double-logging when emergency logout happens
# 170309-0704 - Small fix for INBOUND_MAN agent logging issue
# 170309-1550 - Added campaign agent_xfer_validation option
# 170327-1656 - Added USER_CUSTOM_ options to campaign custom callerID setting
#
$version = '2.14-319';
$build = '170309-1550';
$version = '2.14-320';
$build = '170327-1656';
$php_script = 'vdc_db_query.php';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=658;
$mysql_log_count=661;
$one_mysql_log=0;
$DB=0;
$VD_login=0;
@@ -2903,7 +2904,7 @@ if ($ACTION == 'manDiaLnextCaLL')
$vulnl_new_sum=0;
$stmt="SELECT sum(new_count) from vicidial_user_list_new_lead where user='$user';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00659',$user,$server_ip,$session_name,$one_mysql_log);}
$vulnlags_ct = mysqli_num_rows($rslt);
if ($vulnlags_ct > 0)
{
@@ -3916,7 +3917,28 @@ if ($ACTION == 'manDiaLnextCaLL')
$row=mysqli_fetch_row($rslt);
$use_custom_cid = $row[0];
$manual_dial_hopper_check = $row[1];
if ( ($use_custom_cid == 'AREACODE') and ($cid_lock < 1) )
if ( (preg_match('/^USER_CUSTOM/', $use_custom_cid)) and ($cid_lock < 1) )
{
$temp_vu='';
$use_custom_cid=preg_replace('/^USER_/', "", $use_custom_cid);
$pattern=array('/1/', '/2/', '/3/', '/4/', '/5/');
$replace=array('one', 'two', 'three', 'four', 'five');
$use_custom_cid = strtolower(preg_replace($pattern,$replace, $use_custom_cid));
$stmt="select $use_custom_cid from vicidial_users where user='$user'";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00660',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$vu_ct = mysqli_num_rows($rslt);
$act=0;
while ($vu_ct > $act)
{
$row=mysqli_fetch_row($rslt);
$temp_vu = $row[0];
$act++;
}
$temp_CID = preg_replace("/\D/",'',$temp_vu);
}
else if ( ($use_custom_cid == 'AREACODE') and ($cid_lock < 1) )
{
$temp_vcca='';
$temp_ac='';
@@ -4861,7 +4883,28 @@ if ($ACTION == 'manDiaLonly')
$row=mysqli_fetch_row($rslt);
$use_custom_cid = $row[0];
$manual_dial_hopper_check = $row[1];
if ( ($use_custom_cid == 'AREACODE') and ($cid_lock < 1) )
if ( (preg_match('/^USER_CUSTOM/', $use_custom_cid)) and ($cid_lock < 1) )
{
$temp_vu='';
$use_custom_cid=preg_replace('/^USER_/', "", $use_custom_cid);
$pattern=array('/1/', '/2/', '/3/', '/4/', '/5/');
$replace=array('one', 'two', 'three', 'four', 'five');
$use_custom_cid = strtolower(preg_replace($pattern,$replace, $use_custom_cid));
$stmt="select $use_custom_cid from vicidial_users where user='$user'";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00661',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$vu_ct = mysqli_num_rows($rslt);
$act=0;
while ($vu_ct > $act)
{
$row=mysqli_fetch_row($rslt);
$temp_vu = $row[0];
$act++;
}
$temp_CID = preg_replace("/\D/",'',$temp_vu);
}
else if ( ($use_custom_cid == 'AREACODE') and ($cid_lock < 1) )
{
$temp_vcca='';
$temp_ac='';
+5 -4
View File
@@ -2802,7 +2802,6 @@ if ($non_latin < 1)
$my_callback_option = preg_replace('/[^0-9a-zA-Z]/','',$my_callback_option);
$auto_pause_precall_code = preg_replace('/[^0-9a-zA-Z]/','',$auto_pause_precall_code);
$disable_dispo_status = preg_replace('/[^0-9a-zA-Z]/','',$disable_dispo_status);
$use_custom_cid = preg_replace('/[^0-9a-zA-Z]/','',$use_custom_cid);
$action_xfer_cid = preg_replace('/[^0-9a-zA-Z]/','',$action_xfer_cid);
$callback_list_calltime = preg_replace('/[^0-9a-zA-Z]/','',$callback_list_calltime);
$pause_after_next_call = preg_replace('/[^0-9a-zA-Z]/','',$pause_after_next_call);
@@ -3107,6 +3106,7 @@ if ($non_latin < 1)
$duplicate_check = preg_replace('/[^-_0-9a-zA-Z]/','',$duplicate_check);
$dl_times = preg_replace('/[^-_0-9a-zA-Z]/','',$dl_times);
$dl_monthdays = preg_replace('/[^-_0-9a-zA-Z]/','',$dl_monthdays);
$use_custom_cid = preg_replace('/[^-_0-9a-zA-Z]/','',$use_custom_cid);
### ALPHA-NUMERIC and underscore and dash and slash and dot
$menu_timeout_prompt = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$menu_timeout_prompt);
@@ -4058,12 +4058,13 @@ else
# 170320-1340 - Added conf_qualify phones option for IAX
# 170321-1100 - Added pause code time limits warning feature
# 170327-0704 - Added Drop Lists section
# 170327-1655 - Added USER_CUSTOM_ options to campaign custom callerID setting
#
# 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-604a';
$build = '170327-0704';
$admin_version = '2.14-605a';
$build = '170327-1655';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -21688,7 +21689,7 @@ if ($ADD==31)
{echo " <font color=red>"._QXZ("LIST OVERRIDE ACTIVE")."</font>";}
echo "</td></tr>\n";
echo "<tr bgcolor=#$SSstd_row3_background><td align=right>"._QXZ("Custom CallerID").": </td><td align=left><select size=1 name=use_custom_cid><option value='Y'>"._QXZ("Y")."</option><option value='N'>"._QXZ("N")."</option><option value='AREACODE'>"._QXZ("AREACODE")."</option><option value='$use_custom_cid' SELECTED>"._QXZ("$use_custom_cid")."</option></select>$NWB#campaigns-use_custom_cid$NWE</td></tr>\n";
echo "<tr bgcolor=#$SSstd_row3_background><td align=right>"._QXZ("Custom CallerID").": </td><td align=left><select size=1 name=use_custom_cid><option value='Y'>"._QXZ("Y")."</option><option value='N'>"._QXZ("N")."</option><option value='AREACODE'>"._QXZ("AREACODE")."</option><option value='USER_CUSTOM_1'>"._QXZ("USER_CUSTOM_1")."</option><option value='USER_CUSTOM_2'>"._QXZ("USER_CUSTOM_2")."</option><option value='USER_CUSTOM_3'>"._QXZ("USER_CUSTOM_3")."</option><option value='USER_CUSTOM_4'>"._QXZ("USER_CUSTOM_4")."</option><option value='USER_CUSTOM_5'>"._QXZ("USER_CUSTOM_5")."</option><option value='$use_custom_cid' SELECTED>"._QXZ("$use_custom_cid")."</option></select>$NWB#campaigns-use_custom_cid$NWE</td></tr>\n";
if ($SSoutbound_autodial_active > 0)
{
+2 -1
View File
@@ -118,6 +118,7 @@
# 170321-1130 - Added pause code limits entries
# 170322-1720 - Added filter-phone-list entry
# 170326-1135 - Added drop lists entries
# 170327-1649 - updated the campaigns-use_custom_cid entry
#
@@ -1402,7 +1403,7 @@ if ($SSoutbound_autodial_active > 0)
<BR>
<A NAME="campaigns-use_custom_cid">
<BR>
<B><?php echo _QXZ("Custom CallerID"); ?> -</B><?php echo _QXZ("When set to Y, this option allows you to use the security_phrase field in the list table as the CallerID to send out when placing for each specific lead. If this field has no CID in it then the Campaign CallerID defined above will be used instead. This option will disable the list CallerID Override if there is a CID present in the security_phrase field. Default is N. When set to AREACODE you have the ability to go into the AC-CID submenu and define multiple callerids to be used per areacode."); ?>
<B><?php echo _QXZ("Custom CallerID"); ?> -</B><?php echo _QXZ("When set to Y, this option allows you to use the security_phrase field in the list table as the CallerID to send out when placing for each specific lead. If this field has no CID in it then the Campaign CallerID defined above will be used instead. This option will disable the list CallerID Override if there is a CID present in the security_phrase field. Default is N. When set to AREACODE you have the ability to go into the AC-CID submenu and define multiple callerids to be used per areacode. For MANUAL and INBOUND_MAN dial methods only, you can use one of the USER_CUSTOM selections to take a CallerID number put into one of the User Custom fields in the User Modify screen and use that for outbound manual dial calls placed by an agent."); ?>
<BR>
<A NAME="campaigns-campaign_rec_exten">