[OpenSIPS-Users] Trouble with some ip adresses

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Jun 5 13:51:40 CEST 2014


Hi Mike,

Simply place before the "if" an xlog to print the $var(FROMIP) to see if 
you get there and if the variable contains the IP you expected.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05.06.2014 12:55, Mike Claudi Pedersen wrote:
>
> Hi guys
>
> im currently testing my setup, ive made a rule:
>
> if ($var(FROMIP) == "xxx.xxx.xxx.201" || $var(FROMIP) == 
> "xxx.xxx.xxx.86" || $var(FROMIP) == "xxx.xxx.xxx.13")
>         {
>                 xlog("L_INFO","\n IP OK \n");
>                 if (!lookup("location","m")) {
>                         switch ($retcode)
>                         {
>                                 case -1:
>                                         route(2);
>                                 case -3:
>                                         t_newtran();
>                                         t_reply("404", "Not Found");
>                                         exit;
>                                 case -2:
> sl_send_reply("405", "Method Not Allowed");
>                                         exit;
>                         }
>                 }
>
>
>         # when routing via usrloc, log the missed calls also
>         setflag(2);
>
>         route(1);
>         }
>
> but for some reason this rule only works when using xxx.xxx.xxx.86 or 
> xxx.xxx.xxx.13, whenenver a call originates from xxx.xxx.xxx.201 it 
> never gets into the location lookup it just goes directly to route(1) 
> loops around a couple of times and then changes src ip.
>
> i suspect that it goes into the loose_route part of the default 
> config. but im not sure why or how ?
>
>
> _______________________________________________
> 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/20140605/08ed1521/attachment-0001.htm>


More information about the Users mailing list