RE: [Asterisk-Users] Database lookups?

2005-04-08 Thread Jan Johansson

>Very simple. AGI. Write a custom AGI program (any language) to do the MSSQL

>query. AGI can control playback of audio, etc. See 
>http://www.voip-info.org/wiki-Asterisk+AGI.

Thanks!

This could be ... fun :)


smime.p7s
Description: S/MIME cryptographic signature
___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [Asterisk-Users] Database lookups?

2005-04-07 Thread Steve Prior
Jan Johansson wrote:
Is it possible (How complicated is it?) to do this;
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?
If Perl is your thing then take a look at:
http://ruk.ca/code/amazon.pl
This is a script which plays a prompt message, accepts a number (in this case
an ISBN), does a lookup based on that data, then plays a response.  If you
can hack the database lookup part yourself, then this script should give you
a framework for what you need.
Steve
___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [Asterisk-Users] Database lookups?

2005-04-07 Thread Steve Mann
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
 
 
for more info.
 
Hope that points you in the right direction.
 
Steve

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 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?

<>___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [Asterisk-Users] Database lookups?

2005-04-07 Thread Josiah Bryan
On Thursday 07 April 2005 3:19 pm, Jan Johansson wrote:
> 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?

Very simple. AGI. Write a custom AGI program (any language) to do the MSSQL 
query. AGI can control playback of audio, etc. See 
http://www.voip-info.org/wiki-Asterisk+AGI.

Cheers & HTH -
-josiah

-- 
Josiah Bryan
IT Coordinator
Productive Concepts, Inc.
[EMAIL PROTECTED]
(765) 964-6009, ext. 224
___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users