<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Pasan,<br>
      <br>
      Please print via xlog the $si just before doing the
      is_ip_registered() check. Also, do an "opensipsctl ul show" after
      the registration and before the test call. I want to see the
      values that are internally compared.<br>
      <br>
      Thanks,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Summit 2018
  <a class="moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
    <div class="moz-cite-prefix">On 04/05/2018 01:31 PM, Pasan Meemaduma
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:1247812986.1952652.1522924283326@mail.yahoo.com">
      <div style="font-family:Helvetica Neue, Helvetica, Arial,
        sans-serif;font-size:16px;">
        <div>Hi Bogdan,</div>
        <div><br>
        </div>
        <div>I have log_level set at 9. I get no output just the xlog
          line that is right after is_ip_registered func.</div>
        <div>When the account is not registered (aor is not in ul) I get
          below,</div>
        <div><br>
        </div>
        <div><span>DBG:registrar:is_ip_registered: no contact found for
            aor=<0xx0x0x0xx></span><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>I'm stuck at why it doesn't give any debug message and
          simply return -1.</div>
        <div><br>
        </div>
        <div id="yahoo_quoted_3873350602" class="yahoo_quoted">
          <div style="font-family:'Helvetica Neue', Helvetica, Arial,
            sans-serif;font-size:13px;color:#26282a;">
            <div> On Thursday, April 5, 2018, 3:30:06 PM GMT+5:30,
              Bogdan-Andrei Iancu <a class="moz-txt-link-rfc2396E" href="mailto:bogdan@opensips.org"><bogdan@opensips.org></a> wrote: </div>
            <div><br>
            </div>
            <div><br>
            </div>
            <div>
              <div id="yiv7156198125">
                <div> <tt>Hi Pasan,<br clear="none">
                    <br clear="none">
                    The fix_actions log is only at the startup, before
                    opensips actually starts to handle traffic. Not
                    related I would say.<br clear="none">
                    <br clear="none">
                    Now, if you run in debug level (set log_level = 4),
                    do you see any output when the is_ip_registered() is
                    triggered ?<br clear="none">
                    <br clear="none">
                    Regards,<br clear="none">
                  </tt>
                  <pre class="yiv7156198125moz-signature">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a rel="nofollow" shape="rect" class="yiv7156198125moz-txt-link-freetext" target="_blank" href="http://www.opensips-solutions.com" moz-do-not-send="true">http://www.opensips-solutions.com</a>
OpenSIPS Summit 2018
  <a rel="nofollow" shape="rect" class="yiv7156198125moz-txt-link-freetext" target="_blank" href="http://www.opensips.org/events/Summit-2018Amsterdam" moz-do-not-send="true">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
                  <div class="yiv7156198125yqt5150986033"
                    id="yiv7156198125yqt83891">
                    <div class="yiv7156198125moz-cite-prefix">On
                      04/05/2018 12:30 PM, Pasan Meemaduma via Users
                      wrote:<br clear="none">
                    </div>
                    <blockquote type="cite">
                      <div style="font-family:Helvetica Neue, Helvetica,
                        Arial, sans-serif;font-size:16px;">
                        <div>Hi Guys,</div>
                        <div><br clear="none">
                        </div>
                        <div>Sorry I had to come back to this thread as
                          the issue i reported was for a different
                          function and problem with <span><span>is_ip_registered</span></span>
                          func still exists. on Further investigating I
                          found below<br clear="none">
                        </div>
                        <div><br clear="none">
                        </div>
                        <div><span> </span>
                          <p>DBG:core:fix_actions: fixing
                            is_ip_registered,
                            /etc/opensips/opensips.cfg:970</p>
                          <p>and following is whats at line 970 in my
                            config<br clear="none">
                            $var(aor) = "sip:" + $(au{s.escape.common})
                            + "@" + $(fd{s.escape.common});<br
                              clear="none">
