Hello,
you have to use db_unixodbc for connecting to oracle. The db_oracle was
not maintained for log time and perhaps it should be moved to obsolete
folder.
Cheers,
Daniel
On 29/04/16 17:17, gmele wrote:
Hello,
we are trying to connect our Kamailio SIP to an Oracle database. We tried
both db_oracle and db_unixodbc modules to connect to the DB.
With db_oracle, Kamailio core dumps when trying to access the
active_watchers table (caused by the oracle CLOB?). Here is the kamailio
logs:
Apr 29 13:54:53 newvm1 /usr/sbin/kamailio[23665]: INFO: <core>
[db_query.c:131]: db_do_query_internal(): DB-QUERY: select
presentity_uri,callid,to_tag
,from_tag,event from active_watchers where updated=:1 AND event=:2
Apr 29 13:54:53 newvm1 /usr/sbin/kamailio[23665]: INFO: db_oracle
[res.c:238]: get_columns(): COLUMN PRESENTITY_URI TYPE 4 SIZE 129
Apr 29 13:54:53 newvm1 /usr/sbin/kamailio[23665]: INFO: db_oracle
[res.c:238]: get_columns(): COLUMN CALLID TYPE 4 SIZE 256
Apr 29 13:54:53 newvm1 /usr/sbin/kamailio[23665]: INFO: db_oracle
[res.c:238]: get_columns(): COLUMN TO_TAG TYPE 4 SIZE 65
Apr 29 13:54:53 newvm1 /usr/sbin/kamailio[23665]: INFO: db_oracle
[res.c:238]: get_columns(): COLUMN FROM_TAG TYPE 4 SIZE 65
Apr 29 13:54:53 newvm1 /usr/sbin/kamailio[23665]: INFO: db_oracle
[res.c:238]: get_columns(): COLUMN EVENT TYPE 4 SIZE 65
Apr 29 13:54:53 newvm1 /usr/sbin/kamailio[23665]: INFO: db_oracle
[res.c:378]: get_rows(): OCIStmtFetch2() returned 100
Apr 29 13:54:53 newvm1 /usr/sbin/kamailio[23667]: CRITICAL: <core>
[pass_fd.c:275]: receive_fd(): EOF on 16
Apr 29 13:54:53 newvm1 /usr/sbin/kamailio[23667]: CRITICAL: <core>
[pass_fd.c:275]: receive_fd(): EOF on 14
What is really strange is that this table is accessed several times before
the crash, without any problem. The other point is that this table is
absolutely empty...
With db_unixodbc, all requests having dates check fail because because the
date format is not understood by oracle. The date should be converted using
the oracle to_date(date, format) funtion to work...
Here are the Kamilio traces:
Apr 29 14:10:38 newvm1 /usr/sbin/kamailio[17021]: ERROR: usrloc
[dlist.c:183]: get_all_db_ucontacts(): query error
Apr 29 14:10:38 newvm1 /usr/sbin/kamailio[17021]: ERROR: nathelper
[nathelper.c:2089]: nh_timer(): failed to fetch contacts
Apr 29 14:10:39 newvm1 /usr/sbin/kamailio[17021]: ERROR: db_unixodbc
[dbase.c:133]: db_unixodbc_submit_query(): rv=-1. Query= select
received,contact,socket,cflags,path,ruid from$
Apr 29 14:10:39 newvm1 /usr/sbin/kamailio[17021]: ERROR: db_unixodbc
[connection.c:220]: db_unixodbc_extract_error():
unixodbc:SQLExecDirect=HY000:1:933:[Oracle][ODBC][Ora]ORA-00$
Apr 29 14:10:39 newvm1 /usr/sbin/kamailio[17021]: ERROR: <core>
[db_query.c:132]: db_do_query_internal(): error while submitting query
I tried the option modparam("db_unixodbc", "use_escape_common", 1),
but
without success.
Has anyone been able to make Kamailio 4.4.0 work with Oracle 11g, either
with db_oracle or with db_unixodbc module?
Regards
Giovanni
--
View this message in context:
http://sip-router.1086192.n5.nabble.com/Kamailio-and-Oracle-database-tp1479…
Sent from the Users mailing list archive at
Nabble.com.
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users