I have an interesting problem that I’m not sure how to solve. Here’s my scenario. I have an asterisk box with NAT, no public IP directly attached. I also need to connect to a client’s network and an MPLS has been established between the client’s site and mine. I added an extra NIC on the server. My IP on that link is 172.29.255.21 (gateway is .20), but the client’s PBX is in a 192.168.1.X address. On my asterisk I’ve added the route to the 192.168.1.X network (through 172.29.255.20 gw) and I can ping their PBX and SSH into it, means the route is good.
Public IP: 65.25.147.X (NAT)
Local (internal) IP:
MPLS IP: 172.29.255.21
Here’s my problem. When I make an inbound call from the client’s PBX into mine I receive an INVITE:
MY PBX ----------------------- CLIENT PBX
And that is it! My call gets hung up because I do not receive the ACK back from the client’s PBX.
Looking into more detail into the SIP dialgo I notice that when I send TRYING to client I have this:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.66:5060;branch=z9hG4bK-e9b6a972d400ce35ba2a1561b1353c6b1-192.168.1.66-1;received=192.168.1.66;rport=5060
CSeq: 1033907359 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
…and then on the OK that is next the problem persists: Contact shows my NATed IP. Additional to that, on the SDP (on the OK sequence) it also shows:
[b]o=root 2111849303 2111849303 IN IP4 65.25.147.X[/b]
s=Asterisk PBX 184.108.40.206
[b]c=IN IP4 65.25.147.X[/b]
m=audio 13324 RTP/AVP 8 101
After debugging the client’s SIP I realize that his PBX sends me all the ACKs to my OKs, but to the public IP noted in the SDP’s ‘o’ IP4 field. Sometimes when I send OPTIONS I also see this message:
[b]SIP/2.0 403 From: URI not recognized[/b]
From: "Unknown" <sip:Unknown@65.25.147.X>;tag=as54c88e87
Via: SIP/2.0/UDP 65.25.147.X:5060;received=172.29.255.21;branch=z9hG4bK6c2d9ca0
Organization: MetaSwitch ; => Client's 'PBX' is actually a softswitch from MetaSwitch
CSeq: 102 OPTIONS
I have asterisk 220.127.116.11 (as noted in the SIP and SDP messages) and although I have FreePBX installed on the box I do everything almost entirely ad directly on the conf files themselves. The trunk configuration is this:
localnet=172.29.255.21/24 ;This is my MPLS IP range
localnet=192.168.1.66/24 ;This is the PBXs IP range
I have added/removed localnet, I have added/removed nat=yes/no, I have tried using externIP. All of these options I have tried in the local trunk. Unfortunately I cannot do many changes to the general settings on SIP.conf since I have thousands of calls that come/go through my NATed IP every day.
What has me clueless is that for most of the time the IP of the server is right…
Thank you all!