SURVEY AGI

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

SURVEY AGI

Postby eliasferreyra » Mon May 19, 2008 11:16 pm

hello how can i configure an message for customers with an ivr menu with two options that when the customer choose 1 the call goes to an agent

and if choose 2 the call be hang up?

and how can i configure it for work fine


matt can you xplain me what do i have to to get it works fine please
i have a recorded file with the two options 1 and 2
eliasferreyra
 
Posts: 367
Joined: Wed Jul 18, 2007 3:27 pm

Postby mflorell » Mon May 19, 2008 11:48 pm

What version of astGUIclient are you using?
mflorell
Site Admin
 
Posts: 18342
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

hello

Postby eliasferreyra » Mon May 19, 2008 11:49 pm

vicidial 2.0.4


i need something like this

#Hello, we are conducting a simple survery today, if you are a voter and registered as a Democrat, please press 1. If you are registered as a Republican, please press 2. If you are registered as an Independant or other party please press 3. If you do not want to be contacted again, please press 8.



or like this exactly like this


### Hello, you've been chosen to receive a great deal on travel to Florida, if you are insterested please press one on your phone now,,,,,If you would not like to be contacted again please press 2
eliasferreyra
 
Posts: 367
Joined: Wed Jul 18, 2007 3:27 pm

Postby mflorell » Tue May 20, 2008 8:53 am

Other than the fact that your version is illegal in the USA, it is not difficult to do :)

The SURVEY agi script just needs to have its audio files changed in the code to the ones that you made and the security_question field will need to be changed to be the values you need them to be.
mflorell
Site Admin
 
Posts: 18342
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

hello

Postby eliasferreyra » Wed May 21, 2008 3:28 pm

xplaime please


;; 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,2,AGI(call_log.agi,${EXTEN})
exten => 8366,3,AGI(agi-VDADtransferSURVEY.agi,${EXTEN})
exten => 8366,4,AGI(agi-VDADtransferSURVEY.agi,${EXTEN})
exten => 8366,5,Hangup

what i have to do here
eliasferreyra
 
Posts: 367
Joined: Wed Jul 18, 2007 3:27 pm

Postby mflorell » Wed May 21, 2008 5:53 pm

That part is fine, what needs to be changed is in the actual source code of the agi script itself.
mflorell
Site Admin
 
Posts: 18342
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

hello

Postby eliasferreyra » Thu May 22, 2008 8:18 pm

ok matt i understand you

you reffer to the agi file configuratio



look


what do ia have to change to use only two options 1,2 and the recording file is hello.gsm?


# Hello, we are conducting a simple survery today, if you are a voter and registered as a Democrat, please press 1. If you are registered as a Republican, please press 2. If you are registered as an Independant or other party please press 3. If you do not want to be contacted again, please press 8.

$interrupt_digit = $AGI->stream_file('US_pol_survey_hello','123456789');

if ($AGILOG) {$agi_string = "interrupt_digit |$interrupt_digit|"; &agi_output;}

$digits_being_entered=1;
$digit_loop_counter=0;
$totalDTMF='';
if ($interrupt_digit > 1)
{
if ($interrupt_digit == 48) {$interrupt_digit=0;}
if ($interrupt_digit == 49) {$interrupt_digit=1;}
if ($interrupt_digit == 50) {$interrupt_digit=2;}
if ($interrupt_digit == 51) {$interrupt_digit=3;}
if ($interrupt_digit == 52) {$interrupt_digit=4;}
if ($interrupt_digit == 53) {$interrupt_digit=5;}
if ($interrupt_digit == 54) {$interrupt_digit=6;}
if ($interrupt_digit == 55) {$interrupt_digit=7;}
if ($interrupt_digit == 56) {$interrupt_digit=8;}
if ($interrupt_digit == 57) {$interrupt_digit=9;}

$totalDTMF=$interrupt_digit;
$digit_loop_counter++;
}


while ($digit_loop_counter < 1)
{
$digit = chr($AGI->wait_for_digit('2000')); # wait 0.2 seconds for input or until the pound key is pressed
if ($digit =~ /\d/)
{
$totalDTMF = "$totalDTMF$digit";
if ($AGILOG) {$agi_string = "digit |$digit| TotalDTMF |$totalDTMF|"; &agi_output;}
# $AGI->say_digits("$digit");
undef $digit;
}
else
{
$digit_loop_counter=1;
}

$digit_loop_counter++;
}

$totalDTMF =~ s/\D//gi;
$pin = $totalDTMF;
if ($totalDTMF)
{
if ($AGILOG) {$agi_string = "digit |$digit| TotalDTMF |$totalDTMF|"; &agi_output;}
}
}




sub checkresult {
my ($res) = @_;
my $retval;
$tests++;
chomp $res;
if ($res =~ /^200/) {
$res =~ /result=(-?\d+)/;
if (!length($1)) {
# print STDERR "FAIL ($res)\n";
$fail++;
} else {
# print STDERR "PASS ($1)\n";
$pass++;
}
} else {
print STDERR "FAIL (unexpected result '$res')\n";
$fail++;
}
}



