[Asterisk-Users] MySQL Voicemail and Directory Patch

Matthew Boehm mboehm at cytelcom.com
Fri Sep 17 14:04:08 MST 2004


Hey gang,
 I've been using * with voicemail-mysql for a few weeks. Works like a charm.
Even wrote a nice php web interface to let users check, play and download
their messages.

 Recently found out that if you use mysql-voicemail then you CAN NOT use
app_directory as app_directory reads its information from voicemail.conf. If
you are using mysql-voicemail, then there aren't any entries in
voicemail.conf cause they are all in the database. (insert cheezy *duh*)

 So, I spent a few hours today and wrote a small function that grabs the
information app_directory needs from the voicemail database.

 Before I submit this to the CVS, I'd like some people to test it out.

If you already have voicemail-mysql running then you should be able to apply
both patches and simply type 'make' and have app_directory recompile as my
patch checks for the same compiler directives that app_voicemail checks for.

MAKE SURE to check the newly patched app_directory.c and set VOICEMAIL_TABLE
to whatever table you use. I don't enjoy the fact that other authors choose
to hard-code the tables into their code without making it easy for users to
change them. I have changed my voicemail table. You may have not. Check to
be sure.

app_directory_mysql.patch will patch the app_directory.c file inside
asterisk/apps/ and add the function.

app_directory_mysql_makefile.patch will patch asterisk/apps/Makefile and
will add a new target app_directory because it needs to be linked
with -lmysqlclient.

Please send any comments and bugs to me off-list. Read the debug log for
messages pertaining to 'Directory'.

If you need help setting up voicemail to work with mysql, read here:
http://voip-info.org/tiki-index.php?page=Asterisk%20voicemail%20database

Thanks,
Matthew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: app_directory_mysql.patch
Type: application/octet-stream
Size: 5883 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20040917/06a5f50f/app_directory_mysql.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: app_directory_mysql_makefile.patch
Type: application/octet-stream
Size: 1373 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20040917/06a5f50f/app_directory_mysql_makefile.obj


More information about the asterisk-users mailing list