RFC 8817

RTP Payload Format for Tactical Secure Voice Cryptographic Interoperability Specification (TSVCIS) Codec

๐Ÿ“… published August 2020, from ietf

RFC 8817: RTP Payload Format for TSVCIS Codec โœจ

Okay bestie, get ready ๐Ÿ’– This RFC is all about how to pack up TSVCIS speech into RTP packets so it can ride the Internet. It's a Standards Track doc, which means it's the real deal, not just vibes. ๐ŸŽ€

The authors are V. Demjanenko, J. Punaro, and D. Satterlee, all from VOCAL Technologies, Ltd. ๐ŸŒธ It's dated August 2020, and it's published under ISSN 2070-1721. It doesn't obsolete anything and doesn't update anything else, so it's a clean slate, no drama. ๐Ÿฆ‹

The whole point, in one line: TSVCIS is a scalable narrowband voice coder that can crank its data rate up or down, and it's built as an add-on to the MELPe speech coder. ๐Ÿงš The TSVCIS data gets processed alongside its matching MELP 2400 data, and this RFC spells out exactly how it gets packetized. โญ


Status of This Memo ๐Ÿ“œ

This is an Internet Standards Track document. ๐Ÿ’…

It's a product of the IETF, it reflects what the IETF community agreed on, and it got public review and approval from the IESG. If you want more on Internet Standards, check out Section 2 of RFC 7841. ๐Ÿซถ

Info about its current status, any errata, and where to send feedback lives at https://www.rfc-editor.org/info/rfc8817. ๐ŸŒˆ

Copyright (c) 2020 IETF Trust and the persons identified as the document authors. All rights reserved. ๐Ÿ’œ

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) as they stood on the publication date. Read them closely, because they spell out your rights and restrictions. Code Components pulled out of this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they come with no warranty, as the Simplified BSD License describes. ๐Ÿ”ฅ

Table of Contents ๐Ÿ—บ๏ธ

1.  Introduction
  1.1.  Conventions
  1.2.  Abbreviations
2.  Background
3.  Payload Format
  3.1.  MELPe Bitstream Definitions
    3.1.1.  2400 bps Bitstream Structure
    3.1.2.  1200 bps Bitstream Structure
    3.1.3.  600 bps Bitstream Structure
    3.1.4.  Comfort Noise Bitstream Definition
  3.2.  TSVCIS Bitstream Definition
  3.3.  Multiple TSVCIS Frames in an RTP Packet
  3.4.  Congestion Control Considerations
4.  Payload Format Parameters
  4.1.  Media Type Definitions
  4.2.  Mapping to SDP
  4.3.  Declarative SDP Considerations
  4.4.  Offer/Answer SDP Considerations
5.  Discontinuous Transmissions
6.  Packet Loss Concealment
7.  IANA Considerations
8.  Security Considerations
9.  References
  9.1.  Normative References
  9.2.  Informative References
Authors' Addresses

1. Introduction ๐Ÿฆ‹

Okay so this section explains how compressed TSVCIS speech, the stuff the TSVCIS codec makes [TSVCIS] [NRLVDR], can be formatted as an RTP payload. ๐Ÿ’– The TSVCIS coder, or any TSVCIS-aware gear on the way, can deal with tight bandwidth by sending less augmented speech data and leaning on the underlying MELPe coder for the most constrained links. โœจ

Then it gets into packing the TSVCIS augmented speech data together with the MELPe 2400 bps speech parameters into one RTP packet. ๐ŸŒธ The sender can put one or more codec data frames in each packet, depending on the app, the network conditions, bandwidth limits, delay needs, and how much packet loss you can tolerate. ๐Ÿงš

1.1. Conventions ๐Ÿ“–

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document get read the way BCP 14 [RFC2119] [RFC8174] describes, but only when they show up in all capitals like this. ๐Ÿ”ฅ

Best current practices for writing an RTP payload format spec were followed [RFC2736] [RFC8088]. ๐Ÿ’…

1.2. Abbreviations ๐Ÿ”ค

Here are the abbreviations used in this doc. ๐Ÿ“

AVP:      Audio/Video Profile

AVPF:     Audio/Video Profile Feedback

CELP:     Code-Excited Linear Prediction

FEC:      Forward Error Correction

LPC:      Linear-Predictive Coding

LSB:      Least Significant Bit

MELP:     Mixed Excitation Linear Prediction

MELPe:    Mixed Excitation Linear Prediction Enhanced

MSB:      Most Significant Bit

MTC:      Modified Count

NATO:     North American Treaty Organization

NRL:      Naval Research Lab

PLC:      Packet Loss Concealment

SAVP:     Secure Audio/Video Profile

SAVPF:    Secure Audio/Video Profile Feedback

SDP:      Session Description Protocol

SSRC:     Synchronization Source

SRTP:     Secure Real-Time Transport Protocol

TSVCIS:   Tactical Secure Voice Cryptographic Interoperability
          Specification

VAD:      Voice Activity Detect

VDR:      Variable Date Rate

2. Background ๐ŸŒˆ

The MELP speech coder was built by the US military as an upgrade from the LPC-based CELP standard vocoder for low-bitrate comms [MELP]. ("LPC" means "Linear-Predictive Coding" and "CELP" means "Code-Excited Linear Prediction", just so we're all on the same page. ๐Ÿค“) MELP got further enhanced and then NATO adopted it as "MELPe" for its members and Partnership for Peace countries, for military and other government comms, as international NATO Standard STANAG 4591 [MELPE]. ๐Ÿ‘‘

The Tactical Secure Voice Cryptographic Interoperability Specification (TSVCIS) is a spec written by the Tactical Secure Voice Working Group (TSVWG) so that all modern tactical secure voice devices can talk to each other across the US Department of Defense [TSVCIS]. ๐Ÿซถ The big thing here is that the TSVCIS voice modes are based on fixed rates from the Naval Research Lab's (NRL's) Variable Date Rate (VDR) Vocoder, which uses MELPe as its base [NRLVDR]. โœจ A full TSVCIS speech frame is made of MELPe speech parameters plus the matching TSVCIS augmented speech data. ๐Ÿ’–

