[Asterisk-Users] Asterisk community input: FreeTDS (cdr_tds.c) or unixODBC (cdr_unixodbc.c) ?

Steven J. Sobol sjsobol at JustThe.net
Fri Aug 1 10:49:34 MST 2003


On 1 Aug 2003, Steven Critchfield wrote:

> Something that may need to be thought out, we seem to run into this
> database interface problem regularly enough. Is it time that the
> database access get moved to a resource and then the extensions
> app_sql_postgres.c could be made into just a sql app that works with any
> backend database.

1. Define an API providing whatever functions you might need. There 
probably aren't many - open DB, query, close DB, report last error, what
else? 

Figure out which functions you need, and write prototypes for them.

2. For each type of database, write and compile the functions defined in
step 1 into a shared library.

3. Allow the user to choose which library they need, and dl() it at 
runtime.

-- 
JustThe.net Internet & Multimedia Svcs. [The Fusion of Content & Connectivity]
22674 Motnocab Road * Apple Valley, CA 92307-1950 
Steve Sobol, Proprietor 
888.480.4NET (4638) * 248.724.4NET * sjsobol at JustThe.net




More information about the asterisk-users mailing list