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
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to