Module sdp

Module sdp 

Source
Expand description

Minimal SDP (RFC 8866) offer/answer for G.711 audio calls.

A SIP INVITE carries an SDP offer describing where the caller wants media sent and which codecs it can speak; the 200 OK carries the answer committing to one. This module implements exactly the slice a G.711 voice agent needs: parse the offer’s audio media line and connection address, pick μ-law or A-law, and print a well-formed answer. It is deliberately not a general SDP implementation — video sections, ICE, and crypto lines are ignored on the way in and never produced on the way out.

Structs§

AudioOffer
The audio slice of a parsed SDP offer.

Functions§

audio_answer
Print an SDP answer committing to one G.711 codec, optionally accepting RFC 4733 telephone events (DTMF) on the payload type the offer proposed.
parse_audio_offer
Parse the audio portion of an SDP offer.