Please help with voicemail realtime problem


Thank you for reading this. I hope someone can help me with this voicemail problem as I am stuck for a while already. I want to be able to store the voice messages inside mysql but it does not work.
In my voicemail.conf:
format = wav
attach = yes
; Syntax for new entries looks like this:
; MailboxNumber => password,name,e-mail,pager,options
; (usually, the MailboxNumber is the same as the Extension)
2000 => 1234,Dave Robinson,

My res_mysql :

dbhost =
dbname = asterisk
dbuser = ast
dbpass = sqlpass
dbport = 3306
dbsock = /tmp/mysql.sock

I have the following line in extconfig.conf

voicemail => mysql,asterisk,voicemessages

realtime can load:
*CLI> realtime mysql status
[Mar 29 00:07:23] DEBUG[23407]: res_config_mysql.c:653 mysql_reconnect: MySQL RealTime: Everything is fine.
Connected to asterisk@, port 3306 with username ast for 10 minutes, 3

When I record voice messages, they don’t get stored in mysql. What’s wrong?

The other question is that if I want to store botht the mailbox user info and voicemessages inside mysql using realtime, does it mean I need to have both of the below lines inside the DB:
voicemail => mysql,asterisk,voicemessages
voicemail => mysql,asterisk,voicemail_users

Thank you very much for all your help.


Hey there…

If you just want to record the messages on you mysql db, you don’t need to enable the extconfig.conf line:
“voicemail => mysql,asterisk,voicemessages”.

In fact that line must point to your mysql table where you’re supossed to store voicemails, no voicemessages as you’re doing. So, iff you want to store voicemail_users, all you have to do is point that unique line to your voicemail_users table; the stuff for voicemessages is already set on the voicemail.conf (when you set the properties odbcstorage and odbctable)

Hope it helps !