Session Timers
Liblinphone supports the RFC 4028 - Session Timers.
From the RFC abstract
This document defines an extension to the Session Initiation Protocol (SIP). This extension allows for a periodic refresh of SIP sessions through a re-INVITE or UPDATE request. The refresh allows both user agents and proxies to determine whether the SIP session is still active. The extension defines two new header fields: Session-Expires, which conveys the lifetime of the session, and Min-SE, which conveys the minimum allowed value for the session timer.
How to use it
Session Timers within linphone can be enabled and configured using 4 variables:
- The global toggle
- The Session Timers value
- The MinSE (Minimum Session Expires) value, that should always be lower or equal to the Session Timers value
- The refresher default behavior
Enable the Session Timers feature
You can set the Session Timers value, in seconds
You can also set a minimal required value (MinSE), in seconds
As well as the preferred behavior (following the UAS Behavior section of the RFC)
Those variables can also be set in the config file using the following configuration variables:
session_expires_enabled=1
session_expires_value=100
session_expires_min_value=90
session_expires_refresher_value=2
; refresher value 0 = auto, 1 = uas, 2 = uac
Behavior
Based on the 4 configuration options above the library will then try to negotiate and refresh the session automatically.
It also supports UPDATE or INVITE based refresh regarding the other-end UPDATE support.