On 8/14/07, <b class="gmail_sendername">Fabio Ardeola</b> <<a href="mailto:fardeola@yahoo.com">fardeola@yahoo.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Let say that the user entry during the call is a<br>reference number of a house to rent. Would be possible<br>to check if the reference number is a valid entry on<br>the MySQL database and then base on its answer define
<br>the next menu item on the IVR menu.</blockquote><div><br>If you want to do something like that, you can either use the MYSQL function (with the attendant issues of connecting/reconnecting/etc.) or put all of the functionality in an AGI script. Since AGI can both receive information from and send commands to Asterisk, you can do pretty much anything you can code. There are programming frameworks for AGI for Perl, PHP, Java, and you could even do it in shellscript if you want. The communication channel between Asterisk and the script is stdin/stdout, so you're not restricted at all.
<br><br>Using AGI does make the the integrity of your system depend on an external component (i.e. if you're using FastAGI and the agi server goes down, your calls will just return immediately to the dialplan), but when you need to do something that doesn't fit intuitively into the Asterisk dialplan, I find it's the way to go.
<br></div><br></div>-- <br>j.