[OpenSIPS-Users] check_address() causes crash

Jeff Pyle jpyle at fidelityvoice.com
Tue Oct 20 16:36:11 CEST 2009


I believe check_address() is that function.  With the newer versions of 1.6
you can load the subnets (including masks) into the address table.  That's
exactly what I'm doing with it... now that it doesn't crash the process.  :)


- Jeff



On 10/20/09 10:30 AM, "Brett Nemeroff" <brett at nemeroff.com> wrote:

> I think the dialplan module can help out here as well. Not so much for
> the replacement, but if a pattern match is detected.
> 
> now that I think of it, isn't there a way in the permissions module to
> check subnets? I bet you could use one of the funcs in there, like
> check_address() to test if an address is in a particular subnet.
> 
> -Brett
> 
> 
> On Mon, Oct 19, 2009 at 5:02 PM, Bogdan-Andrei Iancu
> <bogdan at voice-system.ro> wrote:
>> Hi Jeff,
>> 
>> Jeff Pyle wrote:
>>>> not sure what you try to do, but maybe you should consider the blacklist
>>>> capability of opensips:
>>>>        http://www.opensips.org/Resources/DocsCoreFcn16#toc45
>>>> 
>>>> Regards,
>>>> Bogdan
>>>> 
>>> 
>>> I'm deciding which calls get an engage_media_proxy().  If they're on my
>>> network (as defined by a group in the address table), I'll proxy them
>>> because I can get the added accounting benefits without causing them any
>>> added latency.  If they're not (if the check fails), I won't use MP.
>>> 
>>> In this case all the $rd values would have been set by a lookup("location"),
>>> and all those *should* have been populated by registrations.  I'll likely
>>> add an ugly regex check to see if $rd looks like an IP address, then do the
>>> check_address() if it does.  I'll likely catch 95% or more of them that way.
>>> That's fine.
>>> 
>> I guess this is good approach - check if $rd is IP and then check it.
>> 
>> Regards,
>> Bogdan
>> 
>> _______________________________________________
>> 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




More information about the Users mailing list