<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 Marco!<br>
        <br>
        As Patrick suggested, adding the a:sendonly line in RTP should
        instruct the caller not to send any RTP. However, if I remember
        correctly, I've seen legitimate clients that still send RTP.<br>
        On a different note, they are sending RTP to a media gateway,
        right? And most likely the B part will ignore all the RTP.<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 01/22/2015 02:50 PM, Patrick Wakano wrote:<br>
    </div>
    <blockquote
cite="mid:CAPu3kNXLddBkL+PqUjurZ_1+XBTFBG6KVXGGr39yaAXAjBCGiA@mail.gmail.com"
      type="cite">
      <div dir="ltr">Ok Marco,
        <div>Your concern is with hackers and not misuse! Really valid
          nowadays!</div>
        <div><br>
        </div>
        <div>Patrick </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Thu, Jan 22, 2015 at 8:32 AM, Marco
          Hierl <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:marco.hierl@mrnetgroup.com" target="_blank">marco.hierl@mrnetgroup.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 link="blue" vlink="purple" lang="DE">
              <div>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Hi
                    Patrik,</span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                    lang="EN-GB">thanks for this idea!</span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                    lang="EN-GB"> </span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                    lang="EN-GB">I did not say clear enough: I’m afraid
                    that anybody can cheat us. My intention is to assure
                    that our interconnection partners (or their
                    customers) do not have the possibility to make a
                    conversation without being charged. </span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                    lang="EN-GB">Sending the indication “a:sendonly”
                    only means, that the client is told not to send RTP,
                    but IF it send RTP anyway then the RTPproxy leads in
                    on to the callee. So, it is not in my hands then!</span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                    lang="EN-GB"> </span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                    lang="EN-GB">Best regards from Hamburg</span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                    lang="EN-GB">  Marco</span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                    lang="EN-GB"> </span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                    lang="EN-GB"> </span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                    lang="EN-GB"> </span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                    lang="EN-GB"> </span></p>
                <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">Von:</span></b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">
                    <a moz-do-not-send="true"
                      href="mailto:users-bounces@lists.opensips.org"
                      target="_blank">users-bounces@lists.opensips.org</a>
                    [mailto:<a moz-do-not-send="true"
                      href="mailto:users-bounces@lists.opensips.org"
                      target="_blank">users-bounces@lists.opensips.org</a>]
                    <b>Im Auftrag von </b>Patrick Wakano<br>
                    <b>Gesendet:</b> Donnerstag, 22. Januar 2015 11:16<span
                      class=""><br>
                      <b>An:</b> OpenSIPS users mailling list<br>
                    </span></span></p>
                <div>
                  <div class="h5"><b>Betreff:</b> Re: [OpenSIPS-Users]
                    rtpproxy sends rtp from caller to callee before
                    200OK</div>
                </div>
                <div>
                  <div class="h5">
                    <p class="MsoNormal"> </p>
                    <div>
                      <div>
                        <p class="MsoNormal">Have you tried to insert a
                          "a:sendonly" line in your SDP body when
                          sending it to the caller?<br>
                          If the client receives such line it should not
                          send media...</p>
                      </div>
                      <div>
                        <p class="MsoNormal">Then in the 200Ok you can
                          put an "a:sendrecv" line to establish full
                          media path!</p>
                      </div>
                      <div>
                        <p class="MsoNormal">It's just an idea, I'm not
                          sure if it will really work...</p>
                      </div>
                      <div>
                        <p class="MsoNormal"> </p>
                      </div>
                      <div>
                        <p class="MsoNormal">Patrick</p>
                      </div>
                      <div>
                        <p class="MsoNormal"> </p>
                      </div>
                    </div>
                    <div>
                      <p class="MsoNormal"> </p>
                      <div>
                        <p class="MsoNormal">On Thu, Jan 22, 2015 at
                          6:51 AM, Marco Hierl &lt;<a
                            moz-do-not-send="true"
                            href="mailto:marco.hierl@mrnetgroup.com"
                            target="_blank">marco.hierl@mrnetgroup.com</a>&gt;
                          wrote:</p>
                        <div>
                          <div>
                            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                lang="EN-GB">Hi Răzvan,</span></p>
                            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                lang="EN-GB"> </span></p>
                            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                lang="EN-GB">Ok, thanks for your answer!
                              </span></p>
                            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                lang="EN-GB">Unfortunately we are
                                offering „early media“ to our customers
                                (call center, radio station, and other
                                companies) and lots of them like to play
                                a free-of-charge announcement in the
                                beginning. But if we started to get
                                cheated, maybe we need to go for this
                                workaround.</span></p>
                            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                lang="EN-GB"> </span></p>
                            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                lang="EN-GB">But apart from that: Mostly
                                the SDP is NOT repeated in the 200OK.
                                Can I call rtpproxy_answer() when
                                receiving the 200OK anyway?</span></p>
                            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                lang="EN-GB"> </span></p>
                            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                lang="EN-GB">Thanks and best regards</span></p>
                            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                lang="EN-GB">  Marco</span></p>
                            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                lang="EN-GB"> </span></p>
                            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                lang="EN-GB"> </span></p>
                            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                lang="EN-GB"> </span></p>
                            <div>
                              <div style="border:none;border-top:solid
                                #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
                                <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"
                                      lang="EN-GB">Von:</span></b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"
                                    lang="EN-GB"> <a
                                      moz-do-not-send="true"
                                      href="mailto:users-bounces@lists.opensips.org"
                                      target="_blank">users-bounces@lists.opensips.org</a>
                                    [mailto:<a moz-do-not-send="true"
                                      href="mailto:users-bounces@lists.opensips.org"
                                      target="_blank">users-bounces@lists.opensips.org</a>]
                                    <b>Im Auftrag von </b>Razvan
                                    Crainea<br>
                                    <b>Gesendet:</b> Donners</span><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">tag,
                                    22. Januar 2015 09:36<br>
                                    <b>An:</b> <a
                                      moz-do-not-send="true"
                                      href="mailto:users@lists.opensips.org"
                                      target="_blank">users@lists.opensips.org</a><br>
                                    <b>Betreff:</b> Re: [OpenSIPS-Users]
                                    rtpproxy sends rtp from caller to
                                    callee before 200OK</span></p>
                              </div>
                            </div>
                            <div>
                              <div>
                                <p class="MsoNormal"> </p>
                                <div>
                                  <p class="MsoNormal"
                                    style="margin-bottom:12.0pt"><tt><span
                                        style="font-size:10.0pt">Hi,
                                        Marco!</span></tt><span
                                      style="font-size:10.0pt;font-family:&quot;Courier
                                      New&quot;"><br>
                                      <br>
                                      <tt>From RTPProxy point of view,
                                        you can't differentiate between
                                        SIP replies, because for all of
                                        them you call the same function
                                        - rtpproxy_answer().</tt><br>
                                      <tt>Now, if the client decides to
                                        send RTP for 183 (and indeed,
                                        I've seen this several times),
                                        there's not that much that you
                                        can do. Although it's kind of a
                                        hack, all I can think of is to
                                        not call rtpproxy_answer() for
                                        180/183 and strip the body to
                                        prevent the client from sending
                                        RTP directly to the callee.</tt><br>
                                      <tt>I hope this works for you.</tt><br>
                                      <br>
                                      <tt>Best regards,</tt></span></p>
                                  <pre>Răzvan Crainea</pre>
                                  <pre>OpenSIPS Solutions</pre>
                                  <pre><a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a></pre>
                                  <p class="MsoNormal">On 01/21/2015
                                    04:07 PM, Marco Hierl wrote:</p>
                                </div>
                                <blockquote
                                  style="margin-top:5.0pt;margin-bottom:5.0pt">
                                  <div>
                                    <div>
                                      <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                          lang="EN-GB">Dear all,</span></p>
                                      <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                          lang="EN-GB"> </span></p>
                                      <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                          lang="EN-GB">first of all I
                                          need to apologize that I was
                                          not able to find information
                                          about this issue although I’m
                                          sure that I’m not the first
                                          one complaining!</span></p>
                                      <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                          lang="EN-GB"> </span></p>
                                      <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                          lang="EN-GB">The caller is
                                          sending an INVITE via OpenSIPS
                                          and rtpproxy_offer() is
                                          executed, callee answers with
                                          REPLY 180 or REPLY 183 (with
                                          SDP) and rtpproxy_answer() is
                                          made. In this status it should
                                          be ok that the rtp stream from
                                          callee to caller is
                                          transferred via the rtpproxy
                                          (e.g. for announcements), but
                                          I can see that rtp stream from
                                          caller to callee is
                                          transferred too!!! This means
                                          that there can be a
                                          conversation without receiving
                                          the 200OK and what is the real
                                          problem: that means (at least
                                          for me) they can talk to each
                                          other without any charging !!
                                          A timer will stop the
                                          conversion after the a while,
                                          but this can take time.</span></p>
                                      <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                          lang="EN-GB"> </span></p>
                                      <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                          lang="EN-GB">How can I
                                          overcome this problem? How can
                                          prevent RTP to be send to the
                                          callee before REPLY 200 is
                                          received?</span></p>
                                      <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                          lang="EN-GB"> </span></p>
                                      <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                          lang="EN-GB">I can’t find any
                                          help in the RTPproxy protocol
                                          <a moz-do-not-send="true"
                                            href="http://www.b2bua.org/wiki/RTPproxy/Protocol"
                                            target="_blank">http://www.b2bua.org/wiki/RTPproxy/Protocol</a>,
                                          nor in the rtpproxy module
                                          description in OpenSIPS.</span></p>
                                      <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                          lang="EN-GB"> </span></p>
                                      <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                          lang="EN-GB">Thanks for your
                                          ideas, and best regards</span></p>
                                      <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"
                                          lang="EN-GB">  Marco</span></p>
                                      <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span></p>
                                    </div>
                                  </div>
                                  <p class="MsoNormal"
                                    style="margin-bottom:12.0pt"><br>
                                    <br>
                                  </p>
                                  <pre>_______________________________________________</pre>
                                  <pre>Users mailing list</pre>
                                  <pre><a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a></pre>
                                  <pre><a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></pre>
                                </blockquote>
                                <p class="MsoNormal"> </p>
                              </div>
                            </div>
                          </div>
                        </div>
                        <p class="MsoNormal"
                          style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
                          Users mailing list<br>
                          <a moz-do-not-send="true"
                            href="mailto:Users@lists.opensips.org"
                            target="_blank">Users@lists.opensips.org</a><br>
                          <a moz-do-not-send="true"
                            href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                            target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></p>
                      </div>
                      <p class="MsoNormal"> </p>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            Users mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
              target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </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>