<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hi Alexey,<br>
<br>
The usage of the "address" table is more generic so you need to do
some scripting for it.<br>
<br>
So, if you decide to have group "1" for blocking registrations,
use check_source_address("1") before handling a REGISTER request
and drop the request if the check id true.<br>
<br>
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>
</pre>
<div class="moz-cite-prefix">On 10/12/2017 10:24 AM, Alexey K. via
Users wrote:<br>
</div>
<blockquote type="cite"
cite="mid:1507793054.938419053@f420.i.mail.ru">
Hello all.<br>
<br>
Preface<br>
------------------<br>
- OpenSIPS 2.3.2<br>
- permissions module (register permissions handling)<br>
<br>
I'd like to deny registrations from certain IP, and I've done it
successfully using register.deny file.<br>
But now I'd like to add/remove addresses without restarting
OpenSIPS each time.<br>
<br>
The MI function 'fifo address_reload' works for 'address' table,
not for register.allow/register.deny files.<br>
(We already use some tables (for dispatcher and LB) as dbtext,
works fine.)<br>
<br>
<br>
The Problem:<br>
------------------<br>
So, I have 2 questions:<br>
1. the right syntax of filling the txt table (txt structure is
here TAR.GZ/opensips-2.3.2/scripts/dbtext/opensips/address and
description here
<a class="moz-txt-link-freetext" href="http://www.opensips.org/Documentation/Install-DBSchema-2-3#GEN-DB-ADDRESS">http://www.opensips.org/Documentation/Install-DBSchema-2-3#GEN-DB-ADDRESS</a>)<br>
<br>
As for now, I have this, but not sure that it's OK (added
underlines for better visibility):<br>
<br>
<p>id(int,auto) grp(int) ip(string) mask(int) port(int)
proto(string) pattern(string,null) context_info(string,null)<br>
1_________0 ___10.145.13.5__32____ 0 ______any<br>
2_________0 ___10.145.13.11_32____ 0 ______any<br>
</p>
<br>
<br>
2. I can not understand where will be the decision applied -
either allow or deny?! In case of using register.allow and
register.deny it was quite straightforward, and it worked fine. In
case of using address table - where have I to set if to allow or
to deny?! There are no such fields in the table.<br>
<br>
Best regards, Alexey
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>