One-way audio, codecs, and native_rtp?

scroll to bottom for updated info
Hey everyone, I’m sorta stuck.

I’m getting one-way audio when I call out through my trunk to my cell. (Office phone can’t hear the other end.) However, everything works fine when my cell calls into the trunk and Asterisk server. The first thing you associate with one-way audio is NAT problems and I thought I solved those by forwarding UDP 5060, my RTP port range and by setting localnet and externaddr in sip.conf.

Here’s the weirdest part and why I put codec negotiation in the title. If I force both phones to use the same codec, then both parties can hear each other again (no longer one-way when I dial out). My trunk supports the standard G.729 and ulaw codecs. I’d like to use G.722 within the office LAN and G.729 only to my trunk. Usually Asterisk is able to convert between the two codecs just fine and indeed this works when calling in through the trunk, just not going out. :confused:

;sip.conf
[trunk]
allow=!all,g729
[phone]
allow=!all,g722

Does this ring any bells? Let me know if you need more info. Appreciate the help!

I have an update. The problem goes away when I set ‘SRTP Mode’ to ‘Enabled but Not Forced’ in my GXP2130 phone’s settings. Does this mean that the problem is with the routing of RTP traffic? Here’s the output of rtp set debug on:

When calling with SRTP Mode: ‘Enabled but Not Forced’ (works):

Sent RTP packet to      12.194.65.33:25056 (type 18, seq 023679, ts 101776, len 000020)
Got  RTP packet from    12.194.65.33:25056 (type 18, seq 000462, ts 110880, len 000030)
Sent RTP packet to      192.168.0.201:5004 (type 09, seq 018002, ts 101856, len 000250)
Got  RTP packet from    192.168.0.201:5004 (type 09, seq 009418, ts 1972320, len 000160)
Sent RTP packet to      12.194.65.33:25056 (type 18, seq 023680, ts 101936, len 000020)
Got  RTP packet from    12.194.65.33:25056 (type 18, seq 000463, ts 111120, len 000030)
Sent RTP packet to      192.168.0.201:5004 (type 09, seq 018003, ts 102096, len 000250)

When calling with SRTP Mode: ‘No’ (broken):

Got  RTP packet from    192.168.0.201:5004 (type 09, seq 014513, ts 2152960, len 000160)
Sent RTP packet to      12.194.65.33:16618 (type 18, seq 003335, ts 165056, len 000020)
Sent RTP P2P packet to 192.168.0.201:5004 (type 18, len 000030)
Got  RTP packet from    192.168.0.201:5004 (type 09, seq 014514, ts 2153120, len 000160)
Sent RTP packet to      12.194.65.33:16618 (type 18, seq 003336, ts 165216, len 000020)
Sent RTP P2P packet to 192.168.0.201:5004 (type 18, len 000030)
Got  RTP packet from    192.168.0.201:5004 (type 09, seq 014515, ts 2153280, len 000160)
Sent RTP packet to      12.194.65.33:16618 (type 18, seq 003337, ts 165376, len 000020)

Here is the output of rtp set debug on when calling from a soft phone (works):

Sent RTP P2P packet to 12.194.65.33:27972 (type 00, len 000160)
Sent RTP P2P packet to 192.168.0.136:8000 (type 00, len 000240)
Sent RTP P2P packet to 12.194.65.33:27972 (type 00, len 000160)
Sent RTP P2P packet to 192.168.0.136:8000 (type 00, len 000240)
Sent RTP P2P packet to 12.194.65.33:27972 (type 00, len 000160)

What exactly is a P2P packet? I assume the phone must be talking directly when the trunk when I call out with the softphone because Asterisk doesn’t report any RTP packets received from the trunk during the call. It’s my preference to route all media through the Asterisk server to facilitate call recording so do I have anything configured wrong?

And why would audio break on the GXP2130 when I change the trunk codec from ulaw to G.729? :confused:

Anybody have any clues?? Let me know if I can provide any info to make this clearer. Thanks!

A P2P bridge is when RTP packets are exchanged in the RTP stack and minimally altered.

I’d suggest providing the new configuration as well as the output of “sip set debug on” so the signaling can be seen.

Fair enough, I try to provide everything relevant below.

After playing around with it some more, I found that one-way audio is fixed whenever the MixMonitor application is used. This is why the audio was fixed when I was calling in through the trunk. When MixMonitor is used, the output of rtp set debug on looks exactly like scenario #1 (Enabled but Not Forced) from the previous post.

I’ll provide the signaling for two scenarios. One where MixMonitor is not used (one-way audio, broken) and one where it is (fixed). I will leave SRTP Mode off on my phone. Thanks for having a look, really appreciate it.

MixMonitor not used (one-way audio, broken) :rage:

<--- SIP read from UDP:192.168.0.201:5060 --->
INVITE sip:300@192.168.0.129 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.201:5060;branch=z9hG4bK1553496197;rport
From: "Office phone" <sip:phone@192.168.0.129>;tag=780650727
To: <sip:300@192.168.0.129>
Call-ID: 2120433015-5060-103@BJC.BGI.A.CAB
CSeq: 150 INVITE
Contact: "Office phone" <sip:phone@192.168.0.201:5060>
X-Grandstream-PBX: true
Max-Forwards: 70
User-Agent: Grandstream GXP2130 1.0.7.97
Privacy: none
P-Preferred-Identity: "Office phone" <sip:phone@192.168.0.129>
P-Access-Network-Info: IEEE-EUI-48;eui-48-addr=00-22-6B-3A-E7-2C
P-Emergency-Info: IEEE-EUI-48;eui-48-addr=00-0B-82-93-C0-57
Supported: replaces, path, timer
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Type: application/sdp
Accept: application/sdp, application/dtmf-relay
Content-Length: 444

