[Home]

Summary:ASTERISK-01153: [patch] PostgreSQL addition to chan_sip.c
Reporter:bsenicar (bsenicar)Labels:
Date Opened:2004-03-04 14:50:32.000-0600Date Closed:2011-06-07 14:05:24
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) chan_sip.c.patch
( 1) channels-Makefile.patch
Description:Since PostreSQL is main database for Asterisk it would be nice to use it in same way as MySQL to store user accounts in database instead of sip.conf.

Other option is to use ODBC and get backend independency.
Comments:By: enno (enno) 2004-03-17 20:45:45.000-0600

I attached a patch for PostgreSQL support. It's what I'm using on a test system for the last month or so, and it duplicates just what MYSQL_FRIENDS does in CVS-current, i.e. it has the same limited functionality.

Files:
chan_sip.c.patch
Makefile.patch

Configuration in sip.conf is exactly the same, and the PostgreSQL support is activated by USE_POSTGRES_FRIENDS=1 in the Makefile (see Makefile.patch). The SQL table is exactly the same.

The way the patch is written you have too choose either MySQL or PostgreSQL, not both together.

Final note: I don't think duplicating this stuff for all database backends is the way to go, but would rather like to see a common database backend, but as it is, this was faster and easier. Please try and test.

By: Brian West (bkw918) 2004-03-17 21:29:13.000-0600

Since when has Postgres been the main db in asterisk.  This cluster of diffrent databases has GOT to stop this is starting to be VERY messy.  We have got to figure out a better way to do it (ODBC is one option but a performance hit) so we need some other sort of abstraction layer.  Maybe res_mysql and res_pgsql which register a standard set of dbtools that are called from the diffrent apps.

just an idea.

By: Brian West (bkw918) 2004-03-17 21:35:34.000-0600

bug 1229 is kinda what I am talking about.

By: Brian West (bkw918) 2004-04-18 01:40:40

join #asterisk-dev and ask about res_data.c

bkw