### Hello, you've been chosen to receive a great deal on travel to Florida, if you are insterested please press one on your phone now,,,,,If you would not like to be contacted again please press 2



sub agi_output
{
if ($AGILOG >=2)
{
### open the log file for writing ###
open(Lout, ">>$AGILOGfile")
|| die "Can't open $AGILOGfile: $!\n";
print Lout "$now_date|$script|$agi_string\n";
close(Lout);
}
### send to STDERR writing ###
if ( ($AGILOG == '1') || ($AGILOG == '3') )
{print STDERR "$now_date|$script|$agi_string\n";}
$agi_string='';
}
eliasferreyra
 
Posts: 367
Joined: Wed Jul 18, 2007 3:27 pm

Postby mflorell » Thu May 22, 2008 10:31 pm

what do ia have to change to use only two options 1,2 and the recording file is hello.gsm?


$interrupt_digit = $AGI->stream_file('US_pol_survey_hello','123456789');



$interrupt_digit = $AGI->stream_file('hello','12');


you might also want to change this part:

if ($pin =~ /^1|^2|^3|^0/)
{
$voter='';

if ($pin == "1") {$voter = 'DEMOCRAT';}
if ($pin == "2") {$voter = 'REPUBLICAN';}
if ($pin == "3") {$voter = 'INDEPENDANT';}
if ($pin == "0") {$voter = 'OPERATOR';}

$AGI->stream_file('US_pol_survey_transfer');
mflorell
Site Admin
 
Posts: 18342
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

hello

Postby eliasferreyra » Fri May 23, 2008 11:23 am

there is something bad


i have this config

$interrupt_digit = $AGI->stream_file('hello','12');


you might also want to change this part:

if ($pin =~ /^1|^2/)
{
$voter='';

if ($pin == "1") {$voter = 'AGENT';}
if ($pin == "2") {$voter = 'HANGUP';}

$AGI->stream_file('US_pol_survey_transfer');


and i receive that on asterisk cli

ew stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/agi-VDADtransferSURVEY.agi
May 23 12:38:17 WARNING[18173]: file.c:517 ast_openstream_full: File beep does not exist in any format
== Parsing '/etc/asterisk/manager.conf': Found
== Manager 'sendcron' logged on from 127.0.0.1
== Spawn extension (default, 8600058, 1) exited non-zero on 'SIP/mxvo

and the calls hangs up automatically ....help matt
eliasferreyra
 
Posts: 367
Joined: Wed Jul 18, 2007 3:27 pm

Postby mflorell » Fri May 23, 2008 11:43 am

I guess you don't have the default sounds in your /var/lib/asterisk/sounds directory.
Last edited by mflorell on Fri May 23, 2008 11:21 pm, edited 1 time in total.
mflorell
Site Admin
 
Posts: 18342
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

hello

Postby eliasferreyra » Fri May 23, 2008 8:53 pm

do i have to create tables on mysql

for create more options
eliasferreyra
 
Posts: 367
Joined: Wed Jul 18, 2007 3:27 pm

Postby mflorell » Fri May 23, 2008 11:20 pm

I'm not sure I understand, could you explain what you mean?
mflorell
Site Admin
 
Posts: 18342
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

hello

Postby eliasferreyra » Sat May 24, 2008 6:22 am

Does the survey agi has to be with tha database?

how can i configure two campaign on the same server using the 8366 context but with different survey message?

creating another surver agi or copying but changing the content
or i can do with the same agi without have to copy or create another agi file

and where can i find this agi-VDAD_ALL_outbound.agi ?
my vicidial 2.0.4 have not then on
eliasferreyra
 
Posts: 367
Joined: Wed Jul 18, 2007 3:27 pm

Postby mflorell » Sat May 24, 2008 12:38 pm

agi-VDAD_ALL_outbound.agi is in SVN trunk and is not compatible with 2.0.4, it does allow for dialplan flags to configue it for Survey dialing.

In 2.0.4 you will need to create a new SURVEY AGI script and assign it to another exten in your dialplan for each different one you want to run.
mflorell
Site Admin
 
Posts: 18342
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

hello

Postby eliasferreyra » Sat May 24, 2008 1:04 pm

thanks Matt i understand :D
eliasferreyra
 
Posts: 367
Joined: Wed Jul 18, 2007 3:27 pm

Postby ritztech » Tue May 27, 2008 12:33 am

hey hey i am assuming to edit this agi script to put a option only as the dtmf digit of 1... im just trying to figure out how to put everything together hey matt or elias... i hate to ask very new to asterisk ... if i could snag some like working files o txt output .. of im assuming extensions.conf and i think a dial plan conf file and survey agi so i can kind of see what a good working finish is....
or if i can see which files i need to setup


Thanks ....
ritztech
 
Posts: 5
Joined: Wed May 21, 2008 11:27 pm


Return to Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 127 guests