ODBC Voicemail


I am using

I need to change the field name being used to store the password for voicemail.

SQL Prepare failed![UPDATE estr1111_voicemail_users SET password=? WHERE uniqueid=?]

I get this error because password is a reserved word in Firebird databases which is what I am connecting to.

Although I have searched hi and low to see where I could configure an alias of some kind, I just can’t find it.

I want to force users to create greetings and unavailable messages but I can’t do that if they cannot change their passwords.

Thanks, Ed III

I figured it out on my own. Well not really. AFAIK, there is no way to provide aliases for field names in anything other than the CDR and that is in cdr_adaptive_odbc.conf.

In order to get ODBC voicemail working with Firebird you need to modify the app_voicemail.c in the apps directory in the Asterisk source.

Line 987: if (ast_update_realtime(“voicemail”, “uniqueid”, vmu->uniqueid, “password”, password, SENTINEL) > 0)

Just change it to ‘secret’ from password and change the fieldname in Firebird to be named secret. Asterisk is apparently smart enough in the rest of the code to the see the secret field and map it internally to the password variable in it’s own data structures.

After that just do a make && make install and it should be working from that point.

  • note * - I have tested and it so far users can authenticate to their mailboxes and change passwords. It’s only been doing it for a few hours though, so that is the extent of my testing.