Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
#include <res_pjsip_pubsub.h>
Data Fields | |
const char * | default_accept |
Default body type defined for the event package this notifier handles. More... | |
void *(* | get_notify_data )(struct ast_sip_subscription *sub) |
Supply data needed to create a NOTIFY body. More... | |
int(* | get_resource_display_name )(struct ast_sip_endpoint *endpoint, const char *resource, char *display_name, int display_name_size) |
Supply Display Name for resource. More... | |
int(* | new_subscribe )(struct ast_sip_endpoint *endpoint, const char *resource) |
Called when a SUBSCRIBE arrives attempting to establish a new subscription. More... | |
int(* | new_subscribe_with_rdata )(struct ast_sip_endpoint *endpoint, const char *resource, pjsip_rx_data *rdata) |
Same as new_subscribe, but also pass a handle to the pjsip_rx_data. More... | |
int(* | notify_created )(struct ast_sip_subscription *sub, pjsip_tx_data *tdata) |
Optional callback to execute before sending outgoing NOTIFY requests. Because res_pjsip_pubsub creates the tdata internally, this allows modules to access the tdata if needed, e.g. to add custom headers. More... | |
int(* | refresh_subscribe )(struct ast_sip_subscription *sub, pjsip_rx_data *rdata) |
Called when a SUBSCRIBE arrives for an already active subscription. More... | |
int(* | subscription_established )(struct ast_sip_subscription *sub) |
Called when an inbound subscription has been accepted. More... | |
Definition at line 248 of file res_pjsip_pubsub.h.
const char* default_accept |
Default body type defined for the event package this notifier handles.
Typically, a SUBSCRIBE request will contain one or more Accept headers that tell what format they expect the body of NOTIFY requests to use. However, every event package is required to define a default body format type to be used if a SUBSCRIBE request for the event contains no Accept header.
Definition at line 257 of file res_pjsip_pubsub.h.
void *(* get_notify_data) (struct ast_sip_subscription *sub) |
Supply data needed to create a NOTIFY body.
The returned data must be an ao2 object. The caller of this function will be responsible for decrementing the refcount of the returned object
sub | The subscription |
Definition at line 327 of file res_pjsip_pubsub.h.
int(* get_resource_display_name) (struct ast_sip_endpoint *endpoint, const char *resource, char *display_name, int display_name_size) |
Supply Display Name for resource.
endpoint | The endpoint from which we received the SUBSCRIBE |
resource | The name of the resource to which the subscription is being made |
display_name | buffer for Display Name |
display_name_size | size of display_name buffer |
0 | Success |
-1 | Failure |
Definition at line 338 of file res_pjsip_pubsub.h.
int(* new_subscribe) (struct ast_sip_endpoint *endpoint, const char *resource) |
Called when a SUBSCRIBE arrives attempting to establish a new subscription.
The notifier is expected to return the response that should be sent to the SUBSCRIBE request.
If a 200-class response is returned, then the notifier's notify_required callback will immediately be called into with a reason of AST_SIP_SUBSCRIPTION_NOTIFY_REASON_STARTED.
endpoint | The endpoint from which we received the SUBSCRIBE |
resource | The name of the resource to which the subscription is being made |
Definition at line 272 of file res_pjsip_pubsub.h.
int(* new_subscribe_with_rdata) (struct ast_sip_endpoint *endpoint, const char *resource, pjsip_rx_data *rdata) |
Same as new_subscribe, but also pass a handle to the pjsip_rx_data.
endpoint | The endpoint from which we received the SUBSCRIBE |
resource | The name of the resource to which the subscription is being made |
rdata | The pjsip_rx_data for incoming subscription |
Definition at line 284 of file res_pjsip_pubsub.h.
int(* notify_created) (struct ast_sip_subscription *sub, pjsip_tx_data *tdata) |
Optional callback to execute before sending outgoing NOTIFY requests. Because res_pjsip_pubsub creates the tdata internally, this allows modules to access the tdata if needed, e.g. to add custom headers.
sub | The existing subscription |
tdata | The pjsip_tx_data to use for the outgoing NOTIFY |
0 | Success |
-1 | Failure |
Definition at line 317 of file res_pjsip_pubsub.h.
Referenced by send_notify().
int(* refresh_subscribe) (struct ast_sip_subscription *sub, pjsip_rx_data *rdata) |
Called when a SUBSCRIBE arrives for an already active subscription.
sub | The existing subscription |
0 | Success |
-1 | Failure |
Definition at line 306 of file res_pjsip_pubsub.h.
Referenced by pubsub_on_rx_refresh().
int(* subscription_established) (struct ast_sip_subscription *sub) |
Called when an inbound subscription has been accepted.
This is a prime opportunity for notifiers to add any notifier-specific data to the subscription (such as datastores) that it needs to.
sub | The new subscription |
0 | Success |
-1 | Failure |
Definition at line 298 of file res_pjsip_pubsub.h.