Added Survey No Response DROP option to send no-response calls to the campaign drop method

git-svn-id: svn://192.168.202.10@1972 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2013-04-25 11:19:55 +00:00
parent ffe494719f
commit 813765ce6b
6 changed files with 56 additions and 24 deletions
+10
View File
@@ -262,6 +262,16 @@ OTHER CHANGES:
list is available for purchase at the vicidial.org web store:
http://www.vicidial.org/store.php#NANPA
45. Added a NOINT flag option to the Call Menu Prompt so the playback cannot be
interrupted with a key press by the caller, the NOINT should be put
directly in front of the prompt filename, but should not be a part of
the filename, it is a special flag for the system.
45. Added Survey No Response DROP option to send no-response calls to the
campaign drop method and added Survey Wait Seconds to allow you to set
the amount of time the person called will have to respond after the
survey message is played.
+34 -18
View File
@@ -104,6 +104,7 @@
# 130124-1853 - Issue #637 fix <karlb>
# 130210-1013 - Added options for CALLMENU|INGROUP cpd_amd_actions
# 130425-0049 - Added survey_wait_sec option and pre-process time logging
# 130425-0657 - Added survey_no_response option to drop to campaign drop action
#
$script = 'agi-VDAD_ALL_outbound.agi';
@@ -343,6 +344,7 @@ if ($AGILOG) {$agi_string = "AGI Variables: |$unique_id|$channel|$extension|$typ
$VDADcampaign='';
$VDADphone='';
$VDADphone_code='';
$survey_drop=0;
$callerid =~ s/\"//gi;
$callerid =~ s/ .*//gi;
@@ -1887,18 +1889,28 @@ if ($call_handle_method =~ /SURVEY/)
&agi_output;
}
$stmtA = "DELETE FROM vicidial_auto_calls where callerid='$callerid' order by call_time desc limit 1;";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01032'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG)
if ($survey_no_response_action !~ /DROP/)
{
$agi_string = "-- VDAD vac record deleted: |$affected_rows|$VDADcampaign|";
$stmtA = "DELETE FROM vicidial_auto_calls where callerid='$callerid' order by call_time desc limit 1;";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01032'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG)
{
$agi_string = "-- VDAD vac record deleted: |$affected_rows|$VDADcampaign|";
&agi_output;
}
$AGI->hangup();
exit;
}
else
{
$survey_drop++;
$drop_timer = (($drop_timer + $DROP_TIME) + 1);
$agi_string = "-- VDAD survey no-response go to campaign DROP |$drop_timer|$DROP_TIME|";
&agi_output;
}
$AGI->hangup();
exit;
}
}
################################################################################
@@ -1907,8 +1919,8 @@ if ($call_handle_method =~ /SURVEY/)
$drop_timer=0;
if ($survey_drop < 1)
{$drop_timer=0;}
$drop_seconds=0;
$hold_message_counter=25;
$hold_tone_counter=0;
@@ -3087,7 +3099,7 @@ while ($drop_timer <= $DROP_TIME)
}
else
{
if ($AGILOG) {$agi_string = "NNNNNNNNNN No agent record found!!!"; &agi_output;}
if ($AGILOG) {$agi_string = "NNNNNNNNNN No agent record found!!! $drop_timer"; &agi_output;}
}
}
else
@@ -3155,6 +3167,10 @@ if ($drop_timer > $DROP_TIME)
$drop_seconds = $DROP_TIME;
}
$drop_status='DROP';
if ($survey_drop > 0)
{$drop_status='PM';}
if ($drop_action =~ /MESSAGE/)
{
$newcallerid = "\"$callerid <$VDADphone>\"";
@@ -3221,20 +3237,20 @@ if ($drop_timer > $DROP_TIME)
$Baffected_rows = $dbhB->do($stmtB);
$dbhP=$dbhB; $stmtA=$stmtB; $mysql_count='01081'; $MEL_aff_rows=$Baffected_rows; &mysql_error_logging;
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$callerid',queue='$VDADcampaign',agent='NONE',verb='CALLSTATUS',data1='DROP',serverid='$queuemetrics_log_id';";
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$callerid',queue='$VDADcampaign',agent='NONE',verb='CALLSTATUS',data1='$drop_status',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
$dbhP=$dbhB; $stmtA=$stmtB; $mysql_count='01082'; $MEL_aff_rows=$Baffected_rows; &mysql_error_logging;
$dbhB->disconnect();
}
$stmtA = "UPDATE vicidial_log FORCE INDEX(lead_id) set status='DROP',end_epoch='$now_date_epoch',length_in_sec='$drop_seconds',term_reason='CALLMENUXFER' where lead_id = '$CIDlead_id' and uniqueid LIKE \"$Euniqueid%\";";
$stmtA = "UPDATE vicidial_log FORCE INDEX(lead_id) set status='$drop_status',end_epoch='$now_date_epoch',length_in_sec='$drop_seconds',term_reason='CALLMENUXFER' where lead_id = '$CIDlead_id' and uniqueid LIKE \"$Euniqueid%\";";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01083'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDAD vicidial_log update: |$affected_rows|$uniqueid"; &agi_output;}
$stmtA = "UPDATE vicidial_list set status='DROP' where lead_id = '$CIDlead_id';";
$stmtA = "UPDATE vicidial_list set status='$drop_status' where lead_id = '$CIDlead_id';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01084'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
@@ -3253,20 +3269,20 @@ if ($drop_timer > $DROP_TIME)
$Baffected_rows = $dbhB->do($stmtB);
$dbhP=$dbhB; $stmtA=$stmtB; $mysql_count='01048'; $MEL_aff_rows=$Baffected_rows; &mysql_error_logging;
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$callerid',queue='$VDADcampaign',agent='NONE',verb='CALLSTATUS',data1='DROP',serverid='$queuemetrics_log_id';";
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$callerid',queue='$VDADcampaign',agent='NONE',verb='CALLSTATUS',data1='$drop_status',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
$dbhP=$dbhB; $stmtA=$stmtB; $mysql_count='01049'; $MEL_aff_rows=$Baffected_rows; &mysql_error_logging;
$dbhB->disconnect();
}
$stmtA = "UPDATE vicidial_log FORCE INDEX(lead_id) set status='DROP',end_epoch='$now_date_epoch',length_in_sec='$drop_seconds',term_reason='QUEUETIMEOUT' where lead_id = '$CIDlead_id' and uniqueid LIKE \"$Euniqueid%\";";
$stmtA = "UPDATE vicidial_log FORCE INDEX(lead_id) set status='$drop_status',end_epoch='$now_date_epoch',length_in_sec='$drop_seconds',term_reason='QUEUETIMEOUT' where lead_id = '$CIDlead_id' and uniqueid LIKE \"$Euniqueid%\";";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01050'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDAD vicidial_log update: |$affected_rows|$uniqueid"; &agi_output;}
$stmtA = "UPDATE vicidial_list set status='DROP' where lead_id = '$CIDlead_id';";
$stmtA = "UPDATE vicidial_list set status='$drop_status' where lead_id = '$CIDlead_id';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01051'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
+2 -2
View File
@@ -738,7 +738,7 @@ survey_ni_digit VARCHAR(1) default '8',
survey_opt_in_audio_file VARCHAR(50) default 'US_pol_survey_transfer',
survey_ni_audio_file VARCHAR(50) default 'US_thanks_no_contact',
survey_method ENUM('AGENT_XFER','VOICEMAIL','EXTENSION','HANGUP','CAMPREC_60_WAV','CALLMENU') default 'AGENT_XFER',
survey_no_response_action ENUM('OPTIN','OPTOUT') default 'OPTIN',
survey_no_response_action ENUM('OPTIN','OPTOUT','DROP') default 'OPTIN',
survey_ni_status VARCHAR(6) default 'NI',
survey_response_digit_map VARCHAR(255) default '1-DEMOCRAT|2-REPUBLICAN|3-INDEPENDANT|8-OPTOUT|X-NO RESPONSE|',
survey_xfer_exten VARCHAR(20) default '8300',
@@ -3123,4 +3123,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='1346',db_schema_update_date=NOW();
UPDATE system_settings SET db_schema_version='1347',db_schema_update_date=NOW();
+4
View File
@@ -360,3 +360,7 @@ UPDATE system_settings SET db_schema_version='1345',db_schema_update_date=NOW()
ALTER TABLE vicidial_campaigns ADD survey_wait_sec TINYINT(3) default '10';
UPDATE system_settings SET db_schema_version='1346',db_schema_update_date=NOW() where db_schema_version < 1346;
ALTER TABLE vicidial_campaigns MODIFY survey_no_response_action ENUM('OPTIN','OPTOUT','DROP') default 'OPTIN';
UPDATE system_settings SET db_schema_version='1347',db_schema_update_date=NOW() where db_schema_version < 1347;
@@ -192,6 +192,7 @@ Admin Report Log Viewer||
Survey Wait Seconds||
This is the number of seconds when in Survey mode the system will wait for input from the person called until the survey or drop action is triggered. Is not applied if the Survey Method is HANGUP. Default is 10 seconds||
You can add NOINT directly in front of an audio file name to make it so the playback cannot be interrupted with a key press by the caller, the NOINT should not be a part of the filename, it is a special flag for the system. You may also use special purpose .agi scripts in this field as well like the cm_date.agi script, discuss with your administrator for more details||
DROP will drop the call using the campaign drop method but still log the call as a PM played message status||
############################################################ CLIENT
+5 -4
View File
@@ -3242,12 +3242,13 @@ else
# 130402-2322 - Added user_group script variable
# 130414-1924 - Added report logging and display
# 130424-1601 - Added survey_wait_sec campaign survey option
# 130425-0700 - Added DROP option for survey_no_response_action to go to campaign drop method
#
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time
$admin_version = '2.6-398a';
$build = '130424-1601';
$admin_version = '2.6-399a';
$build = '130425-0700';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -5377,7 +5378,7 @@ if ($ADD==99999)
<BR>
<A NAME="vicidial_campaigns-survey_no_response_action">
<BR>
<B>Survey No-Response Action -</B> This is where you define what will happen if there is no response to the survey question. OPTIN will only send the call on to the Survey Method if the customer presses a dtmf digit. OPTOUT will send the customer on to the Survey Method even if they do not press a dtmf digit.
<B>Survey No-Response Action -</B> This is where you define what will happen if there is no response to the survey question. OPTIN will only send the call on to the Survey Method if the customer presses a dtmf digit. OPTOUT will send the customer on to the Survey Method even if they do not press a dtmf digit. DROP will drop the call using the campaign drop method but still log the call as a PM played message status.
<BR>
<A NAME="vicidial_campaigns-survey_response_digit_map">
@@ -24023,7 +24024,7 @@ if ($ADD==31)
echo "<tr bgcolor=#B9CBFD><td align=right>Survey Opt-in Audio File: </td><td><input type=text size=50 maxlength=50 name=survey_opt_in_audio_file id=survey_opt_in_audio_file value=\"$survey_opt_in_audio_file\"> <a href=\"javascript:launch_chooser('survey_opt_in_audio_file','date',30);\">audio chooser</a> $NWB#vicidial_campaigns-survey_opt_in_audio_file$NWE</td></tr>\n";
echo "<tr bgcolor=#B9CBFD><td align=right>Survey Not Interested Audio File: </td><td><input type=text size=50 maxlength=50 name=survey_ni_audio_file id=survey_ni_audio_file value=\"$survey_ni_audio_file\"> <a href=\"javascript:launch_chooser('survey_ni_audio_file','date',30);\">audio chooser</a> $NWB#vicidial_campaigns-survey_ni_audio_file$NWE</td></tr>\n";
echo "<tr bgcolor=#B9CBFD><td align=right>Survey Method: </td><td><select size=1 name=survey_method><option>AGENT_XFER</option><option>VOICEMAIL</option><option>EXTENSION</option><option>HANGUP</option><option>CAMPREC_60_WAV</option><option>CALLMENU</option><option SELECTED>$survey_method</option></select> $NWB#vicidial_campaigns-survey_method$NWE</td></tr>\n";
echo "<tr bgcolor=#B9CBFD><td align=right>Survey No-Response Action: </td><td><select size=1 name=survey_no_response_action><option>OPTIN</option><option>OPTOUT</option><option SELECTED>$survey_no_response_action</option></select> $NWB#vicidial_campaigns-survey_no_response_action$NWE</td></tr>\n";
echo "<tr bgcolor=#B9CBFD><td align=right>Survey No-Response Action: </td><td><select size=1 name=survey_no_response_action><option>OPTIN</option><option>OPTOUT</option><option>DROP</option><option SELECTED>$survey_no_response_action</option></select> $NWB#vicidial_campaigns-survey_no_response_action$NWE</td></tr>\n";
echo "<tr bgcolor=#B9CBFD><td align=right>Survey Not Interested Status: </td><td><select name=survey_ni_status>$survey_ni_status_list</select> $NWB#vicidial_campaigns-survey_ni_status$NWE</td></tr>\n";
echo "<tr bgcolor=#B9CBFD><td align=right>Survey Third Digit: </td><td><input type=text size=5 maxlength=1 name=survey_third_digit id=survey_third_digit value=\"$survey_third_digit\"> $NWB#vicidial_campaigns-survey_third_digit$NWE</td></tr>\n";