Thx Daniel!
I will get the code from git. What do I need to recompile? Only unixodbc module? Any other lib? We are using installation done with the official rpm and would
like to keep an environment as clean as possible and just change the modified libs.
Thx for this quick support.
Regards
Giovanni
From: Daniel-Constantin Mierla [mailto:miconda@gmail.com]
Sent: lundi 2 mai 2016 10:49
To: Mele Giovanni; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Kamailio and Oracle database
Hello,
hopefully I found and fixed the issue. The usrloc was setting the value for time already quoted and then the db api was quoting again. I guess you were using db-only mode for usrloc.
Can you try again with latest git branch 4.4 or master? Report back the results in order to know if the issue was fixed or not.
Cheers,
Daniel
On 02/05/16 09:59, Mele Giovanni wrote:
Hello,
It is two single quote characters (‘). If I try with one double quote character (“), it also fails. The only way to make it work is to have one single quote character surrounding the date.
Regards
Giovanni
From: sr-users [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Daniel-Constantin Mierla
Sent: lundi 2 mai 2016 09:49
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Kamailio and Oracle database
Hello,
are there two single quote characters or one double quotes character? Can you test if it works with double quotes instead of single quotes?
Cheers,
Daniel
On 02/05/16 09:42, gmele wrote:
Hello Daniel,thx for your quick answer.After having failed with db_oracle module, we effectively tried db_unixodbc.But even with unixodbc, we got some strange errors when kamailio tries to doqueries including dates in the where clause:Example of an error reported by kamailio:May 2 08:30:14 newvm1 /usr/sbin/kamailio[26298]: ERROR: nathelper[nathelper.c:2089]: nh_timer(): failed to fetch contactsMay 2 08:30:15 newvm1 /usr/sbin/kamailio[26298]: ERROR: db_unixodbc[dbase.c:133]: db_unixodbc_submit_query(): rv=-1. Query= selectreceived,contact,socket,cflags,path,ruid from location *whereexpires>''2016-05-02 06:30:15'' *AND partition=11 AND keepalive=1May 2 08:30:15 newvm1 /usr/sbin/kamailio[26298]: ERROR: db_unixodbc[connection.c:220]: db_unixodbc_extract_error():unixodbc:SQLExecDirect=HY000:1:933:[Oracle][ODBC][Ora]ORA-00933: SQL commandnot properly ended#012May 2 08:30:15 newvm1 /usr/sbin/kamailio[26298]: ERROR: <core>[db_query.c:132]: db_do_query_internal(): error while submitting queryAs you can see, the date in the request seems has a double quote surroundingit : where expires>''2016-05-02 06:30:15''. In fact it is 2 times thecharacter <'>.If I execute the above request in the isql tool provided by unixODBC, italso fails. If I remove the double quote around the date, it works:select received,contact,socket,cflags,path,ruid from location *whereexpires>'2016-05-02 06:30:15' *AND partition=11 AND keepalive=1;Do you have an idea on how to correct this problem?ThxRegardsGiovanni--View this message in context: http://sip-router.1086192.n5.nabble.com/Kamailio-and-Oracle-database-tp147990p148005.htmlSent from the Users mailing list archive at Nabble.com._______________________________________________SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--Daniel-Constantin Mierlahttp://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/micondaKamailio World Conference, Berlin, May 18-20, 2016 - http://www.kamailioworld.com
--
Daniel-Constantin Mierla
http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, Berlin, May 18-20, 2016 - http://www.kamailioworld.com