Added Safe Harbor Audio Field to campaign options which allows for a lead field to be used as an override safe harbor audio on a per-lead basis

git-svn-id: svn://192.168.202.10@1827 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2012-05-30 14:21:16 +00:00
parent e77ddb08cd
commit 992f95dd5a
6 changed files with 58 additions and 11 deletions
+3
View File
@@ -66,6 +66,9 @@ OTHER CHANGES:
4. Added User Group Login Report
5. Added Safe Harbor Audio Field to campaign options which allows for a lead
field to be used as an override safe harbor audio on a per-lead basis
+27 -4
View File
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
# agi-VDAD_ALL_outbound.agi version 2.4
# agi-VDAD_ALL_outbound.agi version 2.6
#
# runs when an outbound call is answered. This script will
# send the calls out to the agents that are logged in.
@@ -46,7 +46,7 @@
#exten => 8366,4,AGI(agi-VDAD_ALL_outbound.agi,SURVEY-----LB-----US_pol_survey_hello-----1238-----8-----US_pol_survey_transfer-----US_thanks_no_contact-----OPTOUT-----DNC)
#exten => 8366,5,Hangup
#
# Copyright (C) 2011 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2012 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# changes:
# 80218-2027 - First Build
@@ -93,12 +93,13 @@
# 110926-1929 - Small fixes
# 111201-1751 - Added grade-random next-agent-call option
# 111219-2256 - Added max stats updating
# 120529-2112 - Added safe_harbor_audio_field campaign option
#
$script = 'agi-VDAD_ALL_outbound.agi';
$AGILOG = '0';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=96;
$mysql_log_count=97;
$one_mysql_log=0;
@@ -532,7 +533,7 @@ if ($VDACaffected_rows > 0)
##### END - Max call stats
### Grab campaign values from the database
$stmtA = "SELECT drop_call_seconds,drop_action,safe_harbor_exten,concurrent_transfers,next_agent_call,voicemail_ext,drop_inbound_group,use_internal_dnc,use_campaign_dnc,cpd_amd_action,am_message_exten,three_way_call_cid,campaign_cid,survey_first_audio_file,survey_opt_in_audio_file,survey_ni_audio_file,survey_third_audio_file,survey_fourth_audio_file,extension_appended_cidname,queue_priority,closer_campaigns,queuemetrics_phone_environment,campaign_recording,campaign_rec_filename,safe_harbor_audio,safe_harbor_menu_id,survey_recording FROM vicidial_campaigns where campaign_id = '$VDADcampaign';";
$stmtA = "SELECT drop_call_seconds,drop_action,safe_harbor_exten,concurrent_transfers,next_agent_call,voicemail_ext,drop_inbound_group,use_internal_dnc,use_campaign_dnc,cpd_amd_action,am_message_exten,three_way_call_cid,campaign_cid,survey_first_audio_file,survey_opt_in_audio_file,survey_ni_audio_file,survey_third_audio_file,survey_fourth_audio_file,extension_appended_cidname,queue_priority,closer_campaigns,queuemetrics_phone_environment,campaign_recording,campaign_rec_filename,safe_harbor_audio,safe_harbor_menu_id,survey_recording,safe_harbor_audio_field FROM vicidial_campaigns where campaign_id = '$VDADcampaign';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -570,6 +571,7 @@ if ($VDACaffected_rows > 0)
$safe_harbor_audio = $aryA[24];
$safe_harbor_menu_id = $aryA[25];
$survey_recording = $aryA[26];
$safe_harbor_audio_field = $aryA[27];
if (length($closer_campaigns) > 2)
{
$closer_campaigns =~ s/^ | -$//gi;
@@ -2970,6 +2972,27 @@ if ($drop_timer > $DROP_TIME)
if ($drop_action =~ /AUDIO/)
{
if ($safe_harbor_audio_field !~ /DISABLED/)
{
$stmtA = "SELECT $safe_harbor_audio_field FROM vicidial_list where lead_id='$CIDlead_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='01097'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$safe_harbor_audio_value = $aryA[0];
if (length($safe_harbor_audio_value)>0)
{
if ($AGILOG) {$agi_string = "playing drop message FIELD: $safe_harbor_audio_value|$safe_harbor_audio_field|$safe_harbor_audio"; &agi_output;}
$safe_harbor_audio = $safe_harbor_audio_value;
}
}
$sthA->finish();
}
$DROPexten='';
if ($AGILOG) {$agi_string = "playing drop message: $safe_harbor_audio"; &agi_output;}
+3 -2
View File
@@ -851,7 +851,8 @@ callback_list_calltime ENUM('ENABLED','DISABLED') default 'DISABLED',
user_group VARCHAR(20) default '---ALL---',
hopper_vlc_dup_check ENUM('Y','N') default 'N',
in_group_dial ENUM('DISABLED','MANUAL_DIAL','NO_DIAL','BOTH') default 'DISABLED',
in_group_dial_select ENUM('AGENT_SELECTED','CAMPAIGN_SELECTED','ALL_USER_GROUP') default 'CAMPAIGN_SELECTED'
in_group_dial_select ENUM('AGENT_SELECTED','CAMPAIGN_SELECTED','ALL_USER_GROUP') default 'CAMPAIGN_SELECTED',
safe_harbor_audio_field VARCHAR(30) default 'DISABLED'
);
CREATE TABLE vicidial_lists (
@@ -2812,7 +2813,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='1320',db_schema_update_date=NOW();
UPDATE system_settings SET db_schema_version='1321',db_schema_update_date=NOW();
GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost;
+4
View File
@@ -10,3 +10,7 @@ UPDATE system_settings SET db_schema_version='1319',db_schema_update_date=NOW()
ALTER TABLE vicidial_inbound_groups ADD dial_ingroup_cid VARCHAR(20) default '';
UPDATE system_settings SET db_schema_version='1320',db_schema_update_date=NOW() where db_schema_version < 1320;
ALTER TABLE vicidial_campaigns ADD safe_harbor_audio_field VARCHAR(30) default 'DISABLED';
UPDATE system_settings SET db_schema_version='1321',db_schema_update_date=NOW() where db_schema_version < 1321;
@@ -7,6 +7,8 @@ Dial In-Group CID||
If the agent campaign allows for Manual In-Group Dialing, this caller ID number will be sent as the outgoing CID of the phone call if it is populated, overriding the campaign settings and list CID override setting. Default is empty||
You can also use LTMG or XFTAMM as statuses to trigger an automatic transfer to the Leave-Voicemail option||
Send to Answering Machine Message||
Safe Harbor Audio Field||
This optional setting allows you to define a field in the list that the system will use as the audio filename for each lead in place of the Safe Harbor Audio file. If this is set to DISABLED the Safe Harbor Audio file will always be used. The system will do no validation to make sure that the audio file exists other than to make sure the value of the field is at least one character, so if you want a lead to use the default Safe harbor Audio then you just set the field value in the lead to empty. You can use the pipe character to link multiple audio files together in the field value for each lead. Default is DISABLED. Here is the list of fields that can be used for this setting||
############################################################ CLIENT
+19 -5
View File
File diff suppressed because one or more lines are too long