Project

General

Profile

Bug #2728

Align better with 48.103 for AoIP user plane

Added by laforge 11 months ago. Updated 18 days ago.

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

80%

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.

History

#1 Updated by laforge 11 months ago

  • Description updated (diff)

#2 Updated by dexter 5 months 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.

#3 Updated by laforge 5 months 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.

#4 Updated by dexter 5 months 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

#5 Updated by laforge 5 months 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

#6 Updated by dexter 5 months 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.

#7 Updated by dexter 5 months 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/

#8 Updated by laforge 5 months 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.

#9 Updated by dexter 5 months 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)

#10 Updated by dexter 5 months 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

#11 Updated by dexter 4 months 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.

#12 Updated by dexter 4 months 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.

#13 Updated by dexter 4 months 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.)

#14 Updated by dexter 4 months 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.

#15 Updated by dexter 4 months 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

#16 Updated by dexter 3 months 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.

#17 Updated by dexter 2 months ago

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

#18 Updated by laforge about 2 months 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!

#19 Updated by dexter about 2 months 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.

#20 Updated by laforge about 1 month ago

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

#21 Updated by dexter about 1 month 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.

#22 Updated by laforge about 1 month 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...

#23 Updated by laforge about 1 month ago

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

#24 Updated by dexter 18 days 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.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)