summaryrefslogtreecommitdiff
path: root/include/asterisk/res_pjsip_outbound_publish.h
diff options
context:
space:
mode:
authorKevin Harwell <kharwell@digium.com>2016-05-03 16:07:23 -0500
committerJoshua Colp <jcolp@digium.com>2016-05-18 20:37:05 -0300
commit3905997bae4096f04320d409cf1058b1dc378bda (patch)
tree5752cb5023ae8072e74d61d7830028f6ab2e2750 /include/asterisk/res_pjsip_outbound_publish.h
parentfc68291d13760a1fa8b0585a0227ed5453da8c32 (diff)
res_pjsip_outbound_publish: Add multi-user support per configuration
Added a new multi_user option that when specified allows a particular configuration to be used for multiple users. It does this by replacing the user portion of the server uri with a dynamically created one. Two new API calls have been added in order to make use of the new functionality: ast_sip_publish_user_send - Sends an outgoing publish message based on the given user. If state for the user already exists it uses that, otherwise it dynamically creates new outbound publishing state for the user at that time. ast_sip_publish_user_remove - Removes all outbound publish state objects associated with the user. This essentially stops outbound publishing for the user. ASTERISK-25965 #close Change-Id: Ib88dde024cc83c916424645d4f5bb84a0fa936cc
Diffstat (limited to 'include/asterisk/res_pjsip_outbound_publish.h')
-rw-r--r--include/asterisk/res_pjsip_outbound_publish.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/asterisk/res_pjsip_outbound_publish.h b/include/asterisk/res_pjsip_outbound_publish.h
index b2038f58b..2831afb35 100644
--- a/include/asterisk/res_pjsip_outbound_publish.h
+++ b/include/asterisk/res_pjsip_outbound_publish.h
@@ -184,4 +184,26 @@ void ast_sip_publish_client_remove_datastore(struct ast_sip_outbound_publish_cli
int ast_sip_publish_client_send(struct ast_sip_outbound_publish_client *client,
const struct ast_sip_body *body);
+/*!
+* \brief Send an outgoing PUBLISH message based on the user
+*
+* \param client The publication client to send from
+* \param user The user to send to
+* \param body An optional body to add to the PUBLISH
+*
+* \retval -1 failure
+* \retval 0 success
+*/
+int ast_sip_publish_client_user_send(struct ast_sip_outbound_publish_client *client,
+ const char *user, const struct ast_sip_body *body);
+
+/*!
+* \brief Remove the user from the client (stopping it from publishing)
+*
+* \param client The publication client
+* \param user The user to remove
+*/
+void ast_sip_publish_client_remove(struct ast_sip_outbound_publish_client *client,
+ const char *user);
+
#endif /* RES_PJSIP_OUTBOUND_PUBLISH_H */