Asterisk Voicemail ODBC storage

Asterisk Voicemail ODBC Storage ver: CVS HEAD >= 08-24-05 | Asterisk 1.2

Requirements unixODBC (app and dev required) - Check your local RPM provider or http://www.unixodbc.org/

Setup
Asterisk 1.4
1) Run "make menuselect"
2) Go down to "Voicemail Build Options"
3) Select ODBC_STORAGE. Note that if there is an "XXX" next to this option, then the necessary dependencies are not installed. Be sure that you have unixodbc-dev as well as libtool installed.
4) Hit 'x' to save an exit.

Asterisk 1.2
You have to edit the Makefile in /apps adding:
CFLAGS+=-DEXTENDED_ODBC_STORAGE
CFLAGS+=-DUSE_ODBC_STORAGE

Or you can unrem (remove the #) the existing lines that already say those two lines. (Yes, you need both lines.)

If you've already compiled asterisk, you must recompile (make clean;make;make install).

Voicemail.conf Uncomment or add these lines to voicemail.conf.
  • odbcstorage should match the section name in res_odbc.conf
  • odbctable should be the name of the table you're storing messages in.
odbcstorage=asterisk
odbctable=voicemessages


Database format MySQL CREATE TABLE `voicemessages` (
 `id` int(11) NOT NULL auto_increment,
 `msgnum` int(11) NOT NULL default '0',
 `dir` varchar(80) default '',
 `context` varchar(80) default '',
 `macrocontext` varchar(80) default '',
 `callerid` varchar(40) default '',
 `origtime` varchar(40) default '',
 `duration` varchar(20) default '',
 `mailboxuser` varchar(80) default '',
 `mailboxcontext` varchar(80) default '',
 `recording` longblob,
 `flag` varchar(128) default '',
 PRIMARY KEY  (`id`),
 KEY `dir` (`dir`)
) ENGINE=InnoDB;

Asterisk 1.6.1 requires a new column "flag" added above. ...
Syndicate content