Voicemail ODBC storage


I am working on a project to create an Asterisk Voicemail solution with FreePBX. I would like to store the voicemail .wav files in a MySQL database (configurable in the voicemail.conf file). The one problem I have in doing this is that FreePBX looks for the .wav files in the /var/spool/asterisk directory. So, when a user goes to http://voicemailserver/recordings and looks at his inbox, it is always empty, even though there are messages in the MySQL database.

My guess is that I would have to write some PHP code in the /var/www/recordings directory. It looks like the voicmail is referenced in include/main.conf.php and modules/voicemail. If I can re-route this from the file system to the database, I think it will all play nice. Does anybody have any experience with this, or any suggestions?

I know this may all sound hair-brained, but it really could be pretty slick. MySQL 5.1 has clustering capability. So you could have two Asterisk servers write to their own MySQL database, but the databases are clustered, so you have automatic redundancy. If one server goes down, the other can take over for it seamlessly.


there’s a lot hardcoded to the standard voicemail system. If you want to work on developing a branch that could handle ODBC voicemail, that would be welcome. As Asterisk has matured, hopefully that ability has matured with it - I seem to recall once upon a time it was less than reliable.

Hi could you tell me how to write an agi to route the calls when the user wont attend or else he is busy.

Ramesh, See reply to previous post.

FreePBX works at a layer above Asterisk and on it, the voicemail process is hard coded inside asterisk so there is not much you can do without re-writing code asterisk code.