Call drops after 20 seconds

Hi there. We were developing a WebRTC application with Asterisk (11.16.0). Everything works as per usual but the call drops after 15-20 secs. We did search the forum and attempted different changes to the configuration suggested in similar threads, but it doesn’t work. sip.conf and sip debug messages below. Any help will be greatly appreciated.

sip.conf

[general]
externip=serverip
bindaddr=0.0.0.0:5161
bindport=5161
port=5161
localnet=10.112.76.239/255.255.248.0
fromdomain=mydomain.com
transport=udp,ws,wss
tcpenable=no
disallow=all
allow=opus
nat=yes
srvlookup=no
qualify=yes
insecure=very
icesupport=yes
canreinvite=no

;jitter buffer
;-------------
jbenable=yes
jbforce=yes
jbmaxsize=300
jbresyncthreshold=1000
jbimpl=adaptive
jbtargetextra=100
jblog=no


[web-device](!)
disallow=all
allow=opus
type=friend
host=dynamic
videosupport=no
hassip=yes

[user-device](!)
icesupport=yes
type=friend
host=dynamic

;DEVICES for User M6yPaEJ4L0ZUcb
[M6yPaEJ4L0ZUcb]
type=friend
disallow=all
allow=opus
host=sip.callwithus.com
username=blahblahblah
secret=momomo

[5001](web-device)
secret=ABCDEF
disallow=all
allow=opus
dial=SIP/5001
callerid=CRML <5001>
context=M6yPaEJ4L0ZUcb_dial

[9009](user-device)
secret=ABCDEF
disallow=all
allow=opus
dial=SIP/9009
callerid=CRML <9009>
mailbox=9009@device
---------------------------------------------------------------------------
SIP debug messages

<--- SIP read from UDP:asteriskip:30000 --->
INVITE sip:12345@mydomain.com;param1=value1;param2=value2 SIP/2.0
Call-ID: b977b369233243f375d5152e8c10f26a@mydomain.com
CSeq: 1 INVITE
From: "5001" <sip:5001@mydomain.com>;tag=9cdcee51
To: <sip:12345@mydomain.com>
Via: SIP/2.0/UDP asteriskip:30000;branch=z9hG4bKc6ce4cb0f427ed4fa99cb67ff5521ef7
Max-Forwards: 70
Contact: <sip:5001@asteriskip:30000>
Supported: timer
Min-SE: 90
Session-Expires: 1800;refresher=uac
User-Agent: WebRTC
P-Preferred-Identity: <sip:5001@mydomain.com>
Content-Type: application/sdp
Content-Length: 450

v=0
o=sipclient 0 1428564084087 IN IP4 asteriskip
s=sipclient/1.0
c=IN IP4 asteriskip
t=0 0
m=audio 31090 RTP/AVP 109 9 0 8 101
c=IN IP4 asteriskip
a=rtpmap:109 opus/48000/2
a=rtpmap:9 g722/8000
a=rtpmap:0 pcmu/8000
a=rtpmap:8 pcma/8000
a=rtpmap:101 telephone-event/8000
a=ptime:20
a=rtcp:31091 IN IP4 asteriskip
a=sendrecv
a=ssrc:928816901 cname:rtp/audio/b977b369233243f375d5152e8c10f26a@mydomain.com
<------------->
--- (15 headers 16 lines) ---
Sending to asteriskip:30000 (NAT)
Sending to asteriskip:30000 (NAT)
Using INVITE request as basis request - b977b369233243f375d5152e8c10f26a@mydomain.com
Found peer '5001' for '5001' from asteriskip:30000

<--- Reliably Transmitting (NAT) to asteriskip:30000 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP asteriskip:30000;branch=z9hG4bKc6ce4cb0f427ed4fa99cb67ff5521ef7;received=asteriskip;rport=30000
From: "5001" <sip:5001@mydomain.com>;tag=9cdcee51
To: <sip:12345@mydomain.com>;tag=as205b6bf0
Call-ID: b977b369233243f375d5152e8c10f26a@mydomain.com
CSeq: 1 INVITE
Server: Asterisk PBX 11.16.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="046e2513"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog 'b977b369233243f375d5152e8c10f26a@mydomain.com' in 6400 ms (Method: INVITE)