Besides the augmented speech data, the TSVCIS spec says which speech coder and framing bits get encrypted, and how they're protected with forward error correction (FEC) using block codes. ๐Ÿ” At the RTP transport layer, only the speech-coder bits matter, and they're sent unencrypted. ๐Ÿฆ‹ In most IP deployments, you'd secure the RTP speech with standard link encryption, like SRTP, VPNs, FIPS 140 link encryptors, or Type 1 Ethernet encryptors. ๐ŸŒธ

TSVCIS augmented speech data comes from the signal processing and data the MELPe coder generates. ๐Ÿงš For this spec, we only describe the general parameter nature of TSVCIS. ๐Ÿ“ Depending on how much bandwidth is available (and what the FEC needs are), a varying number of TSVCIS-specific speech coder parameters has to be transported. ๐Ÿ’œ These get byte-packed first, then sent from encoder to decoder. โญ

Here's how byte packing of TSVCIS speech data into packed parameters works, using this example:

Three-bit field: Bits A, B, and C (A is MSB; C is LSB)

Five-bit field: Bits D, E, F, G, and H (D is MSB; H is LSB)

        MSB                                              LSB
         0      1      2      3      4      5      6      7
     +------+------+------+------+------+------+------+------+
     |   H  |   G  |   F  |   E  |   D  |   C  |   B  |   A  |
     +------+------+------+------+------+------+------+------+

This packing method puts the three-bit field "first" in the lowest bits, followed by the next five-bit field. ๐Ÿ™ˆ Parameters can be split across octets, with the most significant bits in the earlier octet. ๐ŸŽ€ Any unfilled bits in the last octet MUST be filled with zero. ๐Ÿ’€

To handle a varying amount of TSVCIS augmented speech data, an octet count says how many octets the TSVCIS packed parameters take up. ๐ŸŒˆ The encoding for that is in Section 3.2. TSVCIS uses the NRL VDR in two configurations, with a fixed set of 15 and 35 packed octet parameters in a standardized order [TSVCIS]. ๐Ÿ‘‘

3. Payload Format ๐ŸŽ€

The TSVCIS codec augments the standard MELP 2400, 1200, and 600 bitrates, so it uses 22.5, 67.5, or 90 ms frames with an 8 kHz sampling clock. That means the RTP timestamp MUST be in units of 1/8000 of a second. โฑ๏ธโœจ

The RTP payload for TSVCIS looks like Figure 1. ๐Ÿฆ‹ No extra header specific to this payload format is needed. ๐Ÿ’– This format is meant for when the sender and receiver send one or more codec data frames per packet. ๐ŸŒธ

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         RTP Header                            |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
|                                                               |
+                 one or more frames of TSVCIS                  |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 1: Packet Format Diagram ๐Ÿงš

The RTP header of the packetized encoded TSVCIS speech has the expected values described in [RFC3550]. ๐Ÿ’… How the M bit gets used SHOULD follow the applicable RTP profile. For example, [RFC3551] says that if the sender doesn't suppress silence (so it sends a frame on every frame interval), the M bit will always be zero. ๐Ÿ™Œ When more than one codec data frame is in a single RTP packet, the timestamp is the one for the oldest data frame in that packet. ๐Ÿ•ฐ๏ธ

Assigning an RTP payload type for this new packet format is outside the scope of this document, so it won't be specified here. ๐Ÿ™…โ€โ™€๏ธ The RTP profile for a particular class of apps is expected to assign a payload type for this encoding. ๐ŸŽ€ If that doesn't happen, then the sender shall choose a payload type from the dynamic range. ๐Ÿ’œ


This is part 1 of 5. Keep the next part coming, bestie! ๐Ÿฆ‹โœจ

3.1. MELPe Bitstream Definitions โœจ

okay so the TSVCIS speech coder is basically a whole buffet ๐Ÿ“ because it includes all three MELPe coder rates. You can use them as the base speech parameters, or as speech coders when your link is bandwidth-restricted ๐Ÿฆ‹ RTP packetization of MELPe follows [RFC8130], and it's repeated here for all three MELPe rates [RFC8130]. The recommendations from [RFC8130] are now regarded as requirements, so no more "eh, maybe" ๐Ÿ’… The bits that [RFC8130] used to label RSVA, RSVB, and RSVC SHOULD be filled with the rate code bits CODA, CODB, and CODC, as shown in Table 1 (compatible with Table 7 in Section 3.3 of [RFC8130]) ๐ŸŽ€

              +===============+======+======+======+========+
              | Coder Bitrate | CODA | CODB | CODC | Length |
              +===============+======+======+======+========+
              | 2400 bps      | 0    | 0    | N/A  | 7      |
              +---------------+------+------+------+--------+
              | 1200 bps      | 1    | 0    | 0    | 11     |
              +---------------+------+------+------+--------+
              | 600 bps       | 0    | 1    | N/A  | 7      |
              +---------------+------+------+------+--------+
              | Comfort Noise | 1    | 0    | 1    | 2      |
              +---------------+------+------+------+--------+
              | TSVCIS Data   | 1    | 1    | N/A  | var.   |
              +---------------+------+------+------+--------+

                    Table 1: TSVCIS/MELPe Frame Bitrate
                        Indicators and Frame Length

