refinements to the Survey functions of the ALL_outbound AGI script
git-svn-id: svn://192.168.202.10@883 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -121,6 +121,10 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
|
||||
as well as display in real-time stats. See Inbound_VDAC_IVR.txt doc for
|
||||
more information
|
||||
|
||||
26. Auto-dial survey broadcast campaigns can now be fully configured within the
|
||||
admin.php interface and they have new options shown in the Survey sub-
|
||||
section
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -514,6 +514,7 @@ if ($call_handle_method =~ /SURVEY/)
|
||||
}
|
||||
|
||||
# play the message and let them press a number
|
||||
$digits_to_collect = '1';
|
||||
$opt_code = enter_pin_number($survey_first_audio_file,$survey_dtmf_digits);
|
||||
if (length($opt_code) < 1) {$opt_code = 'X';}
|
||||
$opt_description = $opt_code;
|
||||
@@ -526,7 +527,7 @@ if ($call_handle_method =~ /SURVEY/)
|
||||
}
|
||||
|
||||
# record what they entered
|
||||
$stmtA = "UPDATE vicidial_list set security_phrase='$opt_description' where lead_id = '$CIDlead_id';";
|
||||
$stmtA = "UPDATE vicidial_list set security_phrase='$opt_description',status='PM' where lead_id = '$CIDlead_id';";
|
||||
if ($AGILOG) { $agi_string = "|$stmtA|"; &agi_output; }
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG)
|
||||
@@ -536,7 +537,7 @@ if ($call_handle_method =~ /SURVEY/)
|
||||
}
|
||||
|
||||
# they opted out
|
||||
if ("$opt_code" eq "$survey_ni_digit")
|
||||
if ($opt_code =~ /$survey_ni_digit/)
|
||||
{
|
||||
if ( $survey_ni_audio_file ne "")
|
||||
{
|
||||
@@ -722,7 +723,7 @@ if ($call_handle_method =~ /SURVEY/)
|
||||
|
||||
$AGI->stream_file('beep');
|
||||
|
||||
$interrupt_digit = $AGI->record_file("$survey_camp_record_dir/$VDADcampaign/$VDADphone$filedate", "$format", '123456789*#', "$timeout", 1);
|
||||
$interrupt_digit = $AGI->record_file("$survey_camp_record_dir/$VDADcampaign/$VDADphone$filedate", "$format", '123456789*#', "$timeout", '0', 1, '10');
|
||||
if ($AGILOG)
|
||||
{
|
||||
$agi_string = "RECORDING FINISHED: $interrupt_digit|$survey_camp_record_dir/$VDADcampaign/$VDADphone$filedate|";
|
||||
@@ -747,6 +748,27 @@ if ($call_handle_method =~ /SURVEY/)
|
||||
}
|
||||
else
|
||||
{
|
||||
$Euniqueid=$uniqueid;
|
||||
$Euniqueid =~ s/\.\d+//gi;
|
||||
$now_date_epoch = time();
|
||||
$drop_seconds = $now_date_epoch - $start_time_epoch;
|
||||
$stmtA = "UPDATE vicidial_log FORCE INDEX(lead_id) set status='PM', end_epoch='$now_date_epoch', length_in_sec='$drop_seconds', term_reason='CALLER' where lead_id = '$CIDlead_id' and uniqueid LIKE \"$Euniqueid%\";";
|
||||
if ($AGILOG) { $agi_string = "|$stmtA|"; &agi_output; }
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG)
|
||||
{
|
||||
$agi_string = "-- VDAD vicidial_log update: PM|$affected_rows|$uniqueid|$drop_seconds|";
|
||||
&agi_output;
|
||||
}
|
||||
|
||||
$stmtA = "DELETE FROM vicidial_auto_calls where callerid='$callerid' order by call_time desc limit 1;";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG)
|
||||
{
|
||||
$agi_string = "-- VDAD vac record deleted: |$affected_rows|$VDADcampaign|";
|
||||
&agi_output;
|
||||
}
|
||||
|
||||
$AGI->hangup();
|
||||
|
||||
exit;
|
||||
@@ -1283,7 +1305,7 @@ if ($interrupt_digit > 1)
|
||||
$totalDTMF=$interrupt_digit;
|
||||
}
|
||||
|
||||
$digit_loop_counter=0;
|
||||
$digit_loop_counter = length($totalDTMF);
|
||||
|
||||
while ( ($digit_loop_counter < $digits_to_collect) )
|
||||
{
|
||||
|
||||
@@ -380,9 +380,9 @@ exten => 8365,5,Hangup
|
||||
|
||||
; VICIDIAL_auto_dialer transfer script SURVEY at beginning:
|
||||
exten => 8366,1,AGI(agi://127.0.0.1:4577/call_log)
|
||||
exten => 8366,2,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,3,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,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,2,AGI(agi-VDAD_ALL_outbound.agi,SURVEYCAMP-----LB)
|
||||
exten => 8366,3,AGI(agi-VDAD_ALL_outbound.agi,SURVEYCAMP-----LB)
|
||||
exten => 8366,4,AGI(agi-VDAD_ALL_outbound.agi,SURVEYCAMP-----LB)
|
||||
exten => 8366,5,Hangup
|
||||
|
||||
; VICIDIAL_auto_dialer transfer script Load Balance Overflow:
|
||||
@@ -435,8 +435,8 @@ exten => 8372,5,Hangup
|
||||
;; VICIDIAL_auto_dialer transfer script SURVEY at beginning:
|
||||
;exten => 8366,1,Playback(sip-silence)
|
||||
;exten => 8366,2,AGI(agi://127.0.0.1:4577/call_log)
|
||||
;exten => 8366,3,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,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,3,AGI(agi-VDAD_ALL_outbound.agi,SURVEYCAMP-----LB)
|
||||
;exten => 8366,4,AGI(agi-VDAD_ALL_outbound.agi,SURVEYCAMP-----LB)
|
||||
;exten => 8366,5,Hangup
|
||||
;
|
||||
;; VICIDIAL_auto_dialer transfer script Load Balance Overflow:
|
||||
|
||||
@@ -235,6 +235,8 @@ INSERT INTO vicidial_statuses values('SALE','Sale Made','Y','Y','UNDEFINED');
|
||||
INSERT INTO vicidial_statuses values('N','No Answer','Y','N','UNDEFINED');
|
||||
INSERT INTO vicidial_statuses values('NI','Not Interested','Y','Y','UNDEFINED');
|
||||
INSERT INTO vicidial_statuses values('NP','No Pitch No Price','Y','Y','UNDEFINED');
|
||||
INSERT INTO vicidial_statuses values('PU','Call Picked Up','N','N','UNDEFINED');
|
||||
INSERT INTO vicidial_statuses values('PM','Played Message','N','N','UNDEFINED');
|
||||
INSERT INTO vicidial_statuses values('XFER','Call Transferred','Y','Y','UNDEFINED');
|
||||
INSERT INTO vicidial_statuses values('SVYEXT','Survey sent to Extension','N','N','UNDEFINED');
|
||||
INSERT INTO vicidial_statuses values('SVYVM','Survey sent to Voicemail','N','N','UNDEFINED');
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user