<--- SIP read from UDP:asteriskip:30000 --->
ACK sip:12345@mydomain.com;param1=value1;param2=value2 SIP/2.0
Call-ID: b977b369233243f375d5152e8c10f26a@mydomain.com
Max-Forwards: 70
From: "5001" <sip:5001@mydomain.com>;tag=9cdcee51
To: <sip:12345@mydomain.com>;tag=as205b6bf0
Via: SIP/2.0/UDP asteriskip:30000;branch=z9hG4bKc6ce4cb0f427ed4fa99cb67ff5521ef7
CSeq: 1 ACK
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---

<--- SIP read from UDP:asteriskip:30000 --->
INVITE sip:12345@mydomain.com;param1=value1;param2=value2 SIP/2.0
Call-ID: b977b369233243f375d5152e8c10f26a@mydomain.com
CSeq: 2 INVITE
From: "5001" <sip:5001@mydomain.com>;tag=9cdcee51
To: <sip:12345@mydomain.com>
Via: SIP/2.0/UDP asteriskip:30000;branch=z9hG4bK60aaefb9dfc0e63d064b488846e2d15d
Max-Forwards: 70
Contact: <sip:5001@asteriskip:30000>
Supported: timer
Min-SE: 90
Session-Expires: 1800;refresher=uac
User-Agent: WebRTC
P-Preferred-Identity: <sip:5001@mydomain.com>
Content-Type: application/sdp
Authorization: Digest username="5001",realm="asterisk",nonce="046e2513",uri="sip:12345@mydomain.com",response="a514f7899e5344d1858e26c93cbc63d6",algorithm=MD5
Content-Length: 450

v=0
o=sipclient 0 1428564084087 IN IP4 asteriskip
s=sipclient/1.0
c=IN IP4 asteriskip
t=0 0
m=audio 31090 RTP/AVP 109 9 0 8 101
c=IN IP4 asteriskip
a=rtpmap:109 opus/48000/2
a=rtpmap:9 g722/8000
a=rtpmap:0 pcmu/8000
a=rtpmap:8 pcma/8000
a=rtpmap:101 telephone-event/8000
a=ptime:20
a=rtcp:31091 IN IP4 asteriskip
a=sendrecv
a=ssrc:928816901 cname:rtp/audio/b977b369233243f375d5152e8c10f26a@mydomain.com
<------------->
--- (16 headers 16 lines) ---
Sending to asteriskip:30000 (NAT)
Using INVITE request as basis request - b977b369233243f375d5152e8c10f26a@mydomain.com
Found peer '5001' for '5001' from asteriskip:30000
== Using SIP RTP CoS mark 5
Found RTP audio format 109
Found RTP audio format 9
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 101
Found audio description format opus for ID 109
Found audio description format g722 for ID 9
Found audio description format pcmu for ID 0
Found audio description format pcma for ID 8
Found audio description format telephone-event for ID 101
Capabilities: us - (opus), peer - audio=(ulaw|alaw|g722|opus)/video=(nothing)/text=(nothing), combined - (opus)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port asteriskip:31090
Looking for 12345 in M6yPaEJ4L0ZUcb_dial (domain mydomain.com)
list_route: hop: <sip:5001@asteriskip:30000>

<--- Transmitting (NAT) to asteriskip:30000 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP asteriskip:30000;branch=z9hG4bK60aaefb9dfc0e63d064b488846e2d15d;received=asteriskip;rport=30000
From: "5001" <sip:5001@mydomain.com>;tag=9cdcee51
To: <sip:12345@mydomain.com>
Call-ID: b977b369233243f375d5152e8c10f26a@mydomain.com
CSeq: 2 INVITE
Server: Asterisk PBX 11.16.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uac
Contact: <sip:12345@asteriskip:5161>
Content-Length: 0


<------------>
-- Executing [12345@M6yPaEJ4L0ZUcb_dial:1] GotoIfTime("SIP/5001-00000016", "18:30-18:00,mon-sun,*,*?labelone") in new stack
-- Goto (M6yPaEJ4L0ZUcb_dial,12345,2)
-- Executing [12345@M6yPaEJ4L0ZUcb_dial:2] Dial("SIP/5001-00000016", "SIP/9009, 20") in new stack
== Using SIP RTP CoS mark 5
Audio is at 35198
Adding codec 100030 (opus) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to myip:54952:
INVITE sip:9009@myip:54952;rinstance=ae4a4f7caf530d95 SIP/2.0
Via: SIP/2.0/UDP asteriskip:5161;branch=z9hG4bK153f7d83;rport
Max-Forwards: 70
From: "CRML" <sip:5001@mydomain.com:5161>;tag=as3be84411
To: <sip:9009@myip:54952;rinstance=ae4a4f7caf530d95>
Contact: <sip:5001@asteriskip:5161>
Call-ID: 052559f40819ea4e765cf5f918145b41@mydomain.com
CSeq: 102 INVITE
User-Agent: Asterisk PBX 11.16.0
Date: Thu, 09 Apr 2015 07:21:24 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 338

