<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Razvan,<br>
<br>
You are right ! I think I found the lines of code you are talking
about in the force_rtp_proxy_body function so I added some traces in
it :<br>
<font face="Courier New, Courier, monospace"><br>
<small> cp =
send_rtpp_command(args->node, v, vcnt);<br>
LM_INFO("command sent to
rtpproxy, cp = %s, err = %d\n",cp,rtpp_get_error(cp));<br>
if (!cp && !create) {<br>
LM_ERR("cannot lookup a
session on a different RTPProxy\n");<br>
goto error;<br>
}<br>
if (cp && (err =
rtpp_get_error(cp))) {<br>
/* check internal errors
*/<br>
if (err >= 7
&& err <= 10) {<br>
LM_INFO("rtpproxy returned an error, we disable the node\n");<br>
cp = NULL;<br>
args->node->rn_disabled = 1;<br>
args->node->rn_recheck_ticks = get_ticks() +<br>
rtpproxy_disable_tout;<br>
raise_rtpproxy_event(args->node, 0);<br>
} else {<br>
LM_ERR("unhandled rtpproxy error: %d\n", err);<br>
goto error;<br>
}<br>
}<br>
/* if not successfull choose a
different rtpproxy */<br>
if (!cp) {<br>
args->node =
select_rtpp_node(args->callid, 0);<br>
if (!args->node) {<br>
LM_ERR("no
available proxies\n");<br>
goto error;<br>
}<br>
LM_DBG("trying new
rtpproxy node %s\n", args->node->rn_address);</small><br>
<small>}</small></font><br>
<br>
and this is what I get :<br>
<br>
<small><font face="Courier New, Courier, monospace">Nov 8 13:33:57
WWW_64Bits ./opensips[25568]: INFO :: (INVITE) rtpproxy set 1<br>
Nov 8 13:33:57 WWW_64Bits ./opensips[25568]:
INFO:rtpproxy:select_rtpp_node: entering select_rtpp_node<br>
Nov 8 13:33:57 WWW_64Bits ./opensips[25568]:
INFO:rtpproxy:select_rtpp_node: rtpproxy node count = 1<br>
Nov 8 13:33:57 WWW_64Bits ./opensips[25568]:
INFO:rtpproxy:select_rtpp_node: node->rn_disabled = 0,
node->rn_recheck_ticks = 0, get_ticks = 4<br>
Nov 8 13:33:57 WWW_64Bits ./opensips[25568]:
INFO:rtpproxy:select_rtpp_node: result rtpp_test = 0<br>
Nov 8 13:33:57 WWW_64Bits ./opensips[25568]:
INFO:rtpproxy:force_rtp_proxy_body: command sent to rtpproxy, cp
= E10 , err = 10<br>
Nov 8 13:33:57 WWW_64Bits ./opensips[25568]:
INFO:rtpproxy:force_rtp_proxy_body: rtpproxy returned an error,
we disable the node<br>
Nov 8 13:33:57 WWW_64Bits ./opensips[25568]:
INFO:rtpproxy:select_rtpp_node: entering select_rtpp_node<br>
Nov 8 13:33:57 WWW_64Bits ./opensips[25568]:
INFO:rtpproxy:select_rtpp_node: rtpproxy node count = 1<br>
Nov 8 13:33:57 WWW_64Bits ./opensips[25568]:
INFO:rtpproxy:select_rtpp_node: node->rn_disabled = 1,
node->rn_recheck_ticks = 64, get_ticks = 4<br>
Nov 8 13:33:57 WWW_64Bits ./opensips[25568]:
INFO:rtpproxy:select_rtpp_node: result rtpp_test = 1<br>
Nov 8 13:33:57 WWW_64Bits ./opensips[25568]:
ERROR:rtpproxy:force_rtp_proxy_body: no available proxies</font></small><br>
<br>
This confirms what you said. Any idea what this error 10 means ?
Unfortunaltely i cannot find the rtpproxy log file, I think it
should output its logs in /var/log/messages but it doesn't.<br>
<br>
Best regards,<br>
<br>
Sebastien<br>
<br>
Le 08/11/2011 12:39, Razvan Crainea a écrit :
<blockquote cite="mid:4EB91506.9090705@opensips.org" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Hi Sebastien,<br>
<br>
I think I found out what is your problem. As you noted, there are
two "select_rtpp_node" functions calls for only one INVITE. The
problem is that the first time OpenSIPS sends a command to
RTPProxy, it receives an error. If OpenSIPS detecs the error, it
automatically disables the node for a while (exactly for <small><font
face="Courier New, Courier, monospace">rn_recheck_ticks </font></small>seconds,
your second question) and tries a new node. As you don't have any
different node in the set, no RTPProxy can be used and an error is
triggered.<br>
You should try to see why RTPProxy returns an error to OpenSIPS
requests. You can check RTPProxy logs, or try to trace the
communication between them. I'd be happy to help you if you can
provide me any of this information.<br>
<br>
Regards,<br>
<pre class="moz-signature" cols="72">--
Răzvan Crainea
OpenSIPS Developer</pre>
<br>
On 11/08/2011 01:22 PM, Sebastien CRUAUX wrote:
<blockquote cite="mid:4EB910ED.9060407@halys.fr" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Hi Razvan,<br>
<br>
Actually we don't even enter in the rtpp_test function. I added
some other traces in the select_rtpp_node function :<br>
<br>
<small><font face="Courier New, Courier, monospace"> if
(selected_rtpp_set->rtpp_node_count == 1) {<br>
LM_INFO("rtpproxy node count = 1\n");<br>
node = selected_rtpp_set->rn_first;<br>
LM_INFO("node->rn_disabled = %d,
node->rn_recheck_ticks = %d, get_ticks =
%d\n",node->rn_disabled,node->rn_recheck_ticks,get_ticks());<br>
if (node->rn_disabled &&
node->rn_recheck_ticks <= get_ticks())<br>
node->rn_disabled =
rtpp_test(node, 1, 0);<br>
LM_INFO("result rtpp_test = %d\n",
node->rn_disabled);<br>
return node->rn_disabled ? NULL : node;<br>
}</font></small><br>
<br>
and here is what I get when an INVITE is received :<br>
<br>
<small><font face="Courier New, Courier, monospace">Nov 8
11:19:01 WWW_64Bits ./opensips[24317]: INFO :: (INVITE)
rtpproxy set 1<br>
Nov 8 11:19:01 WWW_64Bits ./opensips[24317]: <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="INFO:rtpproxy:select_rtpp_node:">INFO:rtpproxy:select_rtpp_node:</a>
entering select_rtpp_node<br>
Nov 8 11:19:01 WWW_64Bits ./opensips[24317]: <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="INFO:rtpproxy:select_rtpp_node:">INFO:rtpproxy:select_rtpp_node:</a>
rtpproxy node count = 1<br>
Nov 8 11:19:01 WWW_64Bits ./opensips[24317]: <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="INFO:rtpproxy:select_rtpp_node:">INFO:rtpproxy:select_rtpp_node:</a>
node->rn_disabled = 0, node->rn_recheck_ticks = 0,
get_ticks = 121<br>
Nov 8 11:19:01 WWW_64Bits ./opensips[24317]: <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="INFO:rtpproxy:select_rtpp_node:">INFO:rtpproxy:select_rtpp_node:</a>
result rtpp_test = 0<br>
Nov 8 11:19:01 WWW_64Bits ./opensips[24317]: <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="INFO:rtpproxy:select_rtpp_node:">INFO:rtpproxy:select_rtpp_node:</a>
entering select_rtpp_node<br>
Nov 8 11:19:01 WWW_64Bits ./opensips[24317]: <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="INFO:rtpproxy:select_rtpp_node:">INFO:rtpproxy:select_rtpp_node:</a>
rtpproxy node count = 1<br>
Nov 8 11:19:01 WWW_64Bits ./opensips[24317]: <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="INFO:rtpproxy:select_rtpp_node:">INFO:rtpproxy:select_rtpp_node:</a>
node->rn_disabled = 1, node->rn_recheck_ticks = 181,
get_ticks = 121<br>
Nov 8 11:19:01 WWW_64Bits ./opensips[24317]: <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="INFO:rtpproxy:select_rtpp_node:">INFO:rtpproxy:select_rtpp_node:</a>
result rtpp_test = 1<br>
Nov 8 11:19:01 WWW_64Bits ./opensips[24317]:
ERROR:rtpproxy:force_rtp_proxy_body: no available proxies</font></small><br>
<br>
You can see we never enter in the "if" :(<br>
Consequently, I have several questions :<br>
- why do we see 2 calls to select_rtpp_node while we have chosen
only the rtpproxy set 1 ?<br>
- what does the node->rn_recheck_ticks parameter means ?<br>
- do you think the bug is in my opensips.cfg or in the rtpproxy
module ?<br>
<br>
Thanks a lot for your help.<br>
<br>
Best regards,<br>
<br>
Sebastien<br>
<br>
Le 08/11/2011 12:10, Razvan Crainea a écrit :
<blockquote cite="mid:4EB90E2B.4010706@opensips.org" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Hi Sebastien,<br>
<br>
No, if rtpp_test returns 1, it means that the chosen rtpproxy
node should be disabled for a while. You should try to see why
OpenSIPS detects the node as disabled.<br>
<br>
Regards,<br>
<pre class="moz-signature" cols="72">--
Răzvan Crainea
OpenSIPS Developer</pre>
<br>
On 11/07/2011 04:31 PM, Sebastien CRUAUX wrote:
<blockquote cite="mid:4EB7EBC7.4030005@halys.fr" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Hi Razvan,<br>
<br>
I added some INFO traces in the select_rtpp_node function in
order to get some clues about what happens (see enclosed
file).<br>
Here is what is displayed in my /var/log/messages when an
INVITE is received :<br>
<br>
Nov 7 15:21:38 WWW_64Bits ./opensips[19884]: INFO ::
(INVITE) rtpproxy set 1<br>
Nov 7 15:21:38 WWW_64Bits ./opensips[19884]: <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="INFO:rtpproxy:select_rtpp_node:">INFO:rtpproxy:select_rtpp_node:</a>
entering select_rtpp_node<br>
Nov 7 15:21:38 WWW_64Bits ./opensips[19884]: <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="INFO:rtpproxy:select_rtpp_node:">INFO:rtpproxy:select_rtpp_node:</a>
rtpproxy node count = 1<br>
Nov 7 15:21:38 WWW_64Bits ./opensips[19884]: <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="INFO:rtpproxy:select_rtpp_node:">INFO:rtpproxy:select_rtpp_node:</a>
result rtpp_test = 0<br>
Nov 7 15:21:38 WWW_64Bits ./opensips[19884]: <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="INFO:rtpproxy:select_rtpp_node:">INFO:rtpproxy:select_rtpp_node:</a>
entering select_rtpp_node<br>
Nov 7 15:21:38 WWW_64Bits ./opensips[19884]: <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="INFO:rtpproxy:select_rtpp_node:">INFO:rtpproxy:select_rtpp_node:</a>
rtpproxy node count = 1<br>
Nov 7 15:21:38 WWW_64Bits ./opensips[19884]: <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="INFO:rtpproxy:select_rtpp_node:">INFO:rtpproxy:select_rtpp_node:</a>
result rtpp_test = 1<br>
Nov 7 15:21:38 WWW_64Bits ./opensips[19884]:
ERROR:rtpproxy:force_rtp_proxy_body: no available proxies<br>
<br>
This is really weird, if rtpp_test returns 1, it should mean
that the rtpproxy socket was found right ? Then why do we
have an error message saying that there are no available
proxies ? I'm confused...<br>
<br>
Best regards,<br>
<br>
Sebastien<br>
<br>
Le 04/11/2011 15:23, Razvan Crainea a écrit :
<blockquote cite="mid:4EB3F55B.8030308@opensips.org"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Hi Sebastien,<br>
<br>
I will try to replicate this scenario and see if I am
getting the same behaviour. I will get back to you later.<br>
<br>
Regards,<br>
<pre class="moz-signature" cols="72">--
Răzvan Crainea
OpenSIPS Developer</pre>
<br>
On 11/04/2011 04:20 PM, Sebastien CRUAUX wrote:
<blockquote cite="mid:4EB3F4B5.5070301@halys.fr"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
I also tried to enter the rtpproxy_sock parameters and
the set IDs in the nh_sockets table and to load the
rtpproxy sets from the database but it did not work
either :(<br>
<br>
Sebastien<br>
<br>
Le 04/11/2011 11:52, Sebastien CRUAUX a écrit :
<blockquote cite="mid:4EB3C402.1010502@halys.fr"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Hi Razvan,<br>
<br>
Yes I think I declared the rtpproxy sets correctly,
unless there is some new parameter in the new rtpproxy
module that I forgot :<br>
<br>
# ----- rtpproxy params -----<br>
modparam("rtpproxy", "rtpproxy_sock", "1 ==
udp:localhost:12221")<br>
modparam("rtpproxy", "rtpproxy_sock", "2 ==
udp:localhost:12222")<br>
<br>
Regards,<br>
<br>
Sebastien<br>
<br>
Le 04/11/2011 11:44, Razvan Crainea a écrit :
<blockquote cite="mid:4EB3C1F9.1020003@opensips.org"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Hi Sebastien,<br>
<br>
Are you sure that when you declare the RTPProxy sets
you allocate them the set identifiers (1 and 2)? Can
you send us the rtpproxy_sock parameters
declaration?<br>
<br>
Regards,<br>
<pre class="moz-signature" cols="72">--
Răzvan Crainea
OpenSIPS Developer</pre>
<br>
On 11/04/2011 12:27 PM, Sebastien CRUAUX wrote:
<blockquote cite="mid:4EB3BE0D.9010505@halys.fr"
type="cite">
<meta http-equiv="content-type"
content="text/html; charset=ISO-8859-1">
Hi,<br>
<br>
I am currently migrating my old Opensips 1.6.2 to
the new Opensips 1.7.0 but I am facing some issues
with the configuration of rtpproxy.<br>
The version of rtpproxy I am using is the commit
6b82ff914543d21ff9ddbb797b40a77516348308.<br>
<br>
When I start Opensips, the two sets of rtpproxies
I configured are detected :<br>
<small><font face="Courier New, Courier,
monospace"><br>
<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="INFO:rtpproxy:rtpp_test:">INFO:rtpproxy:rtpp_test:</a>
rtp proxy <udp:localhost:12221> found,
support for it enabled<br>
<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="INFO:rtpproxy:rtpp_test:">INFO:rtpproxy:rtpp_test:</a>
rtp proxy <udp:localhost:12222> found,
support for it enabled</font></small><br>
<br>
However, when an INVITE is received by Opensips it
seems rtpproxy is not found, consequently the SDP
body is not rewritten :<br>
<br>
<small><font face="Courier New, Courier,
monospace">INFO :: (INVITE) rtpproxy set 1</font></small><br>
<small><font face="Courier New, Courier,
monospace">ERROR:rtpproxy:force_rtp_proxy_body:
no available proxies</font></small><br>
<br>
More information about my configuration :<br>
- my Opensips/rtpproxy server has 2 IP addresses,
one opened on the internet, one internal used to
communicate with my VoIP/PSTN gateway<br>
- I have 2 sets of rtpproxies : the 1st one is in
bridge mode for VoIP to PSTN or PSTN to VoIP
calls, the 2nd one only listens on the external IP
and is used for SIP to SIP calls<br>
<br>
<small><font face="Courier New, Courier,
monospace"> ./rtpproxy -u seb -l
172.17.1.126 172.17.1.131 -s udp:localhost
12221 -m 18000 -M 18020<br>
./rtpproxy -u seb -l 172.17.1.131 -s
udp:localhost 12222 -m 18021 -M 18030</font><br>
<br>
</small>- below is the part of my opensips.cfg
file which handles the INVITE requests (I just
replaced my public IP address with xx.xx.xx.xx) :<br>
<br>
<small><font face="Courier New, Courier,
monospace"> if (is_method("INVITE")) {<br>
if
(registered("location","$fu") &&
registered("location")) { # if From and
To are SIP registered : we use rtpproxy 2
(external IP)<br>
setflag(22);<br>
xlog("INFO :: (INVITE)
rtpproxy set 2");<br>
}<br>
else
{
# otherwise, SIP to ISUP or ISUP to SIP call :
we use rtpproxy 1 (bridge mode)<br>
xlog("INFO :: (INVITE)
rtpproxy set 1");<br>
}<br>
if
(has_body("application/sdp")) {<br>
if (isflagset(22)) {<br>
set_rtp_proxy_set("2");<br>
if
(rtpproxy_offer("","xx.xx.xx.xx")) {<br>
t_on_reply("1");<br>
}<br>
}<br>
else {<br>
set_rtp_proxy_set("1");<br>
if (dst_ip ==
172.17.1.131) { # my IP
address opened to the internet (external IP)<br>
if
(rtpproxy_offer("ei","xx.xx.xx.xx")) {<br>
t_on_reply("1");<br>
}<br>
}<br>
if (dst_ip ==
172.17.1.126) { # my
internal IP address<br>
if
(rtpproxy_offer("ie","xx.xx.xx.xx")) {<br>
t_on_reply("1");<br>
}<br>
}<br>
}<br>
<br>
}<br>
else {<br>
t_on_reply("2");<br>
}<br>
}</font></small><br>
<br>
<br>
Any idea ? I have been stuck on this issue for a
few days, this configuration worked fine with my
previous versions of Opensips and rtpproxy.<br>
<br>
Best Regards,<br>
<br>
Sebastien <br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</body>
</html>