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 999999@voxalot.com.au. The message I am sending to the proxy is shown below. Note that my server’s IP address is 64.34.163.35 (which you can see in the message).
REGISTER sip:proxy.freecall.net.au SIP/2.0
Via: SIP/2.0/UDP 64.34.163.35:2340;branch=z9hG4bK298002862
From: sip:190872@proxy.freecall.net.au;tag=390063426
To: sip:190872@proxy.freecall.net.au
Call-ID: 398855122@64.34.163.35
CSeq: 1 REGISTER
Contact: sip:999999@voxalot.com.au
Max-Forwards: 5
User-Agent: VoXaLot
Expires: 3600
Content-Length: 0
When I actually make a call to 999999@voxalot.com.au. Instead, it actually goes to port 2340 on my server (64.34.163.35), 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:999999@voxalot.com.au SIP/2.0
Via: SIP/2.0/UDP 203.63.248.197:5060;branch=z9hG4bK50a99f0c;rport
From: "anonymous" <sip:0@203.63.248.197>;tag=as5cc16b96
To: <sip:999999@voxalot.com.au>
Contact: <sip:0@203.63.248.197>
Call-ID: 560881e87729b9cc0c518af60fa791eb@203.63.248.197
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, proxy.freecall.net.au should be sending the INVITE directly to the Contact - 999999@voxalot.com.au. 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.
–
Craig