if(is_ip_registered("location","$var(aor)","$si")){<br clear="none">
                            xlog("L_INFO","Call: Auth INVITE - From=$fU
                            from_uri=$fu Auth_user=$au Request=$rU
                            IP=$si AOR=$var(aor) ID=$ci");<br
                              clear="none">
                            } else {<br clear="none">
                            xlog("L_WARN","Call: Auth INVITE from
                            Unregistered IP - From=$fU from_uri=$fu
                            Auth_user=$au Request=$rU IP=$si
                            Via=$avp(vip) AOR=$var(aor) ID=$ci");<br
                              clear="none">
                            sl_send_reply("401", "Unauthorized");<br
                              clear="none">
                            exit;<br clear="none">
                            }<br clear="none">
                            Am I using the function in a wrong way ?
                            whats the fix_actions do to the function
                            call ?<br clear="none">
                            And when I make a test call I can't see
                            is_ip_registered func getting call in debug
                            log. It only prints my debug line which is
                            "Call: Auth INVITE from Unregistered IP -"</p>
                          <br clear="none">
                        </div>
                        <div><br clear="none">
                        </div>
                        <div><br clear="none">
                        </div>
                        <div class="yiv7156198125yahoo_quoted"
                          id="yiv7156198125yahoo_quoted_2945121261">
                          <div style="font-family:'Helvetica Neue',
                            Helvetica, Arial,
                            sans-serif;font-size:13px;color:#26282a;">
                            <div> On Wednesday, April 4, 2018, 4:15:11
                              PM GMT+5:30, Pasan Meemaduma <a
                                rel="nofollow" shape="rect"
                                class="yiv7156198125moz-txt-link-rfc2396E"
                                ymailto="mailto:pasandev@ymail.com"
                                target="_blank"
                                href="mailto:pasandev@ymail.com"
                                moz-do-not-send="true"><pasandev@ymail.com></a>
                              wrote: </div>
                            <div><br clear="none">
                            </div>
                            <div><br clear="none">
                            </div>
                            <div>
                              <div id="yiv7156198125">
                                <div>
                                  <div style="font-family:Helvetica
                                    Neue, Helvetica, Arial,
                                    sans-serif;font-size:16px;">
                                    <div>Thanks Liviu, I have submitted
                                      a bu<span></span>g request<br
                                        clear="none">
                                    </div>
                                    <div><br clear="none">
                                    </div>
                                    <div><br clear="none">
                                    </div>
                                    <div
                                      class="yiv7156198125yahoo_quoted"
id="yiv7156198125yahoo_quoted_2959194294">
                                      <div style="font-family:'Helvetica
                                        Neue', Helvetica, Arial,
                                        sans-serif;font-size:13px;color:#26282a;">
                                        <div
                                          class="yiv7156198125yqt7796149435"
                                          id="yiv7156198125yqt45489">
                                          <div> On Wednesday, April 4,
                                            2018, 4:07:45 PM GMT+5:30,
                                            Liviu Chircu <a
                                              rel="nofollow"
                                              shape="rect"
                                              class="yiv7156198125moz-txt-link-rfc2396E"
ymailto="mailto:liviu@opensips.org" target="_blank"
                                              href="mailto:liviu@opensips.org"
                                              moz-do-not-send="true"><liviu@opensips.org></a>
                                            wrote: </div>
                                          <div><br clear="none">
                                          </div>
                                          <div><br clear="none">
                                          </div>
                                          <div>
                                            <div id="yiv7156198125">
                                              <div>
                                                <p><tt>Hi Pasan,</tt></p>
                                                <p><tt>Yes, if you could
                                                    move it over to
                                                    GitHub [1], that
                                                    would be great.
                                                    Thanks!<br
                                                      clear="none">
                                                  </tt></p>
                                                <p><tt>[1]: <a
                                                      rel="nofollow"
                                                      shape="rect"
                                                      class="yiv7156198125moz-txt-link-freetext"
                                                      target="_blank"
                                                      href="https://github.com/OpenSIPS/opensips/issues"
moz-do-not-send="true">https://github.com/OpenSIPS/opensips/issues</a></tt><br
                                                    clear="none">
                                                </p>
                                                <pre class="yiv7156198125moz-signature">Liviu Chircu
OpenSIPS Developer
<a rel="nofollow" shape="rect" class="yiv7156198125moz-txt-link-freetext" target="_blank" href="http://www.opensips-solutions.com" moz-do-not-send="true">http://www.opensips-solutions.com</a></pre>
                                                <div
                                                  class="yiv7156198125yqt7939372314"
id="yiv7156198125yqt36361">
                                                  <div
                                                    class="yiv7156198125moz-cite-prefix">On
                                                    04.04.2018 13:29,
                                                    Pasan Meemaduma via
                                                    Users wrote:<br
                                                      clear="none">
                                                  </div>
                                                  <blockquote
                                                    type="cite">
                                                    <div
                                                      style="font-family:Helvetica
                                                      Neue, Helvetica,
                                                      Arial,
                                                      sans-serif;font-size:16px;">
                                                      <div>Hi Guys,</div>
                                                      <div><br
                                                          clear="none">
                                                      </div>
                                                      <div>Should I open
                                                        up a bug request
                                                        for this ?<br
                                                          clear="none">
                                                      </div>
                                                      <div><br
                                                          clear="none">
                                                      </div>
                                                      <div><br
                                                          clear="none">
                                                      </div>
                                                      <div
                                                        class="yiv7156198125yahoo_quoted"
id="yiv7156198125yahoo_quoted_2903066138">
                                                        <div
                                                          style="font-family:'Helvetica
                                                          Neue',
                                                          Helvetica,
                                                          Arial,
                                                          sans-serif;font-size:13px;color:#26282a;">
                                                          <div> On
                                                          Tuesday, April
                                                          3, 2018,
                                                          2:33:34 PM
                                                          GMT+5:30,
                                                          Pasan
                                                          Meemaduma via
                                                          Users <a
                                                          rel="nofollow"
                                                          shape="rect"
                                                          class="yiv7156198125moz-txt-link-rfc2396E"
ymailto="mailto:users@lists.opensips.org" target="_blank"
                                                          href="mailto:users@lists.opensips.org"
moz-do-not-send="true"><users@lists.opensips.org></a> wrote: </div>
                                                          <div><br
                                                          clear="none">
                                                          </div>
                                                          <div><br
                                                          clear="none">
                                                          </div>
                                                          <div>
                                                          <div
                                                          id="yiv7156198125">
                                                          <div>
                                                          <div
                                                          style="font-family:Helvetica
                                                          Neue,
                                                          Helvetica,
                                                          Arial,
                                                          sans-serif;font-size:16px;">
                                                          <div>Hi Guys,</div>
                                                          <div><br
                                                          clear="none">
                                                          </div>
                                                          <div>I'm
                                                          testing ipv6
                                                          on opensips
                                                          2.3. and I'm
                                                          using the
                                                          following
                                                          script
                                                          function to
                                                          findout if the
                                                          requesting ip
                                                          is already
                                                          registered
                                                          with that ip.</div>
                                                          <div>But the
                                                          function is
                                                          failing with
                                                          following
                                                          error message.</div>
                                                          <div><br
                                                          clear="none">
                                                          </div>
                                                          <div>script
                                                          function call</div>
                                                          <div><span>is_ip_registered("location","$var(aor)","$si"));</span></div>
                                                          <div><span><br
                                                          clear="none">
                                                          </span><br
                                                          clear="none">
                                                          </div>
                                                          <div>error
                                                          message from
                                                          logs.<br
                                                          clear="none">
                                                          </div>
                                                          <div><span><br
                                                          clear="none">
                                                          </span></div>
                                                          <div><span>ERROR:permissions:check_addr_6:
                                                          invalid ip set
<24xx:xxx:0:1:x000:0:0:2></span></div>
                                                          <div><br
                                                          clear="none">
                                                          </div>
                                                          <div>There's
                                                          an AOR already
                                                          with that IP</div>
                                                          <div><br
                                                          clear="none">
                                                          </div>
                                                          <div><span>0 [
                                                          3/04 18:53:29]
root@:/root>> opensipsctl ul show<br clear="none">
                                                          Domain::
                                                          location
                                                          table=512
                                                          records=1<br
                                                          clear="none">
                                                                  AOR::
                                                          0xxxx<br
                                                          clear="none">
                Contact:: sip: <span><span>0xxxx</span></span>@[24xx:xxx:0:1:x000::2];line=180c0d2da1b3e81
                                                          Q=<br
                                                          clear="none">
                        ContactID:: 3275524303981917232<br clear="none">
                        Expires:: 3495<br clear="none">
                        Callid:: 490179714<br clear="none">
                        Cseq:: 2<br clear="none">
                        User-agent:: Linphone/3.6.1 (eXosip2/4.1.0)<br
                                                          clear="none">
                        Received:: sip:[2400:xxx:0:1:x000:0:0:2]:5060<br
                                                          clear="none">
                        State:: CS_SYNC<br clear="none">
                        Flags:: 0<br clear="none">
                        Cflags:: PING NAT<br clear="none">
                        Socket:: udp:[24xx:xx0:1D:F0:0:0:1:88]:5060<br
                                                          clear="none">
                        Methods:: 4294967295<br clear="none">
                                                          <br
                                                          clear="none">
                                                          </span></div>
                                                          <div>It
                                                          appears to be
                                                          failing at <span>/modules/permissions/address.c
                                                          line 517 .
                                                          looks like <span><span
class="yiv7156198125ydp2c2d2970pl-c1">str2ip</span></span> in line 515
                                                          doesn't return
                                                          a valid ip.</span><br
                                                          clear="none">
                                                          </div>
                                                          </div>
                                                          </div>
                                                          </div>
_______________________________________________<br clear="none">
                                                          Users mailing
                                                          list<br
                                                          clear="none">
                                                          <a
                                                          rel="nofollow"
                                                          shape="rect"
                                                          ymailto="mailto:Users@lists.opensips.org"
target="_blank" href="mailto:Users@lists.opensips.org"
                                                          moz-do-not-send="true">Users@lists.opensips.org</a><br
                                                          clear="none">
                                                          <a
                                                          rel="nofollow"
                                                          shape="rect"
                                                          target="_blank"
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                                                          moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br
                                                          clear="none">
                                                          </div>
                                                        </div>
                                                      </div>
                                                    </div>
                                                    <br clear="none">
                                                    <fieldset
                                                      class="yiv7156198125mimeAttachmentHeader"></fieldset>
                                                    <br clear="none">
                                                    <pre>_______________________________________________
Users mailing list
<a rel="nofollow" shape="rect" class="yiv7156198125moz-txt-link-abbreviated" ymailto="mailto:Users@lists.opensips.org" target="_blank" href="mailto:Users@lists.opensips.org" moz-do-not-send="true">Users@lists.opensips.org</a>
<a rel="nofollow" shape="rect" class="yiv7156198125moz-txt-link-freetext" target="_blank" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                                                  </blockquote>
                                                </div>
                                                <br clear="none">
                                              </div>
                                            </div>
                                            <div
                                              class="yiv7156198125yqt7939372314"
                                              id="yiv7156198125yqt92387">_______________________________________________<br
                                                clear="none">
                                              Users mailing list<br
                                                clear="none">
                                              <a rel="nofollow"
                                                shape="rect"
                                                ymailto="mailto:Users@lists.opensips.org"
                                                target="_blank"
                                                href="mailto:Users@lists.opensips.org"
                                                moz-do-not-send="true">Users@lists.opensips.org</a><br
                                                clear="none">
                                              <a rel="nofollow"
                                                shape="rect"
                                                target="_blank"
                                                href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                                                moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br
                                                clear="none">
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                      <br clear="none">
                      <fieldset
                        class="yiv7156198125mimeAttachmentHeader"></fieldset>
                      <br clear="none">
                      <pre>_______________________________________________
Users mailing list
<a rel="nofollow" shape="rect" class="yiv7156198125moz-txt-link-abbreviated" ymailto="mailto:Users@lists.opensips.org" target="_blank" href="mailto:Users@lists.opensips.org" moz-do-not-send="true">Users@lists.opensips.org</a>
<a rel="nofollow" shape="rect" class="yiv7156198125moz-txt-link-freetext" target="_blank" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                    </blockquote>
                  </div>
                  <br clear="none">
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>