Project

General

Profile

Actions

Bug #2728

closed

Align better with 48.103 for AoIP user plane (AMR marker bit for frame following ONSET)

Added by laforge over 6 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
12/09/2017
Due date:
% Done:

100%

Spec Reference:

Description

In most aspects we seem to do what 48.103 States. However, e.g. our payload types for RTP differ from whats specified there. Also not sure aboiut Details oft MARKER behavior and behavior with regard to lost frames on radio interface.


Files


Related issues

Related to OsmoMGW - Feature #3798: Implement bandwidth-efficient AMR payload as per RFC 4867 Section 4.3Resolveddexter02/12/2019

Actions
Actions #1

Updated by laforge over 6 years ago

  • Description updated (diff)
Actions #2

Updated by dexter almost 6 years ago

Note:
I just learned that there are profiles that are just statically defined by the payload type number. And there are dynamics payload types that require an rtpmap in SDP to be fully described.
https://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml
We also seem to use payload type 255 a lot, however this one seems to be illegal because the dynamic range is from 96 to 127 only.

Actions #3

Updated by laforge almost 6 years ago

On Mon, Jun 04, 2018 at 07:55:24PM +0000, dexter [REDMINE] wrote:

I just learned that there are profiles that are just statically defined by the payload type number. And there are dynamics payload types that require an rtpmap in SDP to be fully described.
https://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml

yes, that's standard RTP operation since the 1990ies. However, the important part for AoIP is that 3GPP
actually defined some "fixed" types in the "dynamic payload type" range.

We also seem to use payload type 255 a lot, however this one seems to be illegal because the dynamic range is from 96 to 127 only.

please open an issue for this, I think this is a quite serious separate bug which should be resolved rather quickly.

Actions #4

Updated by dexter almost 6 years ago

yes, that's standard RTP operation since the 1990ies. However, the important part for AoIP is that 3GPP
actually defined some "fixed" types in the "dynamic payload type" range.

Thats new to me. Is this defined in 3GPP TS 48.008?

please open an issue for this, I think this is a quite serious separate bug which should be resolved rather quickly.

In osmo-mgw I have elimiated the problem while cleaing up the SDP parser. In the client I got rid of the hardcoded SDP, so its gone there as well. See also #3334

Actions #5

Updated by laforge almost 6 years ago

Hi dexter,

On Mon, Jun 11, 2018 at 07:44:24PM +0000, dexter [REDMINE] wrote:

yes, that's standard RTP operation since the 1990ies. However, the important part for AoIP is that 3GPP
actually defined some "fixed" types in the "dynamic payload type" range.

Thats new to me. Is this defined in 3GPP TS 48.008?

No. Please read the subject f this issue. It states exactly which 3GPP TS we have to match ;)

Specifically, I was referring to
"Table 5.4.2.2.1: Type of data transported versus RTP Payload Type" when
creating this issue. It lists 110 for EFR, 111 for HR, 112 for AMR

Actions #6

Updated by dexter almost 6 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50

The latest updates to osmo-mgw, which are currently in review also cover this topic. Both libosmo-mgcp and libosmo-mgcp-client now use the 3gpp/IANA defined payload types. So from the payload type perspective we should be good now.

See also:
https://gerrit.osmocom.org/#/c/osmo-mgw/+/9649/
https://gerrit.osmocom.org/#/c/osmo-mgw/+/9648/

What still remains is the MARKER behaviour / lost frames on radio topic.

Actions #7

Updated by dexter almost 6 years ago

  • % Done changed from 50 to 60

As expected many of the BSC tests now fail because osmo-bsc does not set the codec information yet. I have now modifed gscon that it sets basic codec information. This should make the tests pass again.

See also:
https://gerrit.osmocom.org/#/c/osmo-bsc/+/9738/

The TTCN3 tests still use wrong/hardoced codec information. This is now also fixed.

See also:
https://gerrit.osmocom.org/#/c/osmo-ttcn3-hacks/+/9737/

Actions #8

Updated by laforge almost 6 years ago

On Mon, Jun 25, 2018 at 07:41:19PM +0000, dexter [REDMINE] wrote:

https://gerrit.osmocom.org/#/c/osmo-bsc/+/9738/
https://gerrit.osmocom.org/#/c/osmo-ttcn3-hacks/+/9737/

both patches now merged.

Actions #9

Updated by dexter almost 6 years ago

Note: I think we now should have a look at the RTP-Streams as well since there are still problmatic payload types inside the streams. (on a trace with AMR-HR/AMR-FR the streams are tagged with 98, which is wrong)

Actions #10

Updated by dexter almost 6 years ago

  • % Done changed from 60 to 80

