res_pjsip_dialog_info_body_generator: Add dialog-info+xml support for presence.

This module implements dialog-info+xml for the purposes of presence. This means
that phones such as Grandstreams can now subscribe to receive presence information
for an extension.

ASTERISK-21443 #close
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/3705/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@418116 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2014-07-07 16:05:44 +00:00
parent ecaad9e608
commit 6e2d4a5106
5 changed files with 248 additions and 2 deletions

View File

@@ -28,6 +28,7 @@
* \li application/pidf+xml
* \li application/xpidf+xml
* \li application/cpim-pidf+xml
* \li application/dialog-info+xml
*/
struct ast_sip_exten_state_data {
/*! The extension of the current state change */
@@ -48,6 +49,8 @@ struct ast_sip_exten_state_data {
char local[PJSIP_MAX_URL_SIZE];
/*! Remote dialog URI */
char remote[PJSIP_MAX_URL_SIZE];
/*! Optional subscription */
struct ast_sip_subscription *sub;
/*! Allocation pool */
pj_pool_t *pool;
};

View File

@@ -72,7 +72,7 @@ pj_xml_attr *ast_sip_presence_xml_create_attr(pj_pool_t *pool,
* \brief Create XML node
*
* \param pool Allocation pool
* \param parent Node that will be parent to the created node
* \param parent Optional node that will be parent to the created node
* \param name The name for the new node
* \return The created node
*/