[Home]

Summary:ASTERISK-27104: After 10 minutes after reboot get Peer 'XXX' is now UNREACHABLE!
Reporter:Pablo Parodi (pparodi)Labels:
Date Opened:2017-07-02 03:10:46Date Closed:2017-07-02 05:34:21
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Registration
Versions:11.25.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:PBX with public IP - Distribuited IP phones in several placesAttachments:
Description:10 minutes after restart the pbx, start to get the followin messages:
- Extension unreacheble
- Correct auth, but based on stale nonce received from

This issue started yesterday at the end of the working day, before that time the PBX was working fine from some year.
There was no changes before this issue.

If I reboot the pbx, it start to work great by 10 minutes. After that the extensions can't get incomming and outgoing calls.

I have tcpdump, sip set debug and configuration files.


Comments:By: Asterisk Team (asteriskteam) 2017-07-02 03:10:48.506-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Pablo Parodi (pparodi) 2017-07-02 03:20:15.272-0500

Tests and changes done:
- set nonce=true
- qualify=no and qualify=yes
- change extension's type from friend to peer and viceversa
- update Asterisk to11.25.0

Same issue than: http://forums.asterisk.org/viewtopic.php?p=144955
and ASTERISK-16062

No anwer or workaround found


By: Pablo Parodi (pparodi) 2017-07-02 03:20:47.162-0500

Sip set debug ip PHONE-EXTERNAL-IP-ADDRESS

<------------->
Really destroying SIP dialog 'ZDIxYjViZDQ4NWZmNjFhODUwOWQxZjhkM2QyMTk2OTE.' Method: BYE

<--- SIP read from UDP:PHONE-EXTERNAL-IP-ADDRESS:61446 --->
INVITE sip:299@PBX-IP-ADDRESS:5060 SIP/2.0
Via: SIP/2.0/UDP PHONE-LOCAL-IP-ADDRESS:61446;branch=z9hG4bK-d8754z-4c06ca335b60f675-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:104@PHONE-LOCAL-IP-ADDRESS:61446;rinstance=b04569da076865f7>
To: <sip:299@PBX-IP-ADDRESS:5060>
From: "104 - Softphone"<sip:PHONE-EXTENSION-A@PBX-IP-ADDRESS:5060>;tag=c80b6155
Call-ID: NDkzYzVhMDgwYTM0Y2Q0MmZmODlkZDEyYjFlZTNiZGM.
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE
Content-Type: application/sdp
Supported: replaces
User-Agent: 3CXPhone 6.0.26523.0
Content-Length: 407

v=0
o=3cxVCE 390460005 231604545 IN IP4 PHONE-LOCAL-IP-ADDRESS
s=3cxVCE Audio Call
c=IN IP4 PHONE-LOCAL-IP-ADDRESS
t=0 0
m=audio 40030 RTP/AVP 3 8 0 101
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv
m=video 40028 RTP/AVP 34
c=IN IP4 PHONE-LOCAL-IP-ADDRESS
a=rtpmap:34 H263/90000
a=fmtp:34 QCIF=1;CIF=1;SQCIF=1;CIF4=1
a=sendrecv

<------------->
--- (13 headers 18 lines) ---
Sending to PHONE-EXTERNAL-IP-ADDRESS:61446 (NAT)
Sending to PHONE-EXTERNAL-IP-ADDRESS:61446 (NAT)
Using INVITE request as basis request - NDkzYzVhMDgwYTM0Y2Q0MmZmODlkZDEyYjFlZTNiZGM.
Found peer '104' for '104' from PHONE-EXTERNAL-IP-ADDRESS:61446

