Skip to content

Type and route Jingle RTP extensions for BUNDLE - #95

Open
Ri0n wants to merge 5 commits into
jingle/group-negotiationfrom
jingle/rtp-extensions
Open

Ri0n wants to merge 5 commits into
jingle/group-negotiationfrom
jingle/rtp-extensions

Conversation

@Ri0n

@Ri0n Ri0n commented Sep 11, 2026

Copy link
Copy Markdown
Member

Scope

P3 foundation from the native-calls implementation plan. This PR is stacked on jingle/group-negotiation / #94.

Typed RTP extension model

  • parse XEP-0293 RTCP feedback into typed description- and payload-level structures
  • preserve optional feedback parameters and distinguish omitted parameter values from empty strings
  • parse XEP-0293 rtcp-fb-trr-int, including the protocol-defined zero value
  • parse XEP-0294 RTP header extensions, senders, parameters and extmap-allow-mixed
  • validate XEP-0294 extension IDs using protocol ranges rather than arbitrary unsignedShort values
  • parse XEP-0339 sources and source groups into typed SSRC structures
  • keep unknown description/payload extension XML opaque and round-trippable
  • reject malformed known extension elements instead of silently treating them as unknown capability

Offer/answer semantics

  • require accepted RTCP feedback to be an unchanged subset at the same scope
  • support the XEP-0293 AVPF trr-int=0 fallback without replacing an explicitly offered interval
  • enforce XEP-0294 direction narrowing rules
  • keep ordinary header-extension IDs stable
  • allow RFC 8285 extended offer IDs to represent alternatives and be remapped to a usable answer ID
  • reject duplicate usable header-extension IDs while allowing repeated extended alternative IDs
  • keep peer SSRC/source state independent from local source state

Authenticated BUNDLE packet router

  • add a private BundleRouter for plaintext RTP/RTCP after successful SRTP/SRTCP authentication
  • route RTP MID-first, then by an unambiguous peer/incoming SSRC fallback
  • learn MID-authenticated peer SSRCs with a bounded table
  • keep peer/incoming and local SSRC namespaces separate so incoming RTP can never route via our local SSRC
  • parse one-byte and two-byte RFC 8285 RTP header extensions for negotiated MID
  • route RTCP sender/report/media SSRC fields according to their protocol direction
  • fail closed on malformed, unsupported or cross-content compound RTCP instead of broadcasting it
  • fence queued delivery with a router revision and invalidate learned routes on reconfiguration
  • keep route-table replacement transactional

Deliberately not done yet

  • no automatic disco advertisement for XEP-0293/XEP-0294/XEP-0339 or BUNDLE
  • no claim that the media backend supports every parsed feedback/header extension
  • no connection of BundleRouter to the live shared ICE/DTLS/SRTP association yet
  • no actual sharing of a live IceConnection by multiple RTP contents yet

The parser, negotiation policy, routing model and runtime capability advertisement remain intentionally separate. The router accepts packets only after authentication; live BUNDLE sharing will be wired only once the P2 membership lifecycle and this P3 demultiplexer are both proven independently.

@Ri0n Ri0n changed the title Type Jingle RTP feedback, header extensions and sources Type and route Jingle RTP extensions for BUNDLE Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant