2013-04-22 14:58:53 +00:00
|
|
|
/*
|
|
|
|
* Asterisk -- An open source telephony toolkit.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2012 - 2013, Digium, Inc.
|
|
|
|
*
|
|
|
|
* David M. Lee, II <dlee@digium.com>
|
|
|
|
*
|
|
|
|
* See http://www.asterisk.org for more information about
|
|
|
|
* the Asterisk project. Please do not directly contact
|
|
|
|
* any of the maintainers of this project for assistance;
|
|
|
|
* the project provides a web site, mailing lists and IRC
|
|
|
|
* channels for your use.
|
|
|
|
*
|
|
|
|
* This program is free software, distributed under the terms of
|
|
|
|
* the GNU General Public License Version 2. See the LICENSE file
|
|
|
|
* at the top of the source tree.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*! \file
|
|
|
|
*
|
|
|
|
* \brief Generated file - declares stubs to be implemented in
|
2013-07-27 23:11:02 +00:00
|
|
|
* res/ari/resource_bridges.c
|
2013-04-22 14:58:53 +00:00
|
|
|
*
|
|
|
|
* Bridge resources
|
|
|
|
*
|
|
|
|
* \author David M. Lee, II <dlee@digium.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
* !!!!! DO NOT EDIT !!!!!
|
|
|
|
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
* This file is generated by a mustache template. Please see the original
|
2013-07-27 23:11:02 +00:00
|
|
|
* template in rest-api-templates/ari_resource.h.mustache
|
2013-04-22 14:58:53 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ASTERISK_RESOURCE_BRIDGES_H
|
|
|
|
#define _ASTERISK_RESOURCE_BRIDGES_H
|
|
|
|
|
2013-07-27 23:11:02 +00:00
|
|
|
#include "asterisk/ari.h"
|
2013-04-22 14:58:53 +00:00
|
|
|
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Argument struct for ast_ari_bridges_list() */
|
2013-11-07 21:10:31 +00:00
|
|
|
struct ast_ari_bridges_list_args {
|
2013-04-22 14:58:53 +00:00
|
|
|
};
|
|
|
|
/*!
|
2013-10-16 14:02:06 +00:00
|
|
|
* \brief List all active bridges in Asterisk.
|
2013-04-22 14:58:53 +00:00
|
|
|
*
|
|
|
|
* \param headers HTTP headers
|
|
|
|
* \param args Swagger parameters
|
|
|
|
* \param[out] response HTTP response
|
|
|
|
*/
|
2013-11-07 21:10:31 +00:00
|
|
|
void ast_ari_bridges_list(struct ast_variable *headers, struct ast_ari_bridges_list_args *args, struct ast_ari_response *response);
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Argument struct for ast_ari_bridges_create() */
|
2013-11-07 21:10:31 +00:00
|
|
|
struct ast_ari_bridges_create_args {
|
2017-11-02 03:57:28 +00:00
|
|
|
/*! Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu). */
|
2013-04-22 14:58:53 +00:00
|
|
|
const char *type;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Unique ID to give to the bridge being created. */
|
uniqueid: channel linkedid, ami, ari object creation with id's
Much needed was a way to assign id to objects on creation, and
much change was necessary to accomplish it. Channel uniqueids
and linkedids are split into separate string and creation time
components without breaking linkedid propgation. This allowed
the uniqueid to be specified by the user interface - and those
values are now carried through to channel creation, adding the
assignedids value to every function in the chain including the
channel drivers. For local channels, the second channel can be
specified or left to default to a ;2 suffix of first. In ARI,
bridge, playback, and snoop objects can also be created with a
specified uniqueid.
Along the way, the args order to allocating channels was fixed
in chan_mgcp and chan_gtalk, and linkedid is no longer lost as
masquerade occurs.
(closes issue ASTERISK-23120)
Review: https://reviewboard.asterisk.org/r/3191/
........
Merged revisions 410157 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 15:47:55 +00:00
|
|
|
const char *bridge_id;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Name to give to the bridge being created. */
|
2013-12-17 23:25:49 +00:00
|
|
|
const char *name;
|
2013-04-22 14:58:53 +00:00
|
|
|
};
|
2014-01-21 14:27:21 +00:00
|
|
|
/*!
|
|
|
|
* \brief Body parsing function for /bridges.
|
|
|
|
* \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_bridges_create_parse_body(
|
|
|
|
struct ast_json *body,
|
|
|
|
struct ast_ari_bridges_create_args *args);
|
|
|
|
|
2013-04-22 14:58:53 +00:00
|
|
|
/*!
|
|
|
|
* \brief Create a new bridge.
|
|
|
|
*
|
|
|
|
* This bridge persists until it has been shut down, or Asterisk has been shut down.
|
|
|
|
*
|
|
|
|
* \param headers HTTP headers
|
|
|
|
* \param args Swagger parameters
|
|
|
|
* \param[out] response HTTP response
|
|
|
|
*/
|
2013-11-07 21:10:31 +00:00
|
|
|
void ast_ari_bridges_create(struct ast_variable *headers, struct ast_ari_bridges_create_args *args, struct ast_ari_response *response);
|
2015-01-27 17:21:03 +00:00
|
|
|
/*! Argument struct for ast_ari_bridges_create_with_id() */
|
|
|
|
struct ast_ari_bridges_create_with_id_args {
|
2017-11-02 03:57:28 +00:00
|
|
|
/*! Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu) to set. */
|
uniqueid: channel linkedid, ami, ari object creation with id's
Much needed was a way to assign id to objects on creation, and
much change was necessary to accomplish it. Channel uniqueids
and linkedids are split into separate string and creation time
components without breaking linkedid propgation. This allowed
the uniqueid to be specified by the user interface - and those
values are now carried through to channel creation, adding the
assignedids value to every function in the chain including the
channel drivers. For local channels, the second channel can be
specified or left to default to a ;2 suffix of first. In ARI,
bridge, playback, and snoop objects can also be created with a
specified uniqueid.
Along the way, the args order to allocating channels was fixed
in chan_mgcp and chan_gtalk, and linkedid is no longer lost as
masquerade occurs.
(closes issue ASTERISK-23120)
Review: https://reviewboard.asterisk.org/r/3191/
........
Merged revisions 410157 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 15:47:55 +00:00
|
|
|
const char *type;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Unique ID to give to the bridge being created. */
|
uniqueid: channel linkedid, ami, ari object creation with id's
Much needed was a way to assign id to objects on creation, and
much change was necessary to accomplish it. Channel uniqueids
and linkedids are split into separate string and creation time
components without breaking linkedid propgation. This allowed
the uniqueid to be specified by the user interface - and those
values are now carried through to channel creation, adding the
assignedids value to every function in the chain including the
channel drivers. For local channels, the second channel can be
specified or left to default to a ;2 suffix of first. In ARI,
bridge, playback, and snoop objects can also be created with a
specified uniqueid.
Along the way, the args order to allocating channels was fixed
in chan_mgcp and chan_gtalk, and linkedid is no longer lost as
masquerade occurs.
(closes issue ASTERISK-23120)
Review: https://reviewboard.asterisk.org/r/3191/
........
Merged revisions 410157 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 15:47:55 +00:00
|
|
|
const char *bridge_id;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Set the name of the bridge. */
|
uniqueid: channel linkedid, ami, ari object creation with id's
Much needed was a way to assign id to objects on creation, and
much change was necessary to accomplish it. Channel uniqueids
and linkedids are split into separate string and creation time
components without breaking linkedid propgation. This allowed
the uniqueid to be specified by the user interface - and those
values are now carried through to channel creation, adding the
assignedids value to every function in the chain including the
channel drivers. For local channels, the second channel can be
specified or left to default to a ;2 suffix of first. In ARI,
bridge, playback, and snoop objects can also be created with a
specified uniqueid.
Along the way, the args order to allocating channels was fixed
in chan_mgcp and chan_gtalk, and linkedid is no longer lost as
masquerade occurs.
(closes issue ASTERISK-23120)
Review: https://reviewboard.asterisk.org/r/3191/
........
Merged revisions 410157 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 15:47:55 +00:00
|
|
|
const char *name;
|
|
|
|
};
|
|
|
|
/*!
|
|
|
|
* \brief Body parsing function for /bridges/{bridgeId}.
|
|
|
|
* \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
|
|
|
|
*/
|
2015-01-27 17:21:03 +00:00
|
|
|
int ast_ari_bridges_create_with_id_parse_body(
|
uniqueid: channel linkedid, ami, ari object creation with id's
Much needed was a way to assign id to objects on creation, and
much change was necessary to accomplish it. Channel uniqueids
and linkedids are split into separate string and creation time
components without breaking linkedid propgation. This allowed
the uniqueid to be specified by the user interface - and those
values are now carried through to channel creation, adding the
assignedids value to every function in the chain including the
channel drivers. For local channels, the second channel can be
specified or left to default to a ;2 suffix of first. In ARI,
bridge, playback, and snoop objects can also be created with a
specified uniqueid.
Along the way, the args order to allocating channels was fixed
in chan_mgcp and chan_gtalk, and linkedid is no longer lost as
masquerade occurs.
(closes issue ASTERISK-23120)
Review: https://reviewboard.asterisk.org/r/3191/
........
Merged revisions 410157 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 15:47:55 +00:00
|
|
|
struct ast_json *body,
|
2015-01-27 17:21:03 +00:00
|
|
|
struct ast_ari_bridges_create_with_id_args *args);
|
uniqueid: channel linkedid, ami, ari object creation with id's
Much needed was a way to assign id to objects on creation, and
much change was necessary to accomplish it. Channel uniqueids
and linkedids are split into separate string and creation time
components without breaking linkedid propgation. This allowed
the uniqueid to be specified by the user interface - and those
values are now carried through to channel creation, adding the
assignedids value to every function in the chain including the
channel drivers. For local channels, the second channel can be
specified or left to default to a ;2 suffix of first. In ARI,
bridge, playback, and snoop objects can also be created with a
specified uniqueid.
Along the way, the args order to allocating channels was fixed
in chan_mgcp and chan_gtalk, and linkedid is no longer lost as
masquerade occurs.
(closes issue ASTERISK-23120)
Review: https://reviewboard.asterisk.org/r/3191/
........
Merged revisions 410157 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 15:47:55 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Create a new bridge or updates an existing one.
|
|
|
|
*
|
|
|
|
* This bridge persists until it has been shut down, or Asterisk has been shut down.
|
|
|
|
*
|
|
|
|
* \param headers HTTP headers
|
|
|
|
* \param args Swagger parameters
|
|
|
|
* \param[out] response HTTP response
|
|
|
|
*/
|
2015-01-27 17:21:03 +00:00
|
|
|
void ast_ari_bridges_create_with_id(struct ast_variable *headers, struct ast_ari_bridges_create_with_id_args *args, struct ast_ari_response *response);
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Argument struct for ast_ari_bridges_get() */
|
2013-11-07 21:10:31 +00:00
|
|
|
struct ast_ari_bridges_get_args {
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Bridge's id */
|
2013-04-22 14:58:53 +00:00
|
|
|
const char *bridge_id;
|
|
|
|
};
|
|
|
|
/*!
|
|
|
|
* \brief Get bridge details.
|
|
|
|
*
|
|
|
|
* \param headers HTTP headers
|
|
|
|
* \param args Swagger parameters
|
|
|
|
* \param[out] response HTTP response
|
|
|
|
*/
|
2013-11-07 21:10:31 +00:00
|
|
|
void ast_ari_bridges_get(struct ast_variable *headers, struct ast_ari_bridges_get_args *args, struct ast_ari_response *response);
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Argument struct for ast_ari_bridges_destroy() */
|
2013-11-07 21:10:31 +00:00
|
|
|
struct ast_ari_bridges_destroy_args {
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Bridge's id */
|
2013-04-22 14:58:53 +00:00
|
|
|
const char *bridge_id;
|
|
|
|
};
|
|
|
|
/*!
|
2013-06-10 13:07:11 +00:00
|
|
|
* \brief Shut down a bridge.
|
2013-04-22 14:58:53 +00:00
|
|
|
*
|
|
|
|
* If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.
|
|
|
|
*
|
|
|
|
* \param headers HTTP headers
|
|
|
|
* \param args Swagger parameters
|
|
|
|
* \param[out] response HTTP response
|
|
|
|
*/
|
2013-11-07 21:10:31 +00:00
|
|
|
void ast_ari_bridges_destroy(struct ast_variable *headers, struct ast_ari_bridges_destroy_args *args, struct ast_ari_response *response);
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Argument struct for ast_ari_bridges_add_channel() */
|
2013-11-07 21:10:31 +00:00
|
|
|
struct ast_ari_bridges_add_channel_args {
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Bridge's id */
|
2013-04-22 14:58:53 +00:00
|
|
|
const char *bridge_id;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Array of Ids of channels to add to bridge */
|
2013-08-02 14:36:32 +00:00
|
|
|
const char **channel;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Length of channel array. */
|
2013-08-02 14:36:32 +00:00
|
|
|
size_t channel_count;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Parsing context for channel. */
|
2013-08-02 14:36:32 +00:00
|
|
|
char *channel_parse;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Channel's role in the bridge */
|
2013-08-05 16:59:13 +00:00
|
|
|
const char *role;
|
2017-10-07 01:48:48 +00:00
|
|
|
/*! Absorb DTMF coming from this channel, preventing it to pass through to the bridge */
|
|
|
|
int absorb_dtmf;
|
|
|
|
/*! Mute audio from this channel, preventing it to pass through to the bridge */
|
|
|
|
int mute;
|
2019-11-22 14:32:42 +00:00
|
|
|
/*! Do not present the identity of the newly connected channel to other bridge members */
|
|
|
|
int inhibit_connected_line_updates;
|
2013-04-22 14:58:53 +00:00
|
|
|
};
|
2014-01-21 14:27:21 +00:00
|
|
|
/*!
|
|
|
|
* \brief Body parsing function for /bridges/{bridgeId}/addChannel.
|
|
|
|
* \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_bridges_add_channel_parse_body(
|
|
|
|
struct ast_json *body,
|
|
|
|
struct ast_ari_bridges_add_channel_args *args);
|
|
|
|
|
2013-04-22 14:58:53 +00:00
|
|
|
/*!
|
|
|
|
* \brief Add a channel to a bridge.
|
|
|
|
*
|
|
|
|
* \param headers HTTP headers
|
|
|
|
* \param args Swagger parameters
|
|
|
|
* \param[out] response HTTP response
|
|
|
|
*/
|
2013-11-07 21:10:31 +00:00
|
|
|
void ast_ari_bridges_add_channel(struct ast_variable *headers, struct ast_ari_bridges_add_channel_args *args, struct ast_ari_response *response);
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Argument struct for ast_ari_bridges_remove_channel() */
|
2013-11-07 21:10:31 +00:00
|
|
|
struct ast_ari_bridges_remove_channel_args {
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Bridge's id */
|
2013-04-22 14:58:53 +00:00
|
|
|
const char *bridge_id;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Array of Ids of channels to remove from bridge */
|
2013-08-02 14:36:32 +00:00
|
|
|
const char **channel;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Length of channel array. */
|
2013-08-02 14:36:32 +00:00
|
|
|
size_t channel_count;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Parsing context for channel. */
|
2013-08-02 14:36:32 +00:00
|
|
|
char *channel_parse;
|
2013-04-22 14:58:53 +00:00
|
|
|
};
|
2014-01-21 14:27:21 +00:00
|
|
|
/*!
|
|
|
|
* \brief Body parsing function for /bridges/{bridgeId}/removeChannel.
|
|
|
|
* \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_bridges_remove_channel_parse_body(
|
|
|
|
struct ast_json *body,
|
|
|
|
struct ast_ari_bridges_remove_channel_args *args);
|
|
|
|
|
2013-04-22 14:58:53 +00:00
|
|
|
/*!
|
|
|
|
* \brief Remove a channel from a bridge.
|
|
|
|
*
|
|
|
|
* \param headers HTTP headers
|
|
|
|
* \param args Swagger parameters
|
|
|
|
* \param[out] response HTTP response
|
|
|
|
*/
|
2013-11-07 21:10:31 +00:00
|
|
|
void ast_ari_bridges_remove_channel(struct ast_variable *headers, struct ast_ari_bridges_remove_channel_args *args, struct ast_ari_response *response);
|
2016-11-08 16:11:41 +00:00
|
|
|
/*! Argument struct for ast_ari_bridges_set_video_source() */
|
|
|
|
struct ast_ari_bridges_set_video_source_args {
|
|
|
|
/*! Bridge's id */
|
|
|
|
const char *bridge_id;
|
|
|
|
/*! Channel's id */
|
|
|
|
const char *channel_id;
|
|
|
|
};
|
|
|
|
/*!
|
|
|
|
* \brief Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.
|
|
|
|
*
|
|
|
|
* \param headers HTTP headers
|
|
|
|
* \param args Swagger parameters
|
|
|
|
* \param[out] response HTTP response
|
|
|
|
*/
|
|
|
|
void ast_ari_bridges_set_video_source(struct ast_variable *headers, struct ast_ari_bridges_set_video_source_args *args, struct ast_ari_response *response);
|
|
|
|
/*! Argument struct for ast_ari_bridges_clear_video_source() */
|
|
|
|
struct ast_ari_bridges_clear_video_source_args {
|
|
|
|
/*! Bridge's id */
|
|
|
|
const char *bridge_id;
|
|
|
|
};
|
|
|
|
/*!
|
|
|
|
* \brief Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.
|
|
|
|
*
|
|
|
|
* \param headers HTTP headers
|
|
|
|
* \param args Swagger parameters
|
|
|
|
* \param[out] response HTTP response
|
|
|
|
*/
|
|
|
|
void ast_ari_bridges_clear_video_source(struct ast_variable *headers, struct ast_ari_bridges_clear_video_source_args *args, struct ast_ari_response *response);
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Argument struct for ast_ari_bridges_start_moh() */
|
2013-11-07 21:10:31 +00:00
|
|
|
struct ast_ari_bridges_start_moh_args {
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Bridge's id */
|
2013-08-23 00:26:19 +00:00
|
|
|
const char *bridge_id;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Channel's id */
|
2013-08-23 00:26:19 +00:00
|
|
|
const char *moh_class;
|
|
|
|
};
|
2014-01-21 14:27:21 +00:00
|
|
|
/*!
|
|
|
|
* \brief Body parsing function for /bridges/{bridgeId}/moh.
|
|
|
|
* \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_bridges_start_moh_parse_body(
|
|
|
|
struct ast_json *body,
|
|
|
|
struct ast_ari_bridges_start_moh_args *args);
|
|
|
|
|
2013-08-23 00:26:19 +00:00
|
|
|
/*!
|
|
|
|
* \brief Play music on hold to a bridge or change the MOH class that is playing.
|
|
|
|
*
|
|
|
|
* \param headers HTTP headers
|
|
|
|
* \param args Swagger parameters
|
|
|
|
* \param[out] response HTTP response
|
|
|
|
*/
|
2013-11-07 21:10:31 +00:00
|
|
|
void ast_ari_bridges_start_moh(struct ast_variable *headers, struct ast_ari_bridges_start_moh_args *args, struct ast_ari_response *response);
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Argument struct for ast_ari_bridges_stop_moh() */
|
2013-11-07 21:10:31 +00:00
|
|
|
struct ast_ari_bridges_stop_moh_args {
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Bridge's id */
|
2013-08-23 00:26:19 +00:00
|
|
|
const char *bridge_id;
|
|
|
|
};
|
|
|
|
/*!
|
|
|
|
* \brief Stop playing music on hold to a bridge.
|
|
|
|
*
|
2013-11-07 21:10:31 +00:00
|
|
|
* This will only stop music on hold being played via POST bridges/{bridgeId}/moh.
|
2013-08-23 00:26:19 +00:00
|
|
|
*
|
|
|
|
* \param headers HTTP headers
|
|
|
|
* \param args Swagger parameters
|
|
|
|
* \param[out] response HTTP response
|
|
|
|
*/
|
2013-11-07 21:10:31 +00:00
|
|
|
void ast_ari_bridges_stop_moh(struct ast_variable *headers, struct ast_ari_bridges_stop_moh_args *args, struct ast_ari_response *response);
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Argument struct for ast_ari_bridges_play() */
|
2013-11-07 21:10:31 +00:00
|
|
|
struct ast_ari_bridges_play_args {
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Bridge's id */
|
2013-07-19 19:35:21 +00:00
|
|
|
const char *bridge_id;
|
ARI: Add the ability to play multiple media URIs in a single operation
Many ARI applications will want to play multiple media files in a row to
a resource. The most common use case is when building long-ish IVR prompts
made up of multiple, smaller sound files. Today, that requires building a
small state machine, listening for each PlaybackFinished event, and triggering
the next sound file to play. While not especially challenging, it is tedious
work. Since requiring developers to write tedious code to do normal activities
stinks, this patch adds the ability to play back a list of media files to a
resource.
Each of the 'play' operations on supported resources (channels and bridges)
now accepts a comma delineated list of media URIs to play. A single Playback
resource is created as a handle to the entire list. The operation of playing
a list is identical to playing a single media URI, save that a new event,
PlaybackContinuing, is raised instead of a PlaybackFinished for each non-final
media URI. When the entire list is finished being played, a PlaybackFinished
event is raised.
In order to help inform applications where they are in the list playback, the
Playback resource now includes a new, optional attribute, 'next_media_uri',
that contains the next URI in the list to be played.
It's important to note the following:
- If an offset is provided to the 'play' operations, it only applies to the
first media URI, as it would be weird to skip n seconds forward in every
media resource.
- Operations that control the position of the media only affect the current
media being played. For example, once a media resource in the list
completes, a 'reverse' operation on a subsequent media resource will not
start a previously completed media resource at the appropiate offset.
- This patch does not add any new operations to control the list. Hopefully,
user feedback and/or future patches would add that if people want it.
ASTERISK-26022 #close
Change-Id: Ie1ea5356573447b8f51f2e7964915ea01792f16f
2016-04-18 23:17:08 +00:00
|
|
|
/*! Array of Media URIs to play. */
|
|
|
|
const char **media;
|
|
|
|
/*! Length of media array. */
|
|
|
|
size_t media_count;
|
|
|
|
/*! Parsing context for media. */
|
|
|
|
char *media_parse;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! For sounds, selects language for sound. */
|
2013-07-19 19:35:21 +00:00
|
|
|
const char *lang;
|
ARI: Add the ability to play multiple media URIs in a single operation
Many ARI applications will want to play multiple media files in a row to
a resource. The most common use case is when building long-ish IVR prompts
made up of multiple, smaller sound files. Today, that requires building a
small state machine, listening for each PlaybackFinished event, and triggering
the next sound file to play. While not especially challenging, it is tedious
work. Since requiring developers to write tedious code to do normal activities
stinks, this patch adds the ability to play back a list of media files to a
resource.
Each of the 'play' operations on supported resources (channels and bridges)
now accepts a comma delineated list of media URIs to play. A single Playback
resource is created as a handle to the entire list. The operation of playing
a list is identical to playing a single media URI, save that a new event,
PlaybackContinuing, is raised instead of a PlaybackFinished for each non-final
media URI. When the entire list is finished being played, a PlaybackFinished
event is raised.
In order to help inform applications where they are in the list playback, the
Playback resource now includes a new, optional attribute, 'next_media_uri',
that contains the next URI in the list to be played.
It's important to note the following:
- If an offset is provided to the 'play' operations, it only applies to the
first media URI, as it would be weird to skip n seconds forward in every
media resource.
- Operations that control the position of the media only affect the current
media being played. For example, once a media resource in the list
completes, a 'reverse' operation on a subsequent media resource will not
start a previously completed media resource at the appropiate offset.
- This patch does not add any new operations to control the list. Hopefully,
user feedback and/or future patches would add that if people want it.
ASTERISK-26022 #close
Change-Id: Ie1ea5356573447b8f51f2e7964915ea01792f16f
2016-04-18 23:17:08 +00:00
|
|
|
/*! Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified. */
|
2013-07-19 19:35:21 +00:00
|
|
|
int offsetms;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Number of milliseconds to skip for forward/reverse operations. */
|
2013-07-19 19:35:21 +00:00
|
|
|
int skipms;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Playback Id. */
|
2014-04-18 20:09:24 +00:00
|
|
|
const char *playback_id;
|
2013-07-19 19:35:21 +00:00
|
|
|
};
|
2014-01-21 14:27:21 +00:00
|
|
|
/*!
|
|
|
|
* \brief Body parsing function for /bridges/{bridgeId}/play.
|
|
|
|
* \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_bridges_play_parse_body(
|
|
|
|
struct ast_json *body,
|
|
|
|
struct ast_ari_bridges_play_args *args);
|
|
|
|
|
2013-07-19 19:35:21 +00:00
|
|
|
/*!
|
|
|
|
* \brief Start playback of media on a bridge.
|
|
|
|
*
|
2014-04-17 21:57:36 +00:00
|
|
|
* The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)
|
2013-07-19 19:35:21 +00:00
|
|
|
*
|
|
|
|
* \param headers HTTP headers
|
|
|
|
* \param args Swagger parameters
|
|
|
|
* \param[out] response HTTP response
|
|
|
|
*/
|
2013-11-07 21:10:31 +00:00
|
|
|
void ast_ari_bridges_play(struct ast_variable *headers, struct ast_ari_bridges_play_args *args, struct ast_ari_response *response);
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Argument struct for ast_ari_bridges_play_with_id() */
|
2014-04-18 20:09:24 +00:00
|
|
|
struct ast_ari_bridges_play_with_id_args {
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Bridge's id */
|
2014-04-18 20:09:24 +00:00
|
|
|
const char *bridge_id;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Playback ID. */
|
2014-04-18 20:09:24 +00:00
|
|
|
const char *playback_id;
|
ARI: Add the ability to play multiple media URIs in a single operation
Many ARI applications will want to play multiple media files in a row to
a resource. The most common use case is when building long-ish IVR prompts
made up of multiple, smaller sound files. Today, that requires building a
small state machine, listening for each PlaybackFinished event, and triggering
the next sound file to play. While not especially challenging, it is tedious
work. Since requiring developers to write tedious code to do normal activities
stinks, this patch adds the ability to play back a list of media files to a
resource.
Each of the 'play' operations on supported resources (channels and bridges)
now accepts a comma delineated list of media URIs to play. A single Playback
resource is created as a handle to the entire list. The operation of playing
a list is identical to playing a single media URI, save that a new event,
PlaybackContinuing, is raised instead of a PlaybackFinished for each non-final
media URI. When the entire list is finished being played, a PlaybackFinished
event is raised.
In order to help inform applications where they are in the list playback, the
Playback resource now includes a new, optional attribute, 'next_media_uri',
that contains the next URI in the list to be played.
It's important to note the following:
- If an offset is provided to the 'play' operations, it only applies to the
first media URI, as it would be weird to skip n seconds forward in every
media resource.
- Operations that control the position of the media only affect the current
media being played. For example, once a media resource in the list
completes, a 'reverse' operation on a subsequent media resource will not
start a previously completed media resource at the appropiate offset.
- This patch does not add any new operations to control the list. Hopefully,
user feedback and/or future patches would add that if people want it.
ASTERISK-26022 #close
Change-Id: Ie1ea5356573447b8f51f2e7964915ea01792f16f
2016-04-18 23:17:08 +00:00
|
|
|
/*! Array of Media URIs to play. */
|
|
|
|
const char **media;
|
|
|
|
/*! Length of media array. */
|
|
|
|
size_t media_count;
|
|
|
|
/*! Parsing context for media. */
|
|
|
|
char *media_parse;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! For sounds, selects language for sound. */
|
2014-04-18 20:09:24 +00:00
|
|
|
const char *lang;
|
ARI: Add the ability to play multiple media URIs in a single operation
Many ARI applications will want to play multiple media files in a row to
a resource. The most common use case is when building long-ish IVR prompts
made up of multiple, smaller sound files. Today, that requires building a
small state machine, listening for each PlaybackFinished event, and triggering
the next sound file to play. While not especially challenging, it is tedious
work. Since requiring developers to write tedious code to do normal activities
stinks, this patch adds the ability to play back a list of media files to a
resource.
Each of the 'play' operations on supported resources (channels and bridges)
now accepts a comma delineated list of media URIs to play. A single Playback
resource is created as a handle to the entire list. The operation of playing
a list is identical to playing a single media URI, save that a new event,
PlaybackContinuing, is raised instead of a PlaybackFinished for each non-final
media URI. When the entire list is finished being played, a PlaybackFinished
event is raised.
In order to help inform applications where they are in the list playback, the
Playback resource now includes a new, optional attribute, 'next_media_uri',
that contains the next URI in the list to be played.
It's important to note the following:
- If an offset is provided to the 'play' operations, it only applies to the
first media URI, as it would be weird to skip n seconds forward in every
media resource.
- Operations that control the position of the media only affect the current
media being played. For example, once a media resource in the list
completes, a 'reverse' operation on a subsequent media resource will not
start a previously completed media resource at the appropiate offset.
- This patch does not add any new operations to control the list. Hopefully,
user feedback and/or future patches would add that if people want it.
ASTERISK-26022 #close
Change-Id: Ie1ea5356573447b8f51f2e7964915ea01792f16f
2016-04-18 23:17:08 +00:00
|
|
|
/*! Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified. */
|
2014-04-18 20:09:24 +00:00
|
|
|
int offsetms;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Number of milliseconds to skip for forward/reverse operations. */
|
2014-04-18 20:09:24 +00:00
|
|
|
int skipms;
|
|
|
|
};
|
|
|
|
/*!
|
|
|
|
* \brief Body parsing function for /bridges/{bridgeId}/play/{playbackId}.
|
|
|
|
* \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_bridges_play_with_id_parse_body(
|
|
|
|
struct ast_json *body,
|
|
|
|
struct ast_ari_bridges_play_with_id_args *args);
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Start playback of media on a bridge.
|
|
|
|
*
|
2015-01-27 17:21:03 +00:00
|
|
|
* The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)
|
2014-04-18 20:09:24 +00:00
|
|
|
*
|
|
|
|
* \param headers HTTP headers
|
|
|
|
* \param args Swagger parameters
|
|
|
|
* \param[out] response HTTP response
|
|
|
|
*/
|
|
|
|
void ast_ari_bridges_play_with_id(struct ast_variable *headers, struct ast_ari_bridges_play_with_id_args *args, struct ast_ari_response *response);
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Argument struct for ast_ari_bridges_record() */
|
2013-11-07 21:10:31 +00:00
|
|
|
struct ast_ari_bridges_record_args {
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Bridge's id */
|
2013-04-22 14:58:53 +00:00
|
|
|
const char *bridge_id;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Recording's filename */
|
2013-04-22 14:58:53 +00:00
|
|
|
const char *name;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Format to encode audio in */
|
2013-07-19 19:35:21 +00:00
|
|
|
const char *format;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Maximum duration of the recording, in seconds. 0 for no limit. */
|
2013-04-22 14:58:53 +00:00
|
|
|
int max_duration_seconds;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Maximum duration of silence, in seconds. 0 for no limit. */
|
2013-04-22 14:58:53 +00:00
|
|
|
int max_silence_seconds;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Action to take if a recording with the same name already exists. */
|
2013-07-19 19:35:21 +00:00
|
|
|
const char *if_exists;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! Play beep when recording begins */
|
2013-04-22 14:58:53 +00:00
|
|
|
int beep;
|
2014-07-02 21:13:46 +00:00
|
|
|
/*! DTMF input to terminate recording. */
|
2013-04-22 14:58:53 +00:00
|
|
|
const char *terminate_on;
|
|
|
|
};
|
2014-01-21 14:27:21 +00:00
|
|
|
/*!
|
|
|
|
* \brief Body parsing function for /bridges/{bridgeId}/record.
|
|
|
|
* \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_bridges_record_parse_body(
|
|
|
|
struct ast_json *body,
|
|
|
|
struct ast_ari_bridges_record_args *args);
|
|
|
|
|
2013-04-22 14:58:53 +00:00
|
|
|
/*!
|
|
|
|
* \brief Start a recording.
|
|
|
|
*
|
|
|
|
* This records the mixed audio from all channels participating in this bridge.
|
|
|
|
*
|
|
|
|
* \param headers HTTP headers
|
|
|
|
* \param args Swagger parameters
|
|
|
|
* \param[out] response HTTP response
|
|
|
|
*/
|
2013-11-07 21:10:31 +00:00
|
|
|
void ast_ari_bridges_record(struct ast_variable *headers, struct ast_ari_bridges_record_args *args, struct ast_ari_response *response);
|
2013-04-22 14:58:53 +00:00
|
|
|
|
|
|
|
#endif /* _ASTERISK_RESOURCE_BRIDGES_H */
|