[asterisk-users] Preparing to store vm in database

Mike Diehl mdiehl at diehlnet.com
Fri Dec 9 00:10:25 CST 2011


Hi all,

I'm getting ready to start storing all of my voicemail in a mysql database.  
I've already got RT sip and RT voicemailboxes working.

I understand that vm storage only works via odbc.  I've read all of the 
documentation I could find, including:

http://www.voip-info.org/wiki/view/Asterisk+Voicemail+ODBC+storage


===========================================================
But there was this comment, at the bottom of the page:
"I tried adding ODBC message storage to a 1.2.5 system already using MySQL for 
RealTime... Not a good idea, but using ODBC for both Realtime and msg storage 
seems good so far."

Is this still true with Asterisk 1.6.2.9?  Or do I need to migrate all of my 
RT configuration to ODBC?


===========================================================
I also read this comment:
"Make sure you load the .WAV file and not the .wav or .gsm or it won't work! 
<-- is that true? I couldnt get .WAV to work. But when I used a 16bit 8000Hz 
file with a .wav extension, it worked fine."

Will I be ok if I just load the .wav file?


===========================================================
Also, I see that I'll have to pre-load all of the voicemail messages and 
greeting files into the database, like so:

INSERT INTO voicemail (msgnum,dir,mailboxuser,mailboxcontext,recording) VALUES 
(-1,'/var/spool/asterisk/voicemail/CONTEXT/USER/busy','CONTEXT','USER',LOAD_FILE('/var/spool/asterisk/voicemail/CONTEXT/USER/busy.WAV'));

I assume this has to be done for every CONTEXT and every USER, and those 
values need to be substituted into both the fields, and the directory path 
value.

===========================================================
Finally, is there an AGI command that will play a .wav file from the database?

TIA,

-- 

Take care and have fun,
Mike Diehl.



More information about the asterisk-users mailing list