Asterisk - The Open Source Telephony Project GIT-master-b023714
Loading...
Searching...
No Matches
resource_bridges.h
Go to the documentation of this file.
1/*
2 * Asterisk -- An open source telephony toolkit.
3 *
4 * Copyright (C) 2012 - 2013, Digium, Inc.
5 *
6 * David M. Lee, II <dlee@digium.com>
7 *
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.
13 *
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.
17 */
18
19/*! \file
20 *
21 * \brief Generated file - declares stubs to be implemented in
22 * res/ari/resource_bridges.c
23 *
24 * Bridge resources
25 *
26 * \author David M. Lee, II <dlee@digium.com>
27 */
28
29/*
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
35 */
36
37#ifndef _ASTERISK_RESOURCE_BRIDGES_H
38#define _ASTERISK_RESOURCE_BRIDGES_H
39
40#include "asterisk/ari.h"
41
42/*! Argument struct for ast_ari_bridges_list() */
45/*!
46 * \brief List all active bridges in Asterisk.
47 *
48 * \param headers HTTP headers
49 * \param args Swagger parameters
50 * \param[out] response HTTP response
51 */
52void ast_ari_bridges_list(struct ast_variable *headers, struct ast_ari_bridges_list_args *args, struct ast_ari_response *response);
53/*! Argument struct for ast_ari_bridges_create() */
55 /*! Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single, sdp_label). */
56 const char *type;
57 /*! Unique ID to give to the bridge being created. */
58 const char *bridge_id;
59 /*! Name to give to the bridge being created. */
60 const char *name;
61};
62/*!
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
68 */
70 struct ast_json *body,
72
73/*!
74 * \brief Create a new bridge.
75 *
76 * This bridge persists until it has been shut down, or Asterisk has been shut down.
77 *
78 * \param headers HTTP headers
79 * \param args Swagger parameters
80 * \param[out] response HTTP response
81 */
82void ast_ari_bridges_create(struct ast_variable *headers, struct ast_ari_bridges_create_args *args, struct ast_ari_response *response);
83/*! Argument struct for ast_ari_bridges_create_with_id() */
85 /*! Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single, sdp_label) to set. */
86 const char *type;
87 /*! Unique ID to give to the bridge being created. */
88 const char *bridge_id;
89 /*! Set the name of the bridge. */
90 const char *name;
91};
92/*!
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
98 */
100 struct ast_json *body,
102
103/*!
104 * \brief Create a new bridge.
105 *
106 * This bridge persists until it has been shut down, or Asterisk has been shut down.
107 *
108 * \param headers HTTP headers
109 * \param args Swagger parameters
110 * \param[out] response HTTP response
111 */
113/*! Argument struct for ast_ari_bridges_get() */
115 /*! Bridge's id */
116 const char *bridge_id;
117};
118/*!
119 * \brief Get bridge details.
120 *
121 * \param headers HTTP headers
122 * \param args Swagger parameters
123 * \param[out] response HTTP response
124 */
125void ast_ari_bridges_get(struct ast_variable *headers, struct ast_ari_bridges_get_args *args, struct ast_ari_response *response);
126/*! Argument struct for ast_ari_bridges_destroy() */
128 /*! Bridge's id */
129 const char *bridge_id;
130};
131/*!
132 * \brief Shut down a bridge.
133 *
134 * If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.
135 *
136 * \param headers HTTP headers
137 * \param args Swagger parameters
138 * \param[out] response HTTP response
139 */
140void ast_ari_bridges_destroy(struct ast_variable *headers, struct ast_ari_bridges_destroy_args *args, struct ast_ari_response *response);
141/*! Argument struct for ast_ari_bridges_add_channel() */
143 /*! Bridge's id */
144 const char *bridge_id;
145 /*! Array of Ids of channels to add to bridge */
146 const char **channel;
147 /*! Length of channel array. */
149 /*! Parsing context for channel. */
151 /*! Channel's role in the bridge */
152 const char *role;
153 /*! Absorb DTMF coming from this channel, preventing it to pass through to the bridge */
155 /*! Mute audio from this channel, preventing it to pass through to the bridge */
156 int mute;
157 /*! Do not present the identity of the newly connected channel to other bridge members */
159};
160/*!
161 * \brief Body parsing function for /bridges/{bridgeId}/addChannel.
162 * \param body The JSON body from which to parse parameters.
163 * \param[out] args The args structure to parse into.
164 * \retval zero on success
165 * \retval non-zero on failure
166 */
168 struct ast_json *body,
170
171/*!
172 * \brief Add a channel to a bridge.
173 *
174 * \param headers HTTP headers
175 * \param args Swagger parameters
176 * \param[out] response HTTP response
177 */
179/*! Argument struct for ast_ari_bridges_remove_channel() */
181 /*! Bridge's id */
182 const char *bridge_id;
183 /*! Array of Ids of channels to remove from bridge */
184 const char **channel;
185 /*! Length of channel array. */
187 /*! Parsing context for channel. */
189};
190/*!
191 * \brief Body parsing function for /bridges/{bridgeId}/removeChannel.
192 * \param body The JSON body from which to parse parameters.
193 * \param[out] args The args structure to parse into.
194 * \retval zero on success
195 * \retval non-zero on failure
196 */
198 struct ast_json *body,
200
201/*!
202 * \brief Remove a channel from a bridge.
203 *
204 * \param headers HTTP headers
205 * \param args Swagger parameters
206 * \param[out] response HTTP response
207 */
209/*! Argument struct for ast_ari_bridges_set_video_source() */
211 /*! Bridge's id */
212 const char *bridge_id;
213 /*! Channel's id */
214 const char *channel_id;
215};
216/*!
217 * \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.
218 *
219 * \param headers HTTP headers
220 * \param args Swagger parameters
221 * \param[out] response HTTP response
222 */
224/*! Argument struct for ast_ari_bridges_clear_video_source() */
226 /*! Bridge's id */
227 const char *bridge_id;
228};
229/*!
230 * \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.
231 *
232 * \param headers HTTP headers
233 * \param args Swagger parameters
234 * \param[out] response HTTP response
235 */
237/*! Argument struct for ast_ari_bridges_start_moh() */
239 /*! Bridge's id */
240 const char *bridge_id;
241 /*! Channel's id */
242 const char *moh_class;
243};
244/*!
245 * \brief Body parsing function for /bridges/{bridgeId}/moh.
246 * \param body The JSON body from which to parse parameters.
247 * \param[out] args The args structure to parse into.
248 * \retval zero on success
249 * \retval non-zero on failure
250 */
252 struct ast_json *body,
254
255/*!
256 * \brief Play music on hold to a bridge or change the MOH class that is playing.
257 *
258 * \param headers HTTP headers
259 * \param args Swagger parameters
260 * \param[out] response HTTP response
261 */
262void ast_ari_bridges_start_moh(struct ast_variable *headers, struct ast_ari_bridges_start_moh_args *args, struct ast_ari_response *response);
263/*! Argument struct for ast_ari_bridges_stop_moh() */
265 /*! Bridge's id */
266 const char *bridge_id;
267};
268/*!
269 * \brief Stop playing music on hold to a bridge.
270 *
271 * This will only stop music on hold being played via POST bridges/{bridgeId}/moh.
272 *
273 * \param headers HTTP headers
274 * \param args Swagger parameters
275 * \param[out] response HTTP response
276 */
277void ast_ari_bridges_stop_moh(struct ast_variable *headers, struct ast_ari_bridges_stop_moh_args *args, struct ast_ari_response *response);
278/*! Argument struct for ast_ari_bridges_play() */
280 /*! Bridge's id */
281 const char *bridge_id;
282 /*! Array of Media URIs to play. */
283 const char **media;
284 /*! Length of media array. */
286 /*! Parsing context for media. */
288 /*! Format of the 'Anouncer' channel attached to the bridge. Defaults to the format of the channel in the bridge with the highest sampe rate. */
289 const char *announcer_format;
290 /*! For sounds, selects language for sound. */
291 const char *lang;
292 /*! Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified. */
294 /*! Number of milliseconds to skip for forward/reverse operations. */
296 /*! Playback Id. */
297 const char *playback_id;
298};
299/*!
300 * \brief Body parsing function for /bridges/{bridgeId}/play.
301 * \param body The JSON body from which to parse parameters.
302 * \param[out] args The args structure to parse into.
303 * \retval zero on success
304 * \retval non-zero on failure
305 */
307 struct ast_json *body,
309
310/*!
311 * \brief Start playback of media on a bridge.
312 *
313 * 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.)
314 *
315 * \param headers HTTP headers
316 * \param args Swagger parameters
317 * \param[out] response HTTP response
318 */
319void ast_ari_bridges_play(struct ast_variable *headers, struct ast_ari_bridges_play_args *args, struct ast_ari_response *response);
320/*! Argument struct for ast_ari_bridges_play_with_id() */
322 /*! Bridge's id */
323 const char *bridge_id;
324 /*! Playback ID. */
325 const char *playback_id;
326 /*! Array of Media URIs to play. */
327 const char **media;
328 /*! Length of media array. */
330 /*! Parsing context for media. */
332 /*! Format of the 'Anouncer' channel attached to the bridge. Defaults to the format of the channel in the bridge with the highest sampe rate. */
333 const char *announcer_format;
334 /*! For sounds, selects language for sound. */
335 const char *lang;
336 /*! Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified. */
338 /*! Number of milliseconds to skip for forward/reverse operations. */
340};
341/*!
342 * \brief Body parsing function for /bridges/{bridgeId}/play/{playbackId}.
343 * \param body The JSON body from which to parse parameters.
344 * \param[out] args The args structure to parse into.
345 * \retval zero on success
346 * \retval non-zero on failure
347 */
349 struct ast_json *body,
351
352/*!
353 * \brief Start playback of media on a bridge.
354 *
355 * 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.)
356 *
357 * \param headers HTTP headers
358 * \param args Swagger parameters
359 * \param[out] response HTTP response
360 */
362/*! Argument struct for ast_ari_bridges_record() */
364 /*! Bridge's id */
365 const char *bridge_id;
366 /*! Recording's filename */
367 const char *name;
368 /*! Format to encode audio in */
369 const char *format;
370 /*! Format of the 'Recorder' channel attached to the bridge. Defaults to the same format as the 'format' parameter. */
371 const char *recorder_format;
372 /*! Maximum duration of the recording, in seconds. 0 for no limit. */
374 /*! Maximum duration of silence, in seconds. 0 for no limit. */
376 /*! Action to take if a recording with the same name already exists. */
377 const char *if_exists;
378 /*! Play beep when recording begins */
379 int beep;
380 /*! DTMF input to terminate recording. */
381 const char *terminate_on;
382};
383/*!
384 * \brief Body parsing function for /bridges/{bridgeId}/record.
385 * \param body The JSON body from which to parse parameters.
386 * \param[out] args The args structure to parse into.
387 * \retval zero on success
388 * \retval non-zero on failure
389 */
391 struct ast_json *body,
393
394/*!
395 * \brief Start a recording.
396 *
397 * This records the mixed audio from all channels participating in this bridge.
398 *
399 * \param headers HTTP headers
400 * \param args Swagger parameters
401 * \param[out] response HTTP response
402 */
403void ast_ari_bridges_record(struct ast_variable *headers, struct ast_ari_bridges_record_args *args, struct ast_ari_response *response);
404
405#endif /* _ASTERISK_RESOURCE_BRIDGES_H */
Asterisk RESTful API hooks.
static struct @519 args
void ast_ari_bridges_add_channel(struct ast_variable *headers, struct ast_ari_bridges_add_channel_args *args, struct ast_ari_response *response)
Add a channel to a bridge.
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)
Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bri...
void ast_ari_bridges_get(struct ast_variable *headers, struct ast_ari_bridges_get_args *args, struct ast_ari_response *response)
Get bridge details.
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)
Start playback of media on a bridge.
int ast_ari_bridges_add_channel_parse_body(struct ast_json *body, struct ast_ari_bridges_add_channel_args *args)
Body parsing function for /bridges/{bridgeId}/addChannel.
void ast_ari_bridges_play(struct ast_variable *headers, struct ast_ari_bridges_play_args *args, struct ast_ari_response *response)
Start playback of media on a bridge.
void ast_ari_bridges_destroy(struct ast_variable *headers, struct ast_ari_bridges_destroy_args *args, struct ast_ari_response *response)
Shut down a bridge.
void ast_ari_bridges_remove_channel(struct ast_variable *headers, struct ast_ari_bridges_remove_channel_args *args, struct ast_ari_response *response)
Remove a channel from a bridge.
void ast_ari_bridges_create(struct ast_variable *headers, struct ast_ari_bridges_create_args *args, struct ast_ari_response *response)
Create a new bridge.
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)
Create a new bridge.
int ast_ari_bridges_start_moh_parse_body(struct ast_json *body, struct ast_ari_bridges_start_moh_args *args)
Body parsing function for /bridges/{bridgeId}/moh.
int ast_ari_bridges_record_parse_body(struct ast_json *body, struct ast_ari_bridges_record_args *args)
Body parsing function for /bridges/{bridgeId}/record.
int ast_ari_bridges_create_with_id_parse_body(struct ast_json *body, struct ast_ari_bridges_create_with_id_args *args)
Body parsing function for /bridges/{bridgeId}.
int ast_ari_bridges_play_parse_body(struct ast_json *body, struct ast_ari_bridges_play_args *args)
Body parsing function for /bridges/{bridgeId}/play.
int ast_ari_bridges_play_with_id_parse_body(struct ast_json *body, struct ast_ari_bridges_play_with_id_args *args)
Body parsing function for /bridges/{bridgeId}/play/{playbackId}.
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)
Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bri...
int ast_ari_bridges_create_parse_body(struct ast_json *body, struct ast_ari_bridges_create_args *args)
Body parsing function for /bridges.
void ast_ari_bridges_record(struct ast_variable *headers, struct ast_ari_bridges_record_args *args, struct ast_ari_response *response)
Start a recording.
void ast_ari_bridges_start_moh(struct ast_variable *headers, struct ast_ari_bridges_start_moh_args *args, struct ast_ari_response *response)
Play music on hold to a bridge or change the MOH class that is playing.
int ast_ari_bridges_remove_channel_parse_body(struct ast_json *body, struct ast_ari_bridges_remove_channel_args *args)
Body parsing function for /bridges/{bridgeId}/removeChannel.
void ast_ari_bridges_stop_moh(struct ast_variable *headers, struct ast_ari_bridges_stop_moh_args *args, struct ast_ari_response *response)
Stop playing music on hold to a bridge.
void ast_ari_bridges_list(struct ast_variable *headers, struct ast_ari_bridges_list_args *args, struct ast_ari_response *response)
List all active bridges in Asterisk.
Abstract JSON element (object, array, string, int, ...).
Structure for variables, used for configurations and for channel variables.