v=0
o=phone 8000 8000 IN IP4 192.168.0.201
s=SIP Call
c=IN IP4 192.168.0.201
t=0 0
m=audio 5004 RTP/AVP 9 0 8 4 18 2 97 123 101
a=sendrecv
a=rtpmap:9 G722/8000
a=ptime:20
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:2 G726-32/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=rtpmap:123 opus/48000/2
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
<------------->
--- (19 headers 20 lines) ---
Sending to 192.168.0.201:5060 (no NAT)
Sending to 192.168.0.201:5060 (no NAT)
Using INVITE request as basis request - 2120433015-5060-103@BJC.BGI.A.CAB
Found peer 'phone' for 'phone' from 192.168.0.201:5060

<--- Reliably Transmitting (no NAT) to 192.168.0.201:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.201:5060;branch=z9hG4bK1553496197;received=192.168.0.201;rport=5060
From: "Office phone" <sip:phone@192.168.0.129>;tag=780650727
To: <sip:300@192.168.0.129>;tag=as7f8e4f9c
Call-ID: 2120433015-5060-103@BJC.BGI.A.CAB
CSeq: 150 INVITE
Server: Asterisk PBX GIT-13-57a9797
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="02c9ac91"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '2120433015-5060-103@BJC.BGI.A.CAB' in 6400 ms (Method: INVITE)

<--- SIP read from UDP:192.168.0.201:5060 --->
ACK sip:300@192.168.0.129 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.201:5060;branch=z9hG4bK1553496197;rport
From: "Office phone" <sip:phone@192.168.0.129>;tag=780650727
To: <sip:300@192.168.0.129>;tag=as7f8e4f9c
Call-ID: 2120433015-5060-103@BJC.BGI.A.CAB
CSeq: 150 ACK
Content-Length: 0

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

<--- SIP read from UDP:192.168.0.201:5060 --->
INVITE sip:300@192.168.0.129 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.201:5060;branch=z9hG4bK369495644;rport
From: "Office phone" <sip:phone@192.168.0.129>;tag=780650727
To: <sip:300@192.168.0.129>
Call-ID: 2120433015-5060-103@BJC.BGI.A.CAB
CSeq: 151 INVITE
Contact: "Office phone" <sip:phone@192.168.0.201:5060>
Authorization: Digest username="phone", realm="asterisk", nonce="02c9ac91", uri="sip:300@192.168.0.129", response="c8d5fd8eceda62ff2aa5b7b82dcd3bb7", algorithm=MD5
X-Grandstream-PBX: true
Max-Forwards: 70
User-Agent: Grandstream GXP2130 1.0.7.97
Privacy: none
P-Preferred-Identity: "Office phone" <sip:phone@192.168.0.129>
P-Access-Network-Info: IEEE-EUI-48;eui-48-addr=00-22-6B-3A-E7-2C
P-Emergency-Info: IEEE-EUI-48;eui-48-addr=00-0B-82-93-C0-57
Supported: replaces, path, timer
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Type: application/sdp
Accept: application/sdp, application/dtmf-relay
Content-Length: 444

v=0
o=phone 8000 8000 IN IP4 192.168.0.201
s=SIP Call
c=IN IP4 192.168.0.201
t=0 0
m=audio 5004 RTP/AVP 9 0 8 4 18 2 97 123 101
a=sendrecv
a=rtpmap:9 G722/8000
a=ptime:20
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:2 G726-32/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=rtpmap:123 opus/48000/2
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
<------------->
--- (20 headers 20 lines) ---
Sending to 192.168.0.201:5060 (no NAT)
Using INVITE request as basis request - 2120433015-5060-103@BJC.BGI.A.CAB
Found peer 'phone' for 'phone' from 192.168.0.201:5060
  == Using SIP RTP CoS mark 5
Found RTP audio format 9
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 4
Found RTP audio format 18
Found RTP audio format 2
Found RTP audio format 97
Found RTP audio format 123
Found RTP audio format 101
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 G723 for ID 4
Found audio description format G729 for ID 18
Found audio description format G726-32 for ID 2
Found audio description format iLBC for ID 97
Found audio description format opus for ID 123
Found audio description format telephone-event for ID 101
Capabilities: us - (g722), peer - audio=(ulaw|g726|g723|alaw|g722|g729|ilbc|opus)/video=(nothing)/text=(nothing), combined - (g722)
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.201:5004
Looking for 300 in TheOffice (domain 192.168.0.129)
sip_route_dump: route/path hop: <sip:phone@192.168.0.201:5060>

<--- Transmitting (no NAT) to 192.168.0.201:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.0.201:5060;branch=z9hG4bK369495644;received=192.168.0.201;rport=5060
From: "Office phone" <sip:phone@192.168.0.129>;tag=780650727
To: <sip:300@192.168.0.129>
Call-ID: 2120433015-5060-103@BJC.BGI.A.CAB
CSeq: 151 INVITE
Server: Asterisk PBX GIT-13-57a9797
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:300@192.168.0.129:5060>
Content-Length: 0


<------------>
    -- Executing [300@TheOffice:1] NoOp("SIP/phone-00000000", "") in new stack
    -- Executing [300@TheOffice:2] Answer("SIP/phone-00000000", "") in new stack
Audio is at 21842
Adding codec g722 to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Reliably Transmitting (no NAT) to 192.168.0.201:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.201:5060;branch=z9hG4bK369495644;received=192.168.0.201;rport=5060
From: "Office phone" <sip:phone@192.168.0.129>;tag=780650727
To: <sip:300@192.168.0.129>;tag=as1a24c7d1
Call-ID: 2120433015-5060-103@BJC.BGI.A.CAB
CSeq: 151 INVITE
Server: Asterisk PBX GIT-13-57a9797
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:300@192.168.0.129:5060>
Content-Type: application/sdp
Require: timer
Content-Length: 261

v=0
o=root 1592459523 1592459523 IN IP4 192.168.0.129
s=Asterisk PBX GIT-13-57a9797
c=IN IP4 192.168.0.129
t=0 0
m=audio 21842 RTP/AVP 9 101
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

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

