29 #include <pjsip_simple.h> 54 state_data->
pool, body,
"tuple"))) {
60 state_data->
pool, node,
"id",
"digium-presence");
63 state_data->
pool, node,
"status"))) {
69 state_data->
pool, node,
"digium_presence"))) {
76 pj_strdup2(state_data->
pool, &node->content, sanitized);
86 state_data->
pool, node,
"subtype", sanitized);
93 .
type =
"application",
94 .subtype =
"pidf+xml",
117 .requires =
"res_pjsip,res_pjsip_pubsub",
static int pidf_supplement_body(void *body, void *data)
Asterisk main include file. File version handling, generic pbx functions.
static struct ast_sip_pubsub_body_supplement pidf_supplement
pj_xml_attr * ast_sip_presence_xml_create_attr(pj_pool_t *pool, pj_xml_node *node, const char *name, const char *value)
Create XML attribute.
const char * type
Content type In "plain/text", "plain" is the type.
#define ast_strlen_zero(foo)
static int load_module(void)
enum ast_presence_state presence_state
Presence state management.
pj_xml_node * ast_sip_presence_xml_create_node(pj_pool_t *pool, pj_xml_node *parent, const char *name)
Create XML node.
Module has failed to load, may be in an inconsistent state.
void ast_sip_sanitize_xml(const char *input, char *output, size_t len)
Replace offensive XML characters with XML entities.
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS|AST_MODFLAG_LOAD_ORDER, "HTTP Phone Provisioning",.support_level=AST_MODULE_SUPPORT_EXTENDED,.load=load_module,.unload=unload_module,.reload=reload,.load_pri=AST_MODPRI_CHANNEL_DEPEND,.requires="http",)
structure used for presence XML bodies
int ast_sip_pubsub_register_body_supplement(struct ast_sip_pubsub_body_supplement *supplement)
Register a body generator with the pubsub core.
static int unload_module(void)
void ast_sip_pubsub_unregister_body_supplement(struct ast_sip_pubsub_body_supplement *supplement)
Unregister a body generator with the pubsub core.
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
const char * ast_presence_state2str(enum ast_presence_state state)
Convert presence state to text string for output.