Skip to content

Latest commit

 

History

History
77 lines (41 loc) · 1.8 KB

timers.md

File metadata and controls

77 lines (41 loc) · 1.8 KB

Session Timers Plugin

Name

nksip_timers

Description

This module provides full support for the SIP Session Timers extension, according to RFC4028. Once activated, the time before the dialog is timed out and destroyed is negotiated as described in the RFC.

NkSIP will automatically start a session timer for every INVIYE. Use {nksip_timer_se, 0} to disable it. If the session timer is active, and a 422 (Session Interval Too Small) is received, NkSIP will automatically resend the request updating Session-Expires header.

timer will be added to all automatically generated Supported headers.

Dependant Plugins

None

Configuration Values

Service configuration values

Option Default Description
sip_timers_se 1800 (secs) Default value for the Session Timer
sip_timers_min_se 90 (secs) Minimum acceptable Session Timer (min 90, recomended 1800)

Request generation values

The previous options can also be used in each INVITE request sent calling invite/2,3

API functions

get_session_expires/1

get_session_expires(nksip:handle()|nksip:dialog()) ->
    {ok, non_neg_integer() | undefined} | {error, term()}.

Gets the current session expires value for a dialog

get_session_refresh/1

get_session_refresh(nksip:handle()|nksip:dialog()) ->
    {ok, non_neg_integer() | expired | undefined} | {error, term()}.

Gets the reamining time to refresh the session

Callback functions

None

Examples

See timer_test.erl for examples