I just realized a curiosity in the RTP payload type numbers, visible in the attached pcap.
The codec is re-assigned successfully, and during the test, voice quality was clear on both sides.
But both BTS and BSC fail to reflect the modified RTP payload in the payload type number.
It seems that both correctly change the payload to AMR, but still stick with the unchanged payload type number PT=3.
When following an IuUP/RTP packet from the nano3G to the BTS,
- there is a change in the payload bytes from IuUP PT=96 to plain AMR PT=112
(packets 16090, 16093, 16103)
- but then the identical payload is forwarded as PT=3, which would have to be GSM FR1.
(16117, 16122)
Here is a call chain analysis:
--- Call chain 1
192.168.2.78:16384<->192.168.2.52:20004<->192.168.2.52:20006<->127.0.0.6:10006<->127.0.0.6:10004<->127.0.0.6:10008<->127.0.0.6:10010<->192.168.2.52:40006<->192.168.2.52:40004<->192.168.2.218:1028
rtpbridge/1@bsc0
| 892B666D: r:192.168.2.78:16384 <-> l:192.168.2.52:20004 None 'audio 20004 RTP/AVP 3' tx<-{'-': 1, '3': 272} rx->{'3': 874}
- CRCX None None only payload-type-nr=3 ^^^^^^^^^^^^^^^^^^^^^^^
- CRCX-OK audio 20004 RTP/AVP 3 None between BTS and BSC, both directions
- MDCX audio 16384 RTP/AVP 3 None
- MDCX-OK audio 20004 RTP/AVP 3 None
| 573D6998: l:192.168.2.52:20006 <-> r:127.0.0.6:10006 None 'audio 20006 RTP/AVP 3' tx->{'3': 868} rx<-{'-': 2, '3': 5, '112': 267}
- CRCX audio 10006 RTP/AVP 3 None sending only PT=3 to MSC ^^^^^^ from MSC: chg to PT=112 ^^^^^
- CRCX-OK audio 20006 RTP/AVP 3 None
<--- missing MDCX to AMR, from BSC to MGW@BSC
rtpbridge/1@msc
| 8A4A8CA2: r:192.168.2.52:20006 <-> l:127.0.0.6:10006 'AMR' 'audio 10006 RTP/AVP 112' tx<-{'-': 2, '3': 5, '112': 267} rx->{'3': 867}
- CRCX None None MSC receives only PT=3, sends a few PT=3 and then switches to AMR PT=112 ^^^
- CRCX-OK audio 10006 RTP/AVP 112 None
- MDCX audio 20006 RTP/AVP 3 None
- MDCX-OK audio 10006 RTP/AVP 3 None
- MDCX audio 20006 RTP/AVP 112 AMR
- MDCX-OK audio 10006 RTP/AVP 112 AMR
| E605366F: l:127.0.0.6:10004 <-> r:127.0.0.6:10008 'AMR' 'audio 10004 RTP/AVP 112' tx->{'-': 1, '112': 611} rx<-{'112': 272}
- CRCX None None The received PT=3 magically all turn to PT=112 ^^^^^^^^
- CRCX-OK audio 10004 RTP/AVP 112 None
- MDCX audio 10008 RTP/AVP 112 AMR
- MDCX-OK audio 10004 RTP/AVP 112 AMR
rtpbridge/2@msc
| 07415E8C: r:127.0.0.6:10004 <-> l:127.0.0.6:10008 'AMR' 'audio 10008 RTP/AVP 112' tx<-{'-': 1, '112': 272} rx->{'-': 1, '112': 611}
- CRCX None None
- CRCX-OK audio 10008 RTP/AVP 112 None
- MDCX audio 10004 RTP/AVP 3 112 AMR
- MDCX-OK audio 10008 RTP/AVP 112 AMR
| 331727C8: l:127.0.0.6:10010 <-> r:192.168.2.52:40006 'VND.3GPP.IUFP' 'audio 10010 RTP/AVP 96' tx->{'96': 604} rx<-{'96': 273}
- CRCX None None
- CRCX-OK audio 10010 RTP/AVP 96 None
- MDCX audio 40006 RTP/AVP 96 VND.3GPP.IUFP
- MDCX-OK audio 10010 RTP/AVP 96 VND.3GPP.IUFP
rtpbridge/1@hnbgw
| 452D9227: r:127.0.0.6:10010 <-> l:192.168.2.52:40006 'VND.3GPP.IUFP' 'audio 40006 RTP/AVP 96' tx<-{'96': 273} rx->{'96': 604}
- CRCX audio 10010 RTP/AVP 96 VND.3GPP.IUFP
- CRCX-OK audio 40006 RTP/AVP 96 VND.3GPP.IUFP
| 77C10E76: l:192.168.2.52:40004 <-> r:192.168.2.218:1028 'VND.3GPP.IUFP' 'audio 40004 RTP/AVP 96' tx->{'96': 604} rx<-{'96': 273}
- CRCX None None
- CRCX-OK audio 40004 RTP/AVP 96 None
- MDCX audio 1028 RTP/AVP 96 VND.3GPP.IUFP
- MDCX-OK audio 40004 RTP/AVP 96 VND.3GPP.IUFP
Things to look at:
- osmo-bts: on Channel Mode Modify to a different codec, do we fail to change the PT number in outgoing RTP?
- osmo-bsc: on Assignment Request from the MSC that modifies the codec, send MDCX to the MGW to adjust
- osmo-mgw: how can AMR magically become GSM-FR between two endpoint conns
osmo-msc is doing the right thing, but we're lucky that it even works.