XMediaLib.SDP.Origin (xmedialib v0.3.0)

Copy Markdown View Source

SDP origin line (o=) identifying the session creator and session id.

What problem this solves

SDP o= identifies who created the session and assigns session id/version numbers used during renegotiation. Parsers promote this line into a struct so gateways can compare or rewrite origin fields when generating answers.

The origin line ties together username, session id/version (for renegotiation), and the creator's network address. WebRTC stacks often use - as the username and random session ids.

Wire form: o=<username> <sess-id> <sess-version> <nettype> <addrtype> <unicast-address>

RFCs

Summary

Types

t()

Origin fields from o=<username> <sess-id> <sess-version> <nettype> <addrtype> <unicast-address>.

Types

t()

@type t() :: %XMediaLib.SDP.Origin{
  addr_type: String.t(),
  net_type: String.t(),
  session_id: String.t(),
  session_version: String.t(),
  unicast_address: String.t(),
  username: String.t()
}

Origin fields from o=<username> <sess-id> <sess-version> <nettype> <addrtype> <unicast-address>.

Fields

  • :username - creator login or - when unknown
  • :session_id - numeric session identifier (string on the wire)
  • :session_version - incremented when the session description changes
  • :net_type - network type, usually IN (Internet)
  • :addr_type - address family, e.g. IP4 or IP6
  • :unicast_address - address of the session originator