Gotcha! I've added fix_nated_contact() to [NATDETECT] route and now all messages UNTIL reinvite occurs are with correct NATed IP in "Contact" field.

Now I'm trying to make it work similiar way with reinvites. And I still don't understand, is default Kami config is somewhat broken or what.

route[NATDETECT] {
#!ifdef WITH_NAT
        force_rport();
        if (nat_uac_test("19")) {
                if (is_method("REGISTER")) {
                        fix_nated_register();
                } else {
                        if(is_first_hop())

                                #here we go

                                fix_nated_contact();

                                set_contact_alias();
                }
                setflag(FLT_NATS);
        }
#!endif
        return;
}



04.08.2017 16:27, Yu Boot пишет:
Played some time with sngrep and wireshark. All "working" solutions wors only with devices that ignore Contact and reply to Kami IP directly. Even with plain default kamailio.cfg relayed messages from NAtted device are with private address (and correct NATted alias) in Contact field. Is default cfg is broken? Kamailio 4.3


04.08.2017 15:26, Sebastian Damm пишет:
Hi,

On Fri, Aug 4, 2017 at 1:37 PM, Yu Boot <y...@yu-boot.ru> wrote:
Problem was magically solved by replacing t_relay in CR route by route
(RELAY) :)
Okay, the only thing route(RELAY) does more is set the reply route. So
maybe your replies were not correctly handled in first place. (And it
does take care of the dialog handling, but I don't know whether that's
important.)



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


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

Reply via email to