<--- SIP read from UDP:192.168.0.201:5060 --->
ACK sip:300@192.168.0.129:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.201:5060;branch=z9hG4bK1586442694;rport
From: "Office phone" <sip:phone@192.168.0.129>;tag=780650727
To: <sip:300@192.168.0.129>;tag=as1a24c7d1
Call-ID: 2120433015-5060-103@BJC.BGI.A.CAB
CSeq: 151 ACK
Contact: <sip:phone@192.168.0.201:5060>
X-Grandstream-PBX: true
Max-Forwards: 70
Supported: replaces, path, timer
User-Agent: Grandstream GXP2130 1.0.7.97
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0

<------------->
--- (13 headers 0 lines) ---
       > 0x7fa118026e60 -- Probation passed - setting RTP source address to 192.168.0.201:5004
    -- Executing [300@TheOffice:3] Goto("SIP/phone-00000000", "test-att-out") in new stack
    -- Goto (TheOffice,300,4)
    -- Executing [300@TheOffice:4] NoOp("SIP/phone-00000000", "") in new stack
    -- Executing [300@TheOffice:5] Set("SIP/phone-00000000", "CALLERID(name)=Company name") in new stack
    -- Executing [300@TheOffice:6] Set("SIP/phone-00000000", "CALLERID(num)=8285555555") in new stack
    -- Executing [300@TheOffice:7] Dial("SIP/phone-00000000", "SIP/att-1/18281231234") in new stack
  == Using SIP RTP CoS mark 5
Audio is at 18636
Adding codec g729 to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 12.194.45.53:5060:
INVITE sip:18281231234@12.194.45.53 SIP/2.0
Via: SIP/2.0/UDP MY.EXTERNAL.IP.V4:5060;branch=z9hG4bK0952ad54
Max-Forwards: 70
From: "Company name" <sip:8285555555@MY.EXTERNAL.IP.V4>;tag=as5d7e445b
To: <sip:18281231234@12.194.45.53>
Contact: <sip:8285555555@MY.EXTERNAL.IP.V4:5060>
Call-ID: 4ac542d85b75129a6605638d428c29d4@MY.EXTERNAL.IP.V4:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX GIT-13-57a9797
Date: Tue, 31 Jan 2017 20:12:38 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 284

v=0
o=root 141950979 141950979 IN IP4 MY.EXTERNAL.IP.V4
s=Asterisk PBX GIT-13-57a9797
c=IN IP4 MY.EXTERNAL.IP.V4
t=0 0
m=audio 18636 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:230
a=sendrecv

---
    -- Called SIP/att-1/18281231234

<--- SIP read from UDP:12.194.45.53:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP MY.EXTERNAL.IP.V4:5060;branch=z9hG4bK0952ad54
From: "Company name" <sip:8285555555@MY.EXTERNAL.IP.V4>;tag=as5d7e445b
To: <sip:18281231234@12.194.45.53>
Call-ID: 4ac542d85b75129a6605638d428c29d4@MY.EXTERNAL.IP.V4:5060
CSeq: 102 INVITE

<------------->
--- (6 headers 0 lines) ---
       > 0x154e440 -- Probation passed - setting RTP source address to 12.194.45.62:19824

<--- SIP read from UDP:12.194.45.53:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP MY.EXTERNAL.IP.V4:5060;branch=z9hG4bK0952ad54
From: "Company name" <sip:8285555555@MY.EXTERNAL.IP.V4>;tag=as5d7e445b
To: <sip:18281231234@12.194.45.53>;tag=5593764187682827_c1b04.1.2.1485845071941.0_102470_203972
Call-ID: 4ac542d85b75129a6605638d428c29d4@MY.EXTERNAL.IP.V4:5060
CSeq: 102 INVITE
Allow: INVITE,ACK,CANCEL,BYE,INFO,PRACK
Contact: <sip:12.194.45.53:5060;transport=udp>
Content-Length: 257
Content-Disposition: session; handling=required
Content-Type: application/sdp

v=0
o=Sonus_UAC 7754 8854 IN IP4 12.194.45.62
s=SIP Media Capabilities
c=IN IP4 12.194.45.62
t=0 0
m=audio 19824 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=maxptime:30
<------------->
--- (11 headers 12 lines) ---
sip_route_dump: route/path hop: <sip:12.194.45.53:5060;transport=udp>
Found RTP audio format 18
Found RTP audio format 101
Found audio description format G729 for ID 18
Found audio description format telephone-event for ID 101
Capabilities: us - (g729), peer - audio=(g729)/video=(nothing)/text=(nothing), combined - (g729)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 12.194.45.62:19824
    -- SIP/att-1-00000001 is ringing
    -- SIP/att-1-00000001 is making progress passing it to SIP/phone-00000000
       > 0x154e440 -- Probation passed - setting RTP source address to 12.194.45.62:19824

<--- SIP read from UDP:12.194.45.53:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP MY.EXTERNAL.IP.V4:5060;branch=z9hG4bK0952ad54
From: "Company name" <sip:8285555555@MY.EXTERNAL.IP.V4>;tag=as5d7e445b
To: <sip:18281231234@12.194.45.53>;tag=5593764187682827_c1b04.1.2.1485845071941.0_102470_203972
Call-ID: 4ac542d85b75129a6605638d428c29d4@MY.EXTERNAL.IP.V4:5060
CSeq: 102 INVITE
Allow: INVITE,ACK,CANCEL,BYE,INFO,PRACK
Accept: application/sdp, application/isup, application/dtmf, application/dtmf-relay, multipart/mixed
Contact: <sip:12.194.45.53:5060;transport=udp>
Content-Length: 257
Content-Disposition: session; handling=required
Content-Type: application/sdp

