<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi Pasan,<br>
      <br>
      Thanks for the info. It is exactly what I suspected - the check
      between the IP extracted from contact / received field and the
      provided IP is done as strings and the enclosing of IPv6 makes the
      comp to fail. I guess this needs to be rework to do ip comp, not
      string comp.<br>
      <br>
      Best regards,<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/06/2018 05:20 AM, Pasan Meemaduma
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:1580052040.2302315.1522981200894@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 sent the requested details in pm.</div>
        <div><br>
        </div>
        <div>Thank you.<br>
        </div>
        <div><br>
        </div>
        <div id="ydpf4d16519yahoo_quoted_3248390248"
          class="ydpf4d16519yahoo_quoted">
          <div style="font-family:'Helvetica Neue', Helvetica, Arial,
            sans-serif;font-size:13px;color:#26282a;">
            <div> On Thursday, April 5, 2018, 5:33:50 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="ydpf4d16519yiv6363013759">
                <div> <tt>Pasan,<br clear="none">
                    <br clear="none">
                    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 clear="none">
                    <br clear="none">
                    Thanks,<br clear="none">
                  </tt>
                  <pre class="ydpf4d16519yiv6363013759moz-signature">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a shape="rect" class="ydpf4d16519yiv6363013759moz-txt-link-freetext" href="http://www.opensips-solutions.com" rel="nofollow" target="_blank" moz-do-not-send="true">http://www.opensips-solutions.com</a>
OpenSIPS Summit 2018
  <a shape="rect" class="ydpf4d16519yiv6363013759moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam" rel="nofollow" target="_blank" moz-do-not-send="true">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
                  <div class="ydpf4d16519yiv6363013759yqt3403483008"
                    id="ydpf4d16519yiv6363013759yqt53801">
                    <div class="ydpf4d16519yiv6363013759moz-cite-prefix">On
                      04/05/2018 01:31 PM, Pasan Meemaduma wrote:<br
                        clear="none">
                    </div>
                    <blockquote type="cite">
                      <div style="font-family:Helvetica Neue, Helvetica,
                        Arial, sans-serif;font-size:16px;">
                        <div>Hi Bogdan,</div>
                        <div><br clear="none">
                        </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 clear="none">
                        </div>
                        <div><span>DBG:registrar:is_ip_registered: no
                            contact found for aor=<0xx0x0x0xx></span><br
                            clear="none">
                        </div>
                        <div><br clear="none">
                        </div>
                        <div><br clear="none">
                        </div>
                        <div>I'm stuck at why it doesn't give any debug
                          message and simply return -1.</div>
                        <div><br clear="none">
                        </div>
                        <div
                          class="ydpf4d16519yiv6363013759yahoo_quoted"
                          id="ydpf4d16519yiv6363013759yahoo_quoted_3873350602">
                          <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
                                shape="rect"
                                class="ydpf4d16519yiv6363013759moz-txt-link-rfc2396E"
                                href="mailto:bogdan@opensips.org"
                                rel="nofollow" target="_blank"
                                moz-do-not-send="true"><bogdan@opensips.org></a>
                              wrote: </div>
                            <div><br clear="none">
                            </div>
                            <div><br clear="none">
                            </div>
                            <div>
                              <div id="ydpf4d16519yiv6363013759">
                                <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="ydpf4d16519yiv6363013759moz-signature">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a shape="rect" class="ydpf4d16519yiv6363013759moz-txt-link-freetext" href="http://www.opensips-solutions.com" rel="nofollow" target="_blank" moz-do-not-send="true">http://www.opensips-solutions.com</a>
OpenSIPS Summit 2018
  <a shape="rect" class="ydpf4d16519yiv6363013759moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam" rel="nofollow" target="_blank" moz-do-not-send="true">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
                                  <div
                                    class="ydpf4d16519yiv6363013759yqt5150986033"
id="ydpf4d16519yiv6363013759yqt83891">
                                    <div
                                      class="ydpf4d16519yiv6363013759moz-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="ydpf4d16519yiv6363013759yahoo_quoted"
id="ydpf4d16519yiv6363013759yahoo_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
                                                shape="rect"
                                                class="ydpf4d16519yiv6363013759moz-txt-link-rfc2396E"
href="mailto:pasandev@ymail.com" rel="nofollow" target="_blank"
                                                moz-do-not-send="true"><pasandev@ymail.com></a>
                                              wrote: </div>
                                            <div><br clear="none">
                                            </div>
                                            <div><br clear="none">
                                            </div>
                                            <div>
                                              <div
                                                id="ydpf4d16519yiv6363013759">
                                                <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="ydpf4d16519yiv6363013759yahoo_quoted"
