Asterisk - The Open Source Telephony Project  18.5.0
Public Member Functions | Data Fields
ast_sip_session Struct Reference

A structure describing a SIP session. More...

#include <res_pjsip_session.h>

Collaboration diagram for ast_sip_session:
Collaboration graph
[legend]

Public Member Functions

 AST_VECTOR (, struct ast_rtp_instance_stats *) media_stats
 

Data Fields

struct ast_sip_session_media_stateactive_media_state
 
int ani2
 
struct ast_sip_aoraor
 
unsigned int authentication_challenge_count:4
 
enum ast_sip_session_call_direction call_direction
 
struct ast_channelchannel
 
struct ast_sip_contactcontact
 
struct ao2_containerdatastores
 
unsigned int defer_end:1
 
unsigned int defer_terminate:1
 
pjsip_rx_data * deferred_reinvite
 
struct {
   struct ast_sip_session_delayed_request *   first
 
   struct ast_sip_session_delayed_request *   last
 
delayed_requests
 
struct ast_format_capdirect_media_cap
 
struct ast_dspdsp
 
enum ast_sip_dtmf_mode dtmf
 
unsigned int ended_while_deferred:1
 
struct ast_sip_endpointendpoint
 
char exten [AST_MAX_EXTENSION]
 
struct ast_party_id id
 
struct pjsip_inv_session * inv_session
 
unsigned int moh_passthrough:1
 
struct ast_sip_session_media_statepending_media_state
 
pjsip_uri * request_uri
 
pj_timer_entry rescheduled_reinvite
 
pjsip_fromto_hdr * saved_from_hdr
 
pj_timer_entry scheduled_termination
 
struct ast_taskprocessorserializer
 
struct {
   struct ast_sip_session_supplement *   first
 
   struct ast_sip_session_supplement *   last
 