v=0
o=Sonus_UAC 7754 8854 IN IP4 12.194.45.62
s=SIP Media Capabilities
c=IN IP4 12.194.45.62
t=0 0
m=audio 19824 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=maxptime:30
<------------->
--- (12 headers 12 lines) ---
sip_route_dump: route/path hop: <sip:12.194.45.53:5060;transport=udp>
set_destination: Parsing <sip:12.194.45.53:5060;transport=udp> for address/port to send to
set_destination: set destination to 12.194.45.53:5060
Transmitting (no NAT) to 12.194.45.53:5060:
ACK sip:12.194.45.53:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP MY.EXTERNAL.IP.V4:5060;branch=z9hG4bK30aa68c2
Max-Forwards: 70
From: "Company name" <sip:8285555555@MY.EXTERNAL.IP.V4>;tag=as5d7e445b
To: <sip:18281231234@12.194.45.53>;tag=5593764187682827_c1b04.1.2.1485845071941.0_102470_203972
Contact: <sip:8285555555@MY.EXTERNAL.IP.V4:5060>
Call-ID: 4ac542d85b75129a6605638d428c29d4@MY.EXTERNAL.IP.V4:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX GIT-13-57a9797
Content-Length: 0


---
    -- SIP/att-1-00000001 answered SIP/phone-00000000
    -- Channel SIP/att-1-00000001 joined 'simple_bridge' basic-bridge <10f882e0-92e9-41cd-91a8-40ddaf60fc91>
    -- Channel SIP/phone-00000000 joined 'simple_bridge' basic-bridge <10f882e0-92e9-41cd-91a8-40ddaf60fc91>
       > Bridge 10f882e0-92e9-41cd-91a8-40ddaf60fc91: switching from simple_bridge technology to native_rtp
       > Locally RTP bridged 'SIP/phone-00000000' and 'SIP/att-1-00000001' in stack
       > Locally RTP bridged 'SIP/phone-00000000' and 'SIP/att-1-00000001' in stack

<--- SIP read from UDP:192.168.0.201:5060 --->
BYE sip:300@192.168.0.129:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.201:5060;branch=z9hG4bK1530513169;rport
From: "Office phone" <sip:phone@192.168.0.129>;tag=780650727
To: <sip:300@192.168.0.129>;tag=as1a24c7d1
Call-ID: 2120433015-5060-103@BJC.BGI.A.CAB
CSeq: 152 BYE
Contact: <sip:phone@192.168.0.201:5060>
X-Grandstream-PBX: true
Max-Forwards: 70
Supported: replaces, path, timer
User-Agent: Grandstream GXP2130 1.0.7.97
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0

<------------->
--- (13 headers 0 lines) ---
Sending to 192.168.0.201:5060 (no NAT)
Scheduling destruction of SIP dialog '2120433015-5060-103@BJC.BGI.A.CAB' in 6400 ms (Method: BYE)

<--- Transmitting (no NAT) to 192.168.0.201:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.201:5060;branch=z9hG4bK1530513169;received=192.168.0.201;rport=5060
From: "Office phone" <sip:phone@192.168.0.129>;tag=780650727
To: <sip:300@192.168.0.129>;tag=as1a24c7d1
Call-ID: 2120433015-5060-103@BJC.BGI.A.CAB
CSeq: 152 BYE
Server: Asterisk PBX GIT-13-57a9797
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<------------>
    -- Channel SIP/phone-00000000 left 'native_rtp' basic-bridge <10f882e0-92e9-41cd-91a8-40ddaf60fc91>
  == Spawn extension (TheOffice, 300, 7) exited non-zero on 'SIP/phone-00000000'
    -- Channel SIP/att-1-00000001 left 'native_rtp' basic-bridge <10f882e0-92e9-41cd-91a8-40ddaf60fc91>
Scheduling destruction of SIP dialog '4ac542d85b75129a6605638d428c29d4@MY.EXTERNAL.IP.V4:5060' in 6400 ms (Method: INVITE)
set_destination: Parsing <sip:12.194.45.53:5060;transport=udp> for address/port to send to
set_destination: set destination to 12.194.45.53:5060
Reliably Transmitting (no NAT) to 12.194.45.53:5060:
BYE sip:12.194.45.53:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP MY.EXTERNAL.IP.V4:5060;branch=z9hG4bK0a56860c
Max-Forwards: 70
From: "Company name" <sip:8285555555@MY.EXTERNAL.IP.V4>;tag=as5d7e445b
To: <sip:18281231234@12.194.45.53>;tag=5593764187682827_c1b04.1.2.1485845071941.0_102470_203972
Call-ID: 4ac542d85b75129a6605638d428c29d4@MY.EXTERNAL.IP.V4:5060
CSeq: 103 BYE
User-Agent: Asterisk PBX GIT-13-57a9797
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0


---

<--- SIP read from UDP:12.194.45.53:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP MY.EXTERNAL.IP.V4:5060;branch=z9hG4bK0a56860c
From: "Company name" <sip:8285555555@MY.EXTERNAL.IP.V4>;tag=as5d7e445b
To: <sip:18281231234@12.194.45.53>;tag=5593764187682827_c1b04.1.2.1485845071941.0_102470_203972
Call-ID: 4ac542d85b75129a6605638d428c29d4@MY.EXTERNAL.IP.V4:5060
CSeq: 103 BYE
Content-Length: 0

<------------->
--- (7 headers 0 lines) ---
Really destroying SIP dialog '4ac542d85b75129a6605638d428c29d4@MY.EXTERNAL.IP.V4:5060' Method: INVITE

rtp set debug on

