[Asterisk-Dev] RE: Asterisk license (fwd)
Peter Nixon
listuser at peternixon.net
Thu Oct 2 05:27:23 MST 2003
On Wed October 1 2003 22:09, duncan wrote:
> >Is MySQL a requirement for Asterisk? What are the alternatives? How much
> >of its features does it need? I was reading somewhere not too long ago
> >about a product called either miniSQL or tinySQL.
>
> No its not a requirement, its a feature. MySQL is a very popular database
> - so the ability to log CDR records to MySQL was added. Asterisk doesnt
> use MySQL for anything internally, for this db1 is used. Db1 is a very
> small database with the correct licencing to be added to the asterisk
> codebase. This licencing disagreement with MySQL isnt a big deal,
> especially as Postgresql support should be merged into the CVS code base
> about now.
>
> MySQL support is still available for those unable or unwilling to install
> Postgresql by checking out asterisk-addons. Of course a database
> abstraction layer would be nice, so CDR logging could occur to any kind of
> database (oracle, yum!) but these things take a little time.
Yes. They do :-)
I should have explained a little better what I meant when I said "database
abstraction" in the previous email. I most definately did NOT mean ODBC.
I think there is a fair bit of code asterisk could borrow from FreeRADIUS as
far as DB access goes.
FR is very modular like Asterisk (possibly more so) and has multiple modules
to do accounting. It has a "detail" file module (similar to CDR loging in
Asterisk but in a different format) and among other things a SQL module. The
SQL module then loads a database driver module which currently has drivers
for Oracle, MySQL, Postgresql (I maintain this. Please don't laugh too hard
at my code) and ODBC.
With the ODBC module you can obviously then connect to any DB that is
supported by ODBC including MSSQL by using FreeTDS or the Sybase driver.
This nice abstraction allows for much cleaner code, not to mention the ability
to have multiple backend DBs in failover mode. The DBs can even be DIFFERENT.
ie. Your primary Accounting database may be a Postgresql DB running on one
server, your failover may be a MSSQL DB running on a Win2K box using the ODBC
driver, and your Authentication DB may be MySQL running on localhost..
I would love to see this functionality in Asterisk.... I may even put my code
where my mouth is and attempt to implement it in a few weeks once I get the
current crop of projects out of the way.
Cheers
--
Peter Nixon
http://www.peternixon.net/
PGP Key: http://www.peternixon.net/public.asc
More information about the asterisk-dev
mailing list