WARNING: The online documentation has moved to https://docs.pjsip.org.

Visit the new documentation at https://docs.pjsip.org:

BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJSIP Reference

pjsip_inv_session Struct Reference

#include <sip_inv.h>

Data Fields

char obj_name [PJ_MAX_OBJ_NAME]
 
pj_pool_tpool
 
pj_pool_tpool_prov
 
pj_pool_tpool_active
 
pjsip_inv_state state
 
pj_bool_t cancelling
 
pj_bool_t pending_cancel
 
pjsip_tx_datapending_bye
 
pjsip_status_code cause
 
pj_str_t cause_text
 
pj_bool_t notify
 
pj_bool_t sdp_done_early_rel
 
unsigned cb_called
 
pjsip_dialogdlg
 
pjsip_role_e role
 
unsigned options
 
pjmedia_sdp_negneg
 
unsigned sdp_neg_flags
 
pjsip_transactioninvite_tsx
 
pjsip_tx_datainvite_req
 
pjsip_tx_datalast_answer
 
pjsip_tx_datalast_ack
 
pj_int32_t last_ack_cseq
 
void * mod_data [PJSIP_MAX_MODULE]
 
struct pjsip_timertimer
 
pj_bool_t following_fork
 
pj_atomic_tref_cnt
 
pj_bool_t updated_sdp_answer
 

Detailed Description

This structure describes the invite session.

Note regarding the invite session's pools. The inv_sess used to have only one pool, which is just a pointer to the dialog's pool. Ticket https://github.com/pjsip/pjproject/issues/877 has found that the memory usage will grow considerably everytime re-INVITE or UPDATE is performed.

Ticket #877 then created two more memory pools for the inv_sess, so now we have three memory pools:

  • pool: to be used to allocate long term data for the session
  • pool_prov and pool_active: this is a flip-flop pools to be used interchangably during re-INVITE and UPDATE. pool_prov is "provisional" pool, used to allocate SDP offer or answer for the re-INVITE and UPDATE. Once SDP negotiation is done, the provisional pool will be made as the active pool, then the existing active pool will be reset, to release the memory back to the OS. So these pool's lifetime is synchronized to the SDP offer-answer negotiation.

Higher level application such as PJSUA-LIB has been modified to make use of these flip-flop pools, i.e. by creating media objects from the provisional pool rather than from the long term pool.

Other applications that want to use these pools must understand that the flip-flop pool's lifetimes are synchronized to the SDP offer-answer negotiation.

The lifetime of this session is controlled by the reference counter in this structure, which is manipulated by calling pjsip_inv_add_ref and pjsip_inv_dec_ref. When the reference counter has reached zero, then this session will be destroyed.

See also
pjsip_inv_session

Field Documentation

◆ obj_name

char pjsip_inv_session::obj_name[PJ_MAX_OBJ_NAME]

Log identification

◆ pool

pj_pool_t* pjsip_inv_session::pool

Long term pool.

◆ pool_prov

pj_pool_t* pjsip_inv_session::pool_prov

Provisional pool

◆ pool_active

pj_pool_t* pjsip_inv_session::pool_active

Active/current pool

◆ state

pjsip_inv_state pjsip_inv_session::state

Invite sess state.

◆ cancelling

pj_bool_t pjsip_inv_session::cancelling

CANCEL requested

◆ pending_cancel

pj_bool_t pjsip_inv_session::pending_cancel

Wait to send CANCEL

◆ pending_bye

pjsip_tx_data* pjsip_inv_session::pending_bye

BYE to send later

◆ cause

pjsip_status_code pjsip_inv_session::cause

Disconnect cause.

◆ cause_text

pj_str_t pjsip_inv_session::cause_text

Cause text.

◆ notify

pj_bool_t pjsip_inv_session::notify

Internal.

◆ sdp_done_early_rel

pj_bool_t pjsip_inv_session::sdp_done_early_rel

Nego done in early med was reliable?

◆ cb_called

unsigned pjsip_inv_session::cb_called

Cb has been called

◆ dlg

pjsip_dialog* pjsip_inv_session::dlg

Underlying dialog.

◆ role

pjsip_role_e pjsip_inv_session::role

Invite role.

◆ options

unsigned pjsip_inv_session::options

Options in use.

◆ neg

pjmedia_sdp_neg* pjsip_inv_session::neg

Negotiator.

◆ sdp_neg_flags

unsigned pjsip_inv_session::sdp_neg_flags

SDP neg flags.

◆ invite_tsx

pjsip_transaction* pjsip_inv_session::invite_tsx

1st invite tsx.

◆ invite_req

pjsip_tx_data* pjsip_inv_session::invite_req

Saved invite req

◆ last_answer

pjsip_tx_data* pjsip_inv_session::last_answer

Last INVITE resp.

◆ last_ack

pjsip_tx_data* pjsip_inv_session::last_ack

Last ACK request

◆ last_ack_cseq

pj_int32_t pjsip_inv_session::last_ack_cseq

CSeq of last ACK

◆ mod_data

void* pjsip_inv_session::mod_data[PJSIP_MAX_MODULE]

Modules data.

◆ timer

struct pjsip_timer* pjsip_inv_session::timer

Session Timers.

◆ following_fork

pj_bool_t pjsip_inv_session::following_fork

Internal, following forked media?

◆ ref_cnt

pj_atomic_t* pjsip_inv_session::ref_cnt

Reference counter.

◆ updated_sdp_answer

pj_bool_t pjsip_inv_session::updated_sdp_answer

SDP answer just been updated?


The documentation for this struct was generated from the following file:

 


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