v=0
o=root 143885999 143885999 IN IP4 asteriskip
s=Asterisk PBX 11.16.0
c=IN IP4 asteriskip
t=0 0
m=audio 35198 RTP/AVP 107 101
a=rtpmap:107 opus/48000/2
a=maxptime:60
a=fmtp:107 maxplaybackrate=16000; stereo=0; sprop-stereo=0; useinbandfec=0
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

---
-- Called SIP/9009
Retransmitting #1 (NAT) to myip:54952:
INVITE sip:9009@myip:54952;rinstance=ae4a4f7caf530d95 SIP/2.0
Via: SIP/2.0/UDP asteriskip:5161;branch=z9hG4bK153f7d83;rport
Max-Forwards: 70
From: "CRML" <sip:5001@mydomain.com:5161>;tag=as3be84411
To: <sip:9009@myip:54952;rinstance=ae4a4f7caf530d95>
Contact: <sip:5001@asteriskip:5161>
Call-ID: 052559f40819ea4e765cf5f918145b41@mydomain.com
CSeq: 102 INVITE
User-Agent: Asterisk PBX 11.16.0
Date: Thu, 09 Apr 2015 07:21:24 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 338

v=0
o=root 143885999 143885999 IN IP4 asteriskip
s=Asterisk PBX 11.16.0
c=IN IP4 asteriskip
t=0 0
m=audio 35198 RTP/AVP 107 101
a=rtpmap:107 opus/48000/2
a=maxptime:60
a=fmtp:107 maxplaybackrate=16000; stereo=0; sprop-stereo=0; useinbandfec=0
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

---

<--- SIP read from UDP:myip:54952 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP asteriskip:5161;branch=z9hG4bK153f7d83;rport=5161
Contact: <sip:9009@myip:54952>
To: <sip:9009@myip:54952;rinstance=ae4a4f7caf530d95>;tag=2fb22264
From: "CRML"<sip:5001@mydomain.com:5161>;tag=as3be84411
Call-ID: 052559f40819ea4e765cf5f918145b41@mydomain.com
CSeq: 102 INVITE
User-Agent: X-Lite release 4.7.0 stamp 73589 6a171357-W6.1
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---
list_route: hop: <sip:9009@myip:54952>
-- SIP/9009-00000017 is ringing

<--- Transmitting (NAT) to asteriskip:30000 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP asteriskip:30000;branch=z9hG4bK60aaefb9dfc0e63d064b488846e2d15d;received=asteriskip;rport=30000
From: "5001" <sip:5001@mydomain.com>;tag=9cdcee51
To: <sip:12345@mydomain.com>;tag=as07a0ceb8
Call-ID: b977b369233243f375d5152e8c10f26a@mydomain.com
CSeq: 2 INVITE
Server: Asterisk PBX 11.16.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uac
Contact: <sip:12345@asteriskip:5161>
Content-Length: 0


<------------>

<--- SIP read from UDP:myip:54952 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP asteriskip:5161;branch=z9hG4bK153f7d83;rport=5161
Contact: <sip:9009@myip:54952>
To: <sip:9009@myip:54952;rinstance=ae4a4f7caf530d95>;tag=2fb22264
From: "CRML"<sip:5001@mydomain.com:5161>;tag=as3be84411
Call-ID: 052559f40819ea4e765cf5f918145b41@mydomain.com
CSeq: 102 INVITE
User-Agent: X-Lite release 4.7.0 stamp 73589 6a171357-W6.1
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---
list_route: hop: <sip:9009@myip:54952>
-- SIP/9009-00000017 is ringing

