diff --git a/UPGRADE b/UPGRADE index f40c26c3..0f82ff9a 100644 --- a/UPGRADE +++ b/UPGRADE @@ -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. + diff --git a/agi/agi-VDAD_ALL_outbound.agi b/agi/agi-VDAD_ALL_outbound.agi index b401ea73..69c13446 100644 --- a/agi/agi-VDAD_ALL_outbound.agi +++ b/agi/agi-VDAD_ALL_outbound.agi @@ -104,6 +104,7 @@ # 130124-1853 - Issue #637 fix # 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; diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index ca717329..20abe351 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -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(); diff --git a/extras/upgrade_2.6.sql b/extras/upgrade_2.6.sql index dd564b7d..de502d98 100644 --- a/extras/upgrade_2.6.sql +++ b/extras/upgrade_2.6.sql @@ -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; diff --git a/translations/raw_translation_files/TO_BE_TRANSLATED_2.6.txt b/translations/raw_translation_files/TO_BE_TRANSLATED_2.6.txt index 15317d39..71d5f687 100644 --- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.6.txt +++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.6.txt @@ -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 diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 91cf5d10..0981e697 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -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)

- Survey No-Response Action - 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. + Survey No-Response Action - 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.
@@ -24023,7 +24024,7 @@ if ($ADD==31) echo "Survey Opt-in Audio File: audio chooser $NWB#vicidial_campaigns-survey_opt_in_audio_file$NWE\n"; echo "Survey Not Interested Audio File: audio chooser $NWB#vicidial_campaigns-survey_ni_audio_file$NWE\n"; echo "Survey Method: $NWB#vicidial_campaigns-survey_method$NWE\n"; - echo "Survey No-Response Action: $NWB#vicidial_campaigns-survey_no_response_action$NWE\n"; + echo "Survey No-Response Action: $NWB#vicidial_campaigns-survey_no_response_action$NWE\n"; echo "Survey Not Interested Status: $NWB#vicidial_campaigns-survey_ni_status$NWE\n"; echo "Survey Third Digit: $NWB#vicidial_campaigns-survey_third_digit$NWE\n";