Asterisk - The Open Source Telephony Project GIT-master-f36a736
Data Fields
ast_sip_session_supplement Struct Reference

A supplement to SIP message processing. More...

#include <res_pjsip_session.h>

Collaboration diagram for ast_sip_session_supplement:
Collaboration graph
[legend]

Data Fields

int(* incoming_request )(struct ast_sip_session *session, struct pjsip_rx_data *rdata)
 Called on incoming SIP request This method can indicate a failure in processing in its return. If there is a failure, it is required that this method sends a response to the request. This method is always called from a SIP servant thread. More...
 
void(* incoming_response )(struct ast_sip_session *session, struct pjsip_rx_data *rdata)
 Called on an incoming SIP response This method is always called from a SIP servant thread. More...
 
const char * method
 
struct ast_modulemodule
 
struct {
   struct ast_sip_session_supplement *   next
 
next
 
void(* outgoing_request )(struct ast_sip_session *session, struct pjsip_tx_data *tdata)
 Called on an outgoing SIP request This method is always called from a SIP servant thread. More...
 
void(* outgoing_response )(struct ast_sip_session *session, struct pjsip_tx_data *tdata)
 Called on an outgoing SIP response This method is always called from a SIP servant thread. More...
 
enum ast_sip_supplement_priority priority
 
enum ast_sip_session_response_priority response_priority
 
void(* session_begin )(struct ast_sip_session *session)
 Notification that the session has begun This method will always be called from a SIP servant thread. More...
 
void(* session_destroy )(struct ast_sip_session *session)
 Notification that the session is being destroyed. More...
 
void(* session_end )(struct ast_sip_session *session)
 Notification that the session has ended. More...
 

Detailed Description

A supplement to SIP message processing.

These can be registered by any module in order to add processing to incoming and outgoing SIP requests and responses

Definition at line 290 of file res_pjsip_session.h.

Field Documentation

◆ incoming_request

int(* incoming_request) (struct ast_sip_session *session, struct pjsip_rx_data *rdata)

Called on incoming SIP request This method can indicate a failure in processing in its return. If there is a failure, it is required that this method sends a response to the request. This method is always called from a SIP servant thread.

Note
The following PJSIP methods will not work properly: pjsip_rdata_get_dlg() pjsip_rdata_get_tsx() The reason is that the rdata passed into this function is a cloned rdata structure, and its module data is not copied during the cloning operation. If you need to get the dialog, you can get it via session->inv_session->dlg.
There is no guarantee that a channel will be present on the session when this is called.

Definition at line 331 of file res_pjsip_session.h.

Referenced by handle_incoming_request().

◆ incoming_response

void(* incoming_response) (struct ast_sip_session *session, struct pjsip_rx_data *rdata)

Called on an incoming SIP response This method is always called from a SIP servant thread.

Note
The following PJSIP methods will not work properly: pjsip_rdata_get_dlg() pjsip_rdata_get_tsx() The reason is that the rdata passed into this function is a cloned rdata structure, and its module data is not copied during the cloning operation. If you need to get the dialog, you can get it via session->inv_session->dlg.
There is no guarantee that a channel will be present on the session when this is called.

Definition at line 347 of file res_pjsip_session.h.

Referenced by handle_incoming_response().

◆ method

const char* method

Method on which to call the callbacks. If NULL, call on all methods

Definition at line 294 of file res_pjsip_session.h.

Referenced by handle_incoming_request(), handle_incoming_response(), handle_outgoing_request(), handle_outgoing_response(), and has_supplement().

◆ module

struct ast_module* module

Reference module info

Definition at line 292 of file res_pjsip_session.h.

Referenced by ast_sip_session_register_supplement_with_module(), and ast_sip_session_remove_supplements().

◆ next [1/2]

◆  [2/2]

struct { ... } next

Next item in the list

◆ outgoing_request

void(* outgoing_request) (struct ast_sip_session *session, struct pjsip_tx_data *tdata)

Called on an outgoing SIP request This method is always called from a SIP servant thread.

Definition at line 352 of file res_pjsip_session.h.

Referenced by handle_outgoing_request().

◆ outgoing_response

void(* outgoing_response) (struct ast_sip_session *session, struct pjsip_tx_data *tdata)

Called on an outgoing SIP response This method is always called from a SIP servant thread.

Definition at line 357 of file res_pjsip_session.h.

Referenced by handle_outgoing_response().

◆ priority

Priority for this supplement. Lower numbers are visited before higher numbers

Definition at line 296 of file res_pjsip_session.h.

Referenced by ast_sip_session_register_supplement_with_module().

◆ response_priority

enum ast_sip_session_response_priority response_priority

Determines when the supplement is processed when handling a response. Defaults to AST_SIP_SESSION_BEFORE_MEDIA

Definition at line 364 of file res_pjsip_session.h.

Referenced by ast_sip_session_register_supplement_with_module(), and handle_incoming_response().

◆ session_begin

void(* session_begin) (struct ast_sip_session *session)

Notification that the session has begun This method will always be called from a SIP servant thread.

Definition at line 301 of file res_pjsip_session.h.

Referenced by handle_session_begin().

◆ session_destroy

void(* session_destroy) (struct ast_sip_session *session)

Notification that the session is being destroyed.

Definition at line 313 of file res_pjsip_session.h.

Referenced by handle_session_destroy().

◆ session_end

void(* session_end) (struct ast_sip_session *session)

Notification that the session has ended.

This method may or may not be called from a SIP servant thread. Do not make assumptions about being able to call PJSIP methods from within this method.

Definition at line 309 of file res_pjsip_session.h.

Referenced by handle_session_end().


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