Hi,
We would like to propose to change rtpengine_tout granularity from
seconds to milliseconds as for example INVITE retransmissions occur
faster than this (e.g. 500ms) We would benefit from kamailio falling
back to another rtpengine in case one is not responsive before the
retransmission. Should you appreciate this idea, I attach a patch with
the small changes.
Thank you,
Lucian
>From d89004ad62ac7f374914a12a5cf0ec07fad632a1 Mon Sep 17 00:00:00 2001
From: lucian balanceanu <[email protected]>
Date: Tue, 10 Feb 2015 17:01:58 +0200
Subject: [PATCH] rtpengine: changing rtpengine_tout to millisecs
- rtpengine_tout param is now expressed in millisecs
---
modules/rtpengine/doc/rtpengine_admin.xml | 6 +++---
modules/rtpengine/rtpengine.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/rtpengine/doc/rtpengine_admin.xml b/modules/rtpengine/doc/rtpengine_admin.xml
index 84f11c3..07acad1 100644
--- a/modules/rtpengine/doc/rtpengine_admin.xml
+++ b/modules/rtpengine/doc/rtpengine_admin.xml
@@ -162,18 +162,18 @@ modparam("rtpengine", "rtpengine_disable_tout", 20)
<section id="rtpengine.p.rtpengine_tout">
<title><varname>rtpengine_tout</varname> (integer)</title>
<para>
- Timeout value in waiting for reply from &rtp; proxy.
+ Timeout value expressed in milliseconds in waiting for reply from &rtp; proxy.
</para>
<para>
<emphasis>
- Default value is <quote>1</quote>.
+ Default value is <quote>1000</quote>.
</emphasis>
</para>
<example>
<title>Set <varname>rtpengine_tout</varname> parameter</title>
<programlisting format="linespecific">
...
-modparam("rtpengine", "rtpengine_tout", 2)
+modparam("rtpengine", "rtpengine_tout", 2000)
...
</programlisting>
</example>
diff --git a/modules/rtpengine/rtpengine.c b/modules/rtpengine/rtpengine.c
index ff9223d..1d88a07 100644
--- a/modules/rtpengine/rtpengine.c
+++ b/modules/rtpengine/rtpengine.c
@@ -182,7 +182,7 @@ static struct mi_root* mi_show_rtpproxies(struct mi_root* cmd_tree,
static int rtpengine_disable_tout = 60;
static int rtpengine_retr = 5;
-static int rtpengine_tout = 1;
+static int rtpengine_tout = 1000;
static pid_t mypid;
static unsigned int myseqn = 0;
static str extra_id_pv_param = {NULL, 0};
@@ -1546,7 +1546,7 @@ send_rtpp_command(struct rtpp_node *node, bencode_item_t *dict, int *outlen)
LM_ERR("can't send command to a RTP proxy\n");
goto badproxy;
}
- while ((poll(fds, 1, rtpengine_tout * 1000) == 1) &&
+ while ((poll(fds, 1, rtpengine_tout) == 1) &&
(fds[0].revents & POLLIN) != 0) {
do {
len = recv(rtpp_socks[node->idx], buf, sizeof(buf)-1, 0);
--
1.7.4.1
_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev