Summary:ASTERISK-02379: ODBC() application for asterisk.
Reporter:constfilin (constfilin)Labels:
Date Opened:2004-09-10 05:25:37Date Closed:2011-06-07 14:04:46
Versions:Frequency of
Environment:Attachments:( 0) app_sql_odbc.c
Description:I implemented asterisk dialplan application that can access
any database with an ODBC driver. The application is implemented using http://bugs.digium.com/bug_view_page.php?bug_id=0002398.

Here's application help:
*CLI> show application ODBC

 -= Info about application 'ODBC' =-

Do several ODBC things

ODBC():  Do several ODBC things
 ODBC(Connect connid db_conn_string [poolable [writeable]])
   Connects to a database.  db_conn_string should look like
   It is passed to SQLDriverConnect(). Connection identifer is returned in ${connid}
 ODBC(Query resultid ${connid} query_string)
   Executes standard ODBC query contained in query-string using established
   connection identified by ${connid}. Result of query is stored in ${resultid}.
 ODBC(Fetch fetchid ${resultid} var1 var2 ... varN)
   Fetches a single row from a result set contained in ${resultid}.
   Assigns returned fields to ${var1} ... ${varn}.  ${fetchid} is set TRUE
   if additional rows exist in result set.
 ODBC(Clear ${resultid})
   Frees memory and data structures associated with result set.
 ODBC(Disconnect ${connid})
   Disconnects from named connection to ODBC.
Comments:By: constfilin (constfilin) 2004-09-10 05:27:14

I am sorry for having to go ahead with astodbc without waiting much for your
feedback - actually whether or not I go to astricon depends on whether or not
I get this done :)

By: Olle Johansson (oej) 2004-10-11 15:10:10

Is this function replaced by app_realtime and the realtime architecture?

By: Brian West (bkw918) 2004-10-14 01:10:12

I think it is.  Constfilin if thats not the case please let me know this is a kick ass option but we need to bug mark if we want it in CVS :)