Now the bit counting, which is my favourite part ๐Ÿงš A MELPe frame of 2400 bps speech uses 54 bits, which fits in 7 octets (with two rate code bits) ๐Ÿ’– MELPe 1200 bps speech uses 81 bits, which fits in 11 octets (with three rate code bits and four unused bits) โœจ MELPe 600 bps speech uses 54 bits too, so it also fits in 7 octets (with two rate code bits) ๐ŸŒธ The comfort noise frame is 13 bits, which fits in 2 octets (with three rate code bits) ๐Ÿซถ And TSVCIS packed parameters will use the last code combination in a trailing byte, which we'll get into in Section 3.2 ๐Ÿ‘‘

Heads up: this next bit is a little sneaky ๐Ÿ™ˆ CODB for MELPe 600 bps mode MAY deviate from the value in Table 1 when bit 55 is used as an alternating 1/0 end-to-end framing bit. Decoding still stays distinct, because CODA being zero on its own would mean a 7-byte frame for either the 2400 or the 600 bps rate. The use of 600 bps speech coding could be deduced from the RTP timestamp, and it could also be anticipated during the Session Description Protocol (SDP) negotiations ๐Ÿ’œ

3.1.1. 2400 bps Bitstream Structure

The 2400 bps MELPe RTP payload is constructed as shown in Figure 2 ๐ŸŒˆ Quick reminder: CODA MUST be filled with 0, and CODB SHOULD be filled with 0 as per Section 3.1. CODB MAY contain an end-to-end framing bit if the endpoints need one ๐Ÿฆ‹

        MSB                                              LSB
         0      1      2      3      4      5      6      7
     +------+------+------+------+------+------+------+------+
     | B_08 | B_07 | B_06 | B_05 | B_04 | B_03 | B_02 | B_01 |
     +------+------+------+------+------+------+------+------+
     | B_16 | B_15 | B_14 | B_13 | B_12 | B_11 | B_10 | B_09 |
     +------+------+------+------+------+------+------+------+
     | B_24 | B_23 | B_22 | B_21 | B_20 | B_19 | B_18 | B_17 |
     +------+------+------+------+------+------+------+------+
     | B_32 | B_31 | B_30 | B_29 | B_28 | B_27 | B_26 | B_25 |
     +------+------+------+------+------+------+------+------+
     | B_40 | B_39 | B_38 | B_37 | B_36 | B_35 | B_34 | B_33 |
     +------+------+------+------+------+------+------+------+
     | B_48 | B_47 | B_46 | B_45 | B_44 | B_43 | B_42 | B_41 |
     +------+------+------+------+------+------+------+------+
     | CODA | CODB | B_54 | B_53 | B_52 | B_51 | B_50 | B_49 |
     +------+------+------+------+------+------+------+------+

            Figure 2: Packed MELPe 2400 bps Payload Octets

3.1.2. 1200 bps Bitstream Structure

The 1200 bps MELPe RTP payload is constructed as shown in Figure 3 ๐Ÿ’… Here, CODA, CODB, and CODC MUST be filled with 1, 0, and 0, respectively, as per Section 3.1. Also, RSV0 MUST be coded as 0 ๐Ÿซถ

        MSB                                              LSB
         0      1      2      3      4      5      6      7
     +------+------+------+------+------+------+------+------+
     | B_08 | B_07 | B_06 | B_05 | B_04 | B_03 | B_02 | B_01 |
     +------+------+------+------+------+------+------+------+
     | B_16 | B_15 | B_14 | B_13 | B_12 | B_11 | B_10 | B_09 |
     +------+------+------+------+------+------+------+------+
     | B_24 | B_23 | B_22 | B_21 | B_20 | B_19 | B_18 | B_17 |
     +------+------+------+------+------+------+------+------+
     | B_32 | B_31 | B_30 | B_29 | B_28 | B_27 | B_26 | B_25 |
     +------+------+------+------+------+------+------+------+
     | B_40 | B_39 | B_38 | B_37 | B_36 | B_35 | B_34 | B_33 |
     +------+------+------+------+------+------+------+------+
     | B_48 | B_47 | B_46 | B_45 | B_44 | B_43 | B_42 | B_41 |
     +------+------+------+------+------+------+------+------+
     | B_56 | B_55 | B_54 | B_53 | B_52 | B_51 | B_50 | B_49 |
     +------+------+------+------+------+------+------+------+
     | B_64 | B_63 | B_62 | B_61 | B_60 | B_59 | B_58 | B_57 |
     +------+------+------+------+------+------+------+------+
     | B_72 | B_71 | B_70 | B_69 | B_68 | B_67 | B_66 | B_65 |
     +------+------+------+------+------+------+------+------+
     | B_80 | B_79 | B_78 | B_77 | B_76 | B_75 | B_74 | B_73 |
     +------+------+------+------+------+------+------+------+
     | CODA | CODB | CODC | RSV0 | RSV0 | RSV0 | RSV0 | B_81 |
     +------+------+------+------+------+------+------+------+

            Figure 3: Packed MELPe 1200 bps Payload Octets

3.1.3. 600 bps Bitstream Structure

