El Wednesday 08 August 2007 10:30:54 Papadopoulos Georgios escribió:
Hi Bogdan,
I understand that 200 OK should not be fixed by proxyA. Maybe what I
don't understand is what nat_uac_test("2") does and when to use it.
Following is an example where
clientA = demo1(a)altecnet.gr
clientB = sip_test_1(a)i-call.gr
proxyA = 213.5.43.4
proxyB = 213.5.43.134
When proxyA goes in the onreply_route for the 200 OK, nat_uac_test("23")
returns true (I guess because of the "2" flag) and proxyA fixes the
contact again which is wrong. So, would it be safe to use
nat_uac_test("23") for the requests and nat_uac_test("21") for the
replies? I am afraid this would break the simple case with 2 NATed
clients and only one proxy:
clientA ------> proxyA ------> clientC
Good point. As I think, the correct NAT test for replies is:
nat_uac_test("1")
so we just check if <Contact:> header does contain an RFC1918 IP address
(private IP address).
In your case it will work since the <Contact> modified by proxyB will contain
a non private IP so the NAT check (nat_uac_test("1")) in proxyA wont detect
the repliy as behind NAT.
Maybe others test could be done, but I think they should no valid test that
just compare the received IP with the IP of the contact since both could be
public IP but different, in which case shouldn't be
applied "fix_nat_contact".
Regards.
--
Iñaki Baz Castillo
ibc(a)in.ilimit.es