<--- SIP read from UDP:myip:54952 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP asteriskip:5161;branch=z9hG4bK153f7d83;rport=5161
Contact: <sip:9009@myip:54952>
To: <sip:9009@myip:54952;rinstance=ae4a4f7caf530d95>;tag=2fb22264
From: "CRML"<sip:5001@mydomain.com:5161>;tag=as3be84411
Call-ID: 052559f40819ea4e765cf5f918145b41@mydomain.com
CSeq: 102 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
Supported: replaces, eventlist
User-Agent: X-Lite release 4.7.0 stamp 73589 6a171357-W6.1
Content-Length: 267

v=0
o=- 13073037690480561 3 IN IP4 192.168.0.120
s=X-Lite release 4.7.0 stamp 73589
c=IN IP4 192.168.0.120
t=0 0
m=audio 49750 RTP/AVP 107 101
a=rtpmap:107 opus/48000/2
a=fmtp:107 useinbandfec=1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
<------------->
--- (12 headers 11 lines) ---
Found RTP audio format 107
Found RTP audio format 101
Found audio description format opus for ID 107
[Apr 9 07:21:29] WARNING[30874][C-0000000b]: chan_sip.c:11100 process_sdp_a_audio: Got Opus useinbandfec=1
Found audio description format telephone-event for ID 101
Capabilities: us - (opus), peer - audio=(opus)/video=(nothing)/text=(nothing), combined - (opus)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 192.168.0.120:49750
list_route: hop: <sip:9009@myip:54952>
set_destination: Parsing <sip:9009@myip:54952> for address/port to send to
set_destination: set destination to myip:54952
Transmitting (NAT) to myip:54952:
ACK sip:9009@myip:54952 SIP/2.0
Via: SIP/2.0/UDP asteriskip:5161;branch=z9hG4bK691fc968;rport
Max-Forwards: 70
From: "CRML" <sip:5001@mydomain.com:5161>;tag=as3be84411
To: <sip:9009@myip:54952;rinstance=ae4a4f7caf530d95>;tag=2fb22264
Contact: <sip:5001@asteriskip:5161>
Call-ID: 052559f40819ea4e765cf5f918145b41@mydomain.com
CSeq: 102 ACK
User-Agent: Asterisk PBX 11.16.0
Content-Length: 0


---
-- SIP/9009-00000017 answered SIP/5001-00000016
Audio is at 33764
Adding codec 100030 (opus) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Reliably Transmitting (NAT) to asteriskip:30000 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP asteriskip:30000;branch=z9hG4bK60aaefb9dfc0e63d064b488846e2d15d;received=asteriskip;rport=30000
From: "5001" <sip:5001@mydomain.com>;tag=9cdcee51
To: <sip:12345@mydomain.com>;tag=as07a0ceb8
Call-ID: b977b369233243f375d5152e8c10f26a@mydomain.com
CSeq: 2 INVITE
Server: Asterisk PBX 11.16.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uac
Contact: <sip:12345@asteriskip:5161>
Content-Type: application/sdp
Require: timer
Content-Length: 340

v=0
o=root 2055399775 2055399775 IN IP4 asteriskip
s=Asterisk PBX 11.16.0
c=IN IP4 asteriskip
t=0 0
m=audio 33764 RTP/AVP 109 101
a=rtpmap:109 opus/48000/2
a=maxptime:60
a=fmtp:109 maxplaybackrate=16000; stereo=0; sprop-stereo=0; useinbandfec=0
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

<------------>

<--- SIP read from UDP:asteriskip:30000 --->
ACK sip:12345@asteriskip:5161 SIP/2.0
Call-ID: b977b369233243f375d5152e8c10f26a@mydomain.com
CSeq: 2 ACK
Via: SIP/2.0/UDP asteriskip:30000;branch=z9hG4bKe2ee6a63bb4647c14fd8e795e118cf14;received=asteriskip;rport=30000
From: "5001" <sip:5001@mydomain.com>;tag=9cdcee51
To: <sip:12345@mydomain.com>;tag=as07a0ceb8
Max-Forwards: 70
Contact: <sip:5001@asteriskip:30000>
Authorization: Digest username="5001",realm="asterisk",nonce="046e2513",uri="sip:12345@mydomain.com",response="a514f7899e5344d1858e26c93cbc63d6",algorithm=MD5,nc=00000002
User-Agent: WebRTC
Content-Length: 0

