Hi, AFAIK SR doesn't provide a way to binary compare two IPv6 (correct
me if I'm wrong). About IPv4 comparison, I assume it's compared as a
string:
if ($rd == "1.2.3.4")
so it works. But in case of IPv6 it would not work as the same IPv6
could take different (but equivalent) representations:
"1080:0000:0000:0000:0008:0800:200C:417A"
"1080:0:0:0:8:800:200C:417A"
"1080::8:800:200C:417A"
I'd like to add a function to perform IPv6 binary comparison (as I've
already coded it in a personal project), could you please tell me in
which module should it take place? I mean something as:
--------------------------------------------------------------------------
compare_ips(ip1, ip2)
Returns 1 if both IP's are two equal IPv4 or two equal IPv6.
Returns -1 if both IP's are valid but not equal.
Returns -2 if at least one give IP is not a valid IPv4 or IPv6.
Parameters:
- ip1: An string of pv containing a IPv4 or IPv6 in text representation.
- ip2: An string of pv containing a IPv4 or IPv6 in text representation.
--------------------------------------------------------------------------
Thanks.
--
Iñaki Baz Castillo
<ibc(a)aliax.net>
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Ali Onur Uyar (aouyar)
Attached to Project - sip-router
Summary - Debian / Ubuntu Packages for Kamailio 3.1.3 Broken
Task Type - Bug Report
Category - Core
Status - Assigned
Assigned To - Andrei Pelinescu-Onciul
Operating System - Linux
Severity - High
Priority - Normal
Reported Version - 3.1
Due in Version - Undecided
Due Date - Undecided
Details - The deb packages for Kamailio 3.1.3 are broken. The packages for 3.1.2 worked flawlessly, but upgrading to 3.1.3 fails, resulting in a broken installation.
None of the modules packages can be installed, because they to overwrite library files from the main kamailio package.
Example error message while installing kamailio-mysql-modules:
E: /var/cache/apt/archives/kamailio-mysql-modules_3.1.3+lucid1_i386.deb: trying to overwrite '/usr/lib64/kamailio/libsrdb2.so.1.0', which is also in package kamailio 3.1.3+lucid1
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=128
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A user has added themself to the list of users assigned to this task.
FS#128 - Debian / Ubuntu Packages for Kamailio 3.1.3 Broken
User who did this - Ali Onur Uyar (aouyar)
http://sip-router.org/tracker/index.php?do=details&task_id=128
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
Hi, I've coded a function that returns 1, 2, 3 or -1. It does it
correctly, however when evaluating the result of such function in a
switch() it fails:
switch(my_function("lalala")) {
case 1:
[...]
The way it works is:
my_function("lalala");
switch(my_function($rc)) {
case 1:
[...]
Is it the expected behavior?
--
Iñaki Baz Castillo
<ibc(a)aliax.net>
Module: sip-router
Branch: master
Commit: 9287609db4ac64c709aa500e6326ac33af2c2061
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9287609…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Date: Thu Apr 28 10:30:55 2011 +0300
module_k/pv Changed the nameaddr transformation by relaxing the requirements on the input.
As some headers might be either uri or nameaddr form, using a single transformation for parsing them was
impossible, as nameaddr.uri returns "" on an uri input(e.g. sip:12345@example.com). With this change, the
nameaddr transformation succedes and the resulting transformation places the whole string in the .uri field,
.name field being empty. A transformation chaning like the one below will work as expected on both SIP URIs and
SIP Nameaddr
$(val(test){nameaddr.uri}{uri.domain})
---
modules_k/pv/pv_trans.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/modules_k/pv/pv_trans.c b/modules_k/pv/pv_trans.c
index b60f529..4cf2555 100644
--- a/modules_k/pv/pv_trans.c
+++ b/modules_k/pv/pv_trans.c
@@ -1016,6 +1016,7 @@ int tr_eval_nameaddr(struct sip_msg *msg, tr_param_t *tp, int subtype,
pv_value_t *val)
{
str sv;
+ int ret;
if(val==NULL || (!(val->flags&PV_VAL_STR)) || val->rs.len<=0)
return -1;
@@ -1045,8 +1046,14 @@ int tr_eval_nameaddr(struct sip_msg *msg, tr_param_t *tp, int subtype,
/* parse params */
sv = _tr_nameaddr_str;
- if (parse_nameaddr(&sv, &_tr_nameaddr)<0)
- return -1;
+ ret = parse_nameaddr(&sv, &_tr_nameaddr);
+ if (ret < 0) {
+ if(ret != -3) return -1;
+ /* -3 means no "<" found so treat whole nameaddr as an URI */
+ _tr_nameaddr.uri = _tr_nameaddr_str;
+ _tr_nameaddr.name = _tr_empty;
+ _tr_nameaddr.len = _tr_nameaddr_str.len;
+ }
}
memset(val, 0, sizeof(pv_value_t));
Hi Klaus and Juha,
I would just inform you that we solved the problem using the NAT traversal
module and disabling the rtpproxy.
Thanks for your help.
Kind regards,
laura
Hi all,
we are trying to setup a Kamailio as a SIP/SIMPLE presence server for chat
based on the guide published in SIP SIMPLE Presence Made Simple with
Kamailio 3.1.x on the site:
http://kb.asipto.com/kamailio:presence:k31-made-simple.
*The OS we are using is Linux RHEL 5.6 x64 and ORACLE 11g as Database*.
So I have compiled the db_oracle module using instantclient-sdk-11.2.0.2 but
when I start kamailio I receive the following errors:
Apr 19 23:12:07 localhost /opt/openkore/sbin/kamailio[10394]: INFO:
db_oracle [ora_con.c:132]: server version is Oracle Database 11g Enterprise
Edition Release 11.2.0.2.0 - 64bit Production With the Partitioning, OLAP,
Data Mining and Real Application Testing options
Apr 19 23:12:08 localhost /opt/openkore/sbin/kamailio[10394]: ERROR: *db_oracle
[res.c:423]: driver: ORA-24330: internal OCI error*
Apr 19 23:12:08 localhost /opt/openkore/sbin/kamailio[10394]: ERROR:
db_oracle [res.c:475]: error while converting rows
Apr 19 23:12:08 localhost /opt/openkore/sbin/kamailio[10394]: ERROR: <core>
[db_query.c:108]: error while storing result
Apr 19 23:12:08 localhost /opt/openkore/sbin/kamailio[10394]: ERROR: <core>
[db.c:366]: error in db_query
Apr 19 23:12:08 localhost /opt/openkore/sbin/kamailio[10394]: ERROR: <core>
[db.c:405]: querying version for table presentity
Apr 19 23:12:08 localhost /opt/openkore/sbin/kamailio[10394]: ERROR:
presence [presence.c:300]: error during table version check
Apr 19 23:12:08 localhost /opt/openkore/sbin/kamailio[10394]: ERROR: <core>
[sr_module.c:875]: init_mod(): Error while initializing module presence
(/opt/openkore/lib64/kamailio/modules_k/presence.so)
Apr 19 23:12:10 localhost /opt/openkore/sbin/kamailio[10394]: ERROR:
db_oracle [ora_con.c:173]: driver: ORA-03127: no new operations allowed
until the active operation ends
Apr 19 23:12:11 localhost /opt/openkore/sbin/kamailio[10394]: INFO:
db_oracle [db_oracle.c:91]: Oracle terminate
Is it a known bug of db_oracle module?
Could you please help me to solve this problem?
Thanks for your help,
laura
Hi, the following Via causes a parsing error in sip-router:
Via: SIP/2.0/UDP 1.2.3.4;branch=z9hG4bK1aaaaa;rport;param1 ;param2<CRLF>
It occurs due to the space before ";param2".
If param2 has value (param2=abc or param2 = abc) the error also occurs.
According to RFC 3261 BNF the above Via is 100% valid as header
parameters separator is SEMI which is defined as:
SEMI = SWS ";" SWS
SWS = [LWS]
LWS = [*WSP CRLF] 1*WSP
WSP = SP | HTAB;
--
Iñaki Baz Castillo
<ibc(a)aliax.net>
Hello,
Please find attached a patch containing three small RLS bug fixes:
1) A string comparison that fails because sometimes one of the strings
is '\0' terminated and the other never is.
2) A fix for when some non-RLS SUBSCRIBEs are not identified as such.
3) A fix for a small typo in an error diagnostic.
Regards,
Peter
--
Peter Dunkley
Technical Director
Crocodile RCS Ltd
Module: sip-router
Branch: master
Commit: 93514b0efdf526549bb19ae9c24e1612dced43c2
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=93514b0…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Date: Wed Apr 27 16:24:42 2011 +0300
modules_k/sqlops Passed by value variable modified in function causes no effects in calling code
Modify instead the value pointed by the pointer.
---
modules_k/sqlops/sql_api.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules_k/sqlops/sql_api.c b/modules_k/sqlops/sql_api.c
index 9149f5c..ef69071 100644
--- a/modules_k/sqlops/sql_api.c
+++ b/modules_k/sqlops/sql_api.c
@@ -671,7 +671,7 @@ int sqlops_get_column(str *sres, int i, str *col)
LM_ERR("column index out of bounds [%d/%d]\n", i, res->ncols);
goto error;
}
- col = &res->cols[i].name;
+ *col = res->cols[i].name;
return 0;
error:
return -1;