<div dir="ltr">Hi Răzvan,<div><br></div><div>I feared something like this might be the case. I'll look into filing the bug reports.</div><div><br></div><div>My application is near-side NAT traversal in a proxy configuration, relaying RTP and SIP between LAN and WAN. Are you aware of any way around this issue with something other than rtpproxy? something other than OpenSIPS? Can I ask that on this list? :)</div><div><br></div><div>Before using OpenSIPS and rtpproxy for this I used FreeSWITCH with proxy-media, and while I don't believe it suffered from this particular issue, it caused other incompatibilities. My goal is to keep this system as light and unobtrusive as possible. Any suggestions you might have would be great.</div><div><br></div><div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><div>- Jeff</div><div>
<br></div></div></div>
<br><div class="gmail_quote">On Fri, Sep 12, 2014 at 3:22 AM, Răzvan Crainea <span dir="ltr"><<a href="mailto:razvan@opensips.org" target="_blank">razvan@opensips.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div><tt>Hi, Jeff!<br>
<br>
The main problem is that nor opensips neither rtpproxy can
differentiate between the first SDP streams and the second one.
The reason is that both OpenSIPS and RTPProxy only consider the
order the streams are in the SDP packet, and in your case, both
of them are first.<br>
Solving this on OpenSIPS side is quite challenging, since we
have to keep a state between the first SDP stream (remember it
is an audio session and mark it as stream no. 1) and when the
second SDP stream comes in, check whether it is a new one or not
(in your case determine it is a different one, T.38, and mark it
as stream no. 2). We will definitely not implement this in
OpenSIPS, since it is not the correct approach.<br>
Ideally each SDP should have an unique identifier that is passed
to RTPProxy by OpenSIPS, but unfortunately this is not supported
in RTPProxy.<br>
So with the current code, I can't see how your issue can be
solved. The only think you can do is add a bug report for both
projects, detailing the problem.<br>
<br>
Best regards,<br>
</tt>
<pre cols="72">Răzvan Crainea
OpenSIPS Solutions
<a href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a></pre><div><div class="h5">
On 09/12/2014 04:11 AM, Jeff Pyle wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div class="h5">
<div dir="ltr">
<div class="gmail_extra">
<div>
<div dir="ltr">
<div>List,</div>
<div><br>
</div>
<div>I was never able to truly solve this issue. Instead
I worked around it by preventing the ports from changing
between the G711 and the T38 sessions. Well, now I've
encountered situations I can't control. I need to ask
again if anyone has any thoughts on how to handle a
refused re-invite in rtpproxy when the proposed session
was going to use different RTP port numbers than the
existing one.</div>
<div><br>
</div>
<div>All the details are in the thread.</div>
<div><br>
</div>
<div>Thanks in advance for any suggestions.</div>
<div><br>
</div>
<div><br>
</div>
<div>- Jeff</div>
<div><br>
<br>
</div>
</div>
</div>
<br>
<div class="gmail_quote">On Thu, Feb 6, 2014 at 7:57 PM, Jeff
Pyle <span dir="ltr"><<a href="mailto:jpyle@fidelityvoice.com" target="_blank">jpyle@fidelityvoice.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">
<div class="gmail_extra">
<div>
<div dir="ltr">
<div>Just for grins I tried the engage_rtp_proxy()
approach instead. It has the same problem,
using the newly indicated ports on the old
session. This sounds like a bug to me.</div>
<span><font color="#888888">
<div><br>
</div>
<div><br>
</div>
<div>- Jeff</div>
<div><br>
</div>
</font></span></div>
</div>
<div>
<div><br>
<div class="gmail_quote">On Tue, Feb 4, 2014 at
10:06 AM, Jeff Pyle <span dir="ltr"><<a href="mailto:jpyle@fidelityvoice.com" target="_blank">jpyle@fidelityvoice.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">
<div>
<div dir="ltr">
<div>Hello,</div>
<div><br>
</div>
<div>This is on Opensips 1.10 and
rtpproxy 1.2.1. I have them
dual-homed on public and private
networks with rtpproxy in bridge mode.
Overall, things work well. I've
recently encountered a problem I don't
know how to solve relating to a T.38
reinvite that is rejected by the
public side. rtpproxy uses the new
ports in the T.38 SDP even though it
was rejected, effectively killing the
G.711 session that should be
maintained.</div>
<div><br>
</div>
<div>Here's a specific call flow. A
call comes in from the public side and
is routed to the private side, having
rtpproxy_offer run on it. The private
UA 10.1.30.219 answers the G.711 call
with this SDP in its 200 OK:</div>
<div><br>
</div>
</div>
</div>
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
<div>
<div>
<div>
<div>v=0.</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>o=userX 198 2 IN IP4
10.1.30.219.</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>s=-.</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>c=IN IP4 10.1.30.219.</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>t=0 0.</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>m=audio <b>50460</b> RTP/AVP
0.</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>a=ptime:20.</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>a=rtpmap:0 PCMU/8000.</div>
</div>
</div>
</div>
</blockquote>
<div>
<div dir="ltr">
<div><br>
</div>
<div>rtpproxy_answer happens on this;
the call establishes with two-way RTP
and all is well. A few moments later
the private UA re-invites to T.38 with
this SDP:</div>
<div><br>
</div>
</div>
</div>
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
<div>
<div>
<div>
<div>v=0.</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>o=userX 198 3 IN IP4
10.1.30.219.</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>s=-.</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>c=IN IP4 10.1.30.219.</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>t=0 0.</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>m=image <b>50462</b> udptl
t38.</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>a=T38FaxVersion:0.</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>a=T38MaxBitRate:14400.</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>a=T38FaxRateManagement:transferredTCF.</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>a=T38FaxMaxBuffer:262.</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>a=T38FaxMaxDatagram:176.</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>a=T38FaxUdpEC:t38UDPRedundancy.</div>
</div>
</div>
</div>
</blockquote>
<div>
<div dir="ltr">
<div><br>
</div>
<div>You'll notice the UA has changed
its port from 50460 to 50462.
rtpproxy_offer("frocl") is called on
this re-INVITE and rtpproxy redirects
the inbound RTP to <a href="http://10.1.30.219" target="_blank">10.1.30.219</a>:<b>50462</b>.</div>
<div><br>
</div>
<div>A few milliseconds later a 488
comes in from the public side. We're
left with our original G.711 session,
which is fine, but the RTP is now
going to 50462 instead of 50460 and
the UA doesn't see it.</div>
<div><br>
</div>
<div>I'm struggling with an
rtpproxy_offer/rtpproxy_answer
configuration to allow the session to
revert in the event the re-invite is
rejected like this. I've tried
rtpproxy_offer without the "l" lookup
flag - no effect. Any thoughts?</div>
<div><br>
</div>
<div>Another detail... I use
rtpproxy_offer/rtpproxy_answer to
manage mixed early and late
negotiation scenarios that
engage_rtp_proxy() cannot handle. The
automatic function isn't an option
unfortunately. </div>
<span><font color="#888888">
<div><br>
</div>
<div><br>
</div>
<div>- Jeff</div>
<div><br>
</div>
</font></span></div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div></div></div></div></blockquote></div></blockquote></div><br></div></div></div>