I have now changed the constants which are used for RTP streams in various places. I have changed those constants now so that they match the 3GPP recommendations:

https://gerrit.osmocom.org/#/c/libosmo-abis/+/9779 ortp: use 3GPP assigned payload type numbers
https://gerrit.osmocom.org/#/c/libosmo-netif/+/9780 rtp: use 3GPP assigned payload type numbers
https://gerrit.osmocom.org/#/c/osmo-bsc/+/9781 rsl: use 3GPP assigned payload type numbers
https://gerrit.osmocom.org/#/c/openbsc/+/9782 rtp_proxy: use 3GPP assigned payload type numbers

Actions #11

Updated by dexter almost 6 years ago

There was the suggestion not only to change the various constants but also to limit the number of redundant definitions. When we put openbsc aside we still have 3 places where the payload type constants for the RTP-Streams are defined. (Note: We now focusing on the payload type tags used in the RTP packets, not on the ones in the MGCP messages.)

I have abandoned the changes I made in openbsc (osmo-nitb). I thought it would be better to use the 3gpp assigned payload types there as well, but its also true that we do not have any benefit from this while we introduce a regression risk.

In libosmo-netif I kept it the way it is as we do not want to introduce any dependencies here. So I did not do any further changes here.

In osmo-bsc I removed the constants completely and used the ones already present in libosmo-abis. This works fine. However, we need to make sure that we do not introduce a regression with nanoBTS. (I am also not sure about the nanoBTS support in osmo-bsc, the tests I did some months ago were not very promising but I also do not receive any complaints from the tester)

For now I tagged the change in osmo-bsc as WIP until I managed to do a test using the nanobts.

While working on the RTP stream payload types we also realized that osmo-mgw can not do payload type translation yet. See also #3384 If we resolve this, we may also very well stick to the non-3gpp payload types on the BSS/BTS side, however I would recommend to use the 3gpp assigned payload types there as well if there are no problems with nanoBTS.

Actions #12

Updated by dexter almost 6 years ago

  • Status changed from In Progress to Stalled
  • % Done changed from 80 to 90

I think we are very close to complete here. The final bits (Payload type numbers inside the RTP stream) require a discussion.

Actions #13

Updated by dexter over 5 years ago

  • Status changed from Stalled to In Progress
  • % Done changed from 90 to 80

Osmo-bsc now negotiates the payload types that we also use in the RTP packets. So on the BSS side the RTP flow is now coherent to what we have negotiated via MGCP/SDP

https://gerrit.osmocom.org/#/c/osmo-bsc/+/10173 gscon: use BSS-common payload types on BSS side

(There is also still work to do on osmo-msc, it does not yet set proper payload type in the MGCP/SDP, this has to be fixed as well.)

Actions #14

Updated by dexter over 5 years ago

I have looked through the code of the MSC. We do not care about the codec much yet. I am currently fixing it. For the internal MNCC I think it will simple to fix, but for the external MNCC we will have to be a bit harder since we need to exchange the codecs with the PBX as well.

The patches that fix the BSC side are not through the review yet. I see there are merge conflicts I have to fix.

Actions #15

Updated by dexter over 5 years ago

I noticed there were a lot of changes in osmo-bsc, so I have revised my patch to use consistant payload types in RTP packets and MGCP.
See also: https://gerrit.osmocom.org/#/c/osmo-bsc/+/10287

Actions #16

Updated by dexter over 5 years ago

On the MSC side I now extract the Speech Codec (Choosen) field. Based on the content I can set the codec that has to be negotiated to the MGW on the RAN side. The codec information on the CN side is the same when we run with the internal MNCC. When we run on the external MNCC we must take the codec information from the MNCC data we get via the socket.

Unfortunately there ssems to be problems with the external MNCC interface. I do not understand how it is used to signal dynamic payload types. I contacted holger to get some info about this but I fear we have to upgrade the MNCC interface a bit.

Actions #17

Updated by dexter over 5 years ago

Note: Probably also interesting in the context of this ticket and Speech Codec (Choosen): #3529

Actions #18

Updated by laforge over 5 years ago

dexter: What's the status here? Notes about the MNCC interface are not applicable here. What's needed is an analysis/update of which parts of 48.103 we are compliant to, which parts we are not, and which parts we don't know. And then add checkbox items or sub-tasks for those incompatible/dont-know items here. Thanks!

Actions #19

Updated by dexter over 5 years ago

A lot of the compliance was depending on correct signaling on the MGCP side, especially payload types were a problem here. Most of this is now fiexed but we still have a problem is osmo-msc. When we use the external MNCC we do not negotiate the payload type, this leads into violation of 48.103 because we get incorrect payload type numbers in the RTP packets. Apart from that most things look ok. I have gone over the spec and checked some points:

