[Home]

Summary:ASTERISK-01151: PostgreSQL addition to chan_iax.c and chan_iax2.c
Reporter:bsenicar (bsenicar)Labels:
Date Opened:2004-03-04 14:45:59.000-0600Date Closed:2011-06-07 14:05:09
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) iax_pgsql.diff
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 iax.conf.

Other option is to use ODBC and get backend independency.
Comments:By: Steven Sokol (ssokol) 2004-03-04 18:46:35.000-0600

Several of us kicked around several ideas related to this a few days ago.  We need to look at ways to make sub-systems of Asterisk database enabled without altering the way Asterisk works or compromising the overall flexibility of the system.  We also want to create a common framework/API for system management.

By the way, PostgreSQL isn't currently the main database for Asterisk.  Currently Asterisk uses the DB1 database.  PostgreSQL support has been added for VM2 and I think there's an add-on for CDRs floating around out there.  Has a decision been made that PostgreSQL is the way to go?  I think it sounds great.  Just curious.

By: Steven Sokol (ssokol) 2004-03-05 18:24:57.000-0600

Here's a patch to do just that.  My first take at serious hackage of chan_iax2, so be careful.  It seems to be working for me, but that don't say much.

As for the login, just add the same dbname, dbuser, dbpass, dbhost, and an optional dbport value to [general] section of iax2.conf.  It uses the same database layout as the mysql version.

By: jrollyson (jrollyson) 2004-03-07 09:28:34.000-0600

Last I looked, there was a lean towards using ODBC for database independance. Developing and maintaining multiple *SQL interfaces is pointless.

The overhead from a database abstraction layer should be fairly low anyway, so IMHO it's not worth locking into any specific database.

By: Brian West (bkw918) 2004-04-09 20:26:17

Accually pgsql isn't the main database, we as in the -dev channel have talked about creating an asterisk db api that we can then just plug in which db you want and it just works.  we write x or y app to use that api then its 100% compat with them all then.

bkw

By: Brian West (bkw918) 2004-04-09 20:27:13

Bug kept here just in case anyone needs it.  I'm sure they will hash out the api for the db layer soon.