<------------->
--- (11 headers 0 lines) ---
> 0x7f8bf003b080 -- Probation passed - setting RTP source address to asteriskip:31090
[Apr 9 07:21:31] WARNING[32524][C-0000000b]: abstract_jb.c:428 create_jb: Failed to put first frame in the jitterbuffer on channel 'SIP/9009-00000017'
-- adaptive jitterbuffer created on channel SIP/9009-00000017
[Apr 9 07:21:31] WARNING[32524][C-0000000b]: chan_iax2.c:1184 jb_warning_output: Resyncing the jb. last_delay 0, this delay 2213, threshold 1000, new offset -2213

<--- SIP read from UDP:myip:54952 --->
SUBSCRIBE sip:asterisk@asteriskip:5161 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.120:54952;branch=z9hG4bK-d8754z-8100b043f6878e7d-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:9009@myip:54952>
To: "9009"<sip:9009@asteriskip>;tag=as3b672d1a
From: "9009"<sip:9009@asteriskip>;tag=c13af002
Call-ID: YzMwZjZmYzQ1ZWIzNDVmYmU0YzgxMGIxMDIzNzIxZDI
CSeq: 7 SUBSCRIBE
Expires: 300
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Supported: eventlist
User-Agent: X-Lite 4.7.0 73589-6a171357-W6.1
Authorization: Digest username="9009",realm="asterisk",nonce="09e25498",uri="sip:asterisk@asteriskip:5161",response="ac07d884d1bdff8815c400232437bfac",algorithm=MD5
Event: message-summary
Content-Length: 0

<------------->
--- (15 headers 0 lines) ---
Found peer '9009' for '9009' from myip:54952
[Apr 9 07:21:42] NOTICE[30874]: chan_sip.c:16614 check_auth: Correct auth, but based on stale nonce received from '"9009"<sip:9009@asteriskip>;tag=c13af002'

<--- Transmitting (NAT) to myip:54952 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.120:54952;branch=z9hG4bK-d8754z-8100b043f6878e7d-1---d8754z-;received=myip;rport=54952
From: "9009"<sip:9009@asteriskip>;tag=c13af002
To: "9009"<sip:9009@asteriskip>;tag=as3b672d1a
Call-ID: YzMwZjZmYzQ1ZWIzNDVmYmU0YzgxMGIxMDIzNzIxZDI
CSeq: 7 SUBSCRIBE
Server: Asterisk PBX 11.16.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="5a5717b2", stale=true
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog 'YzMwZjZmYzQ1ZWIzNDVmYmU0YzgxMGIxMDIzNzIxZDI' in 15808 ms (Method: SUBSCRIBE)

<--- SIP read from UDP:myip:54952 --->
SUBSCRIBE sip:asterisk@asteriskip:5161 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.120:54952;branch=z9hG4bK-d8754z-9af40a45e495df09-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:9009@myip:54952>
To: "9009"<sip:9009@asteriskip>;tag=as3b672d1a
From: "9009"<sip:9009@asteriskip>;tag=c13af002
Call-ID: YzMwZjZmYzQ1ZWIzNDVmYmU0YzgxMGIxMDIzNzIxZDI
CSeq: 8 SUBSCRIBE
Expires: 300
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Supported: eventlist
User-Agent: X-Lite 4.7.0 73589-6a171357-W6.1
Authorization: Digest username="9009",realm="asterisk",nonce="5a5717b2",uri="sip:asterisk@asteriskip:5161",response="b127461507038e92be9260fa8903f835",algorithm=MD5
Event: message-summary
Content-Length: 0

<------------->
--- (15 headers 0 lines) ---
Found peer '9009' for '9009' from myip:54952
Scheduling destruction of SIP dialog 'YzMwZjZmYzQ1ZWIzNDVmYmU0YzgxMGIxMDIzNzIxZDI' in 310000 ms (Method: SUBSCRIBE)

<--- Transmitting (NAT) to myip:54952 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.120:54952;branch=z9hG4bK-d8754z-9af40a45e495df09-1---d8754z-;received=myip;rport=54952
From: "9009"<sip:9009@asteriskip>;tag=c13af002
To: "9009"<sip:9009@asteriskip>;tag=as3b672d1a
Call-ID: YzMwZjZmYzQ1ZWIzNDVmYmU0YzgxMGIxMDIzNzIxZDI
CSeq: 8 SUBSCRIBE
Server: Asterisk PBX 11.16.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Expires: 300
Contact: <sip:asterisk@asteriskip:5161>;expires=300
Content-Length: 0


