<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div>Hi Guys,</div><div><br></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></div><div><br></div><div><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>
$var(aor) = "sip:" + $(au{s.escape.common}) + "@" + $(fd{s.escape.common});<br>
if(is_ip_registered("location","$var(aor)","$si")){<br>
xlog("L_INFO","Call: Auth INVITE - From=$fU from_uri=$fu Auth_user=$au Request=$rU IP=$si AOR=$var(aor) ID=$ci");<br>
} else {<br>
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>
sl_send_reply("401", "Unauthorized");<br>
exit;<br>
}<br>
Am I using the function in a wrong way ? whats the fix_actions do to the function call ?<br>
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></span><br></div>
            <div><br></div><div><br></div>
            
            <div id="yahoo_quoted_2945121261" class="yahoo_quoted">
                <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 <pasandev@ymail.com> wrote:
                    </div>
                    <div><br></div>
                    <div><br></div>
                    <div><div id="yiv3804995418"><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="yiv3804995418yahoo_quoted" id="yiv3804995418yahoo_quoted_2959194294">
                <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                    
                    <div class="yiv3804995418yqt7796149435" id="yiv3804995418yqt45489"><div>
                        On Wednesday, April 4, 2018, 4:07:45 PM GMT+5:30, Liviu Chircu <liviu@opensips.org> wrote:
                    </div>
                    <div><br clear="none"></div>
                    <div><br clear="none"></div>
                    <div><div id="yiv3804995418"><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="yiv3804995418moz-txt-link-freetext" target="_blank" href="https://github.com/OpenSIPS/opensips/issues">https://github.com/OpenSIPS/opensips/issues</a></tt><br clear="none">
    </p>
    <pre class="yiv3804995418moz-signature">Liviu Chircu
OpenSIPS Developer
<a rel="nofollow" shape="rect" class="yiv3804995418moz-txt-link-freetext" target="_blank" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <div class="yiv3804995418yqt7939372314" id="yiv3804995418yqt36361"><div class="yiv3804995418moz-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="yiv3804995418yahoo_quoted" id="yiv3804995418yahoo_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="yiv3804995418moz-txt-link-rfc2396E" ymailto="mailto:users@lists.opensips.org" target="_blank" href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a>
              wrote: </div>
            <div><br clear="none">
            </div>
            <div><br clear="none">
            </div>
            <div>
              <div id="yiv3804995418">
                <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="yiv3804995418ydp2c2d2970pl-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">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">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br clear="none">
            </div>
          </div>
        </div>
      </div>
      <br clear="none">
      <fieldset class="yiv3804995418mimeAttachmentHeader"></fieldset>
      <br clear="none">
      <pre>_______________________________________________
Users mailing list
<a rel="nofollow" shape="rect" class="yiv3804995418moz-txt-link-abbreviated" ymailto="mailto:Users@lists.opensips.org" target="_blank" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a rel="nofollow" shape="rect" class="yiv3804995418moz-txt-link-freetext" target="_blank" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote></div>
    <br clear="none">
  </div></div><div class="yiv3804995418yqt7939372314" id="yiv3804995418yqt92387">_______________________________________________<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">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">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></body></html>