falconia has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-mgw/+/39478?usp=email )
Change subject: E1: replace idle_tf_fr[] with a better version
......................................................................
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
---
M src/libosmo-mgcp/mgcp_e1.c
1 file changed, 42 insertions(+), 36 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/78/39478/1
diff --git a/src/libosmo-mgcp/mgcp_e1.c b/src/libosmo-mgcp/mgcp_e1.c
index f3471fb..3a7a450 100644
--- a/src/libosmo-mgcp/mgcp_e1.c
+++ b/src/libosmo-mgcp/mgcp_e1.c
@@ -105,47 +105,53 @@
1, 1, 1, 1, 1, 1, 1, 1,
};
-/* FR idle frame */
+/* The following FRv1 TRAU-DL frame is a dummy to be transmitted in the absence
+ * of RTP-derived TRAU-DL frames. The payload bit content here is the silence
+ * frame of TS 46.011 Table 1 - the best we can do without integrating the
+ * TFO transform for FRv1 from Themyscira libgsmfr2 - while the full TRAU-DL
+ * frame was generated by passing said FRv1 silence frame through
+ * osmo_rtp2trau().
+ */
static const ubit_t idle_tf_fr[] = {
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 1, 1, 1, 1,
+ 1, 0, 1, 0, 1, 0, 1, 1,
+ 1, 1, 0, 0, 1, 1, 0, 1,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 0, 1, 0, 0, 1, 0,
+ 1, 1, 1, 0, 0, 1, 0, 0,
+ 0, 0, 1, 0, 1, 0, 0, 0,
+ 1, 1, 0, 0, 0, 0, 0, 0,
+ 0, 1, 1, 0, 0, 0, 1, 1,
+ 1, 1, 0, 0, 0, 1, 0, 0,
+ 1, 1, 1, 0, 1, 1, 0, 1,
+ 1, 1, 0, 1, 1, 0, 0, 0,
+ 1, 0, 0, 1, 1, 1, 0, 1,
+ 1, 1, 0, 0, 0, 0, 1, 0,
+ 1, 0, 0, 0, 1, 0, 0, 0,
+ 1, 0, 0, 0, 0, 1, 1, 0,
+ 0, 0, 1, 1, 1, 0, 0, 0,
+ 1, 1, 0, 0, 1, 1, 1, 0,
+ 1, 1, 0, 1, 1, 0, 1, 1,
+ 1, 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 1, 0, 0, 1,
+ 1, 1, 1, 0, 1, 1, 0, 1,
+ 1, 0, 1, 1, 0, 0, 0, 1,
+ 1, 0, 0, 1, 1, 1, 0, 1,
+ 1, 0, 0, 0, 0, 1, 0, 1,
+ 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 1, 1, 0, 0,
+ 1, 0, 1, 1, 1, 0, 0, 0,
+ 1, 0, 0, 1, 1, 1, 0, 1,
+ 1, 1, 0, 1, 1, 0, 1, 1,
+ 0, 0, 0, 1, 0, 0, 1, 1,
+ 1, 1, 0, 1, 1, 0, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
};
--
To view, visit
https://gerrit.osmocom.org/c/osmo-mgw/+/39478?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I995824586058e4e4ed77e900d4b57e5113f9eff6
Gerrit-Change-Number: 39478
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>