I managed to connect MSSQL server to asterisk using Easysoft ODBC driver. I am wondering how I can call a stored procedure in sql server from Asterisk. I created a stored procedure named sp_GetText in sql server.
Please let me know the ways it can be done.
I couldn’t find much information in internet regarding this.
use the Pear library [pear.php.net/] and particularly the MS ADO support package [pear.php.net/package/DB_ado]. You can then access Pear through the scripting language of your choice [php, perl etc] using the Pear package for MS databases
In general I have had a lot better luck working the other way around, pushing data from MSSQL to asterisk than the other way around.
1st thing you should do, is figure out how to call a stored procedure in the language you are writing the AGI in. Whether that be Perl, PHP, Python, etc… Once you can do that outside of asterisk. Then look into AGI programming for that particular language. Chapter 9 of The Future of Telephony covers it a bit.