mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 03:48:02 +00:00
ARI: External Media
The Channel resource has a new sub-resource "externalMedia". This allows an application to create a channel for the sole purpose of exchanging media with an external server. Once created, this channel could be placed into a bridge with existing channels to allow the external server to inject audio into the bridge or receive audio from the bridge. See https://wiki.asterisk.org/wiki/display/AST/External+Media+and+ARI for more information. Change-Id: I9618899198880b4c650354581b50c0401b58bc46
This commit is contained in:
@@ -824,5 +824,47 @@ struct ast_ari_channels_rtpstatistics_args {
|
||||
* \param[out] response HTTP response
|
||||
*/
|
||||
void ast_ari_channels_rtpstatistics(struct ast_variable *headers, struct ast_ari_channels_rtpstatistics_args *args, struct ast_ari_response *response);
|
||||
/*! Argument struct for ast_ari_channels_external_media() */
|
||||
struct ast_ari_channels_external_media_args {
|
||||
/*! The unique id to assign the channel on creation. */
|
||||
const char *channel_id;
|
||||
/*! Stasis Application to place channel into */
|
||||
const char *app;
|
||||
/*! The "variables" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { "endpoint": "SIP/Alice", "variables": { "CALLERID(name)": "Alice" } } */
|
||||
struct ast_json *variables;
|
||||
/*! Hostname/ip:port of external host */
|
||||
const char *external_host;
|
||||
/*! Payload encapsulation protocol */
|
||||
const char *encapsulation;
|
||||
/*! Transport protocol */
|
||||
const char *transport;
|
||||
/*! Connection type (client/server) */
|
||||
const char *connection_type;
|
||||
/*! Format to encode audio in */
|
||||
const char *format;
|
||||
/*! External media direction */
|
||||
const char *direction;
|
||||
};
|
||||
/*!
|
||||
* \brief Body parsing function for /channels/externalMedia.
|
||||
* \param body The JSON body from which to parse parameters.
|
||||
* \param[out] args The args structure to parse into.
|
||||
* \retval zero on success
|
||||
* \retval non-zero on failure
|
||||
*/
|
||||
int ast_ari_channels_external_media_parse_body(
|
||||
struct ast_json *body,
|
||||
struct ast_ari_channels_external_media_args *args);
|
||||
|
||||
/*!
|
||||
* \brief Start an External Media session.
|
||||
*
|
||||
* Create a channel to an External Media source/sink.
|
||||
*
|
||||
* \param headers HTTP headers
|
||||
* \param args Swagger parameters
|
||||
* \param[out] response HTTP response
|
||||
*/
|
||||
void ast_ari_channels_external_media(struct ast_variable *headers, struct ast_ari_channels_external_media_args *args, struct ast_ari_response *response);
|
||||
|
||||
#endif /* _ASTERISK_RESOURCE_CHANNELS_H */
|
||||
|
||||
Reference in New Issue
Block a user