[Asterisk-Dev] Construct an ast_config from database

Rob Gagnon rob at networkip.net
Wed Sep 15 15:24:03 MST 2004


You could look into ast_data project for mysql, pgsql, or odbc integration 
into asterisk (which includes the app_directory stuff)
See http://svn.asteriskdocs.org/res_data

OR

You could use the built-in MySQL support.  See some info on 
www.voip-info.org or read through some of the Makefiles in the source 
distribution.  (IE:  channels/Makefile)

Rob

----- Original Message ----- 
From: "Matthew Boehm" <mboehm at cytelcom.com>
To: <asterisk-dev at lists.digium.com>
Sent: Wednesday, September 15, 2004 5:04 PM
Subject: [Asterisk-Dev] Construct an ast_config from database


> Hey gang. Since I'm not 'that' great with C I've got a curiosity. My
> eventual goal is to add MySQL support to the entire server. Got SIP,
> Voicemail and Extensions to work (using those retrieve_* scripts). Will
> eventually try to make them dynamic.
>
> Focusing right now on app_directory. I can see from the source that it 
> gets
> its information by reading the voicemail.conf file and parsing the vm
> extensions for certain context.
>
> In my case, there are none in that file as all my VM is done in db.
>
> Without rewriting/adding too much code to the app_directory.c, I figured 
> it
> would be easier if instead of the directory doing this:  cfg =
> ast_load(DIRECTORY_CONFIG);
>
> I could do: cfg = make_cfg_from_db( "voicemail_users" );
>
> That function could then do all the querying and could construct a .cfg
> struct and return it.
>
> Does this sound like something that 'can' be done? Any hints/suggestions 
> for
> things to watch out for?
>
> Thanks,
> Matthew
>
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-dev 




More information about the asterisk-dev mailing list