The 600 bps MELPe RTP payload is constructed as shown in Figure 4 ๐Ÿ“ CODA MUST be filled with 0, and CODB SHOULD be filled with 1 as per Section 3.1. CODB MAY contain an end-to-end framing bit if the endpoints need one ๐ŸŒธ

        MSB                                              LSB
         0      1      2      3      4      5      6      7
     +------+------+------+------+------+------+------+------+
     | B_08 | B_07 | B_06 | B_05 | B_04 | B_03 | B_02 | B_01 |
     +------+------+------+------+------+------+------+------+
     | B_16 | B_15 | B_14 | B_13 | B_12 | B_11 | B_10 | B_09 |
     +------+------+------+------+------+------+------+------+
     | B_24 | B_23 | B_22 | B_21 | B_20 | B_19 | B_18 | B_17 |
     +------+------+------+------+------+------+------+------+
     | B_32 | B_31 | B_30 | B_29 | B_28 | B_27 | B_26 | B_25 |
     +------+------+------+------+------+------+------+------+
     | B_40 | B_39 | B_38 | B_37 | B_36 | B_35 | B_34 | B_33 |
     +------+------+------+------+------+------+------+------+
     | B_48 | B_47 | B_46 | B_45 | B_44 | B_43 | B_42 | B_41 |
     +------+------+------+------+------+------+------+------+
     | CODA | CODB | B_54 | B_53 | B_52 | B_51 | B_50 | B_49 |
     +------+------+------+------+------+------+------+------+

            Figure 4: Packed MELPe 600 bps Payload Octets

3.1.4. Comfort Noise Bitstream Definition

The comfort noise MELPe RTP payload is constructed as shown in Figure 5 ๐ŸŒ™ Note that CODA, CODB, and CODC MUST be filled with 1, 0, and 1, respectively, as per Section 3.1 ๐ŸŽ€

        MSB                                              LSB
         0      1      2      3      4      5      6      7
     +------+------+------+------+------+------+------+------+
     | B_08 | B_07 | B_06 | B_05 | B_04 | B_03 | B_02 | B_01 |
     +------+------+------+------+------+------+------+------+
     | CODA | CODB | CODC | B_13 | B_12 | B_11 | B_10 | B_09 |
     +------+------+------+------+------+------+------+------+

         Figure 5: Packed MELPe Comfort Noise Payload Octets

3.2. TSVCIS Bitstream Definition โœจ

okay bestie, the TSVCIS augmented speech data (aka the packed parameters ๐Ÿ’…) MUST be placed right after its matching MELPe 2400 bps payload, in the SAME RTP packet ๐Ÿงš. The packed parameters get counted in octets, and that count is called TC ๐Ÿ“.

