<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 17/08/16 20:26, Noah Mehl wrote:<br>
    </div>
    <blockquote
      cite="mid:3924429A-724D-4874-994A-1A14FEC4A051@gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      I discussed this with Alex Balashov off-line, and he answered my
      questions:
      <div class=""><br class="">
      </div>
      <div class="">
        <div>
          <blockquote type="cite" class="">
            <div class="">
              <div style="word-wrap: break-word; -webkit-nbsp-mode:
                space; -webkit-line-break: after-white-space;" class="">
                <div class=""><br class="">
                </div>
                <div class="">
                  <ol class="MailOutline">
                    <li class="">A flag of 3, I don’t understand.  I
                      read the <a moz-do-not-send="true"
href="http://kamailio.org/docs/modules/4.4.x/modules/nathelper.html#nathelper.f.nat_uac_test"
                        class="">documentation</a>, and there is a
                      1,2,4,8,etc…  So, I’m guessing that a flag of 3,
                      means 1+2?</li>
                  </ol>
                </div>
              </div>
            </div>
          </blockquote>
          <div><br class="">
          </div>
          <div>Yes, apparently this is a bit array: <a
              moz-do-not-send="true"
              href="https://en.wikipedia.org/wiki/Bit_array" class="">https://en.wikipedia.org/wiki/Bit_array</a> and
            a value of 3 = 1+2.</div>
          <br class="">
          <blockquote type="cite" class="">
            <div class="">
              <div style="word-wrap: break-word; -webkit-nbsp-mode:
                space; -webkit-line-break: after-white-space;" class="">
                <div class="">
                  <ol class="MailOutline" start="2">
                    <li class="">If #1 is true, then "the "received"
                      test is used: address in the “Via” header is
                      compared against source IP address of signaling”</li>
                    <ol class="">
                      <li class="">I don’t understand this test, as I’m
                        pretty sure that the 200OK that’s getting
                        re-written is properly constructed.  I guess I’m
                        trying to understand when one would want to use
                        this test?</li>
                    </ol>
                  </ol>
                </div>
              </div>
            </div>
          </blockquote>
          <div><br class="">
          </div>
          <div>Although we weren’t able to come up with an example for
            this test, it does not seem to apply to my environment.
             Updating the flag to 1 solves my issue.</div>
        </div>
      </div>
    </blockquote>
    This is when the sip message was sent from a.b.c.d and the Via
    header has x.y.z.w. if you get a pcap with the request, we can check
    and see if the test is true for it.<br>
    <br>
    On the other hand, you should use
    set_contact_alias()/handle_ruri_alias() instead of
    fix_nated_contact() (see how default kamailio.cfg does it) -- it is
    safer for such cases and avoids getting in troubles with devices
    that are strict in checking if the r-uri is the contact they set
    previously.<br>
    <br>
    Cheers,<br>
    Daniel<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://www.kamailio.org">http://www.kamailio.org</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>