Skip to main content

Module session

Module session 

Source
Expand description

Session timers (RFC 4028).

A SIP dialog has no keepalive. If the far end loses power, its socket never closes and no BYE is ever sent, so both sides sit in a call that no longer exists — one of them streaming audio into the void, the other gone. Session timers are the periodic “are you still there” that makes that detectable: the two ends agree an interval, one of them refreshes inside it, and whoever stops seeing refreshes tears the call down locally.

Everything here is pure. The interval negotiation, the choice of who refreshes and the deadlines that follow from them are values computed from headers; the waiting and the sending happen a layer up, where there is a clock.

Structs§

Accepted
Terms the UAS accepted, ready to be written into the 2xx.
MinSe
The Min-SE header (RFC 4028 §5): the shortest interval the sender will accept.
Session
A live session timer: the agreed interval and which side keeps it alive.
SessionExpires
The Session-Expires header (RFC 4028 §4), also spelled x.

Enums§

Answer
What a UAS should do about the session timer on an incoming request.
Refresher
Who refreshes the session.

Constants§

ABSOLUTE_MIN_INTERVAL
The floor the RFC puts under any minimum interval (RFC 4028 §9).
DEFAULT_INTERVAL
What sipx asks for when nothing else is configured (RFC 4028 §4’s example value).
OPTION_TAG
The option tag that advertises support, in Supported and Require (RFC 4028 §4).

Functions§

adopt
What a UAC learns from the 2xx to its own session refresh request (RFC 4028 §7.2).
answer
Decide the UAS side of the negotiation (RFC 4028 §9, Table 2).