Hi Bogdan,
On 10/19/09 2:00 PM, "Bogdan-Andrei Iancu" <bog...@voice-system.ro> 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 sense. > 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. - Jeff >> I'll update and see if it still crashes. >> >> >> Thanks, >> Jeff >> >> >> >> On 10/15/09 9:21 AM, "Irina Stanescu" <ironmi...@gmail.com> wrote: >> >> >>> 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! >>> >>> Irina Stanescu >>> >>> On Wed, Oct 14, 2009 at 10:43 PM, Jeff Pyle <jp...@fidelityvoice.com> wrote: >>> >>>> 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 if the source or destination IP addresses fall into one of >>>> the blocks included in group 10 of the address table. >>>> check_source_address() works great with Irina's fix; this is the >>>> destination >>>> half. It tanks the system. >>>> >>>> On the doc page it says: >>>> Transport protocol is either "ANY" or any valid transport protocol value: >>>> "UDP, "TCP", "TLS", and "SCTP". >>>> >>>> Is case relevant? Is lowercase just as valid as the uppercase examples? >>>> >>>> >>>> >>>> - Jeff >>>> >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users@lists.opensips.org >>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>>> >>> >> >> >> _______________________________________________ >> Users mailing list >> Users@lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> > > > _______________________________________________ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users _______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users