Parse SDP/SIP, negotiate WebRTC offer/answer, and track stateful SIP dialogs from text or pcap — with FSM state, codec tables, and a sequence-diagram timeline.
sdp_parseParse SDP / SIP
Parse a raw SDP blob or a full SIP message into structured JSON: media lines, codecs (rtpmap/fmtp), RTP header extensions (extmap), ICE, DTLS, direction, and BUNDLE. Stateless.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
text | string | required | — | Raw SDP or a full SIP message (headers + body). |
format | enum["auto","sdp","sip"] | optional | auto | auto detects SIP (start line) vs bare SDP. |
sdp_negotiateWebRTC SDP offer/answer
Negotiate a WebRTC (JSEP) offer/answer given as raw SDP. Returns the parsed offer/answer and the negotiated result per m-line (agreed codecs, RTP extensions, BUNDLE, DTLS roles, ICE, hold). Pass session_id to accumulate renegotiation cycles as a session.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
offer | string | required | — | Offer SDP (text). |
answer | string | optional | — | Answer SDP (text). Omit to only parse the offer (signaling state have-remote-offer). |
session_id | string | optional | — | Optional WebRTC session id; accumulates offer/answer cycles in the in-memory store. |
sip_dialogSIP dialog session
Track SIP dialogs statefully. Feed raw SIP messages (text) or a pcap (base64, classic or pcapng); the dialog is stored in memory keyed by Call-ID + tags. Inspect connection state (FSM), per-step codec/extension tables, and the lifetime as a JSON sequence diagram (+ Mermaid). Handles re-INVITE/UPDATE/PRACK, multiple m-lines, BUNDLE, hold, and forking.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
action | enum["add","state","timeline","codecs","list","reset"] | required | — | add = feed message/pcap; state = FSM + offer/answer; timeline = sequence diagram JSON + Mermaid; codecs = per-step codec/extension table; list = all dialogs; reset = delete. |
dialog_id | string | optional | — | Dialog id. Optional for add (derived from Call-ID/tags) and reset (omit = all); required for state/timeline/codecs. |
message | string | optional | — | Raw SIP message text (action=add). |
pcap_base64 | string | optional | — | pcap file/fragment as base64 (action=add). |
direction | enum["caller->callee","callee->caller","auto"] | optional | auto | Message direction; auto is derived from From/To tags. |
sip_port | number | optional | 5060 | SIP port to match in pcap (UDP/TCP). |