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. An RTP/SAVP offer’s SDES a=crypto lines are collected for the SRTP layer, and secure_audio_answer answers one. It is deliberately not a general SDP implementation: video sections and ICE 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.
secure_audio_answer
audio_answer for an RTP/SAVP offer: the answer uses the secure profile and carries crypto, the value of our a=crypto: line (the tag and suite of the offer line we accept, and our own key).