Hello,
I have my proxy behind a NAT (static NAT) with SIP clients that are both on my LAN and on public IP.

UAC1 Private IP <-->                           <--> UAC3 PublicIP
                      Proxy <--> NAT <--> WAN
UAC2 Private IP <-->                           <--> UAC4 PublicIP

I'm looking for the correct configuration of record route for this scenario.
I looked for examples with proxy behind the NAT and I have always found a config section for the record route like this

        # -----------------------------------------------------------------
        # Record Route Section
        # -----------------------------------------------------------------
        if (method=="INVITE" && client_nat_test("3")) {
                # INSERT YOUR IP ADDRESS HERE
                record_route_preset("<MY OPENSER PBULIC IP>:5060;nat=yes");
        } else if (method!="REGISTER") {
                record_route();
        };

In this way the proxy uses "record_route_preset" when the caller is private (client_nat_test("3")) and "record_route" when the caller is public, without consider the callee.
Consequently the proxy puts in the record route the public IP when the caller is private and the private IP address when the caller is public.
I can't understand how it can work: when a client on an public ip calls a client on an public ip, they find in record route the private ip and they will try to send the SIP method (ACK,BYE, reINVITE ecc) to a private IP, so this messages will be lost. This is the beahaviour that I'm observing in my test.
Maybe this configuration isn't adapted for my scenario or I miss something else (I have already added advertised_address/port) or I haven't correctly understand the instructions or the Record Route's usage.

**********************************************************************
The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this message
by anyone else is unauthorized. If you are not the intended recipient, any
disclosure, copying, or distribution of the message, or any action or
omission taken by you in reliance on it, is prohibited and may be unlawful.
Please immediately contact the sender if you have received this message inerror.

**********************************************************************