Hi Dear Community, I want to use db_unixodbc to connect to the dm8 database. Although I use Opensips, I found that this module db_unixodbc, Kamailio and Opensips are the same. My question is how to specify the database with kamailio? I add "Database = sbc" into odbc.ini, But nothing happened。
###### cat /usr/local/etc/odbc.ini [DM8] Description = ODBC DRIVER FOR DM8 Driver = DM8 ODBC DRIVER SERVER = 172.16.7.131 TCP_PORT = 5230
odbcinst -j unixODBC 2.3.12 DRIVERS............: /usr/local/etc/odbcinst.ini SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources USER DATA SOURCES..: /root/.odbc.ini SQLULEN Size.......: 8 SQLLEN Size........: 8 SQLSETPOSIROW Size.: 8
#######
#################### modparam("usrloc", "db_url", "unixodbc://opensips:opensips#$@172.16.7.131:5230/dm8") #################### DBG:db_unixodbc:db_unixodbc_new_connection: opening connection: unixodbc://xxxx:xxxx@172.16.7.131/dm8 Nov 7 17:05:21 [145] DBG:db_unixodbc:db_unixodbc_new_connection: connection succeeded with reply <DSN=dm8;SERVER=172.16.7.131;UID=opensips;PWD=opensips#$;TCP_PORT=5230;> DBG:core:db_do_init: connection 0xfffd5bbbaf08 inserted in pool as 0xfffd5bbbb0e0 Nov 7 17:05:21 [145] ERROR:db_unixodbc:db_unixodbc_submit_query: rv=-1. Query= select table_version from version where table_name='dialog' Nov 7 17:05:21 [145] ERROR:db_unixodbc:db_unixodbc_extract_error: unixodbc:SQLExecDirect=42S02:1:-2106:Error in line: 1
####################
Hello,
the DB connection seems to be established. The kamailio tables are available in used table, right? Are you getting maybe more information about the error cause in the DB logs?
Cheers,
Henning