<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hello,<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 30.05.17 19:15, Albert Petit wrote:<br>
    </div>
    <blockquote
cite="mid:CADmx02npz7Z6PXFk5_sfOyDG4GA7FkSv1-=g0nhN+jb5skZ0wg@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi list,
        <div><br>
        </div>
        <div>We are using RTPProxy as media proxy. When doing a SIPcall
           we would need to know the final ports used by RTPProxy.</div>
        <div>Hence  I would need to access the rewritten SDP of the 200
          OK  send by our application server. </div>
        <div>Unfortunately we are not achieving to get that rewritten
          SDP.</div>
        <div><br>
        </div>
        <div>I tried calling sdp_print("1") using module  sdpops  just
          after calling rtpproxy_offer or rtpproxy_answer in kamailio
          script. (According the doc those methods do: "<span
            style="font-family:Helvetica,Arial;font-size:12px;text-align:justify">Rewrites</span><span
            class="inbox-inbox-Apple-converted-space"
            style="font-family:Helvetica,Arial;font-size:12px;text-align:justify"> </span><acronym
            class="inbox-inbox-acronym"
            style="font-family:Helvetica,Arial;font-size:12px;text-align:justify">SDP</acronym><span
            class="inbox-inbox-Apple-converted-space"
            style="font-family:Helvetica,Arial;font-size:12px;text-align:justify"> </span><span
style="font-family:Helvetica,Arial;font-size:12px;text-align:justify">body
            to ensure that media is passed through an</span><span
            class="inbox-inbox-Apple-converted-space"
            style="font-family:Helvetica,Arial;font-size:12px;text-align:justify"> </span><acronym
            class="inbox-inbox-acronym"
            style="font-family:Helvetica,Arial;font-size:12px;text-align:justify">RTP</acronym><span
            class="inbox-inbox-Apple-converted-space"
            style="font-family:Helvetica,Arial;font-size:12px;text-align:justify"> </span><span
style="font-family:Helvetica,Arial;font-size:12px;text-align:justify">proxy.
            To be invoked on INVITE for the cases the SDPs are in INVITE
            and 200 OK and on 200 OK when SDPs are in 200 OK and ACK".)</span></div>
        <br class="inbox-inbox-Apple-interchange-newline">
        <div>However the sdp we print just after calling that is still
          having the original ports set by the AS but not the ports used
          in the rtpproxy or that we will send to the client in the
          rewritten SDP </div>
        <div><br>
        </div>
        <div>What are we doing wrong? Any hint how we can get the
           rewritten SDP in the 200 OK answer we send to caller side?</div>
        <div><br>
        </div>
      </div>
    </blockquote>
    if you do the rtpproxy function in core reply_route{} block, then
    you can use msg_apply_changes().<br>
    <br>
    Alternative could be enabling the onsend_route for replies and
    looking there inside the $snd(buf).<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
  </body>
</html>