Feature #4717


support Handover with changing codec

Added by neels over 1 year ago. Updated over 1 year ago.

Target version:
Start date:
Due date:
% Done:


Spec Reference:


Analogous to #4716 in OsmoBSC, support a Handover where the codec changes in OsmoMSC.

osmo-msc will mid-call receive a Handover Performed message that indicates a different codec.
osmo-msc should then:

  • make sure the BSS-facing MGW endpoint conn includes that new codec.
  • since osmo-mgw does not transcode, also make sure the PLMN facing MGW endpoint conn includes that new codec.
  • communicate over MNCC that the codec has changed.

If the available codecs are included in the SDP as secondary payload types right from the start,
then the incoming RTP packet may simply change their payload type number on the fly.
However, the PBX should be instructed to also send back RTP in the new codec type (typically by allowing only one codec in the SDP).

This is also related to unmerged patch that implements full SDP between MSC and PBX.

Note that mismatching codec types are not possible for internal MNCC in osmo-msc,
so handover with codec change requires an external PBX that is able to transcode.
(Or alternatively implement transcoding in osmo-mgw...)

Related issues

Related to OsmoBSC - Feature #4716: support handover between different codec types, like TCH/F FR1 <--> TCH/H HR1Stalledneels08/18/2020

Actions #1

Updated by neels over 1 year ago

  • Related to Feature #4716: support handover between different codec types, like TCH/F FR1 <--> TCH/H HR1 added
Actions #2

Updated by neels over 1 year ago

After some more testing I realized that osmo-msc with patch [1] sends only the actually assigned codec in SDP and Speech Codec List.
That is a deliberate choice, because osmo-msc is currently unable to handle a change in codec.
So, by sending only the one assigned codec in the Speech Codec List (MSC Preferred), osmo-msc instructs the BSS to avoid other codecs.
In effect, during handover, a switch from e.g. FR1 to HR1 is avoided, because HR1 is not listed by the MSC as available codec.
This behavior is avoided by enabling the '#if ALLOW_REASSIGNMENT' block in osmo-msc/src/libmsc/cc_sdp.c (new file in that patch),
and then, the assigned codec is sent as the first codec, with other supported ones listed after that.

The limitation to the assigned codec in fact only happens on the MT side of a call.
The causality is such that the MO side first does an assignment, and sends SDP with only the assigned codec to the PBX.
The PBX then instructs the MT side to have only that codec available.

Another aspect of this I'd like to mention: after that patch [1], I originally planned to move the Assignment to a later point,
so that first all available codecs are sent to the MT side, where a good match is found and all remaining codecs would be sent back
via SDP/SIP to the MO side. I see that as the ideal implementation, and it may also improve the Speech Codec List for handover.

"add full SDP codec information to the MNCC socket"


Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)