Frame layout
Serde envelope
The body of every frame is a serde envelope:
A receiver that does not recognize a tail of newer fields skips
(payload_size - bytes_consumed) bytes and continues. This is how forward
compatibility works.
Field encoding
Primitives are little-endian and two’s-complement, with no padding:Strings are length-prefixed, not null-terminated. Binary payloads (e.g.
µ-law audio) are also encoded with the
string shape. The bytes are
treated as opaque.Worked example: BargeRequest
Schema:
call_sid = "abc" with method_id = 3854301714 (Barge):
4 + length).
Reading a frame
method_id.
