Gopal,
your script hangs up, because there is nothing more to do in it.
you could fetch the userdata via a get command and let this play a sound to
the user:
$userdata= $AGI->get_data("$sounds/please_enter", 5000, 26);
you specifie a soundfile, a timeout and the length of maximum digits to enter
by the user.
all the best,
Martin
----- Original Message -----
From: Gopal krishnan
To: [email protected]
Sent: Tuesday, June 28, 2011 7:45 PM
Subject: Examples of IVR scripts
Hi,
Is there any example available for basic IVR steps. I tried to find but I
am not able to get it done.
My script as follows,
#!/usr/bin/perl
use Asterisk::AGI;
$agi=new Asterisk::AGI;
$agi->answer();
$agi->stream_file('hello-world','1');
$agi->wait_for_digit('10');
In the above script after playing the hello-world if i press 1 the call is
hanging up, not even waiting for the dtmf input. So any examples please direct
me to there.
Regards,
Gopal.