<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Normally if you are in bridge mode you will use the "ie" flags which
    i dont see please can you post how you start rtpproxy.<br>
    <br>
    Regards<br>
    Trevor Steyn<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 01/10/2015 08:47, Raistlin Majere
      wrote:<br>
    </div>
    <blockquote
cite="mid:CALtNU-3xHLY8GHRNJPz_SY35os9Zr0JMr-WZ3GL_DPJfd=zhvA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>Hi again,<br>
          <br>
        </div>
        Well I have read a bit more about the modes and yes, we use
        brigde mode as OpenSIPS is behind both sides of the NAT not only
        on the WAN side,  OpenSIPs is within the firewall,<br>
        <div class="gmail_extra"><br>
        </div>
        <div class="gmail_extra">So basically the engage_rtp_proxy is
          not a good idea.<br>
          <br>
          <div>
            <div>route[1] {</div>
            <div><span style="white-space:pre-wrap"> </span>if(!cache_fetch("local",
              "outerip_$var(destinationIp)", $avp(outerIp))) {</div>
            <div><span style="white-space:pre-wrap"> </span>get_outer_ip("$var(destinationIp)",
              "$avp(outerIp)");</div>
            <div><span style="white-space:pre-wrap"> </span>cache_store("local",
              "outerip_$var(destinationIp)", "$avp(outerIp)", 10);</div>
            <div><span style="white-space:pre-wrap"> </span>}</div>
            <div><br>
            </div>
            <div><span style="white-space:pre-wrap"> </span>$fs =
              $proto + ":" + $avp(outerIp);</div>
            <div><br>
            </div>
            <div><span style="white-space:pre-wrap"> </span>if
              (is_method("BYE|CANCEL")) {</div>
            <div><span style="white-space:pre-wrap"> </span>unforce_rtp_proxy();</div>
            <div><span style="white-space:pre-wrap"> </span>} else if
              (is_method("INVITE")){</div>
            <span class="im">
              <div><span style="white-space:pre-wrap"> </span>if
                (has_body("application/sdp")) {</div>
              <div><span style="white-space:pre-wrap"> </span>$var(trustconnectionip)
                = "%TRUSTCONNECTIONIP%";</div>
              <div><span style="white-space:pre-wrap"> </span>$var(ciptrusted)
                = "no";</div>
              <div><span style="white-space:pre-wrap"> </span>if
                ($var(trustconnectionip)=="yes") {</div>
              <div><span style="white-space:pre-wrap"> </span>$var(ciptrusted)
                = "yes";</div>
              <div><span style="white-space:pre-wrap"> </span>} else if
                ($var(trustconnectionip)=="auto") {</div>
              <div><span style="white-space:pre-wrap"> </span>$var(sdpc)
                = $(rb{sdp.line,c}{s.substr,9,0});</div>
              <div><span style="white-space:pre-wrap"> </span>if($td ==
                $fd &amp;&amp; $td != $var(sdpc)) {</div>
              <div><span style="white-space:pre-wrap"> </span>$var(ciptrusted)
                = "yes";</div>
              <div><span style="white-space:pre-wrap"> </span>}</div>
              <div><span style="white-space:pre-wrap"> </span>}</div>
              <div><span style="white-space:pre-wrap"> </span>if
                ($var(ciptrusted)=="yes") {</div>
              <div><span style="white-space:pre-wrap"> </span>rtpproxy_offer("focnr");</div>
              <div><span style="white-space:pre-wrap"> </span>} else {</div>
              <div><span style="white-space:pre-wrap"> </span>rtpproxy_offer("focn");</div>
              <div><span style="white-space:pre-wrap"> </span></div>
              <div><span style="white-space:pre-wrap"> </span>}</div>
              <div><span style="white-space:pre-wrap"> </span>}</div>
              <div><span style="white-space:pre-wrap"> </span>}</div>
              <div><br>
              </div>
            </span>
            <div><span style="white-space:pre-wrap"> </span># Prevent
              $var(destinationPort) from getting default port number
              5060 for TLS if no port specified in R-URI.</div>
            <div><span style="white-space:pre-wrap"> </span>if($(ru{uri.port})==""
              &amp;&amp; $proto=="tls" &amp;&amp;
              $var(destinationPort)=="5060") {</div>
            <div><span style="white-space:pre-wrap"> </span>$var(destinationPort)
              = 5061;</div>
            <div><span style="white-space:pre-wrap"> </span>}</div>
            <div><br>
            </div>
            <div><span style="white-space:pre-wrap"> </span># force the
              transport protocol to the same one the client used</div>
            <div><span style="white-space:pre-wrap"> </span>$du =
"sip:"+$var(destinationIp)+":"+$var(destinationPort)+";transport="+$proto;</div>
            <div><br>
            </div>
            <div><span style="white-space:pre-wrap"> </span>t_on_reply("1");</div>
            <div><br>
            </div>
            <div><span style="white-space:pre-wrap"> </span># for
              INVITEs enable some additional helper routes</div>
            <div><span style="white-space:pre-wrap"> </span>if
              (is_method("INVITE")) {</div>
            <div><span style="white-space:pre-wrap"> </span>t_on_failure("1");</div>
            <div><span style="white-space:pre-wrap"> </span>}</div>
            <div><br>
            </div>
            <div><span style="white-space:pre-wrap"> </span>if
              (!t_relay()) {</div>
            <div><span style="white-space:pre-wrap"> </span>xlog("L_INFO",
              "Relay error");</div>
            <div><span style="white-space:pre-wrap"> </span>sl_reply_error();</div>
            <div><span style="white-space:pre-wrap"> </span>}</div>
            <div><span style="white-space:pre-wrap"> </span>exit;</div>
            <div>}</div>
          </div>
          <div><br>
          </div>
          <div>The route[1] is set in the main route under this
            conditions</div>
          <div><br>
          </div>
          <div>
            <div>if (has_totag()) {</div>
            <div><span style="white-space:pre-wrap"> </span>#
              sequential request within a dialog should</div>
            <div><span style="white-space:pre-wrap"> </span># take the
              path determined by record-routing</div>
            <div><span style="white-space:pre-wrap"> </span>if
              (loose_route()) {</div>
            <div><span style="white-space:pre-wrap"> </span>$var(destinationIp)
              = $avp(requestIp);</div>
            <div><span style="white-space:pre-wrap"> </span>$var(destinationPort)
              = $rp;</div>
            <div><br>
            </div>
            <div><span style="white-space:pre-wrap"> </span>if
              (is_method("INVITE")) {</div>
            <div><span style="white-space:pre-wrap"> </span># even if
              in most of the cases is useless, do RR for</div>
            <div><span style="white-space:pre-wrap"> </span>#
              re-INVITEs alos, as some buggy clients do change route set</div>
            <div><span style="white-space:pre-wrap"> </span># during
              the dialog.</div>
            <div><span style="white-space:pre-wrap"> </span>record_route();</div>
            <div><span style="white-space:pre-wrap"> </span>}</div>
            <div><span style="white-space:pre-wrap"> </span># route it
              out to whatever destination was set by loose_route()</div>
            <div><span style="white-space:pre-wrap"> </span># in $du
              (destination URI).</div>
            <div><span style="white-space:pre-wrap"> </span>route(1);</div>
          </div>
          <div>...</div>
          <div>       exit;</div>
          <div>}</div>
          <div>....</div>
          <div><br>
          </div>
          <div>And if there is no REGISTER, PUBLISH, CANCEL</div>
          <div><br>
          </div>
          <div>route(1);</div>
          <div>}</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>