<------------>
Reliably Transmitting (NAT) to myip:54952:
NOTIFY sip:9009@myip:54952 SIP/2.0
Via: SIP/2.0/UDP asteriskip:5161;branch=z9hG4bK249f4aea;rport
Max-Forwards: 70
Route: <sip:9009@myip:54952>
From: "asterisk" <sip:asterisk@mydomain.com:5161>;tag=as3b672d1a
To: <sip:9009@myip:54952>;tag=c13af002
Contact: <sip:asterisk@asteriskip:5161>
Call-ID: YzMwZjZmYzQ1ZWIzNDVmYmU0YzgxMGIxMDIzNzIxZDI
CSeq: 106 NOTIFY
User-Agent: Asterisk PBX 11.16.0
Event: message-summary
Content-Type: application/simple-message-summary
Subscription-State: active
Content-Length: 104

Messages-Waiting: no
Message-Account: sip:asterisk@mydomain.com:5161
Voice-Message: 0/0 (0/0)

---

<--- SIP read from UDP:myip:54952 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP asteriskip:5161;branch=z9hG4bK249f4aea;rport=5161
Contact: <sip:9009@myip:54952>
To: <sip:9009@myip:54952>;tag=c13af002
From: "asterisk"<sip:asterisk@mydomain.com:5161>;tag=as3b672d1a
Call-ID: YzMwZjZmYzQ1ZWIzNDVmYmU0YzgxMGIxMDIzNzIxZDI
CSeq: 106 NOTIFY
User-Agent: X-Lite release 4.7.0 stamp 73589 6a171357-W6.1
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---

<--- SIP read from UDP:asteriskip:30000 --->
BYE sip:12345@asteriskip:5161 SIP/2.0
Via: SIP/2.0/UDP asteriskip:30000;branch=z9hG4bKa255dece2dd1c3787fd3c5b7130a3971
CSeq: 3 BYE
From: "5001" <sip:5001@mydomain.com>;tag=9cdcee51
To: <sip:12345@mydomain.com>;tag=as07a0ceb8
Call-ID: b977b369233243f375d5152e8c10f26a@mydomain.com
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO,PUBLISH,MESSAGE
Supported: replaces,timer
Session-Expires: 1800;refresher=uac
Max-Forwards: 70
User-Agent: WebRTC
Content-Length: 0

<------------->
--- (12 headers 0 lines) ---
Sending to asteriskip:30000 (NAT)
Scheduling destruction of SIP dialog 'b977b369233243f375d5152e8c10f26a@mydomain.com' in 6400 ms (Method: BYE)

<--- Transmitting (NAT) to asteriskip:30000 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP asteriskip:30000;branch=z9hG4bKa255dece2dd1c3787fd3c5b7130a3971;received=asteriskip;rport=30000
From: "5001" <sip:5001@mydomain.com>;tag=9cdcee51
To: <sip:12345@mydomain.com>;tag=as07a0ceb8
Call-ID: b977b369233243f375d5152e8c10f26a@mydomain.com
CSeq: 3 BYE
Server: Asterisk PBX 11.16.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '052559f40819ea4e765cf5f918145b41@mydomain.com' in 15808 ms (Method: INVITE)
set_destination: Parsing <sip:9009@myip:54952> for address/port to send to
set_destination: set destination to myip:54952
Reliably Transmitting (NAT) to myip:54952:
BYE sip:9009@myip:54952 SIP/2.0
Via: SIP/2.0/UDP asteriskip:5161;branch=z9hG4bK6c22c361;rport
Max-Forwards: 70
From: "CRML" <sip:5001@mydomain.com:5161>;tag=as3be84411
To: <sip:9009@myip:54952;rinstance=ae4a4f7caf530d95>;tag=2fb22264
Call-ID: 052559f40819ea4e765cf5f918145b41@mydomain.com
CSeq: 103 BYE
User-Agent: Asterisk PBX 11.16.0
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0


---
-- adaptive jitterbuffer destroyed on channel SIP/9009-00000017
== Spawn extension (M6yPaEJ4L0ZUcb_dial, 12345, 2) exited non-zero on 'SIP/5001-00000016'