Sent RTP packet to      12.194.45.53:29348 (type 18, seq 028957, ts 173200, len 000020)
Got  RTP packet from    192.168.0.201:5004 (type 09, seq 042358, ts 12299520, len 000160)
Sent RTP packet to      12.194.45.53:29348 (type 18, seq 028958, ts 173360, len 000020)
Sent RTP P2P packet to 192.168.0.201:5004 (type 18, len 000030)
Got  RTP packet from    192.168.0.201:5004 (type 09, seq 042359, ts 12299680, len 000160)
Sent RTP packet to      12.194.45.53:29348 (type 18, seq 028959, ts 173520, len 000020)
Sent RTP P2P packet to 192.168.0.201:5004 (type 18, len 000030)
Got  RTP packet from    192.168.0.201:5004 (type 09, seq 042360, ts 12299840, len 000160)
Sent RTP packet to      12.194.45.53:29348 (type 18, seq 028960, ts 173680, len 000020)
Got  RTP packet from    192.168.0.201:5004 (type 09, seq 042361, ts 12300000, len 000160)
Sent RTP packet to      12.194.45.53:29348 (type 18, seq 028961, ts 173840, len 000020)
Sent RTP P2P packet to 192.168.0.201:5004 (type 18, len 000030)

(continued from above due to char limit)

MixMonitor used (fixed) :innocent:

<--- SIP read from UDP:192.168.0.201:5060 --->
INVITE sip:300@192.168.0.129 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.201:5060;branch=z9hG4bK1018995706;rport
From: "Office phone" <sip:phone@192.168.0.129>;tag=1757541109
To: <sip:300@192.168.0.129>
Call-ID: 390657757-5060-104@BJC.BGI.A.CAB
CSeq: 160 INVITE
Contact: "Office phone" <sip:phone@192.168.0.201:5060>
X-Grandstream-PBX: true
Max-Forwards: 70
User-Agent: Grandstream GXP2130 1.0.7.97
Privacy: none
P-Preferred-Identity: "Office phone" <sip:phone@192.168.0.129>
P-Access-Network-Info: IEEE-EUI-48;eui-48-addr=00-22-6B-3A-E7-2C
P-Emergency-Info: IEEE-EUI-48;eui-48-addr=00-0B-82-93-C0-57
Supported: replaces, path, timer
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Type: application/sdp
Accept: application/sdp, application/dtmf-relay
Content-Length: 444

v=0
o=phone 8000 8000 IN IP4 192.168.0.201
s=SIP Call
c=IN IP4 192.168.0.201
t=0 0
m=audio 5004 RTP/AVP 9 0 8 4 18 2 97 123 101
a=sendrecv
a=rtpmap:9 G722/8000
a=ptime:20
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:2 G726-32/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=rtpmap:123 opus/48000/2
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
<------------->
--- (19 headers 20 lines) ---
Sending to 192.168.0.201:5060 (no NAT)
Sending to 192.168.0.201:5060 (no NAT)
Using INVITE request as basis request - 390657757-5060-104@BJC.BGI.A.CAB
Found peer 'phone' for 'phone' from 192.168.0.201:5060

<--- Reliably Transmitting (no NAT) to 192.168.0.201:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.201:5060;branch=z9hG4bK1018995706;received=192.168.0.201;rport=5060
From: "Office phone" <sip:phone@192.168.0.129>;tag=1757541109
To: <sip:300@192.168.0.129>;tag=as30a253a2
Call-ID: 390657757-5060-104@BJC.BGI.A.CAB
CSeq: 160 INVITE
Server: Asterisk PBX GIT-13-57a9797
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="4336b9de"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '390657757-5060-104@BJC.BGI.A.CAB' in 6400 ms (Method: INVITE)

<--- SIP read from UDP:192.168.0.201:5060 --->
ACK sip:300@192.168.0.129 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.201:5060;branch=z9hG4bK1018995706;rport
From: "Office phone" <sip:phone@192.168.0.129>;tag=1757541109
To: <sip:300@192.168.0.129>;tag=as30a253a2
Call-ID: 390657757-5060-104@BJC.BGI.A.CAB
CSeq: 160 ACK
Content-Length: 0

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

<--- SIP read from UDP:192.168.0.201:5060 --->
INVITE sip:300@192.168.0.129 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.201:5060;branch=z9hG4bK549457769;rport
From: "Office phone" <sip:phone@192.168.0.129>;tag=1757541109
To: <sip:300@192.168.0.129>
Call-ID: 390657757-5060-104@BJC.BGI.A.CAB
CSeq: 161 INVITE
Contact: "Office phone" <sip:phone@192.168.0.201:5060>
Authorization: Digest username="phone", realm="asterisk", nonce="4336b9de", uri="sip:300@192.168.0.129", response="cff637e0c139d56498b2acc77f36d6b0", algorithm=MD5
X-Grandstream-PBX: true
Max-Forwards: 70
User-Agent: Grandstream GXP2130 1.0.7.97
Privacy: none
P-Preferred-Identity: "Office phone" <sip:phone@192.168.0.129>
P-Access-Network-Info: IEEE-EUI-48;eui-48-addr=00-22-6B-3A-E7-2C
P-Emergency-Info: IEEE-EUI-48;eui-48-addr=00-0B-82-93-C0-57
Supported: replaces, path, timer
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Type: application/sdp
Accept: application/sdp, application/dtmf-relay
Content-Length: 444

v=0
o=phone 8000 8000 IN IP4 192.168.0.201
s=SIP Call
c=IN IP4 192.168.0.201
t=0 0
m=audio 5004 RTP/AVP 9 0 8 4 18 2 97 123 101
a=sendrecv
a=rtpmap:9 G722/8000
a=ptime:20
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:2 G726-32/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=rtpmap:123 opus/48000/2
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
<------------->
--- (20 headers 20 lines) ---
Sending to 192.168.0.201:5060 (no NAT)
Using INVITE request as basis request - 390657757-5060-104@BJC.BGI.A.CAB
Found peer 'phone' for 'phone' from 192.168.0.201:5060
  == Using SIP RTP CoS mark 5
