[Asterisk-Users] Database lookups?

Steve Mann smann at finelinesolutions.com
Thu Apr 7 13:52:24 MST 2005


Similar to my post about using a DB for authentication, you can use the Read
app to
1 - Play a recoding which asks for digits
2 - Indicate which variable to assign entered digits to
3 - Set the max length for the digits.
 
Once this function is called, the digits entered by the caller are stored in
a variable, the next line of your IVR can pass that variable to an AGI app.
Using any executable app such as Perl, PHP, etc. you can write a script that
reads in the variable passed, dive into a database, pull out the status,
then have asterisk play a different sound file based on the status using
either a specific AGI command, or using the AGI command "exec" to run an
asterisk command.
 
See:
 
http://www.voip-info.org/wiki-Asterisk+AGI
<http://www.voip-info.org/wiki-Asterisk+AGI> 
 
for more info.
 
Hope that points you in the right direction.
 
Steve

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com]On Behalf Of Jan Johansson
Sent: Thursday, April 07, 2005 2:19 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [Asterisk-Users] Database lookups?



Is it possible (How complicated is it?) to do this;

 

Call comes in, connects to IVR

IVR plays the usual "please type your order number, finish with pound"

 

Then I would like to query a MSSQL database server, looking up the "Status"
column from a row where ordernr = the entered order number.

 

Depending on the result of the lookup, play one of two messages  ("Yes,
ready for pickup" or "No, your order is not ready").

 

Can someone clue me in on which docs I should start with? Or is there an
example of this somewhere?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 5904 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20050407/7ddc18bd/winmail.bin


More information about the asterisk-users mailing list