Module: sip-router
Branch: andrei/tcp_tls_changes
Commit: 4f247030923dbb8e433441a66c557d9438316ddc
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4f24703…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Thu May 27 20:00:00 2010 +0200
tls: doc - removed handshake_timeout and send_timeout
---
modules/tls/README | 26 +++++++++++---------------
modules/tls/doc/params.xml | 23 ++++++++++++-----------
2 files changed, 23 insertions(+), 26 deletions(-)
diff --git a/modules/tls/README b/modules/tls/README
index e2b0866..1532c9f 100644
--- a/modules/tls/README
+++ b/modules/tls/README
@@ -397,36 +397,32 @@ modparam("tls", "cipher_list", "HIGH")
1.8.9. send_timeout (int)
- Sets the maximum interval of time after which SIP-router will give up
- trying to send a message over TLS (time after a TLS send will be
- aborted and the corresponding TLS connection closed). The value is in
- seconds.
-
- The default value is 120 s.
+ This parameter is obsolete and cannot be used in newer TLS versions (>
+ sip-router 3.0). In these versions the send_timeout is replaced by
+ tcp_send_timeout (common with all the tcp connections).
Example 10. Set send_timeout parameter
...
-modparam("tls", "send_timeout", 1)
+tls_send_timeout = 10
...
1.8.10. handshake_timeout (int)
- Sets the maximum interval of time after which SIP-router will give up
- trying to accept a TLS connection or connect to a TLS peer. The value
- is in seconds.
-
- The default value is 120 s.
+ This parameter is obsolete and cannot be used in newer TLS versions (>
+ sip-router 3.0). In these versions the handshake_timeout is replaced by
+ tcp_connect_timeout (common with all the tcp connections).
Example 11. Set handshake_timeout parameter
...
-modparam("tls", "handshake_timeout", 1)
+tcp_connect_timeout = 60
...
1.8.11. connection_timeout (int)
Sets the amount of time after which an idle TLS connection will be
- closed. This is similar to tcp_connection_lifetime. The value is
- expressed in seconds.
+ closed, if no I/O ever occured after the initial open. If an I/O event
+ occurs, the timeout will be extended with tcp_connection_lifetime. The
+ value is expressed in seconds.
The default value is 10 min.
diff --git a/modules/tls/doc/params.xml b/modules/tls/doc/params.xml
index b898dc5..a489243 100644
--- a/modules/tls/doc/params.xml
+++ b/modules/tls/doc/params.xml
@@ -201,16 +201,15 @@ modparam("tls", "cipher_list", "HIGH")
<section id="send_timeout">
<title><varname>send_timeout</varname> (int)</title>
<para>
- Sets the maximum interval of time after which SIP-router will give up trying to send a message over TLS (time after a TLS send will be aborted and the corresponding TLS connection closed). The value is in seconds.
- </para>
- <para>
- The default value is 120 s.
+ This parameter is obsolete and cannot be used in newer TLS versions
+ (> sip-router 3.0). In these versions the send_timeout is
+ replaced by tcp_send_timeout (common with all the tcp connections).
</para>
<example>
<title>Set <varname>send_timeout</varname> parameter</title>
<programlisting>
...
-modparam("tls", "send_timeout", 1)
+tls_send_timeout = 10
...
</programlisting>
</example>
@@ -219,16 +218,15 @@ modparam("tls", "send_timeout", 1)
<section id="handshake_timeout">
<title><varname>handshake_timeout</varname> (int)</title>
<para>
- Sets the maximum interval of time after which SIP-router will give up trying to accept a TLS connection or connect to a TLS peer. The value is in seconds.
- </para>
- <para>
- The default value is 120 s.
+ This parameter is obsolete and cannot be used in newer TLS versions
+ (> sip-router 3.0). In these versions the handshake_timeout is
+ replaced by tcp_connect_timeout (common with all the tcp connections).
</para>
<example>
<title>Set <varname>handshake_timeout</varname> parameter</title>
<programlisting>
...
-modparam("tls", "handshake_timeout", 1)
+tcp_connect_timeout = 60
...
</programlisting>
</example>
@@ -237,7 +235,10 @@ modparam("tls", "handshake_timeout", 1)
<section id="connection_timeout">
<title><varname>connection_timeout</varname> (int)</title>
<para>
- Sets the amount of time after which an idle TLS connection will be closed. This is similar to tcp_connection_lifetime. The value is expressed in seconds.
+ Sets the amount of time after which an idle TLS connection will be
+ closed, if no I/O ever occured after the initial open. If an I/O event
+ occurs, the timeout will be extended with tcp_connection_lifetime.
+ The value is expressed in seconds.
</para>
<para>
The default value is 10 min.
Module: sip-router
Branch: andrei/tcp_tls_changes
Commit: bdc512a7e5416fa30d9760f50cc949281d0e71a1
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=bdc512a…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Wed May 26 15:53:33 2010 +0200
tls: added tls_info rpc
The tls_info rpc should print various internal tls informations
and statistics. For now it prints the overall amount of write-queued
clear text.
---
modules/tls/tls_rpc.c | 26 +++++++++++++++++++++-----
modules/tls/tls_rpc.h | 14 ++++----------
2 files changed, 25 insertions(+), 15 deletions(-)
diff --git a/modules/tls/tls_rpc.c b/modules/tls/tls_rpc.c
index 542500d..8351439 100644
--- a/modules/tls/tls_rpc.c
+++ b/modules/tls/tls_rpc.c
@@ -23,11 +23,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/*!
- * \file
- * \brief SIP-router TLS support :: management interface
- * \ingroup tls
- * Module: \ref tls
+/** tls module management interface (rpc).
+ * @file tls_rpc.c
+ * @ingroup tls
+ * Module: @ref tls
*/
@@ -40,6 +39,7 @@
#include "tls_config.h"
#include "tls_util.h"
#include "tls_server.h"
+#include "tls_ct_wrq.h"
#include "tls_rpc.h"
static const char* tls_reload_doc[2] = {
@@ -140,8 +140,24 @@ static void tls_list(rpc_t* rpc, void* c)
+static const char* tls_info_doc[2] = {
+ "Returns internal tls related info.",
+ 0 };
+
+static void tls_info(rpc_t* rpc, void* c)
+{
+ void* handle;
+ rpc->add(c, "{", &handle);
+ rpc->struct_add(handle, "d",
+ "clear_text_write_queued_bytes", tls_ct_wq_total_bytes());
+}
+
+
+
+
rpc_export_t tls_rpc[] = {
{"tls.reload", tls_reload, tls_reload_doc, 0},
{"tls.list", tls_list, tls_list_doc, RET_ARRAY},
+ {"tls.info", tls_info, tls_info_doc, 0},
{0, 0, 0, 0}
};
diff --git a/modules/tls/tls_rpc.h b/modules/tls/tls_rpc.h
index d7154f2..b292de1 100644
--- a/modules/tls/tls_rpc.h
+++ b/modules/tls/tls_rpc.h
@@ -14,11 +14,6 @@
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version
*
- * For a license to use the sip-router software under conditions
- * other than those described here, or to purchase support for this
- * software, please contact iptel.org by e-mail at the following addresses:
- * info(a)iptel.org
- *
* sip-router 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
@@ -28,11 +23,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/*!
- * \file
- * \brief SIP-router TLS support :: Management interface
- * \ingroup tls
- * Module: \ref tls
+/** tls module management interface (rpc).
+ * @file tls_rpc.h
+ * @ingroup tls
+ * Module: @ref tls
*/
#ifndef _TLS_RPC_H
Hello,
I am planning to release kamailio 3.0.2 this Thursday. There were some
fixes since 3.0.1 that worth to be packaged. If you have major reports
for current stable version, please write to sr-dev(a)lists.sip-router.org
Cheers,
Daniel
--
Daniel-Constantin Mierla
Kamailio (OpenSER) Advanced Training
Miami, Fl, USA - June 21-23, 2010
http://www.asipto.com/index.php/kamailio-advanced-training/
if t_relay() fails in route block so that failure route is not executed,
is request uri "consumed" so that if a new branch is added by in the
route block, that branch will be the only remaining one?
in the test that i made, two lcr gws match the request uri. in route
block i have:
load_gws();
next_gw(); /* sets request-uri to uri of first gw */
while ($true) {
t_on_branch("BRANCHES");
if (t_relay()) {
xlog("Relaying succeeded with result $rc\n");
exit;
} else {
xlog("Relaying failed with result $rc\n");
};
if (!next_gw()) { /* tries to append the next gw as a new branch */
xlog("L_WARN", "No more gws\n");
send_reply("503", "Service not available");
exit;
};
xlog("found next gw <$ds>\n")
};
and in branch route block BRANCHES i have
branch_route [BRANCHES] {
xlog("L_INFO", "Relaying $rm <$ru>\n");
return;
};
when proxy receives a request, i get to syslog (some lcr DBGs are
changed to INFOs):
May 16 15:58:49 localhost /usr/sbin/sip-proxy[11412]: INFO: lcr [lcr_mod.c:1532]: added gw_uri_avp <1|1|00||lohi.tutpro.com|5060||1|4096> with weight <8192865>
May 16 15:58:49 localhost /usr/sbin/sip-proxy[11412]: INFO: lcr [lcr_mod.c:1532]: added gw_uri_avp <1|1|00||sars.tutpro.com|||2|64> with weight <3725453>
May 16 15:58:49 localhost /usr/sbin/sip-proxy[11412]: INFO: Relaying INVITE <sip:00358407058055@sars.tutpro.com;transport=tcp>
May 16 15:58:49 localhost /usr/sbin/sip-proxy[11412]: ERROR: tm [ut.h:295]: ERROR: uri2dst: failed to resolve "sars.tutpro.com" :unresolvable A or AAAA request (-7)
May 16 15:58:49 localhost /usr/sbin/sip-proxy[11412]: ERROR: tm [t_fwd.c:1391]: ERROR: t_forward_nonack: failure to add branches
May 16 15:58:49 localhost /usr/sbin/sip-proxy[11412]: ERROR: Relaying failed with result -478
May 16 15:58:49 localhost /usr/sbin/sip-proxy[11412]: INFO: lcr [lcr_mod.c:1949]: appending branch <sip:00358407058055@lohi.tutpro.com:5060>
May 16 15:58:49 localhost /usr/sbin/sip-proxy[11412]: ERROR: found next gw <Contact: sip:00358407058055@sars.tutpro.com;transport=tcp, sip:00358407058055@lohi.tutpro.com:5060>
May 16 15:58:49 localhost /usr/sbin/sip-proxy[11412]: ERROR: tm [ut.h:295]: ERROR: uri2dst: failed to resolve "sars.tutpro.com" :unresolvable A or AAAA request (-7)
May 16 15:58:49 localhost /usr/sbin/sip-proxy[11412]: ERROR: Relaying succeeded with result 1
May 16 15:58:54 localhost /usr/sbin/sip-proxy[11459]: WARNING: No more gws
the first gw domain name sars.tutpro.com does not exist and the tm
errors are as they should. then next_gw() appends a new branch, but
based on the "found next gw" log message it looks like sars.tutpro.com
is still in the destination set.
is this how it is supposed to be? if so, looks like i there is a bug in
next_gw() in that it should clear the previous branch before adding a
new one in case the previous branch was not consumed by t_relay?
another strange thing is, why the branch route is executed only once
(for the first t_relay) although the script is calling t_relay() two
times and t_on_branch() is called before each call?
-- juha
Module: sip-router
Branch: master
Commit: 9b0c1a0e1f02d84c312d67cdc71360d5612b9e2c
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9b0c1a0…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Fri May 28 13:30:38 2010 +0200
Merge remote branch 'origin/tmp/ruri_branch'
* origin/tmp/ruri_branch:
modules*: mark r-uri as "new" when changed
tm: failure route start with r-uri marked as "consumed"
tm: use ruri for forking only if marked as "new"
core: mark uri as new on new message or seturi()
core: support for marking a "consumed" r-uri
---