[asterisk-users] IVR and MySQL
James FitzGibbon
james.fitzgibbon at gmail.com
Tue Aug 14 10:01:11 CDT 2007
On 8/14/07, Fabio Ardeola <fardeola at yahoo.com> wrote:
>
>
> Let say that the user entry during the call is a
> reference number of a house to rent. Would be possible
> to check if the reference number is a valid entry on
> the MySQL database and then base on its answer define
> the next menu item on the IVR menu.
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.
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.
--
j.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070814/aac3b8a5/attachment-0001.htm
More information about the asterisk-users
mailing list