pjsip logo pjsip.org
Open source SIP stack and media stack for presence, im/instant messaging, and multimedia communication

HOME

SIP/media Features
High Performance SIP
Small Footprint SIP
Symbian Port

FAQ

Documentation

Licensing

Download

Development (Trac)

Projects using pjsip

Mailing List

Open Source Links


About: PJLIB, PJLIB-UTIL, PJSIP, and PJMEDIA are created by: Benny Prijono
<bennylp@pjsip.org>


 

Home --> Documentations --> PJSIP Reference

pjsip_module Struct Reference
[Modules]

#include <sip_module.h>


Detailed Description

The declaration for SIP module. This structure would be passed to pjsip_endpt_register_module() to register the module to PJSIP.

Public Member Functions

 PJ_DECL_LIST_MEMBER (struct pjsip_module)

Data Fields

pj_str_t name
int id
int priority
pj_status_t(* load )(pjsip_endpoint *endpt)
pj_status_t(* start )(void)
pj_status_t(* stop )(void)
pj_status_t(* unload )(void)
pj_bool_t(* on_rx_request )(pjsip_rx_data *rdata)
pj_bool_t(* on_rx_response )(pjsip_rx_data *rdata)
pj_status_t(* on_tx_request )(pjsip_tx_data *tdata)
pj_status_t(* on_tx_response )(pjsip_tx_data *tdata)
void(* on_tsx_state )(pjsip_transaction *tsx, pjsip_event *event)

Member Function Documentation

pjsip_module::PJ_DECL_LIST_MEMBER ( struct  pjsip_module  ) 

To allow chaining of modules in the endpoint.


Field Documentation

Module name to identify the module.

This field MUST be initialized before registering the module.

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.

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.

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.

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.

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.

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:
mod The module.
Returns:
Module should return PJ_SUCCESS to indicate success.

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.

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.

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.

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.

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:

 


PJSIP Open Source, high performance, small footprint, and very very portable SIP stack
(C)2003-2008 Benny Prijono