Group PJSIP_EVENT
- group PJSIP_EVENT
Representation of events as they are distributed among modules.
Defines
-
PJSIP_EVENT_INIT_TIMER(event, pentry)
Init timer event.
-
PJSIP_EVENT_INIT_TSX_STATE(event, ptsx, ptype, pdata, prev)
Init tsx state event.
-
PJSIP_EVENT_INIT_TX_MSG(event, ptdata)
Init tx msg event.
-
PJSIP_EVENT_INIT_RX_MSG(event, prdata)
Init rx msg event.
-
PJSIP_EVENT_INIT_TRANSPORT_ERROR(event, ptsx, ptdata)
Init transport error event.
-
PJSIP_EVENT_INIT_USER(event, u1, u2, u3, u4)
Init user event.
Enums
-
enum pjsip_event_id_e
Event IDs.
Values:
-
enumerator PJSIP_EVENT_UNKNOWN
Unidentified event.
-
enumerator PJSIP_EVENT_TIMER
Timer event, normally only used internally in transaction.
-
enumerator PJSIP_EVENT_TX_MSG
Message transmission event.
-
enumerator PJSIP_EVENT_RX_MSG
Message received event.
-
enumerator PJSIP_EVENT_TRANSPORT_ERROR
Transport error event.
-
enumerator PJSIP_EVENT_TSX_STATE
Transaction state changed event.
-
enumerator PJSIP_EVENT_USER
Indicates that the event was triggered by user action.
-
enumerator PJSIP_EVENT_UNKNOWN
Functions
-
const char *pjsip_event_str(pjsip_event_id_e e)
Get the event string from the event ID.
Note
defined in sip_util.c
- Parameters:
e – the event ID.
-
struct pjsip_event
- #include <sip_event.h>
This structure describe event descriptor to fully identify a SIP event.
Events are the only way for a lower layer object to inform something to higher layer objects. Normally this is achieved by means of callback, i.e. the higher layer objects register a callback to handle the event on the lower layer objects.
This event descriptor is used for example by transactions, to inform endpoint about events, and by transports, to inform endpoint about unexpected transport error.
Forward declaration for events (sip_event.h).
Public Functions
-
PJ_DECL_LIST_MEMBER(struct pjsip_event)
This is necessary so that we can put events as a list.
Public Members
-
pjsip_event_id_e type
The event type, can be any value of pjsip_event_id_e.
Type of event source:
PJSIP_EVENT_TX_MSG
PJSIP_EVENT_RX_MSG,
PJSIP_EVENT_TRANSPORT_ERROR
PJSIP_EVENT_TIMER
PJSIP_EVENT_USER
-
pj_timer_entry *entry
The timer entry.
-
struct pjsip_event::[anonymous]::[anonymous] timer
Timer event.
-
pjsip_rx_data *rdata
The incoming message.
The receive data buffer.
-
pjsip_tx_data *tdata
The outgoing message.
The transmit data buffer.
The transmit data.
-
pj_timer_entry *timer
The timer.
-
pj_status_t status
Transport error status.
-
void *data
Generic data.
-
pjsip_transaction *tsx
The transaction.
-
int prev_state
Previous state.
-
struct pjsip_event::[anonymous]::[anonymous] tsx_state
Transaction state has changed event.
-
struct pjsip_event::[anonymous]::[anonymous] tx_msg
Message transmission event.
-
struct pjsip_event::[anonymous]::[anonymous] tx_error
Transmission error event.
-
struct pjsip_event::[anonymous]::[anonymous] rx_msg
Message arrival event.
-
void *user1
User data 1.
-
void *user2
User data 2.
-
void *user3
User data 3.
-
void *user4
User data 4.
-
struct pjsip_event::[anonymous]::[anonymous] user
User event.
-
union pjsip_event::[anonymous] body
The event body as union, which fields depends on the event type. By convention, the first member of each struct in the union must be the pointer which is relevant to the event.
-
PJ_DECL_LIST_MEMBER(struct pjsip_event)
-
PJSIP_EVENT_INIT_TIMER(event, pentry)