<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Andrew<br>
      There is a condition in the NATMANAGE route which tests whether or
      not to apply rtpproxy_manage() :<br>
      <blockquote>
        <pre>if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB)))
                return;
</pre>
      </blockquote>
      One way to force this is to make sure that FLT_NATS is always
      set.  That can be done in the NATDETECT route by moving
      setflag(FLT_NATS) outside of the if(nat_uac_test) condition and
      putting it just before the return statement, so the flag is always
      set.<br>
      <br>
      Another way would be to remove or comment out the if
      "!(isflagset(FLT_NATS) || isbflagset(FLB_NATB))) return;" line
      from NATMANAGE so that the the rtp_manage() is always called.<br>
      <br>
      It might be worth your while upgrading to the 4.2 branch which has
      renamed the rtpproxy-ng module to rtpengine and made the options
      in the call to rtpengine_manage() more readable.<br>
      <br>
      Depending on why you always want to run the rtp proxy ... you
      might also want to set :<br>
      <pre>    rtpengine_manage(replace-session-sonnection replace-origin ICE=force-relay) </pre>
      to ensure that media always goes through your media proxy and no
      other connections are negotiated between the endpoints.<br>
      <pre class="moz-signature" cols="72">


</pre>
      On 13/10/14 08:36, andrew wrote:<br>
    </div>
    <blockquote
      cite="mid:7eec2d1b.eadf.1490870489a.Coremail.androidappaccount@163.com"
      type="cite">
      <div
        style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial">
        <div>hi,</div>
        <div><br>
        </div>
        <div>kamailio 4.1.5 is used with rtpengine, whose older
          counterpart is rtpproxy-ng. I made some changes based on the
          default configuration files(i.e. kamailio.cfg), so that
          rtpproxy-ng module is enabled. Kamailio.cfg has been uploaded.
          In kamailio.cfg, there is one route block related to rtpproxy,
          i.e. route[NATMANAGE], where rtpproxy_manage("co") is called.
          Sometimes, rtpproxy-ng can insert new ip:port candidates in
          SDP. But in some case, rtpproxy-ng doesn't rewrite SDP, so
          rtpengine doesn't relay rtp packets at all.</div>
        <div><br>
        </div>
        <div>How to setup kamailio.cfg, so that rtpproxy-ng moudle can
          always rewritten new ip:port candidates, and rtpengine always
          relays rtp packets?</div>
        <div><br>
        </div>
        <div>Looking foreward to your reply. Thanks!</div>
        <div><br>
        </div>
        <div>B.R.</div>
        <div><br>
        </div>
        <div>Andrew</div>
      </div>
      <br>
      <br>
      <span title="neteasefooter"><span id="netease_mail_footer"></span></span><br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>