Skip to content
Snippets Groups Projects
Commit 3905997b authored by Kevin Harwell's avatar Kevin Harwell Committed by Joshua Colp
Browse files

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
parent fc68291d
Branches
Tags
No related merge requests found
......@@ -259,6 +259,10 @@ res_pjsip_outbound_registration
outbound registration, registration is retried at the given interval up to
'max_retries'.
res_pjsip_outbound_publish
------------------
* Added a new multi_user option that when set to 'yes' allows a given configuration
to be used for multiple users.
CEL Backends
------------------
......
......@@ -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 */
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment