Asterisk - The Open Source Telephony Project GIT-master-6144b6b
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 /*! The "variables" key in the body object holds variable key/value pairs to set on the bridge on creation. Each variable is an object containing "value" (string) and optional "report_events" (boolean) to include updates for that variable in bridge events (defaults to false). Ex. { "name": "SupportBridge", "variables": { "Bridge_State": { "value": "WaitingForAgent", "report_events": true } } } */
63};
64/*!
65 * \brief Body parsing function for /bridges.
66 * \param body The JSON body from which to parse parameters.
67 * \param[out] args The args structure to parse into.
68 * \retval zero on success
69 * \retval non-zero on failure
70 */
72 struct ast_json *body,
74
75/*!
76 * \brief Create a new bridge.
77 *
78 * This bridge persists until it has been shut down, or Asterisk has been shut down.
79 *
80 * \param headers HTTP headers
81 * \param args Swagger parameters
82 * \param[out] response HTTP response
83 */
84void ast_ari_bridges_create(struct ast_variable *headers, struct ast_ari_bridges_create_args *args, struct ast_ari_response *response);
85/*! Argument struct for ast_ari_bridges_create_with_id() */
87 /*! Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single, sdp_label) to set. */
88 const char *type;
89 /*! Unique ID to give to the bridge being created. */
90 const char *bridge_id;
91 /*! Set the name of the bridge. */
92 const char *name;
93 /*! The "variables" key in the body object holds variable key/value pairs to set on the bridge on creation. Each variable is an object containing "value" (string) and optional "report_events" (boolean) to include updates for that variable in bridge events (defaults to false). Ex. { "name": "SupportBridge", "variables": { "Bridge_State": { "value": "WaitingForAgent", "report_events": true } } } */
95};
96/*!
97 * \brief Body parsing function for /bridges/{bridgeId}.
98 * \param body The JSON body from which to parse parameters.
99 * \param[out] args The args structure to parse into.
100 * \retval zero on success
101 * \retval non-zero on failure
102 */
104 struct ast_json *body,
106
107/*!
108 * \brief Create a new bridge.
109 *
110 * This bridge persists until it has been shut down, or Asterisk has been shut down.
111 *
112 * \param headers HTTP headers
113 * \param args Swagger parameters
114 * \param[out] response HTTP response
115 */
117/*! Argument struct for ast_ari_bridges_get() */
119 /*! Bridge's id */
120 const char *bridge_id;
121};
122/*!
123 * \brief Get bridge details.
124 *
125 * \param headers HTTP headers
126 * \param args Swagger parameters
127 * \param[out] response HTTP response
128 */
129void ast_ari_bridges_get(struct ast_variable *headers, struct ast_ari_bridges_get_args *args, struct ast_ari_response *response);
130/*! Argument struct for ast_ari_bridges_destroy() */
132 /*! Bridge's id */
133 const char *bridge_id;
134};
135/*!
136 * \brief Shut down a bridge.
137 *
138 * If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.
139 *
140 * \param headers HTTP headers
141 * \param args Swagger parameters
142 * \param[out] response HTTP response
143 */
144void ast_ari_bridges_destroy(struct ast_variable *headers, struct ast_ari_bridges_destroy_args *args, struct ast_ari_response *response);
145/*! Argument struct for ast_ari_bridges_get_bridge_var() */
147 /*! Bridge's id */
148 const char *bridge_id;
149 /*! The bridge variable or function to get */
150 const char *variable;
151};
152/*!
153 * \brief Body parsing function for /bridges/{bridgeId}/variable.
154 * \param body The JSON body from which to parse parameters.
155 * \param[out] args The args structure to parse into.
156 * \retval zero on success
157 * \retval non-zero on failure
158 */
160 struct ast_json *body,
162
163/*!
164 * \brief Get the value of a bridge variable or function.
165 *
166 * \param headers HTTP headers
167 * \param args Swagger parameters
168 * \param[out] response HTTP response
169 */
171/*! Argument struct for ast_ari_bridges_set_bridge_var() */
173 /*! Bridge's id */
174 const char *bridge_id;
175 /*! The bridge variable or function to set */
176 const char *variable;
177 /*! The value to set the variable to */
178 const char *value;
179 /*! Whether this variable should be included in bridge events. Defaults to false. */
181};
182/*!
183 * \brief Body parsing function for /bridges/{bridgeId}/variable.
184 * \param body The JSON body from which to parse parameters.
185 * \param[out] args The args structure to parse into.
186 * \retval zero on success
187 * \retval non-zero on failure
188 */
190 struct ast_json *body,
192
193/*!
194 * \brief Set the value of a bridge variable or function.
195 *
196 * \param headers HTTP headers
197 * \param args Swagger parameters
198 * \param[out] response HTTP response
199 */
201/*! Argument struct for ast_ari_bridges_get_bridge_vars() */
203 /*! Bridge's id */
204 const char *bridge_id;
205 /*! Array of The bridge variables or functions to get */
206 const char **variables;
207 /*! Length of variables array. */
209 /*! Parsing context for variables. */
211};
212/*!
213 * \brief Body parsing function for /bridges/{bridgeId}/variables.
214 * \param body The JSON body from which to parse parameters.
215 * \param[out] args The args structure to parse into.
216 * \retval zero on success
217 * \retval non-zero on failure
218 */
220 struct ast_json *body,
222
223/*!
224 * \brief Get the value of multiple bridge variables or functions.
225 *
226 * \param headers HTTP headers
227 * \param args Swagger parameters
228 * \param[out] response HTTP response
229 */
231/*! Argument struct for ast_ari_bridges_set_bridge_vars() */
233 /*! Bridge's id */
234 const char *bridge_id;
235 /*! The "variables" key in the body object holds variable key/value pairs to set on the bridge. Each variable value may be either a string or an object containing "value" (string) and optional "report_events" (boolean) to include updates for that variable in bridge events (defaults to false). Ex. { "variables": { "Bridge_State": "WaitingForAgent", "Support_Level": { "value": "Premium", "report_events": true } } } */
237};
238/*!
239 * \brief Body parsing function for /bridges/{bridgeId}/variables.
240 * \param body The JSON body from which to parse parameters.
241 * \param[out] args The args structure to parse into.
242 * \retval zero on success
243 * \retval non-zero on failure
244 */
246 struct ast_json *body,
248
249/*!
250 * \brief Set the values of multiple bridge variables or functions.
251 *
252 * \param headers HTTP headers
253 * \param args Swagger parameters
254 * \param[out] response HTTP response
255 */
257/*! Argument struct for ast_ari_bridges_add_channel() */
259 /*! Bridge's id */
260 const char *bridge_id;
261 /*! Array of Ids of channels to add to bridge */
262 const char **channel;
263 /*! Length of channel array. */
265 /*! Parsing context for channel. */
267 /*! Channel's role in the bridge */
268 const char *role;
269 /*! Absorb DTMF coming from this channel, preventing it to pass through to the bridge */
271 /*! Mute audio from this channel, preventing it to pass through to the bridge */
272 int mute;
273 /*! Do not present the identity of the newly connected channel to other bridge members */
275};
276/*!
277 * \brief Body parsing function for /bridges/{bridgeId}/addChannel.
278 * \param body The JSON body from which to parse parameters.
279 * \param[out] args The args structure to parse into.
280 * \retval zero on success
281 * \retval non-zero on failure
282 */
284 struct ast_json *body,
286
287/*!
288 * \brief Add a channel to a bridge.
289 *
290 * \param headers HTTP headers
291 * \param args Swagger parameters
292 * \param[out] response HTTP response
293 */
295/*! Argument struct for ast_ari_bridges_remove_channel() */
297 /*! Bridge's id */
298 const char *bridge_id;
299 /*! Array of Ids of channels to remove from bridge */
300 const char **channel;
301 /*! Length of channel array. */
303 /*! Parsing context for channel. */
305};
306/*!
307 * \brief Body parsing function for /bridges/{bridgeId}/removeChannel.
308 * \param body The JSON body from which to parse parameters.
309 * \param[out] args The args structure to parse into.
310 * \retval zero on success
311 * \retval non-zero on failure
312 */
314 struct ast_json *body,
316
317/*!
318 * \brief Remove a channel from a bridge.
319 *
320 * \param headers HTTP headers
321 * \param args Swagger parameters
322 * \param[out] response HTTP response
323 */
325/*! Argument struct for ast_ari_bridges_set_video_source() */
327 /*! Bridge's id */
328 const char *bridge_id;
329 /*! Channel's id */
330 const char *channel_id;
331};
332/*!
333 * \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.
334 *
335 * \param headers HTTP headers
336 * \param args Swagger parameters
337 * \param[out] response HTTP response
338 */
340/*! Argument struct for ast_ari_bridges_clear_video_source() */
342 /*! Bridge's id */
343 const char *bridge_id;
344};
345/*!
346 * \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.
347 *
348 * \param headers HTTP headers
349 * \param args Swagger parameters
350 * \param[out] response HTTP response
351 */
353/*! Argument struct for ast_ari_bridges_start_moh() */
355 /*! Bridge's id */
356 const char *bridge_id;
357 /*! Channel's id */
358 const char *moh_class;
359};
360/*!
361 * \brief Body parsing function for /bridges/{bridgeId}/moh.
362 * \param body The JSON body from which to parse parameters.
363 * \param[out] args The args structure to parse into.
364 * \retval zero on success
365 * \retval non-zero on failure
366 */
368 struct ast_json *body,
370
371/*!
372 * \brief Play music on hold to a bridge or change the MOH class that is playing.
373 *
374 * \param headers HTTP headers
375 * \param args Swagger parameters
376 * \param[out] response HTTP response
377 */
378void ast_ari_bridges_start_moh(struct ast_variable *headers, struct ast_ari_bridges_start_moh_args *args, struct ast_ari_response *response);
379/*! Argument struct for ast_ari_bridges_stop_moh() */
381 /*! Bridge's id */
382 const char *bridge_id;
383};
384/*!
385 * \brief Stop playing music on hold to a bridge.
386 *
387 * This will only stop music on hold being played via POST bridges/{bridgeId}/moh.
388 *
389 * \param headers HTTP headers
390 * \param args Swagger parameters
391 * \param[out] response HTTP response
392 */
393void ast_ari_bridges_stop_moh(struct ast_variable *headers, struct ast_ari_bridges_stop_moh_args *args, struct ast_ari_response *response);
394/*! Argument struct for ast_ari_bridges_play() */
396 /*! Bridge's id */
397 const char *bridge_id;
398 /*! Array of Media URIs to play. */
399 const char **media;
400 /*! Length of media array. */
402 /*! Parsing context for media. */
404 /*! Format of the 'Anouncer' channel attached to the bridge. Defaults to the format of the channel in the bridge with the highest sampe rate. */
405 const char *announcer_format;
406 /*! For sounds, selects language for sound. */
407 const char *lang;
408 /*! Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified. */
410 /*! Number of milliseconds to skip for forward/reverse operations. */
412 /*! Playback Id. */
413 const char *playback_id;
414};
415/*!
416 * \brief Body parsing function for /bridges/{bridgeId}/play.
417 * \param body The JSON body from which to parse parameters.
418 * \param[out] args The args structure to parse into.
419 * \retval zero on success
420 * \retval non-zero on failure
421 */
423 struct ast_json *body,
425
426/*!
427 * \brief Start playback of media on a bridge.
428 *
429 * 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.)
430 *
431 * \param headers HTTP headers
432 * \param args Swagger parameters
433 * \param[out] response HTTP response
434 */
435void ast_ari_bridges_play(struct ast_variable *headers, struct ast_ari_bridges_play_args *args, struct ast_ari_response *response);
436/*! Argument struct for ast_ari_bridges_play_with_id() */
438 /*! Bridge's id */
439 const char *bridge_id;
440 /*! Playback ID. */
441 const char *playback_id;
442 /*! Array of Media URIs to play. */
443 const char **media;
444 /*! Length of media array. */
446 /*! Parsing context for media. */
448 /*! Format of the 'Anouncer' channel attached to the bridge. Defaults to the format of the channel in the bridge with the highest sampe rate. */
449 const char *announcer_format;
450 /*! For sounds, selects language for sound. */
451 const char *lang;
452 /*! Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified. */
454 /*! Number of milliseconds to skip for forward/reverse operations. */
456};
457/*!
458 * \brief Body parsing function for /bridges/{bridgeId}/play/{playbackId}.
459 * \param body The JSON body from which to parse parameters.
460 * \param[out] args The args structure to parse into.
461 * \retval zero on success
462 * \retval non-zero on failure
463 */
465 struct ast_json *body,
467
468/*!
469 * \brief Start playback of media on a bridge.
470 *
471 * 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.)
472 *
473 * \param headers HTTP headers
474 * \param args Swagger parameters
475 * \param[out] response HTTP response
476 */
478/*! Argument struct for ast_ari_bridges_record() */
480 /*! Bridge's id */
481 const char *bridge_id;
482 /*! Recording's filename */
483 const char *name;
484 /*! Format to encode audio in */
485 const char *format;
486 /*! Format of the 'Recorder' channel attached to the bridge. Defaults to the same format as the 'format' parameter. */
487 const char *recorder_format;
488 /*! Maximum duration of the recording, in seconds. 0 for no limit. */
490 /*! Maximum duration of silence, in seconds. 0 for no limit. */
492 /*! Action to take if a recording with the same name already exists. */
493 const char *if_exists;
494 /*! Play beep when recording begins */
495 int beep;
496 /*! DTMF input to terminate recording. */
497 const char *terminate_on;
498};
499/*!
500 * \brief Body parsing function for /bridges/{bridgeId}/record.
501 * \param body The JSON body from which to parse parameters.
502 * \param[out] args The args structure to parse into.
503 * \retval zero on success
504 * \retval non-zero on failure
505 */
507 struct ast_json *body,
509
510/*!
511 * \brief Start a recording.
512 *
513 * This records the mixed audio from all channels participating in this bridge.
514 *
515 * \param headers HTTP headers
516 * \param args Swagger parameters
517 * \param[out] response HTTP response
518 */
519void ast_ari_bridges_record(struct ast_variable *headers, struct ast_ari_bridges_record_args *args, struct ast_ari_response *response);
520
521#endif /* _ASTERISK_RESOURCE_BRIDGES_H */
Asterisk RESTful API hooks.
static struct @522 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_set_bridge_var(struct ast_variable *headers, struct ast_ari_bridges_set_bridge_var_args *args, struct ast_ari_response *response)
Set the value of a bridge variable or function.
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_get_bridge_var_parse_body(struct ast_json *body, struct ast_ari_bridges_get_bridge_var_args *args)
Body parsing function for /bridges/{bridgeId}/variable.
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.
int ast_ari_bridges_set_bridge_var_parse_body(struct ast_json *body, struct ast_ari_bridges_set_bridge_var_args *args)
Body parsing function for /bridges/{bridgeId}/variable.
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_get_bridge_vars_parse_body(struct ast_json *body, struct ast_ari_bridges_get_bridge_vars_args *args)
Body parsing function for /bridges/{bridgeId}/variables.
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_get_bridge_vars(struct ast_variable *headers, struct ast_ari_bridges_get_bridge_vars_args *args, struct ast_ari_response *response)
Get the value of multiple bridge variables or functions.
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_set_bridge_vars_parse_body(struct ast_json *body, struct ast_ari_bridges_set_bridge_vars_args *args)
Body parsing function for /bridges/{bridgeId}/variables.
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_get_bridge_var(struct ast_variable *headers, struct ast_ari_bridges_get_bridge_var_args *args, struct ast_ari_response *response)
Get the value of a bridge variable or function.
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.
void ast_ari_bridges_set_bridge_vars(struct ast_variable *headers, struct ast_ari_bridges_set_bridge_vars_args *args, struct ast_ari_response *response)
Set the values of multiple bridge variables or functions.
Abstract JSON element (object, array, string, int, ...).
Structure for variables, used for configurations and for channel variables.