One more undocumented paramter ;-)
regards
klaus
PS: other undocumented tm parameters
tm: ruri_matching
tm: via1_matching
tm: pass_provisional_replies
tm: default_code
tm: default_reason
Andrei Pelinescu-Onciul schrieb:
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}
};
_______________________________________________
sr-dev mailing list
sr-dev(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev