[Asterisk-Dev] Database App

Steven Critchfield critch at basesys.com
Thu Jul 15 11:46:24 MST 2004

On Thu, 2004-07-15 at 13:21, Brian Jones wrote:
> Hi,
> I was wondering if there is an app available that would let me run 
> queries on MySQL or Postgress database through the extensions.conf file 
> in Asterisk.
> My goal is to be able to run a simple query on a database that could 
> return a value in an ${var} variable, or even the number or rows that 
> were returned in the query in a ${var}.  There are a couple of things 
> in Asterisk I would like to accomplish, without having to fork an AGI 
> application, that involved getting/checking data in a database.
> If there isn't such an app then I will look into creating one, which 
> I'd be willing to share.

I'm not sure of it's current status other than it is still working on my
system, but there is a PGSQL app that lets you run postgres queries. I'm
sure someone will pipe in and say it is deprecated and you shouldn't use
it. They are correct. 

We are trying to move to a res_data format and the database specifics
will get hidden down below it. At that point, maybe a wrapper app will
be created for what you want. The bigger better question is if you are
concerned about fork time, why not get res_data and write an application
that can take pre caned queries in a config file and spit out results
for you. 

Over all, if it isn't going to be hit constantly, agi isn't that bad of
a route.

Steven Critchfield  <critch at basesys.com>

More information about the asterisk-dev mailing list