pjsip logo pjsip.org
Open source SIP stack and media stack for presence, im/instant messaging, and multimedia communication
Loading

HOME

SIP/media Features
High Performance SIP
Small Footprint SIP
Symbian Port

FAQ

Documentation

Licensing

Download

Development (Trac)

Projects using pjsip

Mailing List

Open Source Links


About: PJLIB, PJLIB-UTIL, PJSIP, and PJMEDIA are created by: Benny Prijono
<bennylp@pjsip.org>


 

Home --> Documentations --> PJSIP Reference

SIP Session Timers support (RFC 4028 - Session Timers in SIP)
[User Agent Library]

SIP Session Timers support (RFC 4028 - Session Timers in SIP). More...

Data Structures

struct  pjsip_timer_setting
struct  pjsip_sess_expires_hdr
struct  pjsip_min_se_hdr

Typedefs

typedef typedefPJ_BEGIN_DECL
struct pjsip_timer 
pjsip_timer

Functions

pj_status_t pjsip_timer_init_module (pjsip_endpoint *endpt)
pj_status_t pjsip_timer_setting_default (pjsip_timer_setting *setting)
pj_status_t pjsip_timer_init_session (pjsip_inv_session *inv, const pjsip_timer_setting *setting)
pjsip_sess_expires_hdrpjsip_sess_expires_hdr_create (pj_pool_t *pool)
pjsip_min_se_hdrpjsip_min_se_hdr_create (pj_pool_t *pool)
pj_status_t pjsip_timer_update_req (pjsip_inv_session *inv, pjsip_tx_data *tdata)
pj_status_t pjsip_timer_process_resp (pjsip_inv_session *inv, const pjsip_rx_data *rdata, pjsip_status_code *st_code)
pj_status_t pjsip_timer_process_req (pjsip_inv_session *inv, const pjsip_rx_data *rdata, pjsip_status_code *st_code)
pj_status_t pjsip_timer_update_resp (pjsip_inv_session *inv, pjsip_tx_data *tdata)
pj_status_t pjsip_timer_end_session (pjsip_inv_session *inv)

Detailed Description

References

References:


Typedef Documentation

typedef typedefPJ_BEGIN_DECL struct pjsip_timer pjsip_timer

Opaque declaration of Session Timers.


Function Documentation

pj_status_t pjsip_timer_init_module ( pjsip_endpoint endpt  ) 

Initialize Session Timers module. This function must be called once during application initialization, to register this module to SIP endpoint.

Parameters:
endpt The SIP endpoint instance.
Returns:
PJ_SUCCESS if module is successfully initialized.
pj_status_t pjsip_timer_setting_default ( pjsip_timer_setting setting  ) 

Initialize Session Timers setting with default values.

Parameters:
setting Session Timers setting to be initialized.
Returns:
PJ_SUCCESS on successful.
pj_status_t pjsip_timer_init_session ( pjsip_inv_session inv,
const pjsip_timer_setting setting 
)

Initialize Session Timers for an invite session. This function should be called by application to apply Session Timers setting, otherwise invite session will apply default setting to the Session Timers.

Parameters:
inv The invite session.
setting Session Timers setting, see . If setting is NULL, default setting will be applied.
Returns:
PJ_SUCCESS on successful.
pjsip_sess_expires_hdr* pjsip_sess_expires_hdr_create ( pj_pool_t pool  ) 

Create Session-Expires header.

Parameters:
pool Pool to allocate the header instance from.
Returns:
An empty Session-Expires header instance.
pjsip_min_se_hdr* pjsip_min_se_hdr_create ( pj_pool_t pool  ) 

Create Min-SE header.

Parameters:
pool Pool to allocate the header instance from.
Returns:
An empty Min-SE header instance.
pj_status_t pjsip_timer_update_req ( pjsip_inv_session inv,
pjsip_tx_data tdata 
)

Update outgoing request to insert Session Timers headers and also signal Session Timers capability in Supported and/or Require headers.

This function will be called internally by the invite session if it detects that the session needs Session Timers support.

Parameters:
inv The invite session.
tdata Outgoing INVITE or UPDATE request.
Returns:
PJ_SUCCESS on successful.
pj_status_t pjsip_timer_process_resp ( pjsip_inv_session inv,
const pjsip_rx_data rdata,
pjsip_status_code st_code 
)

Process Session Timers headers in incoming response, this function will only process incoming response with status code 422 (Session Interval Too Small) or 2xx (final response).

This function will be called internally by the invite session if it detects that the session needs Session Timers support.

Parameters:
inv The invite session.
rdata Incoming response data.
st_code Output buffer to store corresponding SIP status code when function returning non-PJ_SUCCESS.
Returns:
PJ_SUCCESS on successful.
pj_status_t pjsip_timer_process_req ( pjsip_inv_session inv,
const pjsip_rx_data rdata,
pjsip_status_code st_code 
)

Process Session Timers headers in incoming request, this function will only process incoming INVITE and UPDATE request.

This function will be called internally by the invite session if it detects that the session needs Session Timers support.

Parameters:
inv The invite session.
rdata Incoming INVITE or UPDATE request.
st_code Output buffer to store corresponding SIP status code when function returning non-PJ_SUCCESS.
Returns:
PJ_SUCCESS on successful.
pj_status_t pjsip_timer_update_resp ( pjsip_inv_session inv,
pjsip_tx_data tdata 
)

Update outgoing response to insert Session Timers headers and also signal Session Timers capability in Supported and/or Require headers. This function will only update outgoing response with status code 422 (Session Interval Too Small) or 2xx (final response).

This function will be called internally by the invite session if it detects that the session needs Session Timers support.

Parameters:
inv The invite session.
tdata Outgoing 422/2xx response.
Returns:
PJ_SUCCESS on successful.
pj_status_t pjsip_timer_end_session ( pjsip_inv_session inv  ) 

End Session Timers in an invite session.

This function will be called internally by the invite session if it detects that the session needs Session Timers support.

Parameters:
inv The invite session.
Returns:
PJ_SUCCESS on successful.

 


PJSIP Open Source, high performance, small footprint, and very very portable SIP stack
Copyright (C) 2006-2008 Teluu Inc.