Project

General

Profile

TFO » History » Version 2

falconia, 07/19/2024 07:39 AM

1 1 falconia
h1. Tandem-Free Operation
2
3
In the traditional TDM-based GSM architecture (see [[TRAU]] page), each individual call leg passes through the speech transcoder (and thus turns into G.711 A-law or mu-law) _before_ it hits the MSC. Therefore, if Alice is talking to Bob, both of them being GSM users, their call will be subject to double transcoding in the middle, even if they are both customers of the same operator, even if they are next to each other served by the same BTS! Aside from the obvious waste of transcoder DSP power, this arrangement degrades voice quality: there are two lossy speech codecs operating in tandem.
4
5
The GSM industry recognized this problem of tandem transcoding early on, and came up with several different solutions. In newer GSM and 3G networks, particularly those that use IP transport (RTP packets) for voice traffic, the preferred solution is TrFO: transcoder-free operation. In TrFO the speech transcoder is eliminated altogether (which becomes easy when the transcoder is a software component that can be moved into and out of the call path, as opposed to a physical TRAU between two different and otherwise incompatible TDM formats), and speech codec frames pass directly between Alice and Bob. However, such modern-style TrFO is impossible in the traditional architecture with TRAUs: the TRAU always has to be there, converting between a 16 kbit/s or 8 kbit/s channel toward the BTS and a 64 kbit/s channel toward the MSC. Hence the original solution to the problem of tandem transcoding was tandem-free operation, or TFO: merely tandem-free, rather than transcoder-free.
6
7
Classic GSM TFO (originally defined in GSM 08.62, later moved to 3GPP TS 28.062) is an in-band protocol inside the G.711 PCM sample stream. When transmitting TFO messages, the TRAU (or other TFO-capable transcoder) steals the least significant bit of every 16th sample to send out TFO requests, acknowledgements and other control messages. When TFO is administratively enabled, the TRAU will transmit these TFO messages for some time, hoping that the distant end is another GSM call leg, but then give up (stop stealing bits from outgoing PCM samples) if no response is received. If the TFO mechanism in the TRAU or other transcoder does receive a response to its request, or if it receives a far-end request after it has given up, a prescribed negotiation protocol ensues. Once boths ends have convinced themselves that they are both GSM, that the same codec is used on both ends and that the intervening path is digitally transparent, actual Tandem-Free Operation switches on.
8
9
Once TFO is truly active, one or two least significant bits (depending on the codec) of _every_ PCM sample (as opposed to every 16th sample in the discovery phase) get replaced with TFO binary data. The bit content transported here consists of TRAU-UL frames (the transport format from the BTS uplink to the local TRAU) with only minor modifications, i.e., the TRAU effectively performs a pass-through of its internal uplink input to the outside-world PCM output. The speech decoder keeps running as usual (the upper 6 or 7 bits of every PCM octet are still G.711 A-law or mu-law PCM sample bits), but the speech encoder (much more DSP-intensive) is replaced with [[UL-to-DL transform]].
10
11 2 falconia
The TFO protocol and frame format are standardized, hence at least in theory TFO can be established between a pair of voice-communicating GSM users on two different operators, even in different countries. (Of course the 64 kbit/s PSTN path between the two TRAUs must be digitally transparent, or alternatively, any intervening In-Path Equipment must be TFO-aware, listening for and taking action upon TFO messages.) However, there seems to be very little support for TFO (or none at all) among extant GSM networks in year 2024: the lead developer of Themyscira Wireless has yet to find even one commercial GSM network with which we can establish a TFO call; TFO is not supported even when we are able to demonstrate a digitally transparent path (homing sequences followed by bit-exact encoder and decoder tests) between our IP-PSTN injection point and the transcoder in the target network. It appears that most "modern" networks use TrFO internally (at least with AMR-capable phones, or on 3G where AMR is mandatory), and if the call has to go to the outside world with transcoding to G.711, that's it: the ability to go tandem-free is lost.
12 1 falconia
13
h2. TFO with classic codecs vs AMR
14
15
From the standpoint of someone looking to implement it, TFO can be divided into two flavors: one for classic GSM codecs (FRv1, HRv1 and EFR) and one for AMR (or AMR-WB). These two flavors of TFO exhibit different properties in terms of which difficulties the prospective implementor would face:
16
17
h3. TFO with classic GSM codecs
18
19
This flavor of TFO (the first to be defined in GSM specs) naturally yields itself to implementation in TRAUs: just take the incoming TRAU-UL frame stream and emit it in the least significant bit(s) of the outgoing PCM sample stream. However, implementing TFO in a "modern" speech transcoder that is not a TRAU would require much more work, and if the GSM network internally uses IP transport with poorly-suited RTP payload formats that have unfortunately been made into the general industry standard, then a correct implementation of TFO becomes impossible! Specifically for GSM retronetworking applications, Themyscira Wireless developed [[TW-TS-001]], which should make it possible to implement TFO in a software-based transcoder that works with an IP-based GSM network built with [[cellular-infrastructure:|Osmocom CNI]] - but we cannot expect such support in run-of-the-mill proprietary implementations that aren't TRAUs.
20
21
In the traditional GSM architecture with TDM transport and TRAUs, the implementation of TFO for classic codecs is fully confined to the TRAU: all other network elements remain oblivious to it. In particular, the BTS does not need to know anything about TFO, and this requirement of keeping TFO out of the BTS gives rise to the [[UL-to-DL transform]].
22
23
h3. TFO with AMR
24
25
Starting with 3GPP Release 4, the new TFO spec (TS 28.062) covers both GSM and 3G, and the protocol is fully specified for AMR in addition to classic GSM codecs. However, nothing is ever simple and straightforward:
26
27
* There are no 3GPP specs at all for IP-based GSM RAN, hence the TFO spec is mum on this subject like the rest of them.
28
* If the GSM network is implemented with E1-based Abis and TRAU frames, it is possible to implement TFO for AMR. However, such implementation is no longer confined to the TRAU, the BTS also needs to get involved, and possibly the BSC. It is not clear if any historical vendor actually implemented all of this complexity; we know that Nokia explicitly omitted TFO-AMR support in both TCSM2 and TCSM3i!
29
* The spec describes in detail how one would implement TFO in 3G, where AMR is the only codec. The model is packet-based, hence it would probably make a good starting point for TFO-AMR implementation with IP-based GSM RAN. However, there will be additional complications resulting from radio differences (AMR in GSM has constraints that don't exist in 3G); more research will be needed.
Add picture from clipboard (Maximum size: 48.8 MB)