<--- SIP read from UDP:asteriskip:30000 --->
REGISTER sip:asteriskip;lr SIP/2.0
Call-ID: d5e739809af329603d1c2cca5d57c032@mydomain.com
From: <sip:5001@mydomain.com>;tag=1fa20769
To: <sip:5001@mydomain.com>
Via: SIP/2.0/UDP asteriskip:30000;branch=z9hG4bK41b35a11b0ae2ef86756687d161afabc
Max-Forwards: 70
User-Agent: WebRTC
Allow: UPDATE,MESSAGE,BYE,ACK,REFER,INVITE,NOTIFY,INFO,OPTIONS,CANCEL
Contact: <sip:5001@asteriskip:30000>;expires=0
Expires: 0
CSeq: 3 REGISTER
Authorization: Digest username="5001",realm="asterisk",nonce="178c661c",uri="sip:asteriskip;lr",response="6c8524e1346db1c80afc3d03625a6b6b",algorithm=MD5,nc=00000003
Content-Length: 0

<------------->
--- (13 headers 0 lines) ---
Sending to asteriskip:30000 (NAT)
[Apr 9 07:21:47] NOTICE[30874]: chan_sip.c:16614 check_auth: Correct auth, but based on stale nonce received from '<sip:5001@mydomain.com>;tag=1fa20769'

<--- Transmitting (NAT) to asteriskip:30000 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP asteriskip:30000;branch=z9hG4bK41b35a11b0ae2ef86756687d161afabc;received=asteriskip;rport=30000
From: <sip:5001@mydomain.com>;tag=1fa20769
To: <sip:5001@mydomain.com>;tag=as6707e62e
Call-ID: d5e739809af329603d1c2cca5d57c032@mydomain.com
CSeq: 3 REGISTER
Server: Asterisk PBX 11.16.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="6ad8fbbf", stale=true
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog 'd5e739809af329603d1c2cca5d57c032@mydomain.com' in 32000 ms (Method: REGISTER)

<--- SIP read from UDP:asteriskip:30000 --->
REGISTER sip:asteriskip;lr SIP/2.0
Call-ID: d5e739809af329603d1c2cca5d57c032@mydomain.com
From: <sip:5001@mydomain.com>;tag=1fa20769
To: <sip:5001@mydomain.com>
Via: SIP/2.0/UDP asteriskip:30000;branch=z9hG4bKa25dadf83b0974451f3347cd333ee89b
Max-Forwards: 70
User-Agent: WebRTC
Allow: UPDATE,MESSAGE,BYE,ACK,REFER,INVITE,NOTIFY,INFO,OPTIONS,CANCEL
Contact: <sip:5001@asteriskip:30000>;expires=0
Expires: 0
CSeq: 4 REGISTER
Authorization: Digest username="5001",realm="asterisk",nonce="6ad8fbbf",uri="sip:asteriskip;lr",response="e5c6c90d4caf9c179e4647d1e0803517",algorithm=MD5
Content-Length: 0

<------------->
--- (13 headers 0 lines) ---
Sending to asteriskip:30000 (NAT)
-- Unregistered SIP '5001'

<--- Transmitting (NAT) to asteriskip:30000 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP asteriskip:30000;branch=z9hG4bKa25dadf83b0974451f3347cd333ee89b;received=asteriskip;rport=30000
From: <sip:5001@mydomain.com>;tag=1fa20769
To: <sip:5001@mydomain.com>;tag=as6707e62e
Call-ID: d5e739809af329603d1c2cca5d57c032@mydomain.com
CSeq: 4 REGISTER
Server: Asterisk PBX 11.16.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Expires: 0
Date: Thu, 09 Apr 2015 07:21:47 GMT
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog 'd5e739809af329603d1c2cca5d57c032@mydomain.com' in 32000 ms (Method: REGISTER)
Retransmitting #1 (NAT) to myip:54952:
BYE sip:9009@myip:54952 SIP/2.0
Via: SIP/2.0/UDP asteriskip:5161;branch=z9hG4bK6c22c361;rport
Max-Forwards: 70
From: "CRML" <sip:5001@mydomain.com:5161>;tag=as3be84411
To: <sip:9009@myip:54952;rinstance=ae4a4f7caf530d95>;tag=2fb22264
Call-ID: 052559f40819ea4e765cf5f918145b41@mydomain.com
CSeq: 103 BYE
User-Agent: Asterisk PBX 11.16.0
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0


