[Asterisk-Dev] (no subject)

Steven Sokol ssokol at sokol-associates.com
Tue May 25 08:43:48 MST 2004


 
> I noticed that there was some support for managing the configuration of
> Asterisk in a database.  It seems that it is somewhat incomplete and I was
> wondering if there was anyone working on it right now--or if there are any
> serious caveats working in this area.

We are in the process of altering the configuration structure of Asterisk to
support multiple data sources.  The project is called ast_data and can be
found at http://svn.asteriskdocs.org/res_data

The system allows for any data source to be linked into place.  The system
uses data "drivers" that connect to the back-end of your choice.  We
currently have drivers for MySQL, UnixODBC and PgSQL.

> 
> I am potentially looking to implement a rather large menu/voice mail
> system and was thinking asterisk would be able to give me a lot of the
> functionality I want.  The project requires that everything be rather
> dynamic (prompts and routing can be changed on a whim).  I think I would
> rather implement large portions of the config in a database to make it
> easier for the user management interface (ie. a web interface) manipulate
> the data.
> 

Yep.  The current code in ast_data allows for configuration of Voicemail,
Extensions and SIP users/peers.  Support for other channels will follow
shortly.

> I spent the weekend going through the code and added Postgresql support to
> the MySQL support that was already there in chan_sip.c and chan_iax2.c.
> Additionally I made changes to allow the commands "sip show users" and
> "sip show peers" show the data that it gets in the database (whether mysql
> or postgres)--it is highly inefficient as implemented, but as a proof of
> concept it works.
> 

Uh.  Well... If you want to use the ast_data stuff, that won't work.  We
need to add code for that.  However, many carrier lever users would not want
the sip show peers command to return all 1000000 peers on their system.
Perhaps a command line query version "sip show peer peername"?

> Many of the questions that I have concerning this have to do with the
> database schema.  Has anyone spent the time to come up with a complete
> schema that would encompass the extensions.conf file as well as sip and
> iax2 (and any others)?

Not exactly.  The schema is defined for sipfriends, extensions, and
voicemail.  Iaxfriends will be added soon.  However, many people are running
customized versions of ast_data to make use of stored procedures, views,
etc.  The default schemas are a good starting place.

If you want to discuss, check out the #asterisk-dev channel on IRC
(FreeNode).

Thanks,

Steve





More information about the asterisk-dev mailing list