[OpenSIPS-Users] ipv6 address check
Pasan Meemaduma
pasandev at ymail.com
Thu Apr 5 05:30:09 EDT 2018
Hi Guys,
Sorry I had to come back to this thread as the issue i reported was for a different function and problem with is_ip_registered func still exists. on Further investigating I found below
DBG:core:fix_actions: fixing is_ip_registered, /etc/opensips/opensips.cfg:970
and following is whats at line 970 in my config
$var(aor) = "sip:" + $(au{s.escape.common}) + "@" + $(fd{s.escape.common});
if(is_ip_registered("location","$var(aor)","$si")){
xlog("L_INFO","Call: Auth INVITE - From=$fU from_uri=$fu Auth_user=$au Request=$rU IP=$si AOR=$var(aor) ID=$ci");
} else {
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");
sl_send_reply("401", "Unauthorized");
exit;
}
Am I using the function in a wrong way ? whats the fix_actions do to the function call ?
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 -"
On Wednesday, April 4, 2018, 4:15:11 PM GMT+5:30, Pasan Meemaduma <pasandev at ymail.com> wrote:
Thanks Liviu, I have submitted a bug request
On Wednesday, April 4, 2018, 4:07:45 PM GMT+5:30, Liviu Chircu <liviu at opensips.org> wrote:
Hi Pasan,
Yes, if you could move it over to GitHub [1], that would be great. Thanks!
[1]: https://github.com/OpenSIPS/opensips/issues
Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com On 04.04.2018 13:29, Pasan Meemaduma via Users wrote:
Hi Guys,
Should I open up a bug request for this ?
On Tuesday, April 3, 2018, 2:33:34 PM GMT+5:30, Pasan Meemaduma via Users <users at lists.opensips.org> wrote:
Hi Guys,
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. But the function is failing with following error message.
script function call is_ip_registered("location","$var(aor)","$si"));
error message from logs.
ERROR:permissions:check_addr_6: invalid ip set <24xx:xxx:0:1:x000:0:0:2>
There's an AOR already with that IP
0 [ 3/04 18:53:29] root@:/root>> opensipsctl ul show
Domain:: location table=512 records=1
AOR:: 0xxxx
Contact:: sip: 0xxxx@[24xx:xxx:0:1:x000::2];line=180c0d2da1b3e81 Q=
ContactID:: 3275524303981917232
Expires:: 3495
Callid:: 490179714
Cseq:: 2
User-agent:: Linphone/3.6.1 (eXosip2/4.1.0)
Received:: sip:[2400:xxx:0:1:x000:0:0:2]:5060
State:: CS_SYNC
Flags:: 0
Cflags:: PING NAT
Socket:: udp:[24xx:xx0:1D:F0:0:0:1:88]:5060
Methods:: 4294967295
It appears to be failing at /modules/permissions/address.c line 517 . looks like str2ip in line 515 doesn't return a valid ip.
_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20180405/6ae3ae9c/attachment-0001.html>
More information about the Users
mailing list