#include <sip_module.h>
The declaration for SIP module. This structure would be passed to pjsip_endpt_register_module() to register the module to PJSIP.
Forward declaration for module (sip_module.h).
◆ PJ_DECL_LIST_MEMBER()
To allow chaining of modules in the endpoint.
◆ name
Module name to identify the module.
This field MUST be initialized before registering the module.
◆ id
Module ID. Application must initialize this field with -1 before registering the module to PJSIP. After the module is registered, this field will contain a unique ID to identify the module.
◆ priority
int pjsip_module::priority |
Integer number to identify module initialization and start order with regard to other modules. Higher number will make the module gets initialized later.
This field MUST be initialized before registering the module.
◆ load
Optional function to be called to initialize the module. This function will be called by endpoint during module registration. If the value is NULL, then it's equal to returning PJ_SUCCESS.
- Parameters
-
endpt | The endpoint instance. |
- Returns
- Module should return PJ_SUCCESS to indicate success.
◆ start
Optional function to be called to start the module. This function will be called by endpoint during module registration. If the value is NULL, then it's equal to returning PJ_SUCCESS.
- Returns
- Module should return zero to indicate success.
◆ stop
Optional function to be called to deinitialize the module before it is unloaded. This function will be called by endpoint during module unregistration. If the value is NULL, then it's equal to returning PJ_SUCCESS.
- Returns
- Module should return PJ_SUCCESS to indicate success.
◆ unload
Optional function to be called to deinitialize the module before it is unloaded. This function will be called by endpoint during module unregistration. If the value is NULL, then it's equal to returning PJ_SUCCESS.
- Parameters
-
- Returns
- Module should return PJ_SUCCESS to indicate success.
◆ on_rx_request
Optional function to be called to process incoming request message.
- Parameters
-
rdata | The incoming message. |
- Returns
- Module should return PJ_TRUE if it handles the request, or otherwise it should return PJ_FALSE to allow other modules to handle the request.
◆ on_rx_response
Optional function to be called to process incoming response message.
- Parameters
-
rdata | The incoming message. |
- Returns
- Module should return PJ_TRUE if it handles the response, or otherwise it should return PJ_FALSE to allow other modules to handle the response.
◆ on_tx_request
Optional function to be called when transport layer is about to transmit outgoing request message.
- Parameters
-
tdata | The outgoing request message. |
- Returns
- Module should return PJ_SUCCESS in all cases. If non-zero (or PJ_FALSE) is returned, the message will not be sent.
◆ on_tx_response
Optional function to be called when transport layer is about to transmit outgoing response message.
- Parameters
-
tdata | The outgoing response message. |
- Returns
- Module should return PJ_SUCCESS in all cases. If non-zero (or PJ_FALSE) is returned, the message will not be sent.
◆ on_tsx_state
Optional function to be called when this module is acting as transaction user for the specified transaction, when the transaction's state has changed.
- Parameters
-
tsx | The transaction. |
event | The event which has caused the transaction state to change. |
The documentation for this struct was generated from the following file: