<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi James,<br>
    <br>
    thanks a lot for the feedback.<br>
    <br>
    The log you added does not show anything wrong - the path fields may
    be missing and the so called contact part (returned by usrloc) is
    either the received URI (if present), either the contact URI (if not
    received URI).<br>
    <br>
    What looks scary are the trailing chars for the URI....but the
    question is if the bogus contact happens because it get bogus when
    returned by usrloc (by get_all_mem_contacts) function or because the
    received URI was bogusly saved in ursloc from the beginning via the
    fix_nated_registered() function<br>
    <br>
    Regards,<br>
    Bogdan<br>
    <br>
    <br>
    On 07/01/2011 05:58 PM, James Lamanna wrote:
    <blockquote
      cite="mid:BANLkTik187fb4FxpVCviC-fxkY-_dNnPqg@mail.gmail.com"
      type="cite">Hi Bogdan,
      <div>Unfortunately I've found that it doesn't fix the entire
        problem.</div>
      <div>I have a contact now that is online, that still isn't getting
        pinged for some reason.</div>
      <div>I think there's something subtle in get_all_mem_contacts in
        dlist.c.</div>
      <div><br>
      </div>
      <div>I haven't tried to see if this problem still manifests itself
        if the usrloc mode is DBONLY (its a production server).</div>
      <div><br>
      </div>
      <div>But as an example, I have this contact online (from
        opensipsctl ul show):</div>
      <div><br>
      </div>
      <div>
        <div><span class="Apple-tab-span" style="white-space: pre;"> </span>AOR::
          22505</div>
        <div><span class="Apple-tab-span" style="white-space: pre;"> </span>Contact::
          <a moz-do-not-send="true"
            href="http://sip:22505@192.168.1.117:7945">sip:22505@192.168.1.117:7945</a>
          Q=</div>
        <div><span class="Apple-tab-span" style="white-space: pre;"> </span>Expires::
          1401</div>
        <div><span class="Apple-tab-span" style="white-space: pre;"> </span>Callid::
          <a moz-do-not-send="true"
            href="mailto:c3bfd2f5-50aff633@192.168.1.117">c3bfd2f5-50aff633@192.168.1.117</a></div>
        <div><span class="Apple-tab-span" style="white-space: pre;"> </span>Cseq::
          63708</div>
        <div><span class="Apple-tab-span" style="white-space: pre;"> </span>User-agent::
          Linksys/SPA962-6.1.3(a)-000e08d21b47</div>
        <div><span class="Apple-tab-span" style="white-space: pre;"> </span>Received::
          <a class="moz-txt-link-freetext" href="sip:x.x.x.x.:1024">sip:x.x.x.x.:1024</a></div>
        <div><span class="Apple-tab-span" style="white-space: pre;"> </span>State::
          CS_SYNC</div>
        <div><span class="Apple-tab-span" style="white-space: pre;"> </span>Flags::
          0</div>
        <div><span class="Apple-tab-span" style="white-space: pre;"> </span>Cflag::
          192</div>
        <div><span class="Apple-tab-span" style="white-space: pre;"> </span>Socket::
          udp:opensips.ip:5060</div>
        <div><span class="Apple-tab-span" style="white-space: pre;"> </span>Methods::
          5183</div>
        <div><br>
        </div>
        <div>I've added a print in nathelper.c:</div>
        <div><br>
        </div>
        <div>
          <div>
            <div>@@ -3648,8 +3650,11 @@</div>
            <div>&nbsp;<span class="Apple-tab-span" style="white-space: pre;">
              </span>continue;</div>
            <div>&nbsp;<span class="Apple-tab-span" style="white-space: pre;">
              </span>}</div>
            <div>
              &nbsp;<span class="Apple-tab-span" style="white-space: pre;"> </span>}</div>
            <div>-<span class="Apple-tab-span" style="white-space: pre;">
              </span>if (curi.proto != PROTO_UDP &amp;&amp; curi.proto
              != PROTO_NONE)</div>
            <div>+<span class="Apple-tab-span" style="white-space: pre;">
              </span>LM_INFO("pinging contact: %*s %*s\n", path.len,
              path.s, c.len, c.s);</div>
            <div>+<span class="Apple-tab-span" style="white-space: pre;">
              </span>if (curi.proto != PROTO_UDP &amp;&amp; curi.proto
              != PROTO_NONE) {</div>
            <div>+<span class="Apple-tab-span" style="white-space: pre;">
              </span>LM_ERR("dumping contact: %*s %*s\n", path.len,
              path.s, c.len, c.s);</div>
            <div>&nbsp;<span class="Apple-tab-span" style="white-space: pre;">
              </span>continue;</div>
            <div>+<span class="Apple-tab-span" style="white-space: pre;">
              </span>}</div>
            <div>&nbsp;<span class="Apple-tab-span" style="white-space: pre;">
              </span>if (curi.port_no == 0)</div>
            <div>&nbsp;<span class="Apple-tab-span" style="white-space: pre;">
              </span>curi.port_no = SIP_PORT;</div>
            <div>&nbsp;<span class="Apple-tab-span" style="white-space: pre;">
              </span>proto = curi.proto;</div>
          </div>
        </div>
        <div><br>
        </div>
        <div>
          I see these prints for a while for this contact:</div>
        <div>
          <div>Jun 30 12:30:53 frontend1 /usr/local/sbin/opensips[7087]:
            INFO:nathelper:nh_timer: pinging contact: (null) sip:<a
              moz-do-not-send="true"
              href="http://208.90.185.166:7945??z">208.90.185.166:7945??z</a></div>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>And then it just stops.</div>
        <div>Restarting Opensips doesn't bring it back either.</div>
        <div><br>
        </div>
        <div>unfortunately I haven't had time to digest the code in
          dlist.c to figure out what is actually going on in there with
          the 2 indices.</div>
        <div><br>
        </div>
        <div>Thanks.</div>
        <div><br>
        </div>
        <div>-- James</div>
        <div><br>
        </div>
        <br>
        <div class="gmail_quote">On Fri, Jul 1, 2011 at 7:29 AM,
          Bogdan-Andrei Iancu <span dir="ltr">&lt;<a
              moz-do-not-send="true" href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
            0.8ex; border-left: 1px solid rgb(204, 204, 204);
            padding-left: 1ex;">Hi Andrew,<br>
            <br>
            Thanks God for mentioning this - the initial report from
            James missed me, and I was not aware of the bug and the fix
            - I just fixed it right now on the SVN trunk and 1.6<br>
            <br>
            Thanks and regards,<br>
            Bogdan
            <div class="im"><br>
              <br>
              On 07/01/2011 06:45 AM, Andrew Pogrebennyk wrote:<br>
              <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
                0.8ex; border-left: 1px solid rgb(204, 204, 204);
                padding-left: 1ex;">
                James,<br>
                <br>
                On 01.07.2011 06:42, James Lamanna wrote:<br>
                <blockquote class="gmail_quote" style="margin: 0pt 0pt
                  0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204);
                  padding-left: 1ex;">
                  Hi,<br>
                  I've noticed after a period of time, Nathelper will
                  stop sending pings to some contacts.<br>
                  I've verified that the contact is still registered (it
                  is even in the location table) but the ping process
                  appears to skip some contacts for unknown reasons.<br>
                </blockquote>
                <br>
                maybe see if this fixes the problem for you:<br>
                <a moz-do-not-send="true"
href="http://www.mail-archive.com/users@lists.opensips.org/msg16200.html"
                  target="_blank">http://www.mail-archive.com/users@lists.opensips.org/msg16200.html</a><br>
                ?<br>
                <br>
                <blockquote class="gmail_quote" style="margin: 0pt 0pt
                  0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204);
                  padding-left: 1ex;">
                  Could someone please look into this? I have phones
                  behind NAT that stop being able to receive calls
                  because firewalls close down the UDP mapping<br>
                  since this feature is not working properly.<br>
                </blockquote>
              </blockquote>
              -- <br>
            </div>
            <font color="#888888">
              Bogdan-Andrei Iancu<br>
              OpenSIPS solutions and "know-how"</font>
            <div>
              <div class="h5"><br>
                <br>
                <br>
                _______________________________________________<br>
                Users mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
                <a moz-do-not-send="true"
                  href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                  target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 2nd of May 2011
OpenSIPS solutions and "know-how"</pre>
  </body>
</html>