ok thank you let me try and how about the validation with if structures....
like if i am pressing 1 it has to play some file or ring some extension.
ringing some extension i think i have to do with asterisk perl outgoing
module specified in this link
http://search.cpan.org/dist/asterisk-perl/lib/Asterisk/Outgoing.pm

please correct me if i am wrong.

On Wed, Jun 29, 2011 at 12:26 AM, Martin Schrott - thinking:systems <
[email protected]> wrote:

> **
> 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 <[email protected]>
> *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.
>
>

Reply via email to