<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    you should use search_body(...) from textops module for searching
    the private IP in the body.<br>
    <br>
    Cheers,<br>
    Daniel <br>
    <br>
    <div class="moz-cite-prefix">On 14/07/14 13:27, Anurag Mishra wrote:<br>
    </div>
    <blockquote
cite="mid:CACGrPngHbop_5VAh_UX=GPs3p1Rw6zDkf4TcPEOUiUVtJxkB-A@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>Hi All,<br>
          <br>
          I have been struggling with this issue for a long and could
          not find a way to solve it. I have setup FreeSWITCH and
          Kamailio on the single server but on a private server with a
          private IP and fronted by firewall. Firewall has all the ports
          opened.<br>
          <br>
          FreeSWITCH is running with nonat. Kamailio has public IP
          advertised on port 5060 and private IP on 5070 for phones on
          LAN. Problem is with outbound calls there is no audio and
          reason I can see is contact field in SDP has the private IP of
          the server instead of the public IP.<br>
          <br>
        </div>
        Internal device to device calls is working fine. I have tried to
        rewrite the SDP and have written below code, but got no success:<br>
        <br>
        <blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px
          solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
          request_route<br>
          {<br>
                  xlog("L_DBG", "Request Route Enter");<br>
                  if (is_method("INVITE"))<br>
                  {<br>
                          xlog("L_DBG", "Request Route Enter in
          Invite");<br>
                          if (has_body("application/sdp"))<br>
                          {<br>
                                  xlog("L_DBG", "Request Route Enter in
          SDP of Invite");<br>
                                  if (search("IN IP4 PRIVATE_IP"))<br>
                                  {<br>
                                          xlog("L_DBG", "Request Route
          Search IN IP4 PRIVATE_IP");<br>
                                          fix_nated_sdp("8",
          "PUBLIC_IP");<br>
                                          fix_nated_sdp("2",
          "PUBLIC_IP");<br>
                                  }<br>
                          }<br>
                  }<br>
          }<br>
        </blockquote>
        <div><br>
        </div>
        <div>Can anyone help me to get rid of this.<br>
          <br>
        </div>
        <div>Thanks,<br>
        </div>
        <div>Anurag Mishra<br>
        </div>
      </div>
      <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>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
  </body>
</html>