Non-NAT third party REGISTER

I am trying to perform a third-party registration (ie. on behalf of someone else) to a SIP proxy that is running Asterisk. The registration works OK, but for some reason, the proxy’s Asterisk server sends all INVITEs for the registered URI to my server, not to the Contact that I put in the header. It looks like Asterisk thinks that my server is the router/firewall (ie. a NAT device) for the Contact , but that isn’t the case.

Specifically, I am trying to set up a situation where all calls to The message I am sending to the proxy is shown below. Note that my server’s IP address is (which you can see in the message).

REGISTER SIP/2.0 Via: SIP/2.0/UDP;branch=z9hG4bK298002862 From:;tag=390063426 To: Call-ID: 398855122@ CSeq: 1 REGISTER Contact: Max-Forwards: 5 User-Agent: VoXaLot Expires: 3600 Content-Length: 0

When I actually make a call to Instead, it actually goes to port 2340 on my server (, which is not expecting inbound INVITEs… it is merely performing a third-party registration (and not even listening on 2340 any more). If I set up netcat to listen on UDP port 2340 on my server, I can see the INVITE message coming in (see below).

INVITE SIP/2.0 Via: SIP/2.0/UDP;branch=z9hG4bK50a99f0c;rport From: "anonymous" <sip:0@>;tag=as5cc16b96 To: <> Contact: <sip:0@> Call-ID: 560881e87729b9cc0c518af60fa791eb@ CSeq: 102 INVITE User-Agent: Asterisk PBX Max-Forwards: 70 Date: Tue, 03 Oct 2006 03:03:03 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Content-Type: application/sdp Content-Length: 243
As I understand it, should be sending the INVITE directly to the Contact - I know that OpenSER has some NAT traversal helpers that look at the originating IP address/port and compare them to the Contact URI… if they are different, it just makes the blind assumption that it must have come from a NAT device. Does Asterisk do a similar thing? If so, how might I go about actually getting it to honour a third-party registration??

Any thoughts or advice would be much appreciated. Thanks a lot.