Found RTP audio format 9
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 4
Found RTP audio format 18
Found RTP audio format 2
Found RTP audio format 97
Found RTP audio format 123
Found RTP audio format 101
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 G723 for ID 4
Found audio description format G729 for ID 18
Found audio description format G726-32 for ID 2
Found audio description format iLBC for ID 97
Found audio description format opus for ID 123
Found audio description format telephone-event for ID 101
Capabilities: us - (g722), peer - audio=(ulaw|g726|g723|alaw|g722|g729|ilbc|opus)/video=(nothing)/text=(nothing), combined - (g722)
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.201:5004
Looking for 300 in TheOffice (domain 192.168.0.129)
sip_route_dump: route/path hop: <sip:phone@192.168.0.201:5060>

<--- Transmitting (no NAT) to 192.168.0.201:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.0.201:5060;branch=z9hG4bK549457769;received=192.168.0.201;rport=5060
From: "Office phone" <sip:phone@192.168.0.129>;tag=1757541109
To: <sip:300@192.168.0.129>
Call-ID: 390657757-5060-104@BJC.BGI.A.CAB
CSeq: 161 INVITE
Server: Asterisk PBX GIT-13-57a9797
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:300@192.168.0.129:5060>
Content-Length: 0


<------------>
    -- Executing [300@TheOffice:1] NoOp("SIP/phone-00000002", "") in new stack
    -- Executing [300@TheOffice:2] Answer("SIP/phone-00000002", "") in new stack
Audio is at 23614
Adding codec g722 to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Reliably Transmitting (no NAT) to 192.168.0.201:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.201:5060;branch=z9hG4bK549457769;received=192.168.0.201;rport=5060
From: "Office phone" <sip:phone@192.168.0.129>;tag=1757541109
To: <sip:300@192.168.0.129>;tag=as77c71a04
Call-ID: 390657757-5060-104@BJC.BGI.A.CAB
CSeq: 161 INVITE
Server: Asterisk PBX GIT-13-57a9797
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:300@192.168.0.129:5060>
Content-Type: application/sdp
Require: timer
Content-Length: 259

v=0
o=root 140441553 140441553 IN IP4 192.168.0.129
s=Asterisk PBX GIT-13-57a9797
c=IN IP4 192.168.0.129
t=0 0
m=audio 23614 RTP/AVP 9 101
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

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

<--- SIP read from UDP:192.168.0.201:5060 --->
ACK sip:300@192.168.0.129:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.201:5060;branch=z9hG4bK1806072737;rport
From: "Office phone" <sip:phone@192.168.0.129>;tag=1757541109
To: <sip:300@192.168.0.129>;tag=as77c71a04
Call-ID: 390657757-5060-104@BJC.BGI.A.CAB
CSeq: 161 ACK
Contact: <sip:phone@192.168.0.201:5060>
X-Grandstream-PBX: true
Max-Forwards: 70
Supported: replaces, path, timer
User-Agent: Grandstream GXP2130 1.0.7.97
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0

<------------->
--- (13 headers 0 lines) ---
       > 0x7fa118021d10 -- Probation passed - setting RTP source address to 192.168.0.201:5004
    -- Executing [300@TheOffice:3] Goto("SIP/phone-00000002", "test-att-out") in new stack
    -- Goto (TheOffice,300,4)
    -- Executing [300@TheOffice:4] NoOp("SIP/phone-00000002", "") in new stack
    -- Executing [300@TheOffice:5] Set("SIP/phone-00000002", "CALLERID(name)=Company name") in new stack
    -- Executing [300@TheOffice:6] Set("SIP/phone-00000002", "CALLERID(num)=8285555555") in new stack
    -- Executing [300@TheOffice:7] MixMonitor("SIP/phone-00000002", "/var/spool/asterisk/monitor/att-test.wav") in new stack
    -- Executing [300@TheOffice:8] Dial("SIP/phone-00000002", "SIP/att-1/18281231234") in new stack
  == Using SIP RTP CoS mark 5
Audio is at 29190
Adding codec g729 to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 12.194.45.53:5060:
INVITE sip:18281231234@12.194.45.53 SIP/2.0
Via: SIP/2.0/UDP MY.EXTERNAL.IP.V4:5060;branch=z9hG4bK7ec39e98
Max-Forwards: 70
From: "Company name" <sip:8285555555@MY.EXTERNAL.IP.V4>;tag=as20e8de36
To: <sip:18281231234@12.194.45.53>
Contact: <sip:8285555555@MY.EXTERNAL.IP.V4:5060>
Call-ID: 3044a6b06012c9296de0ca1c250d3cd1@MY.EXTERNAL.IP.V4:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX GIT-13-57a9797
Date: Tue, 31 Jan 2017 20:14:26 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 284

v=0
o=root 524915372 524915372 IN IP4 MY.EXTERNAL.IP.V4
s=Asterisk PBX GIT-13-57a9797
c=IN IP4 MY.EXTERNAL.IP.V4
t=0 0
m=audio 29190 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:230
a=sendrecv

---
    -- Called SIP/att-1/18281231234
  == Begin MixMonitor Recording SIP/phone-00000002

<--- SIP read from UDP:12.194.45.53:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP MY.EXTERNAL.IP.V4:5060;branch=z9hG4bK7ec39e98
From: "Company name" <sip:8285555555@MY.EXTERNAL.IP.V4>;tag=as20e8de36
To: <sip:18281231234@12.194.45.53>
Call-ID: 3044a6b06012c9296de0ca1c250d3cd1@MY.EXTERNAL.IP.V4:5060
CSeq: 102 INVITE

<------------->
--- (6 headers 0 lines) ---
       > 0x7fa11c019f50 -- Probation passed - setting RTP source address to 12.194.45.53:16836

