[asterisk-bugs] [Asterisk 0017872]: update_odbc always reports that : Key field 'ipaddr' does not exist in table ... Update will fail

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Dec 3 06:37:28 CST 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17872 
====================================================================== 
Reported By:                spanov
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17872
Category:                   Resources/res_config_odbc
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.6.2.11 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-08-16 15:04 CDT
Last Modified:              2010-12-03 06:37 CST
====================================================================== 
Summary:                    update_odbc always reports that : Key field 'ipaddr'
does not exist in table ...  Update will fail
Description: 
I've set up reatime configuration for sippeers and sipregs via ODBC
connected to Oracle 11g. There are a lot of warning (update_odbc always
reports that : Key field 'ipaddr' does not exist in table ...  Update will
fail) in the CLI while new SIP registration.
I assume that it's case sensitive issue since actually, the column ipaddr
is updated correctly. By default Oracle return all columns in uppercase.
====================================================================== 

---------------------------------------------------------------------- 
 (0129294) birgita (reporter) - 2010-12-03 06:37
 https://issues.asterisk.org/view.php?id=17872#c129294 
---------------------------------------------------------------------- 
I had the same problem.
The situation improved when I configured the tablename in upper case.

extconfig.conf:
iaxpeers => odbc,sfa_realtime,LOCK_IAX_BUDDIES
instead of
iaxpeers => odbc,sfa_realtime,lock_iax_buddies

I can now see debug:
Found  column with type 3 with len 11, octetlen 11, and numlen (0,10)
Found  column with type 12 with len 40, octetlen 40, and numlen (0,0)
Found  column with type 12 with len 10, octetlen 10, and numlen (0,0)
Found  column with type 12 with len 40, octetlen 40, and numlen (0,0)

However, the columnnames are empty. :-(
All the other information does correspond with my table definition:

CREATE TABLE realtime.LOCK_IAX_BUDDIES
(
  id                    NUMBER(11,0) PRIMARY KEY USING INDEX TABLESPACE
realtime_index not null,
  name                  VARCHAR2(40) not null,
  type                  VARCHAR2(10) DEFAULT 'friend' not null,
  username              VARCHAR2(40),

Versions:
OS: openSUSE 11.3 "Teal", 2.6.34-12
unixODBC: 2.2.12-203.1
Oracle driver: 11.2

I realise it is probably not an Asterisk bug.
No idea if it is the unixODBC driver or Oracle. 
Any suggestions on finding out perhaps? 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-12-03 06:37 birgita        Note Added: 0129294                          
======================================================================




More information about the asterisk-bugs mailing list