FreeCalypso > hg > gsm-codec-lib
annotate doc/RTP-BFI-extension @ 203:1c108dd5b33f
libgsmefr/vad.c: perf opt
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 04 Jan 2023 06:04:45 +0000 |
parents | 6fd49f73b025 |
children |
rev | line source |
---|---|
125
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 We (Themyscira Wireless) have invented our own non-standard extension to the |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 generally accepted standard for RTP-based transport of GSM FR and EFR traffic |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 within a GSM RAN, on stretches running from a BTS to a TRAU-like component. |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 The fundamental question is: when the radio subsystem of the BTS does not have |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 any good traffic frame to send in a given 20 ms window, what should it do? The |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 generally accepted standard behavior is that no packet is sent, an intentional |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 gap is created in the RTP stream (the next time an RTP packet does go out, the |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 timestamp increments over the gap while the sequence number increments only by |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 1, indicating an intentional gap rather than packet loss), and apparently the |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 intent was/is that this gap in the RTP stream serves as the BFI (bad frame |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 indication). |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 The problem with this generally accepted gap-as-BFI approach is that it deprives |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 the downstream transcoding MGW (a "soft TRAU" of sorts) of its timing source. |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 If the TRAU-like entity on the receiving end of the RTP stream originating from |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 the BTS were an RTP to TDM gateway, there would be no problem - such a gateway |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 would have to buffer received RTP packets in order to synchronize to fixed TDM |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 timing, and the absence of an RTP packet arriving in time would serve just fine |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 as the BFI marker, signaling BFI condition to the Rx DTX handler. But what if |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 the G.711 interface on the 64 kbps side of the TRAU is also an RTP stream, this |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 time going to a PSTN-via-SIP connectivity provider? Now the TRAU-like component |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 becomes a transcoding RTP forwarding MGW without any inherently fixed timing. |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 If the desire is to implement a traditional TRAU in every way except for an |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 RTP-based implementation instead of TDM-based, i.e., if the desire is to emit a |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 fully continuous G.711 RTP stream from the MGW toward PSTN with comfort noise |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 generation and in-band DTMF insertion happening inside the MGW, rather than |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 emit gaps in the outgoing stream or punt CN generation (and DTMF) to VoIP |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 network elements, this task becomes dramatically easier if the BTS can be |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 forced to send an RTP packet in every 20 ms window, be it rain or shine, |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 conveying either a good traffic frame or a BFI marker. |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 Representing BFI markers in an RTP stream |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 ========================================= |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 In the case of AMR codec, the existing standard RTP payload format already |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 provides an obvious way to send a BFI marker: it is the NO_DATA frame type, |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 i.e., FT=15 - see RFC 4867 section 4.3.2. That same section also categorizes |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 what we seek to do here as a "SHOULD NOT": |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 Note that packets containing only NO_DATA frames SHOULD NOT be |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 transmitted in any payload format configuration, [...] |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 However, the just-quoted directive is a SHOULD NOT rather than a MUST NOT, |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 and RFC 2119 states: |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 there may exist valid reasons in particular circumstances when the |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 particular behavior is acceptable or even useful, but the full |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 implications should be understood and the case carefully weighed |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 before implementing any behavior described with this label. |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 Our situation is just that: in our particular circumstance (desire to implement |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 a traditional GSM TRAU in an RTP-to-RTP environment with no TDM network to act |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 as a rigid timing governor) a valid reason exists why this "SHOULD NOT" behavior |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 is not only acceptable, but becomes necessary. Thus in the case of AMR, we are |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 good - there is no need to invent our own totally non-standard extensions to |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 RTP payload format, it just needs to be a configurable option in the IP-based |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 BTS or in OsmoMGW converting from an E1-based BTS to RTP. |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 |
126
6fd49f73b025
doc/RTP-BFI-extension: add note about GSM-HR and RFC 5993
Mychaela Falconia <falcon@freecalypso.org>
parents:
125
diff
changeset
|
62 The same situation holds for the rarely-used HR1 codec: RFC 5993 extends GSM-HR |
6fd49f73b025
doc/RTP-BFI-extension: add note about GSM-HR and RFC 5993
Mychaela Falconia <falcon@freecalypso.org>
parents:
125
diff
changeset
|
63 RTP representation with a ToC byte modeled after the one defined for AMR in RFC |
6fd49f73b025
doc/RTP-BFI-extension: add note about GSM-HR and RFC 5993
Mychaela Falconia <falcon@freecalypso.org>
parents:
125
diff
changeset
|
64 4867. Just like in AMR, GSM-HR ToC byte allows the possibility of a No_Data |
6fd49f73b025
doc/RTP-BFI-extension: add note about GSM-HR and RFC 5993
Mychaela Falconia <falcon@freecalypso.org>
parents:
125
diff
changeset
|
65 frame (FT=7 for GSM-HR), with exactly the same semantics - and exactly the same |
6fd49f73b025
doc/RTP-BFI-extension: add note about GSM-HR and RFC 5993
Mychaela Falconia <falcon@freecalypso.org>
parents:
125
diff
changeset
|
66 argument as above applies for sending such No_Data frames against the general |
6fd49f73b025
doc/RTP-BFI-extension: add note about GSM-HR and RFC 5993
Mychaela Falconia <falcon@freecalypso.org>
parents:
125
diff
changeset
|
67 SHOULD NOT. |
6fd49f73b025
doc/RTP-BFI-extension: add note about GSM-HR and RFC 5993
Mychaela Falconia <falcon@freecalypso.org>
parents:
125
diff
changeset
|
68 |
125
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 But what about the older FR and EFR codecs? In the case of existing standard |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 RTP payload formats for FR and EFR, there is no defined way to represent a BFI |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 condition as distinct from any possible good traffic frame, and there lies our |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 challenge. |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 Inventing an RTP BFI marker for FR and EFR |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 ========================================== |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 The existing code in osmo-bts-trx (but not in the osmo-bts-sysmo version of |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 interest to us) already contains a partial implementation of what we seek to do |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 here: it runs its own ECU instance in the case of a BFI from the channel |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 decoding layer, and if there is still no luck, there is code present to send a |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 BFI packet. The implemented behavior is not useful for us because RTP output |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 is still fully suppressed when the uplink is expected to be in DTX, and there |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 is a higher-level check in common/l1sap.c (l1sap_tch_ind() function) that also |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 suppresses RTP output, but still, the point is that someone did already write |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 code for sending an RTP packet intended to serve as a BFI. In the case of AMR, |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 that code sends out the expected NO_DATA (aka AMR_BAD) frame type - but what |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 about FR and EFR? |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 The existing code in osmo-bts-trx sends its FR codec BFI as a valid-looking FR |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 frame with all 260 content bits set to 0, and it sends its EFR codec BFI as a |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 valid-looking EFR frame with all 244 content bits set to 0. I (Mother Mychaela) |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 have given consideration to using this all-zeros in-band BFI representation as |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 our RTP BFI marker for ThemWi, but then rejected this idea and decided to |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 implement our own non-standard extension to RTP payload format instead, |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 described further below. |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 The fundamental philosophical problem which I (Mother Mychaela) have with this |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 in-band BFI representation is that in the world of ETSI and 3GPP standards, BFI |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 has always been meant to be out-of-band, not in-band. In the TRAU frame format |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 defined in GSM 08.60 there is an explicit control bit that carries BFI - the |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 condition is NOT to be derived from the 260 or 244 traffic frame bits carried |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 in data bit positions. Abusing one particular bit pattern within the regular |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 260-bit or 244-bit frame, even if it happens to be all zeros, goes against the |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 spirit of classic GSM and 3GPP. Per the specs, an FR codec frame of all zeros |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 would be a SID frame with all LAR coefficients set to 0, and standards-compliant |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 FR decoders would accept it as a valid SID frame, not as BFI. The situation is |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 likely to be even worse with EFR, where a frame of all zeros would not be |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 treated as SID (EFR SID code word is 95 ones instead of 95 zeros) and would |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 probably produce garbage at the decoder output. |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 Themyscira Wireless implemented solution |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 ======================================== |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 We have invented our own non-standard extension to RTP payload format for GSM |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 FR and EFR codecs. Our extension is as follows: wherever a BTS needs to send a |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 BFI marker in the place of a traffic frame, instead of sending a 33-byte payload |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 beginning with 0xD nibble or a 31-byte payload beginning with 0xC nibble, it |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 needs to send a 2-byte payload formatted as follows: |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 byte 0: 0xBF signature; |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 byte 1: least-significant bit encoding TAF per GSM 06.31 or GSM 06.81, |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 section 6.1.1 in both documents; other bits are reserved. |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 In the uplink direction, with an RTP stream going from a BTS to our "soft TRAU" |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 MGW, our themwi-mgw recognizes these BFI packets and acts accordingly, feeding |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 BFI and TAF to the spec-prescribed Rx DTX handler for FR or EFR. However, if a |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 BTS receives these BFI marker packets in the downlink direction as a result of |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 TrFO (the RTP stream comes from the uplink of another GSM call), it simply |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129 discards them without any processing - because a BTS always runs on its own TDMA |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 timing, there is no difference between receiving a BFI packet vs receiving no |
2b3f612a5fe5
doc/RTP-BFI-extension: import from themwi-system-sw,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 RTP packet at all for that 20 ms frame. |