mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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
This commit is contained in:
committed by
Joshua Colp
parent
fc68291d13
commit
3905997bae
@@ -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 */
|
||||
|
Reference in New Issue
Block a user