<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Jeff,<br>
<br>
Thank you for detailed report. I was able to reproduce and fix it.
Please see:<br>
<a class="moz-txt-link-freetext" href="https://github.com/OpenSIPS/opensips/commit/b30af734cdb84991e1f906e3920a94e87c33ea04">https://github.com/OpenSIPS/opensips/commit/b30af734cdb84991e1f906e3920a94e87c33ea04</a><br>
<br>
If you confirm the fix, I will do the backporting to 2.2 too.<br>
<br>
Thanks and Regards,<br>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 02/04/2017 04:41 AM, Jeff Pyle
wrote:<br>
</div>
<blockquote
cite="mid:CAPhW+0+opdhJU41EXyfbZxJR9sK-CqwpvuWye_SpOMJO5U11Yg@mail.gmail.com"
type="cite">
<div dir="ltr">Hello,
<div><br>
</div>
<div>I recently enabled siptrace on an OpenSIPS 2.2.2 system
acting as a registrar and a proxy. It has one IPv4 address
with several ports for UDP, TCP and TLS. In a case where the
INVITE is relayed from TLS to UDP, the replies to the UAC are
incorrectly being reported as coming from the UDP socket.</div>
<div><br>
</div>
<div>In the below scenario the UAC is at 64.65.66.67, and its
ephemeral TCP client port for this call is 61235. The
OpenSIPS proxy is at 131.132.133.134 listening on UDP 5060 and
TLS 5061. Also on 131.132.133.134 there is a Freeswitch media
server listening on UDP 5080. The UAC sends an INVITE to the
proxy over TLS which routes it to the media server over UDP.
The replies relayed to the UAC are reported as having come
from port 5060 over UDP when in reality they have come from
port 5061 over TCP (TLS).</div>
<div><br>
</div>
<div>My config:</div>
<div><br>
</div>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div>
<div>listen=udp:<a moz-do-not-send="true"
href="http://131.132.133.134:5060">131.132.133.134:5060</a></div>
</div>
<div>
<div>listen=tls:<a moz-do-not-send="true"
href="http://131.132.133.134:5061">131.132.133.134:5061</a></div>
</div>
<div>listen=hep_udp:<a moz-do-not-send="true"
href="http://127.0.0.1:9030">127.0.0.1:9030</a></div>
<div><br>
</div>
<div>
<div>loadmodule "siptrace.so"</div>
</div>
<div>
<div>modparam("siptrace", "trace_on", 1)</div>
</div>
<div>
<div>modparam("siptrace", "trace_id",
"[hep]uri=hep:127.0.0.1:9060;transport=udp;")</div>
</div>
</blockquote>
<div><br>
</div>
<div><br>
</div>
<div>Debugs:</div>
<div>
<blockquote style="margin:0px 0px 0px
40px;border:none;padding:0px">
<div><br>
</div>
<div>
<div>INVITE in from UAC over TLS</div>
</div>
<div>
<div>Feb 3 21:20:22 testproxy /usr/sbin/opensips[24673]:
DBG:siptrace:pipport2su: proto 22, host 64.65.66.67 ,
port 61235</div>
</div>
<div>
<div>Feb 3 21:20:22 testproxy /usr/sbin/opensips[24673]:
DBG:siptrace:pipport2su: proto 22, host 131.132.133.134
, port 5061</div>
</div>
<div>
<div><br>
</div>
</div>
<div>
<div>INVITE out to media server over UDP</div>
</div>
<div>
<div>Feb 3 21:20:22 testproxy /usr/sbin/opensips[24673]:
DBG:siptrace:pipport2su: proto 17, host 131.132.133.134
, port 5060</div>
</div>
<div>
<div>Feb 3 21:20:22 testproxy /usr/sbin/opensips[24673]:
DBG:siptrace:pipport2su: proto 17, host 131.132.133.134
, port 5080</div>
</div>
<div>
<div><br>
</div>
</div>
<div>
<div>100 Trying in from media server over UDP</div>
</div>
<div>
<div>Feb 3 21:20:22 testproxy /usr/sbin/opensips[24650]:
DBG:siptrace:pipport2su: proto 17, host 131.132.133.134
, port 5080</div>
</div>
<div>
<div>Feb 3 21:20:22 testproxy /usr/sbin/opensips[24650]:
DBG:siptrace:pipport2su: proto 17, host 131.132.133.134
, port 5060</div>
</div>
<div>
<div><br>
</div>
</div>
<div>
<div>180 Ringing in from media server over UDP</div>
</div>
<div>
<div>Feb 3 21:20:22 testproxy /usr/sbin/opensips[24651]:
DBG:siptrace:pipport2su: proto 17, host 131.132.133.134
, port 5080</div>
</div>
<div>
<div>Feb 3 21:20:22 testproxy /usr/sbin/opensips[24651]:
DBG:siptrace:pipport2su: proto 17, host 131.132.133.134
, port 5060</div>
</div>
<div>
<div><br>
</div>
</div>
<div>
<div>180 Ringing out to UAC over TLS (even though it
reports UDP)</div>
</div>
<div>
<div>Feb 3 21:20:22 testproxy /usr/sbin/opensips[24651]:
DBG:siptrace:pipport2su: proto 17, host 131.132.133.134
, port 5060</div>
</div>
<div>
<div>Feb 3 21:20:22 testproxy /usr/sbin/opensips[24651]:
DBG:siptrace:pipport2su: proto 22, host 64.65.66.67 ,
port 61235</div>
</div>
<div>
<div><br>
</div>
</div>
<div>
<div>200 OK in from media server over UDP</div>
</div>
<div>
<div>Feb 3 21:20:22 testproxy /usr/sbin/opensips[24651]:
DBG:siptrace:pipport2su: proto 17, host 131.132.133.134
, port 5080</div>
</div>
<div>
<div>Feb 3 21:20:22 testproxy /usr/sbin/opensips[24651]:
DBG:siptrace:pipport2su: proto 17, host 131.132.133.134
, port 5060</div>
</div>
<div>
<div><br>
</div>
</div>
<div>
<div>200 OK out to UAC over TLS (even though it reports
udp)</div>
</div>
<div>
<div>Feb 3 21:20:22 testproxy /usr/sbin/opensips[24651]:
DBG:siptrace:pipport2su: proto 17, host 131.132.133.134
, port 5060</div>
</div>
<div>
<div>Feb 3 21:20:22 testproxy /usr/sbin/opensips[24651]:
DBG:siptrace:pipport2su: proto 22, host 64.65.66.67 ,
port 61235</div>
</div>
<div>
<div><br>
</div>
</div>
<div>
<div>ACK in from UAC over TLS</div>
</div>
<div>
<div>Feb 3 21:20:23 testproxy /usr/sbin/opensips[24673]:
DBG:siptrace:pipport2su: proto 22, host 64.65.66.67 ,
port 61235</div>
</div>
<div>
<div>Feb 3 21:20:23 testproxy /usr/sbin/opensips[24673]:
DBG:siptrace:pipport2su: proto 22, host 131.132.133.134
, port 5061</div>
</div>
<div>
<div><br>
</div>
</div>
<div>
<div>ACK out to media server over UDP</div>
</div>
<div>
<div>Feb 3 21:20:23 testproxy /usr/sbin/opensips[24673]:
DBG:siptrace:pipport2su: proto 17, host 131.132.133.134
, port 5060</div>
</div>
<div>
<div>Feb 3 21:20:23 testproxy /usr/sbin/opensips[24673]:
DBG:siptrace:pipport2su: proto 17, host 131.132.133.134
, port 5080</div>
</div>
</blockquote>
</div>
<div><br>
</div>
<div>Everything routes properly, but it isn't reported by
siptrace properly. Is this a bug or am I doing something
wrong?</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>- Jeff</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<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>
<br>
</body>
</html>