<--- SIP read from UDP:12.194.45.53:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP MY.EXTERNAL.IP.V4:5060;branch=z9hG4bK7ec39e98
From: "Company name" <sip:8285555555@MY.EXTERNAL.IP.V4>;tag=as20e8de36
To: <sip:18281231234@12.194.45.53>;tag=7861493002176287_c4b09.2.3.1483953233007.0_2700742_5361675
Call-ID: 3044a6b06012c9296de0ca1c250d3cd1@MY.EXTERNAL.IP.V4:5060
CSeq: 102 INVITE
Allow: INVITE,ACK,CANCEL,BYE,INFO,PRACK
Contact: <sip:12.194.45.53:5060;transport=udp>
Content-Length: 258
Content-Disposition: session; handling=required
Content-Type: application/sdp

v=0
o=Sonus_UAC 28130 3761 IN IP4 12.194.45.53
s=SIP Media Capabilities
c=IN IP4 12.194.45.53
t=0 0
m=audio 16836 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=maxptime:30
<------------->
--- (11 headers 12 lines) ---
sip_route_dump: route/path hop: <sip:12.194.45.53:5060;transport=udp>
Found RTP audio format 18
Found RTP audio format 101
Found audio description format G729 for ID 18
Found audio description format telephone-event for ID 101
Capabilities: us - (g729), peer - audio=(g729)/video=(nothing)/text=(nothing), combined - (g729)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 12.194.45.53:16836
    -- SIP/att-1-00000003 is ringing
    -- SIP/att-1-00000003 is making progress passing it to SIP/phone-00000002
       > 0x7fa11c019f50 -- Probation passed - setting RTP source address to 12.194.45.53:16836

<--- SIP read from UDP:12.194.45.53:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP MY.EXTERNAL.IP.V4:5060;branch=z9hG4bK7ec39e98
From: "Company name" <sip:8285555555@MY.EXTERNAL.IP.V4>;tag=as20e8de36
To: <sip:18281231234@12.194.45.53>;tag=7861493002176287_c4b09.2.3.1483953233007.0_2700742_5361675
Call-ID: 3044a6b06012c9296de0ca1c250d3cd1@MY.EXTERNAL.IP.V4:5060
CSeq: 102 INVITE
Allow: INVITE,ACK,CANCEL,BYE,INFO,PRACK
Accept: application/sdp, application/isup, application/dtmf, application/dtmf-relay, multipart/mixed
Contact: <sip:12.194.45.53:5060;transport=udp>
Content-Length: 258
Content-Disposition: session; handling=required
Content-Type: application/sdp

v=0
o=Sonus_UAC 28130 3761 IN IP4 12.194.45.53
s=SIP Media Capabilities
c=IN IP4 12.194.45.53
t=0 0
m=audio 16836 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=maxptime:30
<------------->
--- (12 headers 12 lines) ---
sip_route_dump: route/path hop: <sip:12.194.45.53:5060;transport=udp>
set_destination: Parsing <sip:12.194.45.53:5060;transport=udp> for address/port to send to
set_destination: set destination to 12.194.45.53:5060
Transmitting (no NAT) to 12.194.45.53:5060:
ACK sip:12.194.45.53:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP MY.EXTERNAL.IP.V4:5060;branch=z9hG4bK0146d60a
Max-Forwards: 70
From: "Company name" <sip:8285555555@MY.EXTERNAL.IP.V4>;tag=as20e8de36
To: <sip:18281231234@12.194.45.53>;tag=7861493002176287_c4b09.2.3.1483953233007.0_2700742_5361675
Contact: <sip:8285555555@MY.EXTERNAL.IP.V4:5060>
Call-ID: 3044a6b06012c9296de0ca1c250d3cd1@MY.EXTERNAL.IP.V4:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX GIT-13-57a9797
Content-Length: 0


---
    -- SIP/att-1-00000003 answered SIP/phone-00000002
    -- Channel SIP/att-1-00000003 joined 'simple_bridge' basic-bridge <9aeea028-ffc2-4ae8-aab3-65e55985daf9>
    -- Channel SIP/phone-00000002 joined 'simple_bridge' basic-bridge <9aeea028-ffc2-4ae8-aab3-65e55985daf9>

<--- SIP read from UDP:192.168.0.201:5060 --->
BYE sip:300@192.168.0.129:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.201:5060;branch=z9hG4bK941636772;rport
From: "Office phone" <sip:phone@192.168.0.129>;tag=1757541109
To: <sip:300@192.168.0.129>;tag=as77c71a04
Call-ID: 390657757-5060-104@BJC.BGI.A.CAB
CSeq: 162 BYE
Contact: <sip:phone@192.168.0.201:5060>
X-Grandstream-PBX: true
Max-Forwards: 70
Supported: replaces, path, timer
User-Agent: Grandstream GXP2130 1.0.7.97
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0

<------------->
--- (13 headers 0 lines) ---
Sending to 192.168.0.201:5060 (no NAT)
Scheduling destruction of SIP dialog '390657757-5060-104@BJC.BGI.A.CAB' in 6400 ms (Method: BYE)

<--- Transmitting (no NAT) to 192.168.0.201:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.201:5060;branch=z9hG4bK941636772;received=192.168.0.201;rport=5060
From: "Office phone" <sip:phone@192.168.0.129>;tag=1757541109
To: <sip:300@192.168.0.129>;tag=as77c71a04
Call-ID: 390657757-5060-104@BJC.BGI.A.CAB
CSeq: 162 BYE
Server: Asterisk PBX GIT-13-57a9797
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<------------>
    -- Channel SIP/phone-00000002 left 'simple_bridge' basic-bridge <9aeea028-ffc2-4ae8-aab3-65e55985daf9>
    -- Channel SIP/att-1-00000003 left 'simple_bridge' basic-bridge <9aeea028-ffc2-4ae8-aab3-65e55985daf9>
Scheduling destruction of SIP dialog '3044a6b06012c9296de0ca1c250d3cd1@MY.EXTERNAL.IP.V4:5060' in 6400 ms (Method: INVITE)
  == Spawn extension (TheOffice, 300, 8) exited non-zero on 'SIP/phone-00000002'
  == MixMonitor close filestream (mixed)