id="ydpf4d16519yiv6363013759yahoo_quoted_2959194294">
                                                      <div
                                                        style="font-family:'Helvetica
                                                        Neue',
                                                        Helvetica,
                                                        Arial,
                                                        sans-serif;font-size:13px;color:#26282a;">
                                                        <div
                                                          class="ydpf4d16519yiv6363013759yqt7796149435"
id="ydpf4d16519yiv6363013759yqt45489">
                                                          <div> On
                                                          Wednesday,
                                                          April 4, 2018,
                                                          4:07:45 PM
                                                          GMT+5:30,
                                                          Liviu Chircu <a
                                                          shape="rect"
                                                          class="ydpf4d16519yiv6363013759moz-txt-link-rfc2396E"
href="mailto:liviu@opensips.org" rel="nofollow" target="_blank"
                                                          moz-do-not-send="true"><liviu@opensips.org></a>
                                                          wrote: </div>
                                                          <div><br
                                                          clear="none">
                                                          </div>
                                                          <div><br
                                                          clear="none">
                                                          </div>
                                                          <div>
                                                          <div
                                                          id="ydpf4d16519yiv6363013759">
                                                          <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
                                                          shape="rect"
                                                          class="ydpf4d16519yiv6363013759moz-txt-link-freetext"
href="https://github.com/OpenSIPS/opensips/issues" rel="nofollow"
                                                          target="_blank"
moz-do-not-send="true">https://github.com/OpenSIPS/opensips/issues</a></tt><br
                                                          clear="none">
                                                          </p>
                                                          <pre class="ydpf4d16519yiv6363013759moz-signature">Liviu Chircu
OpenSIPS Developer
<a shape="rect" class="ydpf4d16519yiv6363013759moz-txt-link-freetext" href="http://www.opensips-solutions.com" rel="nofollow" target="_blank" moz-do-not-send="true">http://www.opensips-solutions.com</a></pre>
                                                          <div
                                                          class="ydpf4d16519yiv6363013759yqt7939372314"
id="ydpf4d16519yiv6363013759yqt36361">
                                                          <div
                                                          class="ydpf4d16519yiv6363013759moz-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="ydpf4d16519yiv6363013759yahoo_quoted"
id="ydpf4d16519yiv6363013759yahoo_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
                                                          shape="rect"
                                                          class="ydpf4d16519yiv6363013759moz-txt-link-rfc2396E"
href="mailto:users@lists.opensips.org" rel="nofollow" target="_blank"
                                                          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="ydpf4d16519yiv6363013759">
                                                          <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="ydpf4d16519yiv6363013759ydp2c2d2970pl-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
                                                          shape="rect"
                                                          href="mailto:Users@lists.opensips.org"
                                                          rel="nofollow"
target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a><br
                                                          clear="none">
                                                          <a
                                                          shape="rect"
                                                          href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                                                          rel="nofollow"
target="_blank" 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="ydpf4d16519yiv6363013759mimeAttachmentHeader"></fieldset>
                                                          <br
                                                          clear="none">
                                                          <pre>_______________________________________________
Users mailing list
<a shape="rect" class="ydpf4d16519yiv6363013759moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" rel="nofollow" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a shape="rect" class="ydpf4d16519yiv6363013759moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="nofollow" target="_blank" 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="ydpf4d16519yiv6363013759yqt7939372314"
id="ydpf4d16519yiv6363013759yqt92387">_______________________________________________<br
                                                          clear="none">
                                                          Users mailing
                                                          list<br
                                                          clear="none">
                                                          <a
                                                          shape="rect"
                                                          href="mailto:Users@lists.opensips.org"
                                                          rel="nofollow"
target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a><br
                                                          clear="none">
                                                          <a
                                                          shape="rect"
                                                          href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                                                          rel="nofollow"
target="_blank" 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="ydpf4d16519yiv6363013759mimeAttachmentHeader"></fieldset>
                                      <br clear="none">
                                      <pre>_______________________________________________
Users mailing list
<a shape="rect" class="ydpf4d16519yiv6363013759moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" rel="nofollow" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a shape="rect" class="ydpf4d16519yiv6363013759moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="nofollow" target="_blank" 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>
                  </div>
                  <br clear="none">
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>