   ast_mutex_t   lock
 
supplements
 
struct ast_sip_session_suspendersuspended
 
enum ast_sip_session_t38state t38state
 
unsigned int terminate_while_deferred:1
 

Detailed Description

A structure describing a SIP session.

For the sake of brevity, a "SIP session" in Asterisk is referring to a dialog initiated by an INVITE. While "session" is typically interpreted to refer to the negotiated media within a SIP dialog, we have opted to use the term "SIP session" to refer to the INVITE dialog itself.

Definition at line 179 of file res_pjsip_session.h.

Member Function Documentation

◆ AST_VECTOR()

AST_VECTOR ( struct ast_rtp_instance_stats )

Media statistics for negotiated RTP streams

Field Documentation

◆ active_media_state

struct ast_sip_session_media_state* active_media_state

◆ ani2

int ani2

Originating Line Info (ANI II digits)

Definition at line 243 of file res_pjsip_session.h.

Referenced by caller_id_incoming_request().

◆ aor

struct ast_sip_aor* aor

The AOR associated with this session

Definition at line 223 of file res_pjsip_session.h.

Referenced by ast_sip_session_create_outgoing(), read_pjsip(), and session_destructor().

◆ authentication_challenge_count

unsigned int authentication_challenge_count

Number of challenges received during outgoing requests to determine if we are in a loop

Definition at line 239 of file res_pjsip_session.h.

Referenced by ast_sip_session_alloc(), outbound_invite_auth(), and session_inv_on_tsx_state_changed().

◆ call_direction

enum ast_sip_session_call_direction call_direction

◆ channel

The Asterisk channel associated with the session

Definition at line 189 of file res_pjsip_session.h.

Referenced by __print_debug_details(), answer(), apply_negotiated_sdp_stream(), ast_sip_session_get_name(), ast_sip_session_is_pending_stream_default(), ast_sip_session_regenerate_answer(), ast_sip_session_resume_reinvite(), call(), call_pickup_incoming_request(), caller_id_incoming_request(), caller_id_incoming_response(), caller_id_outgoing_request(), caller_id_outgoing_response(), chan_pjsip_answer(), chan_pjsip_fixup(), chan_pjsip_hangup(), chan_pjsip_incoming_ack(), chan_pjsip_incoming_request(), chan_pjsip_incoming_response(), chan_pjsip_incoming_response_update_cause(), chan_pjsip_request_with_stream_topology(), chan_pjsip_session_end(), clear_session_and_channel(), defer_incoming_sdp_stream(), dtmf_info_incoming_request(), dtmf_mode_refresh_cb(), get_redirecting_add_diversion(), handle_incoming_request(), handle_negotiated_sdp(), incoming_in_dialog_request(), invite_replaces(), is_colp_update_allowed(), log_caps(), on_topology_change_response(), pbx_start_incoming_request(), queue_connected_line_update(), read_pjsip(), refer_attended_alloc(), refer_attended_task(), refer_incoming_attended_request(), refer_incoming_blind_request(), refer_incoming_invite_request(), refer_incoming_refer_request(), refer_outgoing_request(), refer_progress_alloc(), rfc3326_add_reason_header(), rfc3326_incoming_request(), rfc3326_incoming_response(), rfc3326_outgoing_request(), rfc3326_outgoing_response(), rfc3326_use_reason_header(), session_inv_on_create_offer(), session_inv_on_media_update(), session_inv_on_redirected(), session_inv_on_tsx_state_changed(), session_reinvite_on_rx_request(), set_caps(), set_from_header(), set_redirecting(), set_sipdomain_variable(), sip_session_response_cb(), stir_shaken_incoming_request(), t38_attach_framehook(), t38_change_state(), t38_initialize_session(), t38_reinvite_response_cb(), transfer(), transfer_redirect(), transfer_refer(), update_connected_line_information(), update_initial_connected_line(), and video_info_incoming_request().

◆ contact

The contact associated with this session

Definition at line 185 of file res_pjsip_session.h.

Referenced by ast_sip_session_alloc(), path_session_outgoing_request(), path_session_outgoing_response(), read_pjsip(), and session_destructor().

◆ datastores

struct ao2_container* datastores

Datastores added to the session by supplements to the session

Definition at line 193 of file res_pjsip_session.h.

Referenced by ast_sip_session_add_datastore(), ast_sip_session_alloc(), ast_sip_session_get_datastore(), ast_sip_session_remove_datastore(), and session_destructor().

◆ defer_end

unsigned int defer_end

Whether the end of the session should be deferred

Definition at line 227 of file res_pjsip_session.h.

Referenced by ast_sip_session_defer_termination(), ast_sip_session_end_if_deferred(), and session_inv_on_state_changed().

◆ defer_terminate

unsigned int defer_terminate

◆ deferred_reinvite

pjsip_rx_data* deferred_reinvite

Deferred incoming re-invite

Definition at line 219 of file res_pjsip_session.h.

Referenced by ast_sip_session_resume_reinvite(), and session_reinvite_on_rx_request().

◆ delayed_requests

struct { ... } delayed_requests

◆ direct_media_cap

struct ast_format_cap* direct_media_cap

Format capabilities pertaining to direct media

Definition at line 203 of file res_pjsip_session.h.

Referenced by ast_sip_session_alloc(), create_outgoing_sdp_stream(), send_direct_media_request(), session_destructor(), and set_caps().

◆ dsp

struct ast_dsp* dsp

Optional DSP, used only for inband DTMF/Fax-CNG detection if configured

Definition at line 213 of file res_pjsip_session.h.

Referenced by ast_sip_session_alloc(), chan_pjsip_cng_tone_detected(), chan_pjsip_read_stream(), pjsip_acf_dtmf_mode_write(), session_destructor(), and set_caps().

◆ dtmf

enum ast_sip_dtmf_mode dtmf

◆ ended_while_deferred

unsigned int ended_while_deferred

Session end (remote hangup) requested while termination deferred

Definition at line 229 of file res_pjsip_session.h.

Referenced by ast_sip_session_defer_termination(), ast_sip_session_end_if_deferred(), and session_inv_on_state_changed().

◆ endpoint

struct ast_sip_endpoint* endpoint

The endpoint with which Asterisk is communicating

Definition at line 183 of file res_pjsip_session.h.

Referenced by __print_debug_details(), add_bundle_groups(), add_crypto_to_stream(), add_extmap_to_stream(), add_ice_to_stream(), add_id_headers(), add_msid_to_stream(), add_rtcp_fb_to_stream(), add_ssrc_to_stream(), apply_negotiated_sdp_stream(), ast_sip_session_alloc(), ast_sip_session_create_invite(), ast_sip_session_create_joint_call_cap(), ast_sip_session_create_joint_call_stream(), ast_sip_session_get_name(), ast_sip_session_media_get_transport(), ast_sip_session_media_state_add(), caller_id_incoming_request(), caller_id_outgoing_response(), chan_pjsip_get_rtp_peer(), chan_pjsip_get_vrtp_peer(), chan_pjsip_incoming_ack(), chan_pjsip_incoming_response(), chan_pjsip_indicate(), chan_pjsip_new(), chan_pjsip_queryoption(), chan_pjsip_read_stream(), chan_pjsip_session_begin(), chan_pjsip_set_rtp_peer(), check_ice_support(), create_local_sdp(), create_outgoing_sdp_stream(), create_rtp(), defer_incoming_sdp_stream(), direct_media_mitigate_glare(), enable_rtcp(), filter_session_outgoing_message(), generate_rtpmap_attr(), get_codecs(), get_destination(), get_redirecting_add_diversion(), handle_incoming_request(), handle_incoming_sdp(), handle_new_invite_request(), handle_outgoing_request(), handle_outgoing_response(), is_colp_update_allowed(), log_caps(), media_offer_read_av(), media_offer_write_av(), nat_incoming_invite_response(), negotiate_incoming_sdp_stream(), new_invite(), outbound_invite_auth(), path_session_outgoing_request(), path_session_outgoing_response(), process_extmap_attributes(), process_ice_attributes(), process_ice_auth_attrb(), process_ssrc_attributes(), push_notify(), queue_connected_line_update(), read_pjsip(), refer_incoming_attended_request(), refer_incoming_blind_request(), refer_incoming_invite_request(), refer_incoming_refer_request(), refer_progress_alloc(), rfc3326_add_reason_header(), send_direct_media_request(), sendtext(), session_destructor(), session_inv_on_media_update(), session_inv_on_redirected(), session_inv_on_tsx_state_changed(), session_refresh_state_get_or_alloc(), set_caps(), set_from_header(), set_ice_components(), set_mid_and_bundle_group(), setup_dtls_srtp(), sip_session_refresh(), stir_shaken_incoming_request(), stir_shaken_outgoing_request(), t38_framehook(), t38_initialize_session(), t38_interpret_sdp(), transmit_info_dtmf(), transmit_info_with_vidupdate(), update_connected_line_information(), and update_incoming_connected_line().

◆ exten

char exten[AST_MAX_EXTENSION]

Dialplan extension where incoming call is destined

Definition at line 181 of file res_pjsip_session.h.

Referenced by call_pickup_incoming_request(), chan_pjsip_incoming_request(), get_destination(), and new_invite().

◆ first [1/2]

Definition at line 191 of file res_pjsip_session.h.

◆ first [2/2]

Definition at line 199 of file res_pjsip_session.h.

◆ id

struct ast_party_id id

◆ inv_session

struct pjsip_inv_session* inv_session

The PJSIP details of the session, which includes the dialog

Definition at line 187 of file res_pjsip_session.h.

Referenced by add_crypto_to_stream(), add_header(), add_party_param(), answer(), apply_negotiated_sdp_stream(), ast_sip_dialog_get_session(), ast_sip_session_alloc(), ast_sip_session_create_invite(), ast_sip_session_regenerate_answer(), ast_sip_session_send_request_with_cb(), ast_sip_session_send_response(), ast_sip_session_terminate(), caller_id_outgoing_response(), chan_pjsip_get_uniqueid(), chan_pjsip_incoming_request(), chan_pjsip_indicate(), chan_pjsip_session_end(), channel_read_pjsip(), create_outgoing_sdp_stream(), direct_media_mitigate_glare(), dtmf_mode_refresh_cb(), generate_session_refresh_sdp(), get_codecs(), get_destination(), handle_incoming_sdp(), handle_negotiated_sdp(), handle_new_invite_request(), incoming_in_dialog_request(), incoming_request(), indicate(), invite_collision_timeout(), media_offer_read_av(), media_offer_write_av(), nat_incoming_invite_request(), nat_outgoing_invite_request(), negotiate_incoming_sdp_stream(), new_invite(), options_incoming_request(), outgoing_request(), process_ice_attributes(), process_ssrc_attributes(), push_notify_channel(), refer_incoming_invite_request(), refer_incoming_refer_request(), refer_outgoing_request(), refer_progress_alloc(), reschedule_reinvite(), send_response(), sendtext(), session_destructor(), session_end_completion(), session_inv_on_create_offer(), session_inv_on_tsx_state_changed(), session_reinvite_on_rx_request(), session_termination_task(), set_from_header(), set_redirecting(), sip_session_refresh(), transfer(), transfer_redirect(), transfer_refer(), transmit_info_dtmf(), transmit_info_with_vidupdate(), update_completed(), update_connected_line_information(), video_info_incoming_request(), and websocket_outgoing_invite_request().

◆ last [1/2]

Definition at line 191 of file res_pjsip_session.h.

◆ last [2/2]

Definition at line 199 of file res_pjsip_session.h.

◆ lock

Definition at line 191 of file res_pjsip_session.h.

◆ moh_passthrough

unsigned int moh_passthrough

Whether to pass through hold and unhold using re-invites with recvonly and sendrecv

Definition at line 231 of file res_pjsip_session.h.

Referenced by ast_sip_session_alloc(), chan_pjsip_indicate(), pjsip_acf_moh_passthrough_read(), and pjsip_acf_moh_passthrough_write().

◆ pending_media_state

struct ast_sip_session_media_state* pending_media_state

◆ request_uri

pjsip_uri* request_uri

Initial incoming INVITE Request-URI. NULL otherwise.

Definition at line 235 of file res_pjsip_session.h.

Referenced by channel_read_pjsip(), get_destination(), and set_sipdomain_variable().

◆ rescheduled_reinvite

pj_timer_entry rescheduled_reinvite

When we need to reschedule a reinvite, we use this structure to do it

Definition at line 201 of file res_pjsip_session.h.

Referenced by invite_terminated(), and reschedule_reinvite().

◆ saved_from_hdr

pjsip_fromto_hdr* saved_from_hdr

From header saved at invite creation

Definition at line 225 of file res_pjsip_session.h.

Referenced by add_pai_header(), add_rpid_header(), and set_from_header().

◆ scheduled_termination

pj_timer_entry scheduled_termination

When we need to forcefully end the session

Definition at line 205 of file res_pjsip_session.h.

Referenced by ast_sip_session_defer_termination(), and sip_session_defer_termination_stop_timer().

◆ serializer

◆ supplements

struct { ... } supplements

◆ suspended

struct ast_sip_session_suspender* suspended

Non-null if the session serializer is suspended or being suspended.

Definition at line 197 of file res_pjsip_session.h.

Referenced by ast_sip_session_suspend(), and ast_sip_session_unsuspend().

◆ t38state

◆ terminate_while_deferred

unsigned int terminate_while_deferred

Termination requested while termination deferred

Definition at line 217 of file res_pjsip_session.h.

Referenced by ast_sip_session_defer_termination_cancel(), and ast_sip_session_terminate().


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