Module: sip-router
Branch: sr_3.0
Commit: 0c819f3ff3d947897fa0bafbaaa0081b671bb4e4
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0c819f3…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: Wed Apr 14 17:17:59 2010 +0300
modules/lcr: always use current time when loading gateways
- Always use current time when deciding if a gateway is defunct or not.
Otherwise a gateway may get used even if its defunct until time in
database is greater than current time.
---
modules/lcr/lcr_mod.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/modules/lcr/lcr_mod.c b/modules/lcr/lcr_mod.c
index 9748024..65c65d1 100644
--- a/modules/lcr/lcr_mod.c
+++ b/modules/lcr/lcr_mod.c
@@ -1746,12 +1746,11 @@ static int load_gws(struct sip_msg* _m, char *_lcr_id, char *_from_uri)
gw_count = gws[0].ip_addr;
if (defunct_capability > 0) {
- now = time((time_t *)NULL);
delete_avp(defunct_gw_avp_type, defunct_gw_avp);
- } else {
- now = MAX_UVAR_VALUE(now);
}
+ now = time((time_t *)NULL);
+
while (pl) {
if (ruri_user.len < pl->prefix_len) {
pl = pl->next;
Hi, I would like to insist in the 408 problem when it's locally
generated due to fr_timer timeout in SIP UDP. Let's suppose this very
simple example:
- Call from UAC to proxy.
- Proxy routes it to a gateway (no failover to other gateways).
3 cases:
a) Gateway replies 408, so TM selects 408 (OK).
b) Provisional responses are received but fr_inv_timer expires, so TM
generates a local 408. The client receives 408 (OK).
c) No reponse at all from gateway so fr_timer expires and TM generates
a local 408. The client receives 408 (WRONG).
Obviously in case "c" it doesn't make sense to send a 408 to the
client as the fact is that the gateway is unreachable, so a 500 should
be replied to the client.
So what is the problem? In case "c" there should be a "transport
error". According to RFC 3261 if an UDP transaction gets a ICMP "port
unreachable" it should generate a local 503. And if it receives no UDP
reply at all (neither an ICMP notification) then it should generate a
local 408.
Problems with this:
- SR doesn't rely on received ICMP (it neither receives them AFAIK).
- If the gateway is down there will be not a ICMP message (neither if
the gateway TCP/IP stack doesn't generate such ICMP notifications).
So with the current TM design an UDP transport error just can cause a
local 408, and never a 503. This is the main problem.
Unfortunatelly such 408 is painful as the examples above show. This is
the reason I propose TM to generate a local 503 if no response at all
is received for a UDP requests (when fr_timer expires).
More or less the same info in this report:
http://sip-router.org/tracker/index.php?do=details&task_id=55
Regards.
--
Iñaki Baz Castillo
<ibc(a)aliax.net>
what is the best practice of fixing up module functions with more than
two params?
in mod_fix.h there is some three param fixups defined, but not all
possible param type combinations. also, adding four param fixups will
not scale, since the number or possible type combinations would be too
large.
-- juha
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#55 - Extending TM timeout/408 handling
User who did this - Iñaki Baz Castillo (ibc)
----------
It seems that new TM module includes some functions to detect if there was a timeout and also provisional responses for the winning branch, so they could be used to inspect the locatl timeout cause and determine what to do in each case:
failure_route[0] {
if (t_branch_timeout()) {
if (t_branch_replied())
log("the winning branch got a fr_inv_timer expiration (provisional responses were received) => 408\n");
else
log("the winning branch got a fr_timer expiration (no response at all) => 500\n");
# I prefer to reply a 500 in this case as it really means a problem with the destination:
t_reply("500", "The destination is unreachable");
}
}
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=55#comment77
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.
The following task has been changed. The changes are listed below. For full information about what has changed, visit the URL and click the History tab.
FS#55 - Extending TM timeout/408 handling
User who did this: Iñaki Baz Castillo (ibc)
Task Type: Bug Report -> Feature Request
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=55
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.
Module: sip-router
Branch: master
Commit: 420eeac3dcf4cc04c59ee700b9a8897d451491e2
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=420eeac…
Author: Henning Westerholt <henning.westerholt(a)1und1.de>
Committer: Henning Westerholt <henning.westerholt(a)1und1.de>
Date: Tue Apr 13 14:03:44 2010 +0200
reg(k): small spelling fix
---
modules_k/registrar/config.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules_k/registrar/config.c b/modules_k/registrar/config.c
index d595817..f187c1a 100644
--- a/modules_k/registrar/config.c
+++ b/modules_k/registrar/config.c
@@ -49,7 +49,7 @@ cfg_def_t registrar_cfg_def[] = {
{"default_expires", CFG_VAR_INT | CFG_CB_ONLY_ONCE, 0, 0, 0, default_expires_stats_update,
"Contains number of second to expire if no expire hf or contact expire present" },
{"default_expires_range", CFG_VAR_INT | CFG_CB_ONLY_ONCE, 0, 100, 0, default_expires_range_update,
- "Procent from default_expires that will be used in generating the range for the expire interval"},
+ "Percent from default_expires that will be used in generating the range for the expire interval"},
{"min_expires", CFG_VAR_INT | CFG_CB_ONLY_ONCE, 0, 0, 0, 0,
"The minimum expires value of a Contact. Value 0 disables the checking. "},
{"max_expires", CFG_VAR_INT | CFG_CB_ONLY_ONCE, 0, 0, 0, max_expires_stats_update,
Module: sip-router
Branch: master
Commit: b38adad6d2667420fd5e50a30f4c04a0fd6cf6cd
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b38adad…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Date: Mon Apr 12 17:36:20 2010 +0300
unit/test/46.sh Added new test for integration of cfg framework in k modules.
The test allows for a easy set/get scenario of a configuration variable.
---
test/unit/46.sh | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 94 insertions(+), 0 deletions(-)
diff --git a/test/unit/46.sh b/test/unit/46.sh
new file mode 100755
index 0000000..2511f41
--- /dev/null
+++ b/test/unit/46.sh
@@ -0,0 +1,94 @@
+#!/bin/bash
+#Check configuration framework implementation in k modules
+
+# Copyright (C) 2007 1&1 Internet AG
+#
+# This file is part of Kamailio, a free SIP server.
+#
+# Kamailio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version
+#
+# Kamailio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+source include/common
+source include/require
+source include/database
+
+if ! (check_sipp && check_kamailio && check_module "db_mysql" && check_mysql ); then
+ exit 0
+fi ;
+
+CFG=11.cfg
+SRV=5060
+UAS=5070
+UAC=5080
+
+function test_module_int()
+{
+ if [ x$# != x3 ] ; then
+ echo "wrong number of params : usage test_module module cfg_param value"
+ return 1
+ fi
+
+ MODNAME="$1"
+ MODPARAM="$2"
+ MODVAL="$3"
+
+ if [ x$ret = x0 ] ; then
+ $SERCMD cfg.set_now_int $MODNAME $MODPARAM $MODVAL &>/dev/null
+ ret=$?
+ fi
+
+ if [ x$ret = x0 ] ; then
+ val=$($SERCMD cfg.get $MODNAME $MODPARAM)
+ ret=$?
+
+ if [ x"$val" = x$MODVAL ] ; then
+# echo "check ok"
+ ret=0;
+ else
+# echo "check failed"
+ ret=1
+ fi
+ fi
+
+ return $ret
+}
+
+# add an registrar entry to the db
+cp $CFG ${CFG}.bak
+
+echo "loadmodule \"../../modules/db_mysql/db_mysql.so\"" >>$CFG
+echo "loadmodule \"../../modules/ctl/ctl.so\"" >> $CFG
+echo "loadmodule \"../../modules/cfg_rpc/cfg_rpc.so\"" >> $CFG
+$BIN -w . -f $CFG &> /dev/null
+ret=$?
+sleep 1
+
+SERCMD="../../utils/sercmd/sercmd"
+
+if [ ! -x $SERCMD ] ; then
+ ret=1
+ echo "SERCMD executable not found"
+fi
+
+test_module_int registrar default_expires 100
+
+ret=$?
+
+# cleanup
+killall -9 sipp > /dev/null 2>&1
+$KILL > /dev/null 2>&1
+
+mv ${CFG}.bak $CFG
+
+exit $ret;
Module: sip-router
Branch: master
Commit: 4480f807dcbc75c84784ad8f4ffb3cf5b19912c3
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4480f80…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Date: Tue Apr 13 11:48:50 2010 +0300
modules/registrar Added default_expires_range parameter, which specifies randomisation of the Expire parameter
returned to the UA(in case the UAC doesn't specify an own expiry value) in a certain interval.
This new parameters adds the posibility to randomize the Expiry parameter in a certain interval,
(+- default_expires_range%*default_expires). This is helpful to avoid syncronization of re-registration
of the UACs after an outage.
Parameter is configurable via ser cfg framework.
Old behaviour (fixed default_registrar value), is enabled by default, by leaving the parameter 0.
---
modules_k/registrar/README | 271 +++++++++++++++------------
modules_k/registrar/config.c | 10 +-
modules_k/registrar/config.h | 3 +-
modules_k/registrar/doc/registrar_admin.xml | 28 +++
modules_k/registrar/reg_mod.c | 46 +++--
modules_k/registrar/sip_msg.c | 26 ++-
6 files changed, 228 insertions(+), 156 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=448…