Skip to content

Commit 403d5f1

Browse files
author
Mychaela N. Falconia
committed
E1: replace idle_tf_fr[] with a better version
The only truly correct way to pass FR/HR/EFR traffic from an incoming RTP stream to TRAU-DL frames is to apply the transform of TS 28.062 section C.3.2.1.1, originally specified for TFO but also necessary in the non-3GPP-specified case of GSM TrFO as it happens here. Unlike the situation with EFR, a FOSS implementation of TFO transform for FRv1 does exist in Themyscira libgsmfr2 - however, making these Themyscira codec libraries usable from mainline Osmocom programs by way of a proposed libosmocore DSO plugin mechanism, followed by a major redesign of OsmoMGW-E1 to pass all DL traffic through this TFO transform, would be a major project, difficult to justify prior to development of a proper TFO transform for EFR to complement the one for FRv1. Hence no change is being made currently to the arguably flawed general architecture of OsmoMGW-E1, which consists of passing through unaltered all valid codec frames that are received in RTP, and inserting fixed dummy TRAU-DL frames when no RTP-derived ones are available. The original dummy TRAU-DL frame for FRv1 exhibited the following defects: * The payload frame transmitted to the MS consisted of all zero bits. Standard type-approved GSM MS would interpret this bit pattern as a SID frame, even though the BTS is told via C16 bit "this frame is not a SID". Passing a SID is not inherently bad in itself in this context, but a SID with all LARc parameters set to 0 is a strange/poor choice. * The setting of C-bits (defined in TS 48.060 section 5.5.1.1.1) was a mish-mash between TRAU-UL and TRAU-DL frame formats, thereby not matching the standard TRAU-DL C-bits fill produced by osmo_rtp2trau(). The replacement fill frame introduced here differs as follows: * The payload bit content is the silence frame of GSM 46.011 Table 1: certainly better than a SID with all LARc parameters set to 0, and arguably better than any SID at all. * The full TRAU-DL frame (C-bits pattern, peculiar ordering of D-bits) was generated by passing said silence frame through osmo_rtp2trau(), using this ad hoc tool: https://gitea.osmocom.org/themwi/dummy-dl-frames Change-Id: I995824586058e4e4ed77e900d4b57e5113f9eff6
1 parent f227633 commit 403d5f1

File tree

1 file changed

+42
-36
lines changed

1 file changed

+42
-36
lines changed

src/libosmo-mgcp/mgcp_e1.c

+42-36
Original file line numberDiff line numberDiff line change
@@ -105,47 +105,53 @@ static const ubit_t idle_tf_efr[] = {
105105
1, 1, 1, 1, 1, 1, 1, 1,
106106
};
107107

108-
/* FR idle frame */
108+
/* The following FRv1 TRAU-DL frame is a dummy to be transmitted in the absence
109+
* of RTP-derived TRAU-DL frames. The payload bit content here is the silence
110+
* frame of TS 46.011 Table 1 - the best we can do without integrating the
111+
* TFO transform for FRv1 from Themyscira libgsmfr2 - while the full TRAU-DL
112+
* frame was generated by passing said FRv1 silence frame through
113+
* osmo_rtp2trau().
114+
*/
109115
static const ubit_t idle_tf_fr[] = {
110116
0, 0, 0, 0, 0, 0, 0, 0,
111117
0, 0, 0, 0, 0, 0, 0, 0,
112118
1, 1, 1, 1, 0, 0, 0, 0,
113-
0, 0, 0, 0, 1, 0, 0, 0,
114-
1, 0, 0, 0, 0, 0, 0, 0,
115-
0, 0, 0, 0, 0, 0, 0, 0,
116-
1, 0, 0, 0, 0, 0, 0, 0,
117-
0, 0, 0, 0, 0, 0, 0, 0,
118-
1, 0, 0, 0, 0, 0, 0, 0,
119-
0, 0, 0, 0, 0, 0, 0, 0,
120-
1, 0, 0, 0, 0, 0, 0, 0,
121-
0, 0, 0, 0, 0, 0, 0, 0,
122-
1, 0, 0, 0, 0, 0, 0, 0,
123-
0, 0, 0, 0, 0, 0, 0, 0,
124-
1, 0, 0, 0, 0, 0, 0, 0,
125-
0, 0, 0, 0, 0, 0, 0, 0,
126-
1, 0, 0, 0, 0, 0, 0, 0,
127-
0, 0, 0, 0, 0, 0, 0, 0,
128-
1, 0, 0, 0, 0, 0, 0, 0,
129-
0, 0, 0, 0, 0, 0, 0, 0,
130-
1, 0, 0, 0, 0, 0, 0, 0,
131-
0, 0, 0, 0, 0, 0, 0, 0,
132-
1, 0, 0, 0, 0, 0, 0, 0,
133-
0, 0, 0, 0, 0, 0, 0, 0,
134-
1, 0, 0, 0, 0, 0, 0, 0,
135-
0, 0, 0, 0, 0, 0, 0, 0,
136-
1, 0, 0, 0, 0, 0, 0, 0,
137-
0, 0, 0, 0, 0, 0, 0, 0,
138-
1, 0,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0, 0, 0, 0, 1, 0, 1,
148+
1, 0, 0, 0, 1, 0, 0, 0,
149+
0, 0, 0, 0, 1, 1, 0, 0,
150+
1, 0, 1, 1, 1, 0, 0, 0,
151+
1, 0, 0, 1, 1, 1, 0, 1,
152+
1, 1, 0, 1, 1, 0, 1, 1,
153+
0, 0, 0, 1, 0, 0, 1, 1,
154+
1, 1, 0, 1, 1, 0, 1, 1,
149155
1, 1, 1, 1, 1, 1, 1, 1,
150156
};
151157

0 commit comments

Comments
 (0)