<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix"><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 class="moz-signature" cols="72">Răzvan Crainea
OpenSIPS Solutions
<a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
      On 09/12/2014 04:11 AM, Jeff Pyle wrote:<br>
    </div>
    <blockquote
cite="mid:CACYJG3LWfM6w4+sf6rRmEtC6Kw00b0sA2_43ASLMkXTXu8o7LQ@mail.gmail.com"
      type="cite">
      <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">&lt;<a moz-do-not-send="true"
                href="mailto:jpyle@fidelityvoice.com" target="_blank">jpyle@fidelityvoice.com</a>&gt;</span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc 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 class="HOEnZb"><font color="#888888">
                          <div><br>
                          </div>
                          <div><br>
                          </div>
                          <div>- Jeff</div>
                          <div><br>
                          </div>
                        </font></span></div>
                  </div>
                  <div>
                    <div class="h5"><br>
                      <div class="gmail_quote">On Tue, Feb 4, 2014 at
                        10:06 AM, Jeff Pyle <span dir="ltr">&lt;<a
                            moz-do-not-send="true"
                            href="mailto:jpyle@fidelityvoice.com"
                            target="_blank">jpyle@fidelityvoice.com</a>&gt;</span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          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
                                    moz-do-not-send="true"
                                    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>
          <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>