First of all thank you for your replies.
I think I am quite close to solution. But still have NAT issues in some cases.
I have added a bunch of code to the standard kamailio script.
I defined a new flag
added these parameters to registrar module.
modparam("registrar", "sock_flag", SOCK_FLAG)
modparam("registrar", "sock_hdr_name", "Sock-Info")
set this flag in the nat test section
if (nat_uac_test("19")) {
if (is_method("REGISTER")) {
fix_nated_register();
} else {
fix_nated_contact();
}
setflag(FLT_NATS);
setflag(SOCK_FLAG);
}
and send it to the peer proxy to replicate client registration. I also added received parameter to the replicated packet.
if ($si!=$sel(cfg_get.peer.srv_ip))
{
add_rcv_param();
t_replicate("sip:10.173.187.226:5060;transport=udp");
}
Now, the issue is, the original proxy that receives the registration works as expected.Replicated proxy, has the location data as expected. But if I sent a call over second proxy, UA does not respond. I can see the INVITE packet that comes from replicated proxy on my client PC, but UA does not respond to INVITE that comes from second proxy.
Contact:: sip:1002@10.173.191.72:1031;transport=udp;registering_acc=test_example_net Q=
Expires:: 544
Callid:: 443bb84315de2e2b637a55ab44c0b759@0:0:0:0:0:0:0:0
Cseq:: 256
User-agent:: Jitsi2.4.4997Linux
State:: CS_NEW
Flags:: 0
Cflag:: 192
Methods:: 4294967295
Ruid:: uloc-52de6613-3dd4-28
Reg-Id:: 0
Last-Keepalive:: 1390512267
Last-Modified:: 1390512267
This is the ul show output on original proxy. Replicated proxy has nearly same values except Cflag and Socket. On replicated proxy, Cflag is 0 and Socket points to the original proxy. Is this output normal? Do I have anything missing in the setup?
Thanks.
/Volkan