the preferred placement SHOULD be used for TSVCIS payloads with TC less than or equal to 77 octets. see Figure 6 below ๐ŸŽ€. in this layout, one trailing octet SHALL be added to hold a two-bit rate code (CODA and CODB, both set to one) and a six-bit modified count (MTC). the special modified count of all ones (that's an MTC of 63) SHALL NOT be used here, because it's the signal for the alternate packing format we'll get to next ๐Ÿ™ˆ.

in a standard implementation, the TSVCIS speech coder uses a minimum of 15 octets for parameters in octet packed form. so the modified count (MTC) MUST be reduced by 15 from the full octet count (TC). Computed MTC = TC-15. this gives you a max of 77 parameter octets, since the max MTC is 62 and 62+15 is 77 ๐Ÿ’–.

        MSB                                              LSB
         0      1      2      3      4      5      6      7
     +------+------+------+------+------+------+------+------+
  1  | T008 | T007 | T006 | T005 | T004 | T003 | T002 | T001 |
     +------+------+------+------+------+------+------+------+
  2  | T016 | T015 | T014 | T013 | T012 | T011 | T010 | T009 |
     +------+------+------+------+------+------+------+------+
  3  | T024 | T023 | T022 | T021 | T020 | T019 | T018 | T017 |
     +------+------+------+------+------+------+------+------+
  4  | T032 | T031 | T030 | T029 | T028 | T027 | T026 | T025 |
     +------+------+------+------+------+------+------+------+
  5  | T040 | T039 | T038 | T037 | T036 | T035 | T034 | T033 |
     +------+------+------+------+------+------+------+------+
  6  | T048 | T047 | T046 | T045 | T044 | T043 | T042 | T041 |
     +------+------+------+------+------+------+------+------+
  7  | TO56 | TO55 | T054 | T053 | T052 | T051 | T050 | T049 |
     +------+------+------+------+------+------+------+------+
  8  | T064 | T063 | T062 | T061 | T060 | T059 | T058 | T057 |
     +------+------+------+------+------+------+------+------+
  9  | T072 | T071 | T070 | T069 | T068 | T067 | T066 | T065 |
     +------+------+------+------+------+------+------+------+
 10  | T080 | T079 | T078 | T077 | T076 | T075 | T074 | T073 |
     +------+------+------+------+------+------+------+------+
 11  | T088 | T087 | T086 | T085 | T084 | T083 | T082 | T081 |
     +------+------+------+------+------+------+------+------+
 12  | TO96 | TO95 | T094 | T093 | T092 | T091 | T090 | T089 |
     +------+------+------+------+------+------+------+------+
 13  | T104 | T103 | T102 | T101 | T100 | T099 | T098 | T097 |
     +------+------+------+------+------+------+------+------+
 14  | T112 | T111 | T110 | T109 | T108 | T107 | T106 | T105 |
     +------+------+------+------+------+------+------+------+
 15  | T120 | T119 | T118 | T117 | T116 | T115 | T114 | T113 |
     +------+------+------+------+------+------+------+------+
     |                      .  .  .  .                       |
     +------+------+------+------+------+------+------+------+
TC+1 | CODA | CODB |          modified octet count           |
     +------+------+------+------+------+------+------+------+

Figure 6: Preferred Packed TSVCIS Payload Octets

now for the alternate placement ๐Ÿ‘‘. it's there to cover all the other NRL VDR configurations, and it MUST use two trailing bytes (see Figure 7). the last trailing byte MUST be filled with the two-bit rate code (CODA and CODB, both set to one), and its six-bit count field MUST be filled with ones. the second-to-last trailing byte MUST contain the parameter count (TC) in octets (a value from 1 and 255, inclusive). the value of zero SHALL be considered as reserved, so don't use it ๐Ÿซถ.

        MSB                                              LSB
         0      1      2      3      4      5      6      7
     +------+------+------+------+------+------+------+------+
  1  | T008 | T007 | T006 | T005 | T004 | T003 | T002 | T001 |
     +------+------+------+------+------+------+------+------+
  2  | T016 | T015 | T014 | T013 | T012 | T011 | T010 | T009 |
     +------+------+------+------+------+------+------+------+
     |                      .  .  .  .                       |
     +------+------+------+------+------+------+------+------+
TC+1 |                      octet count                      |
     +------+------+------+------+------+------+------+------+
TC+2 | CODA | CODB |   1  |   1  |   1  |   1  |   1  |   1  |
     +------+------+------+------+------+------+------+------+

Figure 7: Length Unrestricted Packed TSVCIS Payload Octets


3.3. Multiple TSVCIS Frames in an RTP Packet ๐Ÿฆ‹

okay so a TSVCIS RTP packet payload can hold zero or more back-to-back TSVCIS coder frames (each one is MELPe 2400 plus TSVCIS coder data), oldest frame first ๐ŸŒธ. after those, there can be zero or one MELPe comfort noise frame. you can tell if there's a comfort noise frame by checking its rate code bits in its last octet โœจ.

the default packetization interval is one coder frame, which is 22.5, 67.5, or 90 ms depending on the coder bitrate (2400, 1200, or 600 bps) ๐Ÿ’œ. some apps use a longer packetization interval to lower the packet rate, and that's giving efficiency ๐Ÿงš.

a TSVCIS RTP packet with no coder frames and no comfort noise frames MAY be sent now and then by an endpoint, just to say "hey, I'm still connected" to an otherwise idle receiver ๐Ÿซถ.

TSVCIS coder frames in one RTP packet MAY have different TSVCIS parameter octet counts ๐ŸŒˆ. the packed parameter octet count (length) is shown in the trailing byte(s). all MELPe frames in one RTP packet MUST be the same coder bitrate, no mixing ๐Ÿ™…โ€โ™€๏ธ. for every MELPe coder frame, the coder rate bits in the trailing byte tell you what the contents are and how long they are, as listed in Table 1 ๐Ÿ’….

it's important to know that senders have these extra restrictions ๐Ÿšจ:

  • Senders SHOULD NOT include more TSVCIS or MELPe frames in a single RTP packet than will fit in the MTU of the RTP transport protocol.
  • Frames MUST NOT be split between RTP packets.

it is RECOMMENDED that the number of frames in an RTP packet match the application ๐ŸŽ€. for example, in telephony and other real-time stuff where delay matters, fewer frames per packet means lower delay. but for bandwidth-constrained links or delay-insensitive streaming messaging apps, more than one frame per packet, or even lots of frames per packet, would be totally fine ๐ŸŒธ.

info about how many frames are in an RTP packet is NOT sent as part of the RTP payload ๐Ÿ™ˆ. the way to figure it out is to identify each frame's type and length, then count the total octets in the RTP packet. so you're basically doing the math yourself, bestie ๐Ÿงฎ.


3.4. Congestion Control Considerations ๐Ÿšฆ

the target bitrate of TSVCIS can be adjusted at any point in time, which means congestion management is possible โœจ. also, the amount of encoded speech or audio data in a single packet can be used for congestion control, since the packet rate is inversely proportional to the packet duration ๐Ÿ’–. a lower packet transmission rate cuts down on header overhead, but it also raises latency and loss sensitivity, so it ought to be used with care ๐Ÿฅบ.

UDP doesn't do congestion control on its own, so applications using RTP over UDP SHOULD implement their own congestion control above the UDP layer [RFC8085], and they MAY also implement a transport circuit breaker [RFC8083] ๐Ÿ”ฅ. the RMCAT Working Group [RMCAT] is working on how the application pieces that handle congestion control should interact, including the RTP layer, the higher-level media codec control layer, and the lower-level transport interface, plus any components dedicated to congestion control functions ๐Ÿง .


4. Payload Format Parameters ๐Ÿ‘‘

this RTP payload format is identified with the TSVCIS media subtype ๐ŸŽ€. it's registered under [RFC4855] and follows the media type registration template from [RFC6838] ๐Ÿ’œ.


4.1. Media Type Definitions ๐ŸŒˆ

  • Type name: audio
  • Subtype name: TSVCIS
  • Required parameters: Clock Rate (Hz): 8000
  • Optional parameters:
    • ptime: this is the recommended length of time (in milliseconds) that the media in a packet covers. it SHALL use the nearest rounded-up ms integer packet duration. for TSVCIS, the values are 23, 45, 68, 90, 112, 135, 156, and 180. larger values can be used as long as they're properly rounded. see Section 6 of [RFC4566] ๐Ÿฆ‹.
    • maxptime: this is the maximum length of time (in milliseconds) that can be packed into one packet. it SHALL use the nearest rounded-up ms integer packet duration. for TSVCIS, the values are 23, 45, 68, 90, 112, 135, 156, and 180. larger values can be used as long as they're properly rounded. see Section 6 of [RFC4566] ๐Ÿซถ.
    • bitrate: this tells you which MELPe coder bitrates are supported ๐Ÿ“. the possible values are a comma-separated list of rates from this set: 2400, 1200, 600. the modes are listed in order of preference, so the first one is the favorite. if "bitrate" is not present, the fixed coder bitrate of 2400 MUST be used ๐Ÿ™Œ.
    • tcmax: this is the TSVCIS maximum TC value that's supported or wanted, from 1 to 255 ๐Ÿ’…. if "tcmax" is not present, a default value of 35 is used ๐ŸŒธ.
  • Channels: 1

Encoding considerations: this media subtype is framed and binary, see Section 4.8 of [RFC6838] ๐Ÿ”ฅ.

Security considerations: Please see Section 8 of RFC 8817.

Interoperability considerations: N/A

Published specification: [TSVCIS]

Applications that use this media type: N/A

Fragment identifier considerations: N/A

Additional information:

  • Deprecated alias names for this type: N/A
  • Magic number(s): N/A
  • File extension(s): N/A
  • Macintosh file type code(s): N/A

Person & email address to contact for further information: Victor Demjanenko, Ph.D. <victor.demjanenko@vocal.com>

Intended usage: COMMON

Restrictions on usage: the media subtype depends on RTP framing, so it's only defined for transfer via RTP [RFC3550]. transport within other framing protocols is not defined at this time ๐Ÿ™…โ€โ™€๏ธ.

Author: Victor Demjanenko, Ph.D.

Change controller: IETF; contact <avt@ietf.org>

Provisional registration? (standards tree only): No

4.2. Mapping to SDP ๐Ÿ’–

Okay bestie, the payload format media subtype and its parameters SHALL be mapped following Section 3 of [RFC4855] ๐Ÿ’…. The media type info has a very specific mapping to fields in the Session Description Protocol (SDP) [RFC4566], which is what people usually use to describe RTP sessions ๐ŸŽ€. When SDP is describing a TSVCIS session, it goes like this:

  • The media type ("audio") goes in SDP m= as the media name.
  • The media subtype (payload format name) goes in SDP a=rtpmap as the encoding name.
  • The parameter "bitrate" goes in the SDP a=fmtp attribute by copying it as a bitrate=<value> string.
  • The parameter "tcmax" goes in the SDP a=fmtp attribute by copying it as a tcmax=<value> string.
  • The parameters "ptime" and "maxptime" go in the SDP a=ptime and a=maxptime attributes, respectively.

When conveying information via SDP, the encoding name SHALL be "TSVCIS" (the same as the media subtype) ๐Ÿฆ‹.

An example of the media representation in SDP for describing TSVCIS might be:

m=audio 49120 RTP/AVP 96
a=rtpmap:96 TSVCIS/8000

The optional media type parameter "bitrate", when present, MUST be included in the a=fmtp attribute in the SDP, expressed as a media type string in the form of a semicolon-separated list of parameter=value pairs. The string "value" can be one or more of 2400, 1200, and 600, separated by commas (where each bitrate value indicates the corresponding MELPe coder) โœจ. An example of the media representation in SDP for describing TSVCIS when all three coder bitrates are supported might be:

m=audio 49120 RTP/AVP 96
a=rtpmap:96 TSVCIS/8000
a=fmtp:96 bitrate=2400,600,1200

The optional media type parameter "tcmax", when present, MUST be included in the a=fmtp attribute in the SDP, expressed as a media type string in the form of a semicolon-separated list of parameter=value pairs. The string "value" is an integer number in the range of 1 to 255 representing the maximum number of TSVCIS parameter octets supported ๐ŸŒธ. An example of the media representation in SDP for describing TSVCIS with a maximum of 101 octets supported is as follows:

m=audio 49120 RTP/AVP 96
a=rtpmap:96 TSVCIS/8000
a=fmtp:96 tcmax=101

The parameter "ptime" cannot be used for the purpose of specifying the TSVCIS operating mode ๐Ÿ™ˆ. The reason is that, for certain values, it will be impossible to distinguish which mode is about to be used (e.g., when ptime=68, it would be impossible to distinguish whether the packet is carrying one frame of 67.5 ms or three frames of 22.5 ms). Not me getting confused by this one ๐Ÿ’€.

Note that the payload format (encoding) names are commonly shown in upper case. Media subtypes are commonly shown in lower case. These names are case insensitive in both places. Similarly, parameter names are case insensitive in both the media subtype name and the default mapping to the SDP a=fmtp attribute ๐ŸŒˆ.

4.3. Declarative SDP Considerations ๐Ÿงš

For declarative media, the "bitrate" parameter specifies the possible bitrates used by the sender. Multiple TSVCIS rtpmap values (such as 97, 98, and 99, as used below) MAY be used to convey TSVCIS-coded voice at different bitrates. The receiver can then select an appropriate TSVCIS codec by using 97, 98, or 99 ๐Ÿ’œ.

m=audio 49120 RTP/AVP 97 98 99
a=rtpmap:97 TSVCIS/8000
a=fmtp:97 bitrate=2400
a=rtpmap:98 TSVCIS/8000
a=fmtp:98 bitrate=1200
a=rtpmap:99 TSVCIS/8000
a=fmtp:99 bitrate=600

For declarative media, the "tcmax" parameter specifies the maximum number of octets of TSVCIS packed parameters used by the sender or the sender's communications channel ๐Ÿ“.

4.4. Offer/Answer SDP Considerations ๐Ÿค

In the Offer/Answer model [RFC3264], "bitrate" is a bidirectional parameter. Both sides MUST use a common "bitrate" value or values. The offer contains the bitrates supported by the offerer, listed in its preferred order. The answerer MAY agree to any bitrate by listing the bitrate first in the answerer response. Additionally, the answerer MAY indicate any secondary bitrate or bitrates that it supports. The initial bitrate used by both parties SHALL be the first bitrate specified in the answerer response ๐Ÿ‘‘.

For example, if offerer bitrates are "2400,600" and answerer bitrates are "600,2400", the initial bitrate is 600. If other bitrates are provided by the answerer, any common bitrate between the offer and answer MAY be used at any time in the future. Activation of these other common bitrates is beyond the scope of this document ๐Ÿฆ‹.

The use of a lower bitrate is often important for a case such as when one endpoint utilizes a bandwidth-constrained link (e.g., 1200 bps radio link or slower), where only the lower coder bitrate will work ๐Ÿ“ป.

In the Offer/Answer model [RFC3264], "tcmax" is a bidirectional parameter. Both sides SHOULD use a common "tcmax" value. The offer contains the tcmax supported by the offerer. The answerer MAY agree to any tcmax equal to or less than this value by stating the desired tcmax in the answerer response. The answerer alternatively MAY identify its own tcmax and rely on TSVCIS ignoring any augmented data it cannot use โญ.


5. Discontinuous Transmissions ๐Ÿ“ด

A primary application of TSVCIS is for radio communications of voice conversations, and discontinuous transmissions are normal ๐ŸŽ™๏ธ. When TSVCIS is used in an IP network, TSVCIS RTP packet transmissions may cease and resume frequently. RTP synchronization source (SSRC) sequence number gaps indicate lost packets to be filled by Packet Loss Concealment (PLC), while abrupt loss of RTP packets indicates intended discontinuous transmissions ๐Ÿซถ. Resumption of voice transmission SHOULD be indicated by the RTP marker bit (M) set to 1 โœจ.

If a TSVCIS coder so desires, it may send a MELPe comfort noise frame as per Appendix B of [SCIP210] prior to ceasing transmission. A receiver may optionally use comfort noise during its silence periods. No SDP negotiations are required ๐ŸŒ™.


6. Packet Loss Concealment ๐Ÿฉน

TSVCIS packet loss concealment (PLC) uses the special properties and coding for the pitch/voicing parameter of the MELPe 2400 bps coder ๐Ÿ”ฅ. The PLC erasure indication utilizes any of the errored encodings of a non-voiced frame as identified in Table 1 of [MELPE]. For the sake of simplicity, it is preferred that a code value of 3 for the pitch/voicing parameter be used. Hence, set bits P0 and P1 to one and bits P2, P3, P4, P5, and P6 to zero ๐Ÿ’–.

When using PLC in 1200 bps or 600 bps mode, the MELPe 2400 bps decoder is called three or four times, respectively, to cover the loss of a low bitrate MELPe frame ๐Ÿงธ.


7. IANA Considerations ๐Ÿ—‚๏ธ

IANA has registered TSVCIS as specified in Section 4.1. The media type has been added to the IANA registry for "RTP Payload Format Media Types" (https://www.iana.org/assignments/rtp-parameters) ๐ŸŒŸ.


8. Security Considerations ๐Ÿšจ

RTP packets using the payload format defined in this specification are subject to the security considerations discussed in the RTP specification [RFC3550] and in any applicable RTP profile such as RTP/AVP [RFC3551], RTP/AVPF [RFC4585], RTP/SAVP [RFC3711], or RTP/SAVPF [RFC5124]. However, as discussed in [RFC7202], it is not an RTP payload format's responsibility to discuss or mandate what solutions are used to meet such basic security goals as confidentiality, integrity, and source authenticity for RTP in general. This responsibility lies with anyone using RTP in an application. They can find guidance on available security mechanisms and important considerations in [RFC7201]. Applications SHOULD use one or more appropriate strong security mechanisms. The rest of this section discusses the security-impacting properties of the payload format itself ๐Ÿ”.

This RTP payload format and the TSVCIS decoder, to the best of our knowledge, do not exhibit any significant non-uniformity in the receiver-side computational complexity for packet processing and thus are unlikely to pose a denial-of-service threat due to the receipt of pathological data. Additionally, the RTP payload format does not contain any active content ๐Ÿ›ก๏ธ.

Please see the security considerations discussed in [RFC6562] regarding Voice Activity Detect (VAD) and its effect on bitrates. This one is seriously important, bestie ๐Ÿ˜ญ.

9. References ๐Ÿ“š

9.1. Normative References โœจ

okay bestie, these are the docs this spec leans on ๐Ÿ“š they're the foundation the whole thing is built on ๐Ÿ’…

[MELP]     Department of Defense, "Analog-to-Digital Conversion of
           Voice by 2,400 Bit/Second Mixed Excitation Linear
           Prediction (MELP)", Department of Defense
           Telecommunications Standard MIL-STD-3005, December 1999.

[MELPE]    North Atlantic Treaty Organization (NATO), "The 600 Bit/S,
           1200 Bit/S and 2400 Bit/S NATO Interoperable Narrow Band
           Voice Coder", STANAG No. 4591, October 2008.

[NRLVDR]   Heide, D., Cohen, A., Lee, Y., and T. Moran, "Universal
           Vocoder Using Variable Data Rate Vocoding",
           DOI 10.21236/ada588068, Naval Research Lab NRL/FR/5555--
           13-10, 239, June 2013,
           <https://doi.org/10.21236/ada588068>.

[RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
           Requirement Levels", BCP 14, RFC 2119,
           DOI 10.17487/RFC2119, March 1997,
           <https://www.rfc-editor.org/info/rfc2119>.

[RFC2736]  Handley, M. and C. Perkins, "Guidelines for Writers of RTP
           Payload Format Specifications", BCP 36, RFC 2736,
           DOI 10.17487/RFC2736, December 1999,
           <https://www.rfc-editor.org/info/rfc2736>.

[RFC3264]  Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model
           with Session Description Protocol (SDP)", RFC 3264,
           DOI 10.17487/RFC3264, June 2002,
           <https://www.rfc-editor.org/info/rfc3264>.

[RFC3550]  Schulzrinne, H., Casner, S., Frederick, R., and V.
           Jacobson, "RTP: A Transport Protocol for Real-Time
           Applications", STD 64, RFC 3550, DOI 10.17487/RFC3550,
           July 2003, <https://www.rfc-editor.org/info/rfc3550>.

[RFC3551]  Schulzrinne, H. and S. Casner, "RTP Profile for Audio and
           Video Conferences with Minimal Control", STD 65, RFC 3551,
           DOI 10.17487/RFC3551, July 2003,
           <https://www.rfc-editor.org/info/rfc3551>.

[RFC3711]  Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K.
           Norrman, "The Secure Real-time Transport Protocol (SRTP)",
           RFC 3711, DOI 10.17487/RFC3711, March 2004,
           <https://www.rfc-editor.org/info/rfc3711>.

[RFC4566]  Handley, M., Jacobson, V., and C. Perkins, "SDP: Session
           Description Protocol", RFC 4566, DOI 10.17487/RFC4566,
           July 2006, <https://www.rfc-editor.org/info/rfc4566>.

[RFC4855]  Casner, S., "Media Type Registration of RTP Payload
           Formats", RFC 4855, DOI 10.17487/RFC4855, February 2007,
           <https://www.rfc-editor.org/info/rfc4855>.

[RFC5124]  Ott, J. and E. Carrara, "Extended Secure RTP Profile for
           Real-time Transport Control Protocol (RTCP)-Based Feedback
           (RTP/SAVPF)", RFC 5124, DOI 10.17487/RFC5124, February
           2008, <https://www.rfc-editor.org/info/rfc5124>.

[RFC6562]  Perkins, C. and JM. Valin, "Guidelines for the Use of
           Variable Bit Rate Audio with Secure RTP", RFC 6562,
           DOI 10.17487/RFC6562, March 2012,
           <https://www.rfc-editor.org/info/rfc6562>.

[RFC6838]  Freed, N., Klensin, J., and T. Hansen, "Media Type
           Specifications and Registration Procedures", BCP 13,
           RFC 6838, DOI 10.17487/RFC6838, January 2013,
           <https://www.rfc-editor.org/info/rfc6838>.

[RFC8083]  Perkins, C. and V. Singh, "Multimedia Congestion Control:
           Circuit Breakers for Unicast RTP Sessions", RFC 8083,
           DOI 10.17487/RFC8083, March 2017,
           <https://www.rfc-editor.org/info/rfc8083>.

[RFC8085]  Eggert, L., Fairhurst, G., and G. Shepherd, "UDP Usage
           Guidelines", BCP 145, RFC 8085, DOI 10.17487/RFC8085,
           March 2017, <https://www.rfc-editor.org/info/rfc8085>.

[RFC8088]  Westerlund, M., "How to Write an RTP Payload Format",
           RFC 8088, DOI 10.17487/RFC8088, May 2017,
           <https://www.rfc-editor.org/info/rfc8088>.

[RFC8130]  Demjanenko, V. and D. Satterlee, "RTP Payload Format for
           the Mixed Excitation Linear Prediction Enhanced (MELPe)
           Codec", RFC 8130, DOI 10.17487/RFC8130, March 2017,
           <https://www.rfc-editor.org/info/rfc8130>.

[RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
           2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
           May 2017, <https://www.rfc-editor.org/info/rfc8174>.

[SCIP210]  National Security Agency, "SCIP Signaling Plan", SCIP-210,
           January 2013.

9.2. Informative References ๐ŸŒธ

these ones are the extra reading ๐Ÿ“– helpful for the vibes but not the core rules, so you can dive in whenever you're curious ๐Ÿฆ‹

[RFC4585]  Ott, J., Wenger, S., Sato, N., Burmeister, C., and J. Rey,
           "Extended RTP Profile for Real-time Transport Control
           Protocol (RTCP)-Based Feedback (RTP/AVPF)", RFC 4585,
           DOI 10.17487/RFC4585, July 2006,
           <https://www.rfc-editor.org/info/rfc4585>.

[RFC7201]  Westerlund, M. and C. Perkins, "Options for Securing RTP
           Sessions", RFC 7201, DOI 10.17487/RFC7201, April 2014,
           <https://www.rfc-editor.org/info/rfc7201>.

[RFC7202]  Perkins, C. and M. Westerlund, "Securing the RTP
           Framework: Why RTP Does Not Mandate a Single Media
           Security Solution", RFC 7202, DOI 10.17487/RFC7202, April
           2014, <https://www.rfc-editor.org/info/rfc7202>.

[RMCAT]    IETF, "RTP Media Congestion Avoidance Techniques (rmcat)
           Working Group",
           <https://datatracker.ietf.org/wg/rmcat/about/>.

[TSVCIS]   National Security Agency, "Tactical Secure Voice
           Cryptographic Interoperability Specification (TSVCIS)
           Version 3.1", NSA 09-01A, March 2019.

Authors' Addresses ๐Ÿ’œ

the squad behind this one ๐Ÿซถ the VOCAL Technologies crew, all based out of Buffalo!

Victor Demjanenko, Ph.D.
VOCAL Technologies, Ltd.
520 Lee Entrance, Suite 202
Buffalo, NY 14228
United States of America

Phone: +1 716 688 4675
Email: victor.demjanenko@vocal.com


John Punaro
VOCAL Technologies, Ltd.
520 Lee Entrance, Suite 202
Buffalo, NY 14228
United States of America

Phone: +1 716 688 4675
Email: john.punaro@vocal.com


David Satterlee
VOCAL Technologies, Ltd.
520 Lee Entrance, Suite 202
Buffalo, NY 14228
United States of America

Phone: +1 716 688 4675
Email: david.satterlee@vocal.com

that's the whole thing, bestie!! ๐ŸŒˆโœจ thank you for sticking with me through all five parts ๐Ÿฅน๐Ÿ’–

๐Ÿ“ฆ where this page comes from