Added List overrides for some inbound voicemail settings: drop and after-hours

git-svn-id: svn://192.168.202.10@3264 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2020-07-08 19:18:41 +00:00
parent 6fa5e4ccf4
commit 0f9b2db5aa
5 changed files with 72 additions and 7 deletions
+44
View File
@@ -236,6 +236,7 @@
# 191117-2156 - Fix for truncated extension issue #1193
# 200424-1044 - Fix for incorrect list_id logging
# 200624-0011 - Added options for Answer signal settings
# 200708-1126 - Added some list override settings
#
$script = 'agi-VDAD_ALL_inbound.agi';
@@ -1779,6 +1780,26 @@ if ( ( ( ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) && ($hm >= $c
}
if ($after_hours_action =~ /VOICEMAIL|VMAIL_NO_INST/)
{
# First, look for a list override for after-hours voicemail from the database
$inbound_after_hours_voicemail='';
$stmtA = "SELECT inbound_after_hours_voicemail FROM vicidial_lists where list_id='$list_id';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$inbound_after_hours_voicemail = $aryA[0];
}
$sthA->finish();
if (length($inbound_after_hours_voicemail) > 0)
{
if ($AGILOG) {$agi_string = "List Override for After Hours Voicemail set: $inbound_after_hours_voicemail($after_hours_voicemail) $list_id|$callerid"; &agi_output;}
$after_hours_voicemail = $inbound_after_hours_voicemail;
}
if ( ($channel_group =~ /AGENTDIRECT/i) && (length($agent_only) > 1) && ($after_hours_voicemail =~ /AGENTVMAIL/) )
{
### Grab user's voicemail ID from the database
@@ -6783,6 +6804,29 @@ if ( ($drop_timer > $DROP_TIME) || ($MCdrop_override > 0) )
$drop_seconds = $DROP_TIME;
}
# Look for a list override for drop voicemail from the database
if ($drop_action =~ /VOICEMAIL|VMAIL_NO_INST/)
{
$inbound_drop_voicemail='';
$stmtA = "SELECT inbound_drop_voicemail FROM vicidial_lists where list_id='$list_id';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$inbound_drop_voicemail = $aryA[0];
}
$sthA->finish();
if (length($inbound_drop_voicemail) > 0)
{
if ($AGILOG) {$agi_string = "List Override for Drop Voicemail set: $inbound_drop_voicemail($VDADvoicemail_ext) $list_id|$callerid"; &agi_output;}
$VDADvoicemail_ext = $inbound_drop_voicemail;
}
}
if ( ($channel_group =~ /AGENTDIRECT/i) && (length($agent_only) > 1) && ( (length($user_unavailable_action) > 1) || ($VDADvoicemail_ext =~ /AGENTVMAIL/) ) )
{
if ($VDADvoicemail_ext !~ /AGENTVMAIL/)
+4 -2
View File
@@ -1083,7 +1083,9 @@ auto_active_list_rank SMALLINT(5) default '0',
cache_count INT(9) UNSIGNED default '0',
cache_count_new INT(9) UNSIGNED default '0',
cache_count_dialable_new INT(9) UNSIGNED default '0',
cache_date DATETIME
cache_date DATETIME,
inbound_drop_voicemail VARCHAR(20),
inbound_after_hours_voicemail VARCHAR(20)
) ENGINE=MyISAM;
CREATE TABLE vicidial_statuses (
@@ -4644,4 +4646,4 @@ INSERT INTO vicidial_settings_containers(container_id,container_notes,container_
UPDATE system_settings set vdc_agent_api_active='1';
UPDATE system_settings SET db_schema_version='1599',db_schema_update_date=NOW(),reload_timestamp=NOW();
UPDATE system_settings SET db_schema_version='1600',db_schema_update_date=NOW(),reload_timestamp=NOW();
+6
View File
@@ -1266,3 +1266,9 @@ UPDATE system_settings SET db_schema_version='1598',db_schema_update_date=NOW()
ALTER TABLE vicidial_campaigns MODIFY concurrent_transfers ENUM('AUTO','1','2','3','4','5','6','7','8','9','10','15','20','25','30','40','50','60','80','100','1000','10000') default 'AUTO';
UPDATE system_settings SET db_schema_version='1599',db_schema_update_date=NOW() where db_schema_version < 1599;
ALTER TABLE vicidial_lists ADD inbound_drop_voicemail VARCHAR(20);
ALTER TABLE vicidial_lists ADD inbound_after_hours_voicemail VARCHAR(20);
UPDATE system_settings SET db_schema_version='1600',db_schema_update_date=NOW() where db_schema_version < 1600;
+15 -4
View File
@@ -2514,6 +2514,10 @@ if (isset($_GET["inbound_route_answer"])) {$inbound_route_answer=$_GET["inboun
elseif (isset($_POST["inbound_route_answer"])) {$inbound_route_answer=$_POST["inbound_route_answer"];}
if (isset($_GET["answer_signal"])) {$answer_signal=$_GET["answer_signal"];}
elseif (isset($_POST["answer_signal"])) {$answer_signal=$_POST["answer_signal"];}
if (isset($_GET["inbound_drop_voicemail"])) {$inbound_drop_voicemail=$_GET["inbound_drop_voicemail"];}
elseif (isset($_POST["inbound_drop_voicemail"])) {$inbound_drop_voicemail=$_POST["inbound_drop_voicemail"];}
if (isset($_GET["inbound_after_hours_voicemail"])) {$inbound_after_hours_voicemail=$_GET["inbound_after_hours_voicemail"];}
elseif (isset($_POST["inbound_after_hours_voicemail"])) {$inbound_after_hours_voicemail=$_POST["inbound_after_hours_voicemail"];}
if (isset($script_id)) {$script_id= strtoupper($script_id);}
@@ -3536,6 +3540,8 @@ if ($non_latin < 1)
$three_way_record_stop_exception = preg_replace('/[^-_0-9a-zA-Z]/','',$three_way_record_stop_exception);
$queuemetrics_pausereason = preg_replace('/[^-_0-9a-zA-Z]/','',$queuemetrics_pausereason);
$answer_signal = preg_replace('/[^-_0-9a-zA-Z]/','',$answer_signal);
$inbound_drop_voicemail = preg_replace('/[^-_0-9a-zA-Z]/','',$inbound_drop_voicemail);
$inbound_after_hours_voicemail = preg_replace('/[^-_0-9a-zA-Z]/','',$inbound_after_hours_voicemail);
### ALPHA-NUMERIC and underscore and dash and slash and dot
$menu_timeout_prompt = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$menu_timeout_prompt);
@@ -4687,12 +4693,13 @@ else
# 200623-1957 - Added inbound answer configuration
# 200624-1939 - Added Callbacks Export report
# 200701-1525 - Added more concurrent_transfers options
# 200708-1033 - Added List overrides for some inbound settings
#
# 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-760a';
$build = '200701-1525';
$admin_version = '2.14-761a';
$build = '200708-1033';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -15852,7 +15859,7 @@ if ($ADD==411)
echo "<br><B>"._QXZ("LIST MODIFIED").": $list_id</B>\n";
$stmt="UPDATE vicidial_lists set list_name='$list_name',campaign_id='$campaign_id',active='$active',list_description='$list_description',list_changedate='$SQLdate',reset_time='$reset_time',agent_script_override='$agent_script_override',inbound_list_script_override='$inbound_list_script_override',campaign_cid_override='$campaign_cid_override',am_message_exten_override='$am_message_exten_override',drop_inbound_group_override='$drop_inbound_group_override',xferconf_a_number='$xferconf_a_number',xferconf_b_number='$xferconf_b_number',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',web_form_address='" . mysqli_real_escape_string($link, $web_form_address) . "',web_form_address_two='" . mysqli_real_escape_string($link, $web_form_address_two) . "',time_zone_setting='$time_zone_setting',inventory_report='$inventory_report',expiration_date='$expiration_date',na_call_url='" . mysqli_real_escape_string($link, $na_call_url) . "',local_call_time='$local_call_time',web_form_address_three='" . mysqli_real_escape_string($link, $web_form_address_three) . "',status_group_id='$status_group_id',user_new_lead_limit='$user_new_lead_limit',default_xfer_group='$default_xfer_group' $daily_reset_limitSQL,auto_active_list_rank='$auto_active_list_rank' where list_id='$list_id';";
$stmt="UPDATE vicidial_lists set list_name='$list_name',campaign_id='$campaign_id',active='$active',list_description='$list_description',list_changedate='$SQLdate',reset_time='$reset_time',agent_script_override='$agent_script_override',inbound_list_script_override='$inbound_list_script_override',campaign_cid_override='$campaign_cid_override',am_message_exten_override='$am_message_exten_override',drop_inbound_group_override='$drop_inbound_group_override',xferconf_a_number='$xferconf_a_number',xferconf_b_number='$xferconf_b_number',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',web_form_address='" . mysqli_real_escape_string($link, $web_form_address) . "',web_form_address_two='" . mysqli_real_escape_string($link, $web_form_address_two) . "',time_zone_setting='$time_zone_setting',inventory_report='$inventory_report',expiration_date='$expiration_date',na_call_url='" . mysqli_real_escape_string($link, $na_call_url) . "',local_call_time='$local_call_time',web_form_address_three='" . mysqli_real_escape_string($link, $web_form_address_three) . "',status_group_id='$status_group_id',user_new_lead_limit='$user_new_lead_limit',default_xfer_group='$default_xfer_group' $daily_reset_limitSQL,auto_active_list_rank='$auto_active_list_rank',inbound_drop_voicemail='$inbound_drop_voicemail',inbound_after_hours_voicemail='$inbound_after_hours_voicemail' where list_id='$list_id';";
$rslt=mysql_to_mysqli($stmt, $link);
## QC Addition for Audited Comments
@@ -27819,7 +27826,7 @@ if ($ADD==311)
}
}
$stmt="SELECT vicidial_lists.list_id,list_name,campaign_id,active,list_description,list_changedate,list_lastcalldate,reset_time,agent_script_override,campaign_cid_override,am_message_exten_override,drop_inbound_group_override,xferconf_a_number,xferconf_b_number,xferconf_c_number,xferconf_d_number,xferconf_e_number,web_form_address,web_form_address_two,time_zone_setting,inventory_report,IFNULL(audit_comments,0),expiration_date,DATE_FORMAT(expiration_date,'%Y%m%d'),na_call_url,local_call_time,web_form_address_three,status_group_id,user_new_lead_limit,inbound_list_script_override,default_xfer_group,daily_reset_limit,resets_today,auto_active_list_rank from vicidial_lists left outer join vicidial_lists_custom on vicidial_lists.list_id=vicidial_lists_custom.list_id where vicidial_lists.list_id='$list_id' $LOGallowed_campaignsSQL;";
$stmt="SELECT vicidial_lists.list_id,list_name,campaign_id,active,list_description,list_changedate,list_lastcalldate,reset_time,agent_script_override,campaign_cid_override,am_message_exten_override,drop_inbound_group_override,xferconf_a_number,xferconf_b_number,xferconf_c_number,xferconf_d_number,xferconf_e_number,web_form_address,web_form_address_two,time_zone_setting,inventory_report,IFNULL(audit_comments,0),expiration_date,DATE_FORMAT(expiration_date,'%Y%m%d'),na_call_url,local_call_time,web_form_address_three,status_group_id,user_new_lead_limit,inbound_list_script_override,default_xfer_group,daily_reset_limit,resets_today,auto_active_list_rank,inbound_drop_voicemail,inbound_after_hours_voicemail from vicidial_lists left outer join vicidial_lists_custom on vicidial_lists.list_id=vicidial_lists_custom.list_id where vicidial_lists.list_id='$list_id' $LOGallowed_campaignsSQL;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($DB) {echo "$stmt\n";}
@@ -27857,6 +27864,8 @@ if ($ADD==311)
$daily_reset_limit = $row[31];
$resets_today = $row[32];
$auto_active_list_rank = $row[33];
$inbound_drop_voicemail = $row[34];
$inbound_after_hours_voicemail = $row[35];
# grab names of global statuses and statuses in the selected campaign
$stmt="SELECT status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable,scheduled_callback,completed,min_sec,max_sec,answering_machine from vicidial_statuses order by status;";
@@ -28032,6 +28041,8 @@ if ($ADD==311)
echo "$Lscripts_list";
echo "<option selected value=\"$inbound_list_script_override\">$inbound_list_script_override - $scriptname_list[$inbound_list_script_override]</option>\n";
echo "</select>$NWB#lists-inbound_list_script_override$NWE</td></tr>\n";
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("Inbound Drop Voicemail Override").": </td><td align=left><input type=text name=inbound_drop_voicemail id=inbound_drop_voicemail size=12 maxlength=20 value=\"$inbound_drop_voicemail\"> <a href=\"javascript:launch_vm_chooser('inbound_drop_voicemail','vm');\">"._QXZ("voicemail chooser")."</a>$NWB#lists-inbound_drop_voicemail$NWE</td></tr>\n";
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("Inbound After Hours Voicemail Override").": </td><td align=left><input type=text name=inbound_after_hours_voicemail id=inbound_after_hours_voicemail size=12 maxlength=20 value=\"$inbound_after_hours_voicemail\"> <a href=\"javascript:launch_vm_chooser('inbound_after_hours_voicemail','vm');\">"._QXZ("voicemail chooser")."</a>$NWB#lists-inbound_after_hours_voicemail$NWE</td></tr>\n";
$DID_edit_link_BEGIN='';
$DID_edit_link_END='';
+3 -1
View File
@@ -1,4 +1,4 @@
# version: 202000624232501
# version: 202000708105201
users-user User ID <QXZ>This field is where you put the users ID number, can be up to 8 digits in length, Must be at least 2 characters in length.</QXZ>
users-pass Password <QXZ>This field is where you put the users password. Must be at least 2 characters in length. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters.</QXZ>
users-force_change_password Force Change Password <QXZ>If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage. Default is N.</QXZ>
@@ -395,6 +395,8 @@ lists-local_call_time Local Call Time <QXZ>This is a setting for this list only,
lists-audit_comments Audit Comments <QXZ>This option allows comments to be moved to an audit table. No longer editable, but viewable along with the date-time-creator of each comment. Default is N. This is a part of the Quality Control Add-On.</QXZ>
lists-agent_script_override Agent Script Override <QXZ>If this field is set, this will be the script that the agent sees on their screen instead of the campaign script when the lead is from this list. Default is not set.</QXZ>
lists-inbound_list_script_override Inbound Script Override <QXZ>If this field is set, this will be the script that the agent sees on their screen instead of the campaign script when the agent receives an inbound call and the lead is from this list. Default is not set.</QXZ>
lists-inbound_drop_voicemail Inbound Drop Voicemail Override <QXZ>If an inbound call associated with this list drops while in an Inbound Group queue, this is the voicemail box the call will be sent to if the Drop Action is set to go to a voicemail box.</QXZ>
lists-inbound_after_hours_voicemail Inbound After Hours Voicemail Override <QXZ>If an inbound call associated with this list triggers an after hours action after it has been sent to an Inbound Group queue, this is the voicemail box the call will be sent to if the After Hours Action is set to go to a voicemail box.</QXZ>
lists-campaign_cid_override Campaign CID Override <QXZ>If this field is set, this will override the campaign CallerID that is set for calls that are placed to leads in this list. Default is not set.</QXZ>
lists-am_message_exten_override Answering Machine Message Override <QXZ>If this field is set, this will override the Answering Machine Message set in the campaign for customers in this list. Default is not set.</QXZ>
lists-drop_inbound_group_override Drop Inbound Group Override <QXZ>If this field is set, this in-group will be used for outbound calls within this list that drop from the outbound campaign instead of the drop in-group set in the campaign detail screen. Default is not set.</QXZ>