Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#833 closed enhancement (fixed)

Support for SIP Session Timer (RFC 4028)

Reported by: bennylp Owned by: bennylp
Priority: normal Milestone: release-1.4
Component: pjsip Version: trunk
Keywords: Cc: johan, lantz
Backport to 1.x milestone: Backported:

Description (last modified by nanang)

Scope:

  • Run-time configurable session interval (Session-Expires header) and minimum session interval (Min-SE header) per account basis.
  • Refresher performs refreshes at half of session interval, and refreshee sends BYE slightly before session expiration. 'Slightly' == minimum of 32 seconds and one-third of session interval.
  • Session interval negotiation, i.e: generate/handle 422 when SE less than Min-SE.
  • Works even when only one UA in a dialog supports Session Timer (and it's not listed in Require header).
  • Able to use Session Timer even when peer doesn't support Session Timer, perform refreshes by and for itself.
  • Able to adapt when Session Timer is turned-off.

Limitations:

  • Refreshing session using UPDATE hasn't been supported yet.
  • Refreshing session will always restart the media session (even if the media session is not modified).
  • Session Timer can always be listed in Supported header, but it's not necessarily always used (by omitting Session-Expires header), currently there is no mechanism to omit/turn-off Session-Expires header.

Change History (16)

comment:1 Changed 10 years ago by bennylp

  • Milestone changed from release-1.3 to release-1.4

comment:2 Changed 10 years ago by bennylp

  • Cc johan lantz added

comment:3 Changed 10 years ago by nanang

In r2858:

  • Initial version of Session Timers (RFC 4028).
  • Added new options in pjsua app to configure Session Timers settings.
  • Added python tests for Session Timers.

comment:4 Changed 10 years ago by nanang

  • Description modified (diff)

comment:5 Changed 10 years ago by nanang

In r2859:

  • Renamed pjsip_timer_default_setting() to pjsip_timer_setting_default().
  • Updated session timer settings in pjsua-lib as whole session timer setting struct (pyhton version remains using se & min_se).
  • Added output param SIP status code in pjsip_timer_process_resp() and pjsip_timer_process_req() to specify the corresponding SIP status code when function returning non-PJ_SUCCESS.
  • Fixed print header functions in sip_timer.c to have buffer check.
  • Added PJSIP_SESS_TIMER_DEF_SE setting to specify the default value of session timer interval.
  • Fixed role reference of the refresher, it is transaction role, not dialog role.

comment:6 Changed 10 years ago by nanang

In r2861:

  • Updated build config for VS6, Symbian MMP, and Makefile for Session Timer.
  • Fixed C/C++ cross-linking problem on some compilers (e.g: Symbian GCCE).

comment:7 follow-up: Changed 10 years ago by nanang

In r2865:

  • Fixed pjsip_timer definition (should not in a typedef).

comment:8 Changed 10 years ago by bennylp

In r2867:

  • bug in verifying --timer-se option in pjsua

comment:9 in reply to: ↑ 7 Changed 10 years ago by nanang

Replying to nanang:

In r2865:

  • Fixed pjsip_timer definition (should not in a typedef).

Just adding the details:
Reported compile error on Mac platform about pjsip_timer redefinition. pjsip_timer was forward-declared in sip_timer.h and (re)defined (also using typedef) in sip_timer.c.

comment:10 Changed 10 years ago by nanang

In r2870:

  • Updated Session Timer to keep the refresher role unchanged on any refreshes, by timer or manual.

comment:11 Changed 10 years ago by bennylp

  • Resolution set to fixed
  • Status changed from new to closed

comment:12 Changed 10 years ago by nanang

In r2889:

  • Fixed bug in session timer, timer callback shouldn't perform re-INVITE or BYE when there is pending INVITE.

comment:13 Changed 10 years ago by nanang

In r2890:

  • Updated previous fix for Session Timer (timer callback gets pending INVITE is in progress), instead of just quitting the callback, it may be better to reschedule the timer (for five seconds).

comment:14 Changed 10 years ago by nanang

In r2893:

  • Fixed bug session timer won't work properly after pjsua-lib restarted, by adding deinit module function for session timer and register the deinit function into atexit.

comment:15 Changed 10 years ago by bennylp

In r2896:

  • special treatment in ICE media transport, since Session Timer refresh when sending re-INVITE doesn't call transport_encode_sdp(), causing the ICE media transport to mistakenly think that it's role is UAS hence it will disable current ICE session

comment:16 Changed 10 years ago by nanang

In r2897:

  • Updated dump-config in pjsua app to include Session Timer settings (and 100rel).
Note: See TracTickets for help on using tickets.