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}
};
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task is now closed:
FS#14 - TLS modul problem
User who did this - Andrei Pelinescu-Onciul (andrei)
Reason for closing: Fixed
Additional comments about closing: Hopefully fixed, see git#68e944.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=14
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: c390fed30a67655a8d45c7210b06d82bde9f3820
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c390fed…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Mon Sep 21 18:41:26 2009 +0200
tcp: tls fix_read_con hook return changes
tls_fix_read_con doesn't change the tcp connection state any
longer, relying instead on different return codes.
---
tcp_read.c | 6 +++---
tls_hooks.h | 6 +++++-
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/tcp_read.c b/tcp_read.c
index 7d45d53..b79e2e2 100644
--- a/tcp_read.c
+++ b/tcp_read.c
@@ -651,11 +651,11 @@ int tcp_read_req(struct tcp_connection* con, int* bytes_read, int* read_flags)
req=&con->req;
#ifdef USE_TLS
if (con->type==PROTO_TLS){
- if (tls_fix_read_conn(con)!=0){
+ ret=tls_fix_read_conn(con);
+ if (unlikely(ret<0)){
resp=CONN_ERROR;
goto end_req;
- }
- if (unlikely(con->state!=S_CONN_OK && con->state!=S_CONN_ACCEPT))
+ }else if (unlikely(ret==0))
goto end_req; /* not enough data */
}
#endif
diff --git a/tls_hooks.h b/tls_hooks.h
index 5b17ca6..462ad3d 100644
--- a/tls_hooks.h
+++ b/tls_hooks.h
@@ -51,7 +51,11 @@ struct tls_hooks{
/* checks if a tls connection is fully established before a read, and if
* not it runs tls_accept() or tls_connect() as needed
* (tls_accept and tls_connect are deferred to the "reader" process for
- * performance reasons) */
+ * performance reasons)
+ * returns 1 if the read can continue, 0 if the connection is not yet
+ * ready for the read and fix_read_con() should be attempted at a latter
+ * time and <0 on error.
+ */
int (*fix_read_con)(struct tcp_connection* c);
/* per listening socket init, called on ser startup (after modules,