4.    Transport over TDM:
           (Not implemented yet)
5.     Transport over IP:
           OK: Port numbering
           OK: Same ports for Send/Receive
5.4.2:    RTP
        OK: RTP Header version
        OK: No Padding
        OK: No Extension
        OK: CSRC=0
        CHECK: Marker Bit, unknown yet, must check.
        OK: Payload type (when codec is correctly negotiated,
            there are problems in osmo-msc and MNCC so that we
            do not know the right codec and therefore the payload
            type will be wrong then. In principle osmo-mgw does
            patch the payload types inthe RTP stream so that they
            are correct on the egress connection.)
        OK: Packetization time (20ms)
        OK: RTCP (optional)
5.5    RTP Multiplexing:
        (Not Implemented yet)
5.6    Transport of CSData:
        (Not omplemented yet)
5.7    Transport during local switching
        (We do not release any endpoints while local switching, this looks ok.)

I did not check the marker bit yet. The spec says that on AMR the ONSET frame must have the marker bit set and also the voice frame that follows after the ONSET. This still needs to be checked. I also found that we do not have RTP multiplexing, nor do we have CSData, but I think those are not all important anyway.

Actions #20

Updated by laforge over 5 years ago

Ok, so we need to check for the marker bit usage, and then we can close this issue.

Actions #21

Updated by dexter over 5 years ago

I now had a look at the marker behaviour. The spec says that the mark bit should be set for every ONSET frame and for the following voice frame. In the trace I can only see a marker once when the RTP stream starts, so I think there is a problem here. This needs to be investigated on osmo-bts. As far as I understood the payload is generated by the phy and used 1:1 in the RTP stream, we just add the RTP header.

Attached one finds a trace that shows the problem. I also did a trace with GSM-FR and the behavior is exactly the same there, so my guess is that we just have the same marker behavior for all codecs and did not program an exception for AMR.

Actions #22

Updated by laforge over 5 years ago

On Tue, Oct 09, 2018 at 09:49:29AM +0000, dexter [REDMINE] wrote:

I now had a look at the marker behaviour. The spec says that the mark
bit should be set for every ONSET frame and for the following voice
frame. In the trace I can only see a marker once when the RTP stream
starts, so I think there is a problem here.

Sad :/

This needs to be investigated on osmo-bts. As far as I understood the
payload is generated by the phy and used 1:1 in the RTP stream, we
just add the RTP header.

Yes, and the marker bit is part of the RTP header which we generate.

grep for things like lchan_set_marker() and lchan->rtp_tx_marker in the osmo-bts source
code and you should find some code that is supposed to set the marker bits.

The common part above l1sap uses osmo_rtp_send_frame_ext() with lchan->rtp_tx_marker
as a flag to state whether or not the marker bit shall be sent in the next RTP frame.
Once it has been set once, it is reset to false.

You an see that rtp_tx_marker is set by osmo-bts-sysmo and osmo-bts-lc15
in the AMR related use cases...

Actions #23

Updated by laforge over 5 years ago

it may make sense to shift this over to msuraev as he had been working on AMR DTX in the past?

Actions #24

Updated by dexter over 5 years ago

  • Assignee changed from dexter to msuraev

I think it makes sense when max does it, he probably knows better where to fix it.

msuraev Have a look at update #19. The only thing that is still missing is the slightly different marker behavior when AMR is used.

Actions #25

Updated by msuraev over 5 years ago

  • Status changed from In Progress to Stalled
Actions #26

Updated by laforge about 5 years ago

  • Related to Feature #3798: Implement bandwidth-efficient AMR payload as per RFC 4867 Section 4.3 added
Actions #27

Updated by laforge almost 5 years ago

  • Subject changed from Align better with 48.103 for AoIP user plane to Align better with 48.103 for AoIP user plane (AMR marker bit for frame following ONSET)
  • Assignee changed from msuraev to 4368
Actions #28

Updated by laforge over 4 years ago

  • Assignee deleted (4368)
Actions #29

Updated by dexter about 4 years ago

In #2978 we implement the implement the correct setting of the marker bit for osmo-bts-trx. The marker bit is now set in the first actual voice frame after ONSET (The ONSET frame itself exists only on the radio link, it does not generate an RTP frame)

Actions #30

Updated by laforge almost 4 years ago

Actions #31

Updated by laforge about 3 years ago

  • Status changed from Stalled to Resolved
  • % Done changed from 80 to 100

this should have been closed 10 motnhs ago, when #2978 was closed.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)