summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/res_pjsip_outbound_publish.h52
-rw-r--r--include/asterisk/stasis_app_playback.h17
2 files changed, 66 insertions, 3 deletions
diff --git a/include/asterisk/res_pjsip_outbound_publish.h b/include/asterisk/res_pjsip_outbound_publish.h
index b2038f58b..a578b5aec 100644
--- a/include/asterisk/res_pjsip_outbound_publish.h
+++ b/include/asterisk/res_pjsip_outbound_publish.h
@@ -104,6 +104,21 @@ struct ast_sip_outbound_publish_client *ast_sip_publish_client_get(const char *n
const char *ast_sip_publish_client_get_from_uri(struct ast_sip_outbound_publish_client *client);
/*!
+ * \brief Get the From URI the client will use for a specific user.
+ * \since 14.0.0
+ *
+ * \param client The publication client to get the From URI of a user
+ * \param user The user to retrieve the From URI for
+ * \param uri A buffer to place the URI into
+ * \param size The size of the buffer
+ *
+ * \retval From-uri on success
+ * \retval Empty-string on failure
+ */
+const char *ast_sip_publish_client_get_user_from_uri(struct ast_sip_outbound_publish_client *client, const char *user,
+ char *uri, size_t size);
+
+/*!
* \brief Get the To URI the client will use.
* \since 14.0.0
*
@@ -115,6 +130,21 @@ const char *ast_sip_publish_client_get_from_uri(struct ast_sip_outbound_publish_
const char *ast_sip_publish_client_get_to_uri(struct ast_sip_outbound_publish_client *client);
/*!
+ * \brief Get the To URI the client will use for a specific user.
+ * \since 14.0.0
+ *
+ * \param client The publication client to get the To URI of a user
+ * \param user The user to retrieve the To URI for
+ * \param uri A buffer to place the URI into
+ * \param size The size of the buffer
+ *
+ * \retval To-uri on success
+ * \retval Empty-string on failure
+ */
+const char *ast_sip_publish_client_get_user_to_uri(struct ast_sip_outbound_publish_client *client, const char *user,
+ char *uri, size_t size);
+
+/*!
* \brief Alternative for ast_datastore_alloc()
*
* There are two major differences between this and ast_datastore_alloc()
@@ -184,4 +214,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 */
diff --git a/include/asterisk/stasis_app_playback.h b/include/asterisk/stasis_app_playback.h
index b35299581..0038fd6d0 100644
--- a/include/asterisk/stasis_app_playback.h
+++ b/include/asterisk/stasis_app_playback.h
@@ -41,6 +41,8 @@ enum stasis_app_playback_state {
STASIS_PLAYBACK_STATE_PLAYING,
/*! The media is currently playing */
STASIS_PLAYBACK_STATE_PAUSED,
+ /*! The media is transitioning to the next in the list */
+ STASIS_PLAYBACK_STATE_CONTINUING,
/*! The media has stopped playing */
STASIS_PLAYBACK_STATE_COMPLETE,
/*! The playback was canceled. */
@@ -84,7 +86,8 @@ enum stasis_app_playback_target_type {
* available codecs for the channel.
*
* \param control Control for \c res_stasis.
- * \param file Base filename for the file to play.
+ * \param media Array of const char * media files to play.
+ * \param media_count The number of media files in \c media.
* \param language Selects the file based on language.
* \param target_id ID of the target bridge or channel.
* \param target_type What the target type is
@@ -95,8 +98,8 @@ enum stasis_app_playback_target_type {
* \return \c NULL on error.
*/
struct stasis_app_playback *stasis_app_control_play_uri(
- struct stasis_app_control *control, const char *file,
- const char *language, const char *target_id,
+ struct stasis_app_control *control, const char **media,
+ size_t media_count, const char *language, const char *target_id,
enum stasis_app_playback_target_type target_type,
int skipms, long offsetms, const char *id);
@@ -128,6 +131,14 @@ const char *stasis_app_playback_get_id(
*/
struct stasis_app_playback *stasis_app_playback_find_by_id(const char *id);
+/*!
+ * \brief Convert a playback to its JSON representation
+ *
+ * \param playback The playback object to convert to JSON
+ *
+ * \retval \c NULL on error
+ * \retval A JSON object on success
+ */
struct ast_json *stasis_app_playback_to_json(
const struct stasis_app_playback *playback);