set_destination: Parsing <sip:12.194.45.53:5060;transport=udp> for address/port to send to
set_destination: set destination to 12.194.45.53:5060
Reliably Transmitting (no NAT) to 12.194.45.53:5060:
BYE sip:12.194.45.53:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP MY.EXTERNAL.IP.V4:5060;branch=z9hG4bK0455e52b
Max-Forwards: 70
From: "Company name" <sip:8285555555@MY.EXTERNAL.IP.V4>;tag=as20e8de36
To: <sip:18281231234@12.194.45.53>;tag=7861493002176287_c4b09.2.3.1483953233007.0_2700742_5361675
Call-ID: 3044a6b06012c9296de0ca1c250d3cd1@MY.EXTERNAL.IP.V4:5060
CSeq: 103 BYE
User-Agent: Asterisk PBX GIT-13-57a9797
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0


---
  == End MixMonitor Recording SIP/phone-00000002

<--- SIP read from UDP:12.194.45.53:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP MY.EXTERNAL.IP.V4:5060;branch=z9hG4bK0455e52b
From: "Company name" <sip:8285555555@MY.EXTERNAL.IP.V4>;tag=as20e8de36
To: <sip:18281231234@12.194.45.53>;tag=7861493002176287_c4b09.2.3.1483953233007.0_2700742_5361675
Call-ID: 3044a6b06012c9296de0ca1c250d3cd1@MY.EXTERNAL.IP.V4:5060
CSeq: 103 BYE
Content-Length: 0

<------------->
--- (7 headers 0 lines) ---
Really destroying SIP dialog '3044a6b06012c9296de0ca1c250d3cd1@MY.EXTERNAL.IP.V4:5060' Method: INVITE

rtp set debug on

Got  RTP packet from    12.194.45.62:17700 (type 18, seq 000838, ts 201120, len 000030)
Sent RTP packet to      192.168.0.201:5004 (type 09, seq 018649, ts 190360, len 000160)
Sent RTP packet to      192.168.0.201:5004 (type 09, seq 018650, ts 190520, len 000160)
Got  RTP packet from    192.168.0.201:5004 (type 09, seq 049151, ts 11751360, len 000160)
Sent RTP packet to      12.194.45.62:17700 (type 18, seq 006531, ts 190472, len 000020)
Got  RTP packet from    192.168.0.201:5004 (type 09, seq 049152, ts 11751520, len 000160)
Sent RTP packet to      12.194.45.62:17700 (type 18, seq 006532, ts 190632, len 000020)
Got  RTP packet from    12.194.45.62:17700 (type 18, seq 000839, ts 201360, len 000030)
Sent RTP packet to      192.168.0.201:5004 (type 09, seq 018651, ts 190680, len 000160)
Got  RTP packet from    192.168.0.201:5004 (type 09, seq 049153, ts 11751680, len 000160)
Sent RTP packet to      12.194.45.62:17700 (type 18, seq 006533, ts 190792, len 000020)

sip.conf

bindaddr=0.0.0.0
bindport=5060
qualify=yes
qualifyfreq=60
disallow=all
allow=ulaw

vmexten=200
checkmwi=10
context=unauthenticated
allowguest=no
allowoverlap=no
udpbindaddr=0.0.0.0
tcpenable=no
tcpbindaddr=0.0.0.0
transport=udp
srvlookup=yes
trustrpid=yes
sendrpid=pai
dtmfmode=rfc2833
alwaysauthreject=yes

allowsubscribe=yes
subscribecontext=TheOffice
notifyringing=yes
notifyhold=yes
notifycid=yes
callcounter=yes

localnet=192.168.0.0/255.255.0.0
externaddr=MY.EXTERNAL.IP.V4

directmedia=no
rtcachefriends=yes
rtupdate=yes

[phone]
host=dynamic
type=friend
context=TheOffice
dtmfmode=rfc2833
disallow=all
allow=!all,g722
callingpres=allowed_passed_screen
recordonfeature=dynamicfeature1
recordofffeature=dynamicfeature2
busylevel=1
description=Office phone

[att-1]
type=peer
dtmfmode=rfc2833
qualify=2000
sendrpid=no
srvlookup=no
videosupport=no
context=inbound
disallow=all
allow=g729
host=12.194.45.53
description=My trunk

rip.conf

;rtp.conf
rtpstart=16384
rtpend=32767

I think I am pretty close!

The problem occurs whenever the native_rtp bridge technology is used. In Asterisk, my phones are configured to only use the G.722 codec (allow=!all,g722). My trunk is configured to only use G.729 (allow=!all,g729). However, the Grandstream GXP2130 sends media attribute rtpmap:18 G729/8000 in the INVITE message. This causes Asterisk to send RTP packets with the payload type of G.722 and G.729 in the same call which the GXP2130 seems to not like. Is it normal for two different RTP payload types to be used in the same call? (the seq number and sync source id do change when it switches from 722 to 729, src/dest ports are same)

The workarounds I’ve found is to disable G.729 on the phone so it’s no longer sent in the invite message. (I probably should have done this to begin with.) I assumed that the allow=!all,g722 setting within sip.conf would have overrode the codecs listed in the INVITE message… The other workaround is to suspend the native_rtp bridge from console.

I have another SIP phone, a Grandstream DP750, that works with native_rtp and RTP packets switching from 722 to 729 mid-call. So perhaps this is a quirk with the GXP2130?

Can anybody weigh in on whether or not I am on the right track? My SIP/RTP knowledge is really limited. Google reports a few people with similar problems with native_rtp and one-way but there’s no way to know if they are the same. Using 13.14.0-rc2. Thanks for reading!

While not that common, it is perfectly legal to hop between codecs.

chan_sip, doesn’t handle SSRC particularly well.