this is a summary of what i still need in order to be able to use sip
router in production. they are not new issues. all of them have been
mentioned on the mailing list before:
- async t_uac_dlg support and allowing asycn mi commands by mi_rpc
module. i have seen various commits related to thius by andrei, but
if i have understood correctly, at least mi_rpc part is not done yet.
- any test "if (something)" must succeed if something evaluates to
non-zero int or non-empty string.
- this warning needs to go away:
Sep 2 21:00:18 localhost sip-router: WARNING: tm [tm.c:502]: WARNING:
on_sl_reply("stateless_reply"): empty/non existing route
when onreply_route [stateless_reply] exist.
- tm needs to have param
1.3.18. disable_6xx_block (integer)
please correct me if some of the items have already done and i can
remove them from the list.
if these issues are not taken care of, it is likely that i'm not using
sip-router in next version of my sip proxy.
-- juha
i'm getting syntax error on last line of this kind of switch statement:
if (defined($fd.foo)) {
switch ($fd.foo) {
case "fi":
route(TEST);
return($retcode);
why is that? in k, that kind of construct used to work.
-- juha
0(26885) : <core> [cfg.y:3208]: parse error in config file /etc/sip-proxy/sip-proxy.cfg, line 2971, column 19: syntax error
0(26885) : <core> [cfg.y:3208]: parse error in config file /etc/sip-proxy/sip-proxy.cfg, line 2971, column 19: ==, !=, <,>, >= or <= expected
Module: sip-router
Branch: master
Commit: 77e7d5164dde66d3ec5dd7b86c3cbd586e9e25d7
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=77e7d51…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Tue Sep 22 13:07:14 2009 +0200
tm: support for disabling 6xx special handling
Added disable_6xx_block (same name as in kamailio), which when set
will cause the 6xx to be treated like a normal reply (breaking the
rfc). Default is off.
It can be set also at runtime, e.g.:
sercmd cfg.set_now_int tm disable_6xx_block 1
---
modules/tm/config.c | 6 +++++-
modules/tm/config.h | 1 +
modules/tm/t_reply.c | 3 ++-
modules/tm/tm.c | 1 +
4 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/modules/tm/config.c b/modules/tm/config.c
index 0dd258e..0e3101e 100644
--- a/modules/tm/config.c
+++ b/modules/tm/config.c
@@ -90,7 +90,9 @@ struct cfg_group_tm default_tm_cfg = {
* for every method except BYE by default */
1, /* cancel_b_method used for e2e and 6xx cancels*/
1, /* reparse_on_dns_failover */
- INV_FR_TIME_OUT_NEXT
+ INV_FR_TIME_OUT_NEXT, /* fr_inv_timeout_next -> for serial forking subseq.
+ branches */
+ 0 /* disable_6xx, by default off */
};
void *tm_cfg = &default_tm_cfg;
@@ -182,5 +184,7 @@ cfg_def_t tm_cfg_def[] = {
"branch instead of from the received request"},
{"fr_inv_timer_next", CFG_VAR_INT, 0, 0, timer_fixup, 0,
"The value of fr_inv_timer for subsequent branches during serial forking"},
+ {"disable_6xx_block", CFG_VAR_INT | CFG_ATOMIC, 0, 1, 0, 0,
+ "if set to 1, 6xx is treated like a normal reply (breaks rfc)"},
{0, 0, 0, 0, 0, 0}
};
diff --git a/modules/tm/config.h b/modules/tm/config.h
index 0904479..aabfa96 100644
--- a/modules/tm/config.h
+++ b/modules/tm/config.h
@@ -134,6 +134,7 @@ struct cfg_group_tm {
unsigned int cancel_b_flags;
int reparse_on_dns_failover;
unsigned int fr_inv_timeout_next;
+ int disable_6xx;
};
extern struct cfg_group_tm default_tm_cfg;
diff --git a/modules/tm/t_reply.c b/modules/tm/t_reply.c
index fa99650..6458d2e 100644
--- a/modules/tm/t_reply.c
+++ b/modules/tm/t_reply.c
@@ -1086,7 +1086,8 @@ static enum rps t_should_relay_response( struct cell *Trans , int new_code,
if (picked_branch==-2) { /* branches open yet */
*should_store=1;
*should_relay=-1;
- if (new_code>=600 && new_code<=699){
+ if (new_code>=600 && new_code<=699 &&
+ !cfg_get(tm, tm_cfg, disable_6xx)){
if (!(Trans->flags & T_6xx)){
/* cancel only the first time we get a 6xx */
prepare_to_cancel(Trans, cancel_bitmap, 0);
diff --git a/modules/tm/tm.c b/modules/tm/tm.c
index e62185c..64d32fd 100644
--- a/modules/tm/tm.c
+++ b/modules/tm/tm.c
@@ -463,6 +463,7 @@ static param_export_t params[]={
{"on_sl_reply", PARAM_STRING|PARAM_USE_FUNC, fixup_on_sl_reply },
{"fr_inv_timer_next", PARAM_INT, &default_tm_cfg.fr_inv_timeout_next },
{"contacts_avp", PARAM_STRING, &contacts_avp_param },
+ {"disable_6xx_block", PARAM_INT, &default_tm_cfg.disable_6xx },
{0,0,0}
};