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

A supplement to SIP message processing. More...

#include <res_pjsip.h>

Collaboration diagram for ast_sip_supplement:
Collaboration graph
[legend]

Data Fields

int(* incoming_request )(struct ast_sip_endpoint *endpoint, 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_endpoint *endpoint, 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 {
   struct ast_sip_supplement *   next
 
next
 
void(* outgoing_request )(struct ast_sip_endpoint *endpoint, struct ast_sip_contact *contact, 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_endpoint *endpoint, struct ast_sip_contact *contact, 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
 

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 out of dialog requests and responses

Definition at line 3197 of file res_pjsip.h.

Field Documentation

◆ incoming_request

int(* incoming_request) (struct ast_sip_endpoint *endpoint, 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 3219 of file res_pjsip.h.

Referenced by supplement_on_rx_request().

◆ incoming_response

void(* incoming_response) (struct ast_sip_endpoint *endpoint, 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 3235 of file res_pjsip.h.

Referenced by send_request_cb().

◆ method

const char* method

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

Definition at line 3199 of file res_pjsip.h.

Referenced by ast_sip_send_out_of_dialog_request(), send_request_cb(), supplement_on_rx_request(), and supplement_outgoing_response().

◆ next [1/2]

struct ast_sip_supplement* next

◆  [2/2]

struct { ... } next

Next item in the list

◆ outgoing_request

void(* outgoing_request) (struct ast_sip_endpoint *endpoint, struct ast_sip_contact *contact, struct pjsip_tx_data *tdata)

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

Definition at line 3240 of file res_pjsip.h.

Referenced by ast_sip_send_out_of_dialog_request().

◆ outgoing_response

void(* outgoing_response) (struct ast_sip_endpoint *endpoint, struct ast_sip_contact *contact, struct pjsip_tx_data *tdata)

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

Definition at line 3245 of file res_pjsip.h.

Referenced by supplement_outgoing_response().

◆ priority

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

Definition at line 3201 of file res_pjsip.h.

Referenced by ast_sip_register_supplement().


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