I am helping (?) an organization that is running FreePbx FreePBX 2.5.1.1 atop Asterisk 1.4.21.2, servicing 120 peered extensions (Polycom 430s, bootblock 2.70, bootrom 3.2.3.0002, sip.ld 3.0.3.0.0401)
the server, a fat, screaming 64-bit G4 HP box, is public, static IP - it is the PBX-in-a-Flash distro, built on that box.
clusters of these peers are at remote locations, behind DSL, Motorola Netopia router/gateways. All the remote peers are NAT-ed (PAT-ed, I would say), all the extension settings are the same, qualify=yes, very rare that a peer goes unreachable, the SIP debug headers on the “good” peers read very consistent, to my eye.
They work fine! occasional gripes about static or echo, but a completely functional, working architecture - almost no surprising problems with basic telephony and voicemail, ring-groups and follow-me, IVRs, etc. All good, no errors of any consequence.
Adding 1 more remote location has not worked - the extensions go unreachable (as soon as there is any activity) - transferred calls go to wrong extensions, inbounds go right to voicemail, phones don’t ring but voicemail arrives, etc.
this location has AT&T (Bellsouth) DSL and they provisioned a “2Wire” router/gateway, model 2701hg – it is non-functional, although outbound calls work, most inbounds ring correctly, but the main problem is the UNREACHABLE
I can never quite get my head around NAT/PAT, certainly not as it relates to SIP and Asterisk – the SIP headers from the bad location look like this:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Reliably Transmitting (NAT) to 70.147.7.115:50819:
OPTIONS sip:[email protected]:49482 SIP/2.0
Via: SIP/2.0/UDP 64.20.189.199:5060;branch=z9hG4bK52f8c28d;rport
From: “Unknown” sip:[email protected];tag=as53745fc3
To: sip:[email protected]:49482
Contact: sip:[email protected]
Call-ID: [email protected]
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Sat, 28 Aug 2010 16:56:23 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0
ps01*CLI>
<— SIP read from 70.147.7.115:50819 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 64.20.189.199:5060;branch=z9hG4bK52f8c28d;rport
From: “Unknown” sip:[email protected];tag=as53745fc3
To: sip:[email protected]:5060;tag=19243662-43DEFE3
CSeq: 102 OPTIONS
Call-ID: [email protected]
Contact: sip:[email protected]
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.0.3.0401
Content-Length: 0
<------------->
— (10 headers 0 lines) —
Really destroying SIP dialog ‘[email protected]’ Method: OPTIONS
Reliably Transmitting (NAT) to 70.147.7.115:50819:
OPTIONS sip:[email protected]:49482 SIP/2.0
Via: SIP/2.0/UDP 64.20.189.199:5060;branch=z9hG4bK6763b53b;rport
From: “Unknown” sip:[email protected];tag=as69654bd7
To: sip:[email protected]:49482
Contact: sip:[email protected]
Call-ID: [email protected]
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Sat, 28 Aug 2010 16:57:23 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0
ps01*CLI>
<— SIP read from 70.147.7.115:50819 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 64.20.189.199:5060;branch=z9hG4bK6763b53b;rport
From: “Unknown” sip:[email protected];tag=as69654bd7
To: sip:[email protected]:5060;tag=EA5F800D-BF8BF536
CSeq: 102 OPTIONS
Call-ID: [email protected]
Contact: sip:[email protected]
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.0.3.0401
Content-Length: 0
<------------->
— (10 headers 0 lines) —
Really destroying SIP dialog ‘[email protected]’ Method: OPTIONS
ps01*CLI>
none of the other good locations ever show this mismatch in port numbers for the remote peer, as in:
Method: OPTIONS
Reliably Transmitting (NAT) to 70.147.7.115:50819:
OPTIONS sip:[email protected]:49482 SIP/2.0
above
I think that the NAT/PAT is wrong here - SIP SHOW PEERS has 50819 for this extension, yet the message is directed to 49482
I don’t even know which device “creates” the port assignment in the first place – the DHCP manager? It must be the phone that requests a port and Asterisk assigns one? I am lost on this sequence, and how Asterisk gets 2 different port numbers for 1 device
Is the above dialog expressing a problem? The location certainly is experiencing problems unlike all the other locations that are all configured the same way:
dtmfmode RFC2833
canreinvite no
context from-internal
host dynamic
type friend
nat yes
port 5060
qualify yes
Anyone know what should be tried to pin down this problem? I think swapping in the Netopia will fix it - it might be simply not enough bandwidth (512 Kb upstream) at this location, other similar sites have 768 Kb - but the OPTIONS messages retransmit UDP 7 times before declaring the peer unreachable, and those messages have the same port differences as above.
anyone have an opinion on FreePBX paid support for stuff like this? would it be useful to me in solving this problem?
thanks in advance -
rldel99