I tried, but no luck. Could you tell which route block i should place these code to?

On Thu, Jun 29, 2017 at 10:57 PM, Mojtaba <mespio@gmail.com> wrote:
Hi.
I wrote this code, I check do the both peers are in the same network
or not. It works correctly.
# Check if both peers are in the same network(nat).
    if (is_method("INVITE")){
         lookup("location","m");
         $var(x) = $(ru{s.select,1,@});
         $var(y) = $(var(x){s.select,0,:});
         if ($var(y) == $si)
            $var(nat) = "yes";
         else
            $var(nat) = "no";

    }
With Regagrds.
Mojtaba Esfandiari.S

On Thu, Jun 29, 2017 at 6:57 PM, vuleetu <vuleetu@gmail.com> wrote:
> Hi, all
>
>    Is there any way to get remote ip address of both sender($si) and
> receiver(?)? I am configuring kamailio with multiple rtpproxy sets.
> Basically, rtpproxy set will be choosed based on the country those ip
> addresses of caller and callee belong to. Lets say if caller and callee are
> both in US, set 1 will selected. If they are not in the same country, set 2
> will be selected.  I dont know if there is any way to do that.
>
>
> Best regards
>
> Fisher
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>



--
--Mojtaba Esfandiari.S

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users