2 * Asterisk -- An open source telephony toolkit.
4 * Copyright (C) 2012 - 2013, Digium, Inc.
6 * David M. Lee, II <dlee@digium.com>
8 * See http://www.asterisk.org for more information about
9 * the Asterisk project. Please do not directly contact
10 * any of the maintainers of this project for assistance;
11 * the project provides a web site, mailing lists and IRC
12 * channels for your use.
14 * This program is free software, distributed under the terms of
15 * the GNU General Public License Version 2. See the LICENSE file
16 * at the top of the source tree.
21 * \brief Generated file - declares stubs to be implemented in
22 * res/ari/resource_bridges.c
26 * \author David M. Lee, II <dlee@digium.com>
30 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
31 * !!!!! DO NOT EDIT !!!!!
32 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
33 * This file is generated by a mustache template. Please see the original
34 * template in rest-api-templates/ari_resource.h.mustache
37 #ifndef _ASTERISK_RESOURCE_BRIDGES_H
38 #define _ASTERISK_RESOURCE_BRIDGES_H
40 #include "asterisk/ari.h"
42 /*! \brief Argument struct for ast_ari_bridges_list() */
43 struct ast_ari_bridges_list_args {
46 * \brief List all active bridges in Asterisk.
48 * \param headers HTTP headers
49 * \param args Swagger parameters
50 * \param[out] response HTTP response
52 void ast_ari_bridges_list(struct ast_variable *headers, struct ast_ari_bridges_list_args *args, struct ast_ari_response *response);
53 /*! \brief Argument struct for ast_ari_bridges_create() */
54 struct ast_ari_bridges_create_args {
55 /*! \brief Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media). */
57 /*! \brief Unique ID to give to the bridge being created. */
58 const char *bridge_id;
59 /*! \brief Name to give to the bridge being created. */
63 * \brief Body parsing function for /bridges.
64 * \param body The JSON body from which to parse parameters.
65 * \param[out] args The args structure to parse into.
66 * \retval zero on success
67 * \retval non-zero on failure
69 int ast_ari_bridges_create_parse_body(
70 struct ast_json *body,
71 struct ast_ari_bridges_create_args *args);
74 * \brief Create a new bridge.
76 * This bridge persists until it has been shut down, or Asterisk has been shut down.
78 * \param headers HTTP headers
79 * \param args Swagger parameters
80 * \param[out] response HTTP response
82 void ast_ari_bridges_create(struct ast_variable *headers, struct ast_ari_bridges_create_args *args, struct ast_ari_response *response);
83 /*! \brief Argument struct for ast_ari_bridges_create_or_update_with_id() */
84 struct ast_ari_bridges_create_or_update_with_id_args {
85 /*! \brief Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media) to set. */
87 /*! \brief Unique ID to give to the bridge being created. */
88 const char *bridge_id;
89 /*! \brief Set the name of the bridge. */
93 * \brief Body parsing function for /bridges/{bridgeId}.
94 * \param body The JSON body from which to parse parameters.
95 * \param[out] args The args structure to parse into.
96 * \retval zero on success
97 * \retval non-zero on failure
99 int ast_ari_bridges_create_or_update_with_id_parse_body(
100 struct ast_json *body,
101 struct ast_ari_bridges_create_or_update_with_id_args *args);
104 * \brief Create a new bridge or updates an existing one.
106 * This bridge persists until it has been shut down, or Asterisk has been shut down.
108 * \param headers HTTP headers
109 * \param args Swagger parameters
110 * \param[out] response HTTP response
112 void ast_ari_bridges_create_or_update_with_id(struct ast_variable *headers, struct ast_ari_bridges_create_or_update_with_id_args *args, struct ast_ari_response *response);
113 /*! \brief Argument struct for ast_ari_bridges_get() */
114 struct ast_ari_bridges_get_args {
115 /*! \brief Bridge's id */
116 const char *bridge_id;
119 * \brief Get bridge details.
121 * \param headers HTTP headers
122 * \param args Swagger parameters
123 * \param[out] response HTTP response
125 void ast_ari_bridges_get(struct ast_variable *headers, struct ast_ari_bridges_get_args *args, struct ast_ari_response *response);
126 /*! \brief Argument struct for ast_ari_bridges_destroy() */
127 struct ast_ari_bridges_destroy_args {
128 /*! \brief Bridge's id */
129 const char *bridge_id;
132 * \brief Shut down a bridge.
134 * If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.
136 * \param headers HTTP headers
137 * \param args Swagger parameters
138 * \param[out] response HTTP response
140 void ast_ari_bridges_destroy(struct ast_variable *headers, struct ast_ari_bridges_destroy_args *args, struct ast_ari_response *response);
141 /*! \brief Argument struct for ast_ari_bridges_add_channel() */
142 struct ast_ari_bridges_add_channel_args {
143 /*! \brief Bridge's id */
144 const char *bridge_id;
145 /*! \brief Array of Ids of channels to add to bridge */
146 const char **channel;
147 /*! \brief Length of channel array. */
148 size_t channel_count;
149 /*! \brief Parsing context for channel. */
151 /*! \brief Channel's role in the bridge */
155 * \brief Body parsing function for /bridges/{bridgeId}/addChannel.
156 * \param body The JSON body from which to parse parameters.
157 * \param[out] args The args structure to parse into.
158 * \retval zero on success
159 * \retval non-zero on failure
161 int ast_ari_bridges_add_channel_parse_body(
162 struct ast_json *body,
163 struct ast_ari_bridges_add_channel_args *args);
166 * \brief Add a channel to a bridge.
168 * \param headers HTTP headers
169 * \param args Swagger parameters
170 * \param[out] response HTTP response
172 void ast_ari_bridges_add_channel(struct ast_variable *headers, struct ast_ari_bridges_add_channel_args *args, struct ast_ari_response *response);
173 /*! \brief Argument struct for ast_ari_bridges_remove_channel() */
174 struct ast_ari_bridges_remove_channel_args {
175 /*! \brief Bridge's id */
176 const char *bridge_id;
177 /*! \brief Array of Ids of channels to remove from bridge */
178 const char **channel;
179 /*! \brief Length of channel array. */
180 size_t channel_count;
181 /*! \brief Parsing context for channel. */
185 * \brief Body parsing function for /bridges/{bridgeId}/removeChannel.
186 * \param body The JSON body from which to parse parameters.
187 * \param[out] args The args structure to parse into.
188 * \retval zero on success
189 * \retval non-zero on failure
191 int ast_ari_bridges_remove_channel_parse_body(
192 struct ast_json *body,
193 struct ast_ari_bridges_remove_channel_args *args);
196 * \brief Remove a channel from a bridge.
198 * \param headers HTTP headers
199 * \param args Swagger parameters
200 * \param[out] response HTTP response
202 void ast_ari_bridges_remove_channel(struct ast_variable *headers, struct ast_ari_bridges_remove_channel_args *args, struct ast_ari_response *response);
203 /*! \brief Argument struct for ast_ari_bridges_start_moh() */
204 struct ast_ari_bridges_start_moh_args {
205 /*! \brief Bridge's id */
206 const char *bridge_id;
207 /*! \brief Channel's id */
208 const char *moh_class;
211 * \brief Body parsing function for /bridges/{bridgeId}/moh.
212 * \param body The JSON body from which to parse parameters.
213 * \param[out] args The args structure to parse into.
214 * \retval zero on success
215 * \retval non-zero on failure
217 int ast_ari_bridges_start_moh_parse_body(
218 struct ast_json *body,
219 struct ast_ari_bridges_start_moh_args *args);
222 * \brief Play music on hold to a bridge or change the MOH class that is playing.
224 * \param headers HTTP headers
225 * \param args Swagger parameters
226 * \param[out] response HTTP response
228 void ast_ari_bridges_start_moh(struct ast_variable *headers, struct ast_ari_bridges_start_moh_args *args, struct ast_ari_response *response);
229 /*! \brief Argument struct for ast_ari_bridges_stop_moh() */
230 struct ast_ari_bridges_stop_moh_args {
231 /*! \brief Bridge's id */
232 const char *bridge_id;
235 * \brief Stop playing music on hold to a bridge.
237 * This will only stop music on hold being played via POST bridges/{bridgeId}/moh.
239 * \param headers HTTP headers
240 * \param args Swagger parameters
241 * \param[out] response HTTP response
243 void ast_ari_bridges_stop_moh(struct ast_variable *headers, struct ast_ari_bridges_stop_moh_args *args, struct ast_ari_response *response);
244 /*! \brief Argument struct for ast_ari_bridges_play() */
245 struct ast_ari_bridges_play_args {
246 /*! \brief Bridge's id */
247 const char *bridge_id;
248 /*! \brief Media's URI to play. */
250 /*! \brief For sounds, selects language for sound. */
252 /*! \brief Number of media to skip before playing. */
254 /*! \brief Number of milliseconds to skip for forward/reverse operations. */
258 * \brief Body parsing function for /bridges/{bridgeId}/play.
259 * \param body The JSON body from which to parse parameters.
260 * \param[out] args The args structure to parse into.
261 * \retval zero on success
262 * \retval non-zero on failure
264 int ast_ari_bridges_play_parse_body(
265 struct ast_json *body,
266 struct ast_ari_bridges_play_args *args);
269 * \brief Start playback of media on a bridge.
271 * 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.)
273 * \param headers HTTP headers
274 * \param args Swagger parameters
275 * \param[out] response HTTP response
277 void ast_ari_bridges_play(struct ast_variable *headers, struct ast_ari_bridges_play_args *args, struct ast_ari_response *response);
278 /*! \brief Argument struct for ast_ari_bridges_record() */
279 struct ast_ari_bridges_record_args {
280 /*! \brief Bridge's id */
281 const char *bridge_id;
282 /*! \brief Recording's filename */
284 /*! \brief Format to encode audio in */
286 /*! \brief Maximum duration of the recording, in seconds. 0 for no limit. */
287 int max_duration_seconds;
288 /*! \brief Maximum duration of silence, in seconds. 0 for no limit. */
289 int max_silence_seconds;
290 /*! \brief Action to take if a recording with the same name already exists. */
291 const char *if_exists;
292 /*! \brief Play beep when recording begins */
294 /*! \brief DTMF input to terminate recording. */
295 const char *terminate_on;
298 * \brief Body parsing function for /bridges/{bridgeId}/record.
299 * \param body The JSON body from which to parse parameters.
300 * \param[out] args The args structure to parse into.
301 * \retval zero on success
302 * \retval non-zero on failure
304 int ast_ari_bridges_record_parse_body(
305 struct ast_json *body,
306 struct ast_ari_bridges_record_args *args);
309 * \brief Start a recording.
311 * This records the mixed audio from all channels participating in this bridge.
313 * \param headers HTTP headers
314 * \param args Swagger parameters
315 * \param[out] response HTTP response
317 void ast_ari_bridges_record(struct ast_variable *headers, struct ast_ari_bridges_record_args *args, struct ast_ari_response *response);
319 #endif /* _ASTERISK_RESOURCE_BRIDGES_H */