oh it seems to be very easy.... i though it will be complicated and i am trying to read perl books...:(
Thank you very much and i will keep on working on this.... On Fri, Jul 1, 2011 at 8:18 PM, Asterisk - thinking:systems <[email protected] > wrote: > ** > > hi again, > > > > no, you do not have to think that complicated. Just use the normal asterisk > commands and your dialplan! > > > > here just a short example: > > > > ...answer... > > #ask for the choice and save it to your var: > > $choice= $AGI->get_data("$pfad/sounds/bsf-tel1", 5000, 26); > > #play a thank you: > > $AGI->stream_file("$path/$thankyou"); > > #do something with the choice: > > #play Sie werden verbunden > > if($choice eq '1') { > > #if user pressed 1 stream a file to the user: > > $AGI->stream_file("$pfad/$bsftransfer"); > > } > > else { > > #if the user pressed something else execute an astereisk command > > #here we do a goto where the extension is defined in a variable: > > $AGI->exec('GoTo', $bsgoto); > > }#ende if choice > > exit; > > > > > > I hope this does help you. With this little description you should be able > to do quite everything ;-) > > > > cheers > > martin > > > > > > ----- Original Message ----- > *From:* Gopal krishnan <[email protected]> > *To:* Martin Schrott - thinking:systems <[email protected]> > *Cc:* [email protected] > *Sent:* Thursday, June 30, 2011 7:25 PM > *Subject:* Re: Examples of IVR scripts > > 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. >> >> >
