Re: [OpenSIPS-Users] check_address() causes crash

2009-10-20 Thread Jeff Pyle
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" wrote: > I think t

Re: [OpenSIPS-Users] check_address() causes crash

2009-10-20 Thread Brett Nemeroff
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 addres

Re: [OpenSIPS-Users] check_address() causes crash

2009-10-19 Thread Bogdan-Andrei Iancu
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

Re: [OpenSIPS-Users] check_address() causes crash

2009-10-19 Thread Jeff Pyle
Hi Bogdan, On 10/19/09 2:00 PM, "Bogdan-Andrei Iancu" wrote: > you cannot know it prior to t_relay() - IP the RURI is an IP, then is > fine, but if the RURI is a domain, the translation from domain to IP > (via DNS) is done internally by t_relay(), so you do not have access to it. That makes s

Re: [OpenSIPS-Users] check_address() causes crash

2009-10-19 Thread Bogdan-Andrei Iancu
Hi Jeff, Jeff Pyle wrote: > Irina, > > In this case $rd was an IP address, freshly loaded from a > lookup("location"). well, there is no guarantee that after the lookup() you will have an IP in the domain part - it is up to the client what contact it uploaded (and you accepted :P ) > But, goi

Re: [OpenSIPS-Users] check_address() causes crash

2009-10-15 Thread Jeff Pyle
Irina, In this case $rd was an IP address, freshly loaded from a lookup("location"). But, going forward, you're right, this isn't a great way to do it. Any suggestions on how to get the IP of the where the message will go if it were to hit a t_relay(), for example? I'll update and see if it sti

Re: [OpenSIPS-Users] check_address() causes crash

2009-10-15 Thread Irina Stanescu
Hello Jeff, I managed to get a core dump only when the second parameter of the check_address is empty. I added a check for that (rev. 6272), so it shouldn't crash anymore. Also, you can use "$rd" as the second parameter only if the domain name is an ip address, otherwise it won't work. Thanks! I

[OpenSIPS-Users] check_address() causes crash

2009-10-14 Thread Jeff Pyle
Hello, I have the following: if (check_address("10", "$rd", "0", "$proto")) { setflag(7); } In many cases, and I can't seem to determine what those cases are, this causes the system to run very slowly for about 30 seconds, and then Opensips exits. I need to know i