Media
The Bot runtime terminates the audio session. It validates the SDP offer, selects a compatible codec, allocates RTP and RTCP ports, and returns an SDP answer. RTP processing, jitter handling, playback, and provider audio conversion remain separate from SIP routing.
Codecs
The runtime supports the following audio codecs:
| Codec | Audio rate | RTP clock | Notes |
|---|---|---|---|
| Opus | 48 kHz | 48 kHz | Variable bitrate |
| PCMA | 8 kHz | 8 kHz | G.711 A-law |
| PCMU | 8 kHz | 8 kHz | G.711 μ-law |
| G.722 | 16 kHz | 8 kHz | Wideband audio |
| L16 | SDP-defined | SDP-defined | Linear PCM |
The default preference order is Opus, PCMA, PCMU, G.722, then L16. A call is rejected when the offer and the effective codec policy have no common codec.
Secure media
Plain RTP and SDES-SRTP are supported. SRTP is deployment-controlled and is not automatically enabled for every Bot. When enabled with SDES, the runtime negotiates a compatible crypto suite, validates key material, and applies replay protection.
Supported suites are AEAD AES-128-GCM, AEAD AES-256-GCM, AES-128 Counter Mode with HMAC-SHA1-80, and AES-128 Counter Mode with HMAC-SHA1-32.
DTLS-SRTP keying is not implemented by the current RTP endpoint. Do not advertise DTLS-SRTP as a required media profile.