IVR Answer to client from DB

Have someone to give me clue how do that:

I have MSSQL DB. I prefere tp develop with Java or .NET. I need to answer Automaticly to client according the Records from DB.

What is the approch to build such application. how Asterisk connect to my application to get Voice stream of answer, or get array of sequence mp3 file names to play them?

You can connect via an odbc connection. If you are trying to route calls based on the CID I would recommend using agi’s and learn perl or php.

For MSSQL2005 ODBC is not an option. I use JDBC. Pretty easy to work with.

Build an AGI script implemented using Asterisk-Java and use JDBC.

How connect to Asterisk DB? how connect to Astrisk with Java?

where I can find Doc & Examples?

Example to connect Asterisk and Java: asterisk-java.org/development/tutorial.html

If you choose the AGI with Java way connection to the database is just from you Java AGI script using standard JDBC.