<--- Reliably Transmitting (NAT) to PHONE-EXTERNAL-IP-ADDRESS:61446 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP PHONE-LOCAL-IP-ADDRESS:61446;branch=z9hG4bK-d8754z-4c06ca335b60f675-1---d8754z-;received=PHONE-EXTERNAL-IP-ADDRESS;rport=61446
From: "104 - Softphone"<sip:104@PBX-IP-ADDRESS:5060>;tag=c80b6155
To: <sip:299@PBX-IP-ADDRESS:5060>;tag=as3617d26f
Call-ID: NDkzYzVhMDgwYTM0Y2Q0MmZmODlkZDEyYjFlZTNiZGM.
CSeq: 1 INVITE
Server: FPBX-2.8.1(11.25.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="3e715fa3"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog 'NDkzYzVhMDgwYTM0Y2Q0MmZmODlkZDEyYjFlZTNiZGM.' in 32000 ms (Method: INVITE)
Retransmitting #1 (NAT) to PHONE-EXTERNAL-IP-ADDRESS:61446:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP PHONE-LOCAL-IP-ADDRESS:61446;branch=z9hG4bK-d8754z-4c06ca335b60f675-1---d8754z-;received=PHONE-EXTERNAL-IP-ADDRESS;rport=61446
From: "104 - Softphone"<sip:104@PBX-IP-ADDRESS:5060>;tag=c80b6155
To: <sip:299@PBX-IP-ADDRESS:5060>;tag=as3617d26f
Call-ID: NDkzYzVhMDgwYTM0Y2Q0MmZmODlkZDEyYjFlZTNiZGM.
CSeq: 1 INVITE
Server: FPBX-2.8.1(11.25.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="3e715fa3"
Content-Length: 0


By: Pablo Parodi (pparodi) 2017-07-02 03:21:08.780-0500

CALL FLOW:
                                                                                         xINVITE sip:299@PBX-IP-ADDRESS:5060 SIP/2.0
          PHONE-EXTERNAL-IP-ADDRESS:61446           PBX-IP-ADDRESS:5060           192.168.10.254:5060xVia: SIP/2.0/UDP PHONE-LOCAL-IP-ADDRESS:61446;branch=z9hG4bK-d8754z-9d4780076e6b886e-
         qqqqqqqqqqwqqqqqqqqq          qqqqqqqqqqwqqqqqqqqq          qqqqqqqqqqwqqqqqqqqqx--d8754z-;rport
                   x        INVITE (SDP)         x                             x         xMax-Forwards: 70
 04:01:38.758185   x qqqqqqqqqqqqqqqqqqqqqqqqqq> x                             x         xContact: <sip:104@PHONE-LOCAL-IP-ADDRESS:61446;rinstance=b04569da076865f7>
       +0.000548   x                     401 Unauthorized                      x         xTo: <sip:299@PBX-IP-ADDRESS:5060>
 04:01:38.758733   x <qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq x         xFrom: "104 - Softphone"<sip:104@PBX-IP-ADDRESS:5060>;tag=8c2d262b
       +0.498311   x        INVITE (SDP)         x                             x         xCall-ID: NjQ2Yjc2NmVjYzkzYTk2Y2E1ZDY2MTNhMzRmYzE3OWY.
 04:01:39.257044   x qqqqqqqqqqqqqqqqqqqqqqqq>>> x                             x         xCSeq: 1 INVITE
       +0.001416   x                     401 Unauthorized                      x         xAllow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER
 04:01:39.258460   x <<<qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq x         xINFO, MESSAGE
       +0.999521   x                     401 Unauthorized                      x         xContent-Type: application/sdp
 04:01:40.257981   x <<<qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq x         xSupported: replaces
       +0.000968   x        INVITE (SDP)         x                             x         xUser-Agent: 3CXPhone 6.0.26523.0
 04:01:40.258949   x qqqqqqqqqqqqqqqqqqqqqqqq>>> x                             x         xContent-Length: 407
       +1.999782   x        INVITE (SDP)         x                             x         x
 04:01:42.258731   x qqqqqqqqqqqqqqqqqqqqqqqq>>> x                             x         xv=0
       +0.000326   x                     401 Unauthorized                      x         xo=3cxVCE 348437625 213370980 IN IP4 PHONE-LOCAL-IP-ADDRESS
 04:01:42.259057   x <<<qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq x         xs=3cxVCE Audio Call
       +3.999173   x                     401 Unauthorized                      x         xc=IN IP4 PHONE-LOCAL-IP-ADDRESS
 04:01:46.258230   x <<<qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq x         xt=0 0
       +0.000944   x        INVITE (SDP)         x                             x         xm=audio 40036 RTP/AVP 3 8 0 101
 04:01:46.259174   x qqqqqqqqqqqqqqqqqqqqqqqq>>> x                             x         xa=rtpmap:3 GSM/8000
       +3.999158   x                     401 Unauthorized                      x         xa=rtpmap:8 PCMA/8000
 04:01:50.258332   x <<<qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq x         xa=rtpmap:0 PCMU/8000
                   x                             x                             x         xa=rtpmap:101 telephone-event/8000
                   x                             x                             x         xa=fmtp:101 0-15
                   x                             x                             x         xa=ptime:20
                   x                             x                             x         xa=sendrecv
                   x                             x                             x         xm=video 40034 RTP/AVP 34
                   x                             x                             x         xc=IN IP4 PHONE-LOCAL-IP-ADDRESS
                   x                             x                             x         xa=rtpmap:34 H263/90000
                   x                             x                             x         xa=fmtp:34 QCIF=1;CIF=1;SQCIF=1;CIF4=1
                   x                             x                             x         xa=sendrecv





By: Pablo Parodi (pparodi) 2017-07-02 03:22:31.589-0500

PBX*CLI> sip show settings


Global Settings:
----------------
 UDP Bindaddress:        0.0.0.0:5060
 TCP SIP Bindaddress:    Disabled
 TLS SIP Bindaddress:    Disabled
 Videosupport:           No
 Textsupport:            No
 Ignore SDP sess. ver.:  No
 AutoCreate Peer:        Off
 Match Auth Username:    No
 Allow unknown access:   No
 Allow subscriptions:    Yes
 Allow overlap dialing:  Yes
 Allow promisc. redir:   No
 Enable call counters:   No
 SIP domain support:     No
 Realm. auth:            No
 Our auth realm          asterisk
 Use domains as realms:  No
 Call to non-local dom.: Yes
 URI user is phone no:   No
 Always auth rejects:    Yes
 Direct RTP setup:       No
 User Agent:             FPBX-2.8.1(11.25.0)
 SDP Session Name:       Asterisk PBX 11.25.0
 SDP Owner Name:         root
 Reg. context:           (not set)
 Regexten on Qualify:    No
 Trust RPID:             No
 Send RPID:              No
 Legacy userfield parse: No
 Send Diversion:         Yes
 Caller ID:              Unknown
 From: Domain:
 Record SIP history:     Off
 Call Events:            On
 Auth. Failure Events:   Off
 T.38 support:           No
 T.38 EC mode:           Unknown
 T.38 MaxDtgrm:          4294967295
 SIP realtime:           Disabled
 Qualify Freq :          60000 ms
 Q.850 Reason header:    No
 Store SIP_CAUSE:        No

Network QoS Settings:
---------------------------
 IP ToS SIP:             CS3
 IP ToS RTP audio:       EF
 IP ToS RTP video:       AF41
 IP ToS RTP text:        CS0
 802.1p CoS SIP:         4
 802.1p CoS RTP audio:   5
 802.1p CoS RTP video:   6
 802.1p CoS RTP text:    5
 Jitterbuffer enabled:   Yes
 Jitterbuffer forced:    Yes
 Jitterbuffer max size:  80
 Jitterbuffer resync:    1000
 Jitterbuffer impl:      fixed
 Jitterbuffer log:       No

Network Settings:
---------------------------
 SIP address remapping:  Disabled, no localnet list
 Externhost:             <none>
 Externaddr:             (null)
 Externrefresh:          10

Global Signalling Settings:
---------------------------
 Codecs:                 (gsm|ulaw|alaw|g729)
 Codec Order:            g729:20,gsm:20,alaw:20,ulaw:20
 Relax DTMF:             No
 RFC2833 Compensation:   No
 Symmetric RTP:          Yes
 Compact SIP headers:    No
 RTP Keepalive:          0 (Disabled)
 RTP Timeout:            30
 RTP Hold Timeout:       300
 MWI NOTIFY mime type:   application/simple-message-summary
 DNS SRV lookup:         No
 Pedantic SIP support:   No
 Reg. min duration       60 secs
 Reg. max duration:      360 secs
 Reg. default duration:  120 secs
 Sub. min duration       60 secs
 Sub. max duration:      360 secs
 Outbound reg. timeout:  40 secs
 Outbound reg. attempts: 0
 Outbound reg. retry 403:0
 Notify ringing state:   Yes
   Include CID:          No
 Notify hold state:      Yes
 SIP Transfer mode:      open
 Max Call Bitrate:       384 kbps
 Auto-Framing:           No
 Outb. proxy:            <not set>
 Session Timers:         Accept
 Session Refresher:      uas
 Session Expires:        1800 secs
 Session Min-SE:         90 secs
 Timer T1:               500
 Timer T1 minimum:       100
 Timer B:                32000
 No premature media:     Yes
 Max forwards:           70

Default Settings:
-----------------
 Allowed transports:     UDP
 Outbound transport:     UDP
 Context:                from-sip-external
 Record on feature:      automon
 Record off feature:     automon
 Force rport:            Yes
 DTMF:                   rfc2833
 Qualify:                0
 Keepalive:              60
 Use ClientCode:         No
 Progress inband:        Never
 Language:               es
 Tone zone:              <Not set>
 MOH Interpret:          default
 MOH Suggest:
 Voice Mail Extension:   *97

----


PBX*CLI> sip show peer 104


 * Name       : 104
 Description  :
 Secret       : <Set>
 MD5Secret    : <Not set>
 Remote Secret: <Not set>
 Context      : from-internal
 Record On feature : automon
 Record Off feature : automon
 Subscr.Cont. : <Not set>
 Language     : es
 Tonezone     : <Not set>
 AMA flags    : Unknown
 Transfer mode: open
 CallingPres  : Presentation Allowed, Not Screened
 Callgroup    :
 Pickupgroup  :
 Named Callgr :
 Nam. Pickupgr:
 MOH Suggest  :
 Mailbox      : 104@device
 VM Extension : *97
 LastMsgsSent : 0/0
 Call limit   : 2147483647
 Max forwards : 0
 Dynamic      : Yes
 Callerid     : "device" <104>
 MaxCallBR    : 384 kbps
 Expire       : 91
 Insecure     : no
 Force rport  : Yes
 Symmetric RTP: Yes
 ACL          : Yes
 DirectMedACL : No
 T.38 support : No
 T.38 EC mode : Unknown
 T.38 MaxDtgrm: 4294967295
 DirectMedia  : No
 PromiscRedir : No
 User=Phone   : No
 Video Support: No
 Text Support : No
 Ign SDP ver  : No
 Trust RPID   : No
 Send RPID    : No
 TrustIDOutbnd: Legacy
 Subscriptions: Yes
 Overlap dial : Yes
 DTMFmode     : info
 Timer T1     : 500
 Timer B      : 32000
 ToHost       :
 Addr->IP     : PHONE-EXTERNAL-IP-ADDRESS:61446
 Defaddr->IP  : (null)
 Prim.Transp. : UDP
 Allowed.Trsp : UDP
 Def. Username: 104
 SIP Options  : (none)
 Codecs       : (gsm|ulaw|alaw|g729)
 Codec Order  : (g729:20,gsm:20,alaw:20,ulaw:20)
 Auto-Framing : No
 Status       : OK (44 ms)
 Useragent    : 3CXPhone 6.0.26523.0
 Reg. Contact : sip:104@PHONE-LOCAL-IP-ADDRESS:61446;rinstance=b04569da076865f7
 Qualify Freq : 60000 ms
 Keepalive    : 60000 ms
 Sess-Timers  : Accept
 Sess-Refresh : uas
 Sess-Expires : 1800 secs
 Min-Sess     : 90 secs
 RTP Engine   : asterisk
 Parkinglot   :
 Use Reason   : No
 Encryption   : No

AFTER ISSUE:
PBX*CLI> sip show peer 104


 * Name       : 104
 Description  :
 Secret       : <Set>
 MD5Secret    : <Not set>
 Remote Secret: <Not set>
 Context      : from-internal
 Record On feature : automon
 Record Off feature : automon
 Subscr.Cont. : <Not set>
 Language     : es
 Tonezone     : <Not set>
 AMA flags    : Unknown
 Transfer mode: open
 CallingPres  : Presentation Allowed, Not Screened
 Callgroup    :
 Pickupgroup  :
 Named Callgr :
 Nam. Pickupgr:
 MOH Suggest  :
 Mailbox      : 104@device
 VM Extension : *97
 LastMsgsSent : 0/0
 Call limit   : 2147483647
 Max forwards : 0
 Dynamic      : Yes
 Callerid     : "device" <104>
 MaxCallBR    : 384 kbps
 Expire       : -1
 Insecure     : no
 Force rport  : Yes
 Symmetric RTP: Yes
 ACL          : Yes
 DirectMedACL : No
 T.38 support : No
 T.38 EC mode : Unknown
 T.38 MaxDtgrm: 4294967295
 DirectMedia  : No
 PromiscRedir : No
 User=Phone   : No
 Video Support: No
 Text Support : No
 Ign SDP ver  : No
 Trust RPID   : No
 Send RPID    : No
 TrustIDOutbnd: Legacy
 Subscriptions: Yes
 Overlap dial : Yes
 DTMFmode     : info
 Timer T1     : 500
 Timer B      : 32000
 ToHost       :
 Addr->IP     : (null)
 Defaddr->IP  : (null)
 Prim.Transp. : UDP
 Allowed.Trsp : UDP
 Def. Username: 104
 SIP Options  : replaces replace
 Codecs       : (gsm|ulaw|alaw|g729)
 Codec Order  : (g729:20,gsm:20,alaw:20,ulaw:20)
 Auto-Framing : No
 Status       : UNKNOWN
 Useragent    : 3CXPhone 6.0.26523.0
 Reg. Contact : sip:104@192.168.1.115:61446;rinstance=b04569da076865f7
 Qualify Freq : 60000 ms
 Keepalive    : 60000 ms
 Sess-Timers  : Accept
 Sess-Refresh : uas
 Sess-Expires : 1800 secs
 Min-Sess     : 90 secs
 RTP Engine   : asterisk
 Parkinglot   :
 Use Reason   : No
 Encryption   : No

PBX*CLI>




By: Joshua C. Colp (jcolp) 2017-07-02 05:34:05.163-0500

Per the Asterisk versions page [1], the maintenance (bug fix) support for the Asterisk branch you are using has ended. For continued maintenance support please move to a supported branch of Asterisk. After testing with a supported branch, if you find this problem has not been resolved, please open a new issue against the latest version of that Asterisk branch.

Thanks!

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions