Dialling a number from database via SIP channel?

hello,

  can anyone tell me how to dial a number, retrieved from database???

actually,whenever i get any call i’m going through the database related to that callerid and from there i want to call to the number specified in that particular database.

But,i’m not getting how to do.Please any suggesstions…

Please visit the following URL to find more info on intergrating Asterisk AGI to database:
forums.digium.com/viewtopic.php? … ght=oracle

please ignore the previous post. the guy is pushing some convoluted Oracle product which in my opinion sounds like piss… anyway.

You have a couple of options.

1 - There is a third party application called app_dbquery. It works in conjunction with res_mysqlpool and it allows you to do simple DB queries directly from the dialplan. I used it and it worked fine… only problem I found was that on occasion I would get an error about not being able to retrieve a connection from the pool, although there were definitely available connections. (Note: looks like the download page is down. PM me if you want me to email you a tarball of the source package).

2 - You could write a simple AGI script to do the database lookup and either set a channel variable, or do the dial from the AGI script and handle the call cleanup as well. Both Perl and PHP have nice AGI libraries available. I personally use Asterisk-Java and FastAGI, but that’s probably a bit much for this application.

-G

He is talking about Data Centric Approach of Development which he has implemented in Oracle, MS SQL Server and MySQL. Any body is free to do that. Pls post no hate replies. Anyway his posts are worth reading for a serious asterisk developer.

You and he are obviously the same person… or perhaps working for the same company based on your blatantly fake back and forth. Seriously, stop posting here.

Software Development Approach is for every ones benefit only and it has nothing to do with Person, Product or Company?

[quote=“g2010”]please ignore the previous post. the guy is pushing some convoluted Oracle product which in my opinion sounds like piss… anyway.

You have a couple of options.

1 - There is a third party application called app_dbquery. It works in conjunction with res_mysqlpool and it allows you to do simple DB queries directly from the dialplan. I used it and it worked fine… only problem I found was that on occasion I would get an error about not being able to retrieve a connection from the pool, although there were definitely available connections. (Note: looks like the download page is down. PM me if you want me to email you a tarball of the source package).

2 - You could write a simple AGI script to do the database lookup and either set a channel variable, or do the dial from the AGI script and handle the call cleanup as well. Both Perl and PHP have nice AGI libraries available. I personally use Asterisk-Java and FastAGI, but that’s probably a bit much for this application.

-G[/quote]

thanks G…for replying my forum…Actually i’m using SIP server to forward the calls and those numbers are registered by user…so i have to dial to those numbers.I’m using phpagi script and MYSQL database.