Extension registration dropping randomly

Hi,

I have a office setup with about 40 Cisco 7960. We used to be on a Epigy box that died during the office move so me and coworker decided to give a shot at a DIY solution and after some research we landed on using FreePBX.

Our current setup is:

A server with FreePBX v2.10.1.1 (Asterisk v1.8.14.8)
40 Cisco 7960 phone
1 Polycom IP Station 6000

The learning curve was steep but we eventually figured out how to setup our trunks with our VOIP provider (the authentication was more complicated than most examples we found online in the format @myhost.com::@myhost.com/)

Anyway I have a problem where 6 or so of my phones started to drop randomly the registration against the PBX box. I mean that the device in the Endpoint Device list would show as unavailable but the trunk is still fine and properly registered. Every time I called my office phone I would see the called arriving in the trace (/var/log/asterisk/full) but the problem is that my phone is deemed Unreachable by the PBX box and I get the message “The host you are trying to reach is not available…”. At the same time if I call my own extension while in the office I get the same message.

Now, from my phone, if I try to make a internal or external call it fails the first time but I can then see in the logs that the phone finally registers itself right after that at which point I can make outbound calls and receive incoming calls without a problem. That is for the couple minutes until it becomes unavailable again.

I’ve try to do a lot of reading online about the issue. I tried setting the NAT parameter to yes and no (currently set to no), I tried adding/removing the qualify parameter (currently set to yes) and playing with registration timeouts but without much luck.

Here is the trace that I got from enabling it via the Asterisk CLI command sip debug ip 10.XX.XX.125 (my phone IP). Our PBX box being 10.XX.XX.84
I’m just very confused as to why it work for a bit and suddently stops until I try to make a phone call.
Any help is much appreciated. Let me know what other details/settings/config you need me to share.

[2013-01-16 21:47:04] VERBOSE[3780] chan_sip.c: Scheduling destruction of SIP dialog ‘[email protected]’ in 32000 ms (Method: REGISTER)
[2013-01-16 21:47:08] VERBOSE[3780] chan_sip.c:

REGISTER sip:10.XX.XX.84 SIP/2.0
Via: SIP/2.0/UDP 10.XX.XX.125:5060;branch=z9hG4bK13ebe20b
From: sip:[email protected];tag=00036bf24a9100c956e582ca-0f210942
To: sip:[email protected]
Call-ID: [email protected]
Max-Forwards: 70
Date: Thu, 17 Jan 2013 02:46:44 GMT
CSeq: 305 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: sip:[email protected]:5060;user=phone;transport=udp;+sip.instance="";+u.sip!model.ccm.cisco.com="7"
Content-Length: 0
Expires: 120

[2013-01-16 21:47:08] VERBOSE[3780] chan_sip.c: — (12 headers 0 lines) —
[2013-01-16 21:47:08] VERBOSE[3780] chan_sip.c: Sending to 10.XX.XX.125:5060 (no NAT)
[2013-01-16 21:47:08] VERBOSE[3780] chan_sip.c:

SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.XX.XX.125:5060;branch=z9hG4bK13ebe20b;received=10.XX.XX.125
From: sip:[email protected];tag=00036bf24a9100c956e582ca-0f210942
To: sip:[email protected];tag=as10d2c7bf
Call-ID: [email protected]
CSeq: 305 REGISTER
Server: FPBX-2.10.1(1.8.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="7050922d"
Content-Length: 0

[2013-01-16 21:47:08] VERBOSE[3780] chan_sip.c: Scheduling destruction of SIP dialog ‘[email protected]’ in 32000 ms (Method: REGISTER)
[2013-01-16 21:47:12] VERBOSE[3780] chan_sip.c:

REGISTER sip:10.XX.XX.84 SIP/2.0
Via: SIP/2.0/UDP 10.XX.XX.125:5060;branch=z9hG4bK13ebe20b
From: sip:[email protected];tag=00036bf24a9100c956e582ca-0f210942
To: sip:[email protected]
Call-ID: [email protected]
Max-Forwards: 70
Date: Thu, 17 Jan 2013 02:46:44 GMT
CSeq: 305 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: sip:[email protected]:5060;user=phone;transport=udp;+sip.instance="";+u.sip!model.ccm.cisco.com="7"
Content-Length: 0
Expires: 120

[2013-01-16 21:47:12] VERBOSE[3780] chan_sip.c: — (12 headers 0 lines) —
[2013-01-16 21:47:12] VERBOSE[3780] chan_sip.c: Sending to 10.XX.XX.125:5060 (no NAT)
[2013-01-16 21:47:12] VERBOSE[3780] chan_sip.c:

SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.XX.XX.125:5060;branch=z9hG4bK13ebe20b;received=10.XX.XX.125
From: sip:[email protected];tag=00036bf24a9100c956e582ca-0f210942
To: sip:[email protected];tag=as10d2c7bf
Call-ID: [email protected]
CSeq: 305 REGISTER
Server: FPBX-2.10.1(1.8.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="7050922d"
Content-Length: 0

[2013-01-16 21:47:12] VERBOSE[3780] chan_sip.c: Scheduling destruction of SIP dialog ‘[email protected]’ in 32000 ms (Method: REGISTER)
[2013-01-16 21:47:16] VERBOSE[3780] chan_sip.c:

REGISTER sip:10.XX.XX.84 SIP/2.0
Via: SIP/2.0/UDP 10.XX.XX.125:5060;branch=z9hG4bK13ebe20b
From: sip:[email protected];tag=00036bf24a9100c956e582ca-0f210942
To: sip:[email protected]
Call-ID: [email protected]
Max-Forwards: 70
Date: Thu, 17 Jan 2013 02:46:44 GMT
CSeq: 305 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: sip:[email protected]:5060;user=phone;transport=udp;+sip.instance="";+u.sip!model.ccm.cisco.com="7"
Content-Length: 0
Expires: 120

[2013-01-16 21:47:16] VERBOSE[3780] chan_sip.c: — (12 headers 0 lines) —
[2013-01-16 21:47:16] VERBOSE[3780] chan_sip.c: Sending to 10.XX.XX.125:5060 (no NAT)
[2013-01-16 21:47:16] VERBOSE[3780] chan_sip.c:

SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.XX.XX.125:5060;branch=z9hG4bK13ebe20b;received=10.XX.XX.125
From: sip:[email protected];tag=00036bf24a9100c956e582ca-0f210942
To: sip:[email protected];tag=as10d2c7bf
Call-ID: [email protected]
CSeq: 305 REGISTER
Server: FPBX-2.10.1(1.8.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="7050922d"
Content-Length: 0

[2013-01-16 21:47:16] VERBOSE[3780] chan_sip.c: Scheduling destruction of SIP dialog ‘[email protected]’ in 32000 ms (Method: REGISTER)
[2013-01-16 21:47:16] VERBOSE[3780] chan_sip.c: Really destroying SIP dialog ‘[email protected]’ Method: REGISTER
[2013-01-16 21:47:16] VERBOSE[3780] chan_sip.c:

REGISTER sip:10.XX.XX.84 SIP/2.0
Via: SIP/2.0/UDP 10.XX.XX.125:5060;branch=z9hG4bK096fecc7
From: sip:[email protected];tag=00036bf24a9100ca46198657-5d788737
To: sip:[email protected]
Call-ID: [email protected]
Max-Forwards: 70
Date: Thu, 17 Jan 2013 02:47:16 GMT
CSeq: 306 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: sip:[email protected]:5060;user=phone;transport=udp;+sip.instance="";+u.sip!model.ccm.cisco.com="7"
Content-Length: 0
Expires: 120

[2013-01-16 21:47:16] VERBOSE[3780] chan_sip.c: — (12 headers 0 lines) —
[2013-01-16 21:47:16] VERBOSE[3780] chan_sip.c: Sending to 10.XX.XX.125:5060 (no NAT)
[2013-01-16 21:47:16] VERBOSE[3780] chan_sip.c:

SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.XX.XX.125:5060;branch=z9hG4bK096fecc7;received=10.XX.XX.125
From: sip:[email protected];tag=00036bf24a9100ca46198657-5d788737
To: sip:[email protected];tag=as5b39ef22
Call-ID: [email protected]
CSeq: 306 REGISTER
Server: FPBX-2.10.1(1.8.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="11d9ddaf"
Content-Length: 0

[2013-01-16 21:47:16] VERBOSE[3780] chan_sip.c: Scheduling destruction of SIP dialog ‘[email protected]’ in 32000 ms (Method: REGISTER)
[2013-01-16 21:47:17] VERBOSE[3780] chan_sip.c:

REGISTER sip:10.XX.XX.84 SIP/2.0
Via: SIP/2.0/UDP 10.XX.XX.125:5060;branch=z9hG4bK096fecc7
From: sip:[email protected];tag=00036bf24a9100ca46198657-5d788737
To: sip:[email protected]
Call-ID: [email protected]
Max-Forwards: 70
Date: Thu, 17 Jan 2013 02:47:16 GMT
CSeq: 306 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: sip:[email protected]:5060;user=phone;transport=udp;+sip.instance="";+u.sip!model.ccm.cisco.com="7"
Content-Length: 0
Expires: 120

[2013-01-16 21:47:17] VERBOSE[3780] chan_sip.c: — (12 headers 0 lines) —
[2013-01-16 21:47:17] VERBOSE[3780] chan_sip.c: Sending to 10.XX.XX.125:5060 (no NAT)
[2013-01-16 21:47:17] VERBOSE[3780] chan_sip.c:

SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.XX.XX.125:5060;branch=z9hG4bK096fecc7;received=10.XX.XX.125
From: sip:[email protected];tag=00036bf24a9100ca46198657-5d788737
To: sip:[email protected];tag=as5b39ef22
Call-ID: [email protected]
CSeq: 306 REGISTER
Server: FPBX-2.10.1(1.8.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="11d9ddaf"
Content-Length: 0

[2013-01-16 21:47:17] VERBOSE[3780] chan_sip.c: Scheduling destruction of SIP dialog ‘[email protected]’ in 32000 ms (Method: REGISTER)
[2013-01-16 21:47:18] VERBOSE[3780] chan_sip.c:

REGISTER sip:10.XX.XX.84 SIP/2.0
Via: SIP/2.0/UDP 10.XX.XX.125:5060;branch=z9hG4bK096fecc7
From: sip:[email protected];tag=00036bf24a9100ca46198657-5d788737
To: sip:[email protected]
Call-ID: [email protected]
Max-Forwards: 70
Date: Thu, 17 Jan 2013 02:47:16 GMT
CSeq: 306 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: sip:[email protected]:5060;user=phone;transport=udp;+sip.instance="";+u.sip!model.ccm.cisco.com="7"
Content-Length: 0
Expires: 120

[2013-01-16 21:47:18] VERBOSE[3780] chan_sip.c: — (12 headers 0 lines) —
[2013-01-16 21:47:18] VERBOSE[3780] chan_sip.c: Sending to 10.XX.XX.125:5060 (no NAT)
[2013-01-16 21:47:18] VERBOSE[3780] chan_sip.c:

SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.XX.XX.125:5060;branch=z9hG4bK096fecc7;received=10.XX.XX.125
From: sip:[email protected];tag=00036bf24a9100ca46198657-5d788737
To: sip:[email protected];tag=as5b39ef22
Call-ID: [email protected]
CSeq: 306 REGISTER
Server: FPBX-2.10.1(1.8.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="11d9ddaf"
Content-Length: 0

[2013-01-16 21:47:18] VERBOSE[3780] chan_sip.c: Scheduling destruction of SIP dialog ‘[email protected]’ in 32000 ms (Method: REGISTER)
[2013-01-16 21:47:20] VERBOSE[3780] chan_sip.c:

REGISTER sip:10.XX.XX.84 SIP/2.0
Via: SIP/2.0/UDP 10.XX.XX.125:5060;branch=z9hG4bK096fecc7
From: sip:[email protected];tag=00036bf24a9100ca46198657-5d788737
To: sip:[email protected]
Call-ID: [email protected]
Max-Forwards: 70
Date: Thu, 17 Jan 2013 02:47:16 GMT
CSeq: 306 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: sip:[email protected]:5060;user=phone;transport=udp;+sip.instance="";+u.sip!model.ccm.cisco.com="7"
Content-Length: 0
Expires: 120

[2013-01-16 21:47:20] VERBOSE[3780] chan_sip.c: — (12 headers 0 lines) —
[2013-01-16 21:47:20] VERBOSE[3780] chan_sip.c: Sending to 10.XX.XX.125:5060 (no NAT)
[2013-01-16 21:47:20] VERBOSE[3780] chan_sip.c:

SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.XX.XX.125:5060;branch=z9hG4bK096fecc7;received=10.XX.XX.125
From: sip:[email protected];tag=00036bf24a9100ca46198657-5d788737
To: sip:[email protected];tag=as5b39ef22
Call-ID: [email protected]
CSeq: 306 REGISTER
Server: FPBX-2.10.1(1.8.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="11d9ddaf"
Content-Length: 0

[2013-01-16 21:47:20] VERBOSE[3780] chan_sip.c: Scheduling destruction of SIP dialog ‘[email protected]’ in 32000 ms (Method: REGISTER)