[Asterisk-Users] odbc realtime update problem

Julian Lyndon-Smith asterisk at dotr.com
Wed Aug 31 10:28:49 MST 2005


I'm experimenting with realtime (CVS HEAD), but using odbc to a 
third-party database (progress) instead of mysql.

Following the instructions on voip-info, I created a table for voicemail 
called rtvm with the following fields:

CREATE TABLE `rtvm` (
  `uniqueid` int(11) NOT NULL auto_increment,
  `customer_id` int(11) NOT NULL default '0',
  `context` varchar(50) NOT NULL default '',
  `mailbox` int(5) NOT NULL default '0',
  `password` varchar(4) NOT NULL default '0',
  `fullname` varchar(50) NOT NULL default '',
  `email` varchar(50) NOT NULL default '',
  `pager` varchar(50) NOT NULL default '',
  `stamp` timestamp(14) NOT NULL,
  PRIMARY KEY  (`uniqueid`),
  KEY `mailbox_context` (`mailbox`,`context`)
) ;

I manually created a record in the database and fired up asterisk. Wow! 
it actually worked !

But. (There had to be a but) - when it came to update, there was a 
problem. If I tried to change the password, I got an error, and the 
database was not updated:

update_odbc : SQL execute error

After an afternoon of chasing all sorts of dead-ends (permissions etc) I 
finally changed the uniqueid from an int to a character field, and it 
all updates ok now.

Now, is this a problem with res_odbc, the linux odbc client or the sql 
server itself ?

Julian.



More information about the asterisk-users mailing list