---

<--- SIP read from UDP:myip:54952 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP asteriskip:5161;branch=z9hG4bK6c22c361;rport=5161
Contact: <sip:9009@myip:54952>
To: <sip:9009@myip:54952;rinstance=ae4a4f7caf530d95>;tag=2fb22264
From: "CRML"<sip:5001@mydomain.com:5161>;tag=as3be84411
Call-ID: 052559f40819ea4e765cf5f918145b41@mydomain.com
CSeq: 103 BYE
User-Agent: X-Lite release 4.7.0 stamp 73589 6a171357-W6.1
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---
Really destroying SIP dialog '052559f40819ea4e765cf5f918145b41@mydomain.com' Method: INVITE

<--- SIP read from UDP:myip:54952 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP asteriskip:5161;branch=z9hG4bK6c22c361;rport=5161
Contact: <sip:9009@myip:54952>
To: <sip:9009@myip:54952;rinstance=ae4a4f7caf530d95>;tag=2fb22264
From: "CRML"<sip:5001@mydomain.com:5161>;tag=as3be84411
Call-ID: 052559f40819ea4e765cf5f918145b41@mydomain.com
CSeq: 103 BYE
User-Agent: X-Lite release 4.7.0 stamp 73589 6a171357-W6.1
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---
Reliably Transmitting (NAT) to 204.74.213.5:5060:
OPTIONS sip:sip.callwithus.com SIP/2.0
Via: SIP/2.0/UDP asteriskip:5161;branch=z9hG4bK584fa6f7;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@mydomain.com:5161>;tag=as0b5da0f3
To: <sip:sip.callwithus.com>
Contact: <sip:asterisk@asteriskip:5161>
Call-ID: 4c0f442f59e2775e7b714e1e5ceac705@mydomain.com
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 11.16.0
Date: Thu, 09 Apr 2015 07:21:52 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


---

<--- SIP read from UDP:204.74.213.5:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP asteriskip:5161;branch=z9hG4bK584fa6f7;rport=5161;received=asteriskip
From: "asterisk" <sip:asterisk@mydomain.com:5161>;tag=as0b5da0f3
To: <sip:sip.callwithus.com>;tag=05fa965d41f3adc51e16f9a7acf1c273.514c
Call-ID: 4c0f442f59e2775e7b714e1e5ceac705@mydomain.com
CSeq: 102 OPTIONS
Server: CWU SIP GW
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---
Really destroying SIP dialog '4c0f442f59e2775e7b714e1e5ceac705@mydomain.com' Method: OPTIONS
Really destroying SIP dialog 'b977b369233243f375d5152e8c10f26a@mydomain.com' Method: BYE
Reliably Transmitting (NAT) to myip:54952:
OPTIONS sip:9009@myip:54952;rinstance=ae4a4f7caf530d95 SIP/2.0
Via: SIP/2.0/UDP asteriskip:5161;branch=z9hG4bK063588e5;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@mydomain.com:5161>;tag=as202e116d
To: <sip:9009@myip:54952;rinstance=ae4a4f7caf530d95>
Contact: <sip:asterisk@asteriskip:5161>
Call-ID: 1c449dfd0fc74e4f6da9401f76be8921@mydomain.com
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 11.16.0
Date: Thu, 09 Apr 2015 07:21:53 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


---

<--- SIP read from UDP:myip:54952 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP asteriskip:5161;branch=z9hG4bK063588e5;rport=5161
Contact: <sip:myip:54952>
To: <sip:9009@myip:54952;rinstance=ae4a4f7caf530d95>;tag=149f3e73
From: "asterisk"<sip:asterisk@mydomain.com:5161>;tag=as202e116d
Call-ID: 1c449dfd0fc74e4f6da9401f76be8921@mydomain.com
CSeq: 102 OPTIONS
Accept: application/sdp
Accept-Language: en
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Supported: replaces, eventlist
User-Agent: X-Lite release 4.7.0 stamp 73589 6a171357-W6.1
Content-Length: 0

<------------->
--- (13 headers 0 lines) ---
Really destroying SIP dialog '1c449dfd0fc74e4f6da9401f76be8921@mydomain.com' Method: OPTIONS

It’s a normal call clearing from the calling party. It is too delayed to be a codec rejection. You will have to look outside Asterisk.