Asterisk - The Open Source Telephony Project  GIT-master-8beac82
resource_channels.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_channels.c
23  *
24  * Channel 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_CHANNELS_H
38 #define _ASTERISK_RESOURCE_CHANNELS_H
39 
40 #include "asterisk/ari.h"
41 
42 /*! Argument struct for ast_ari_channels_list() */
44 };
45 /*!
46  * \brief List all active channels in Asterisk.
47  *
48  * \param headers HTTP headers
49  * \param args Swagger parameters
50  * \param[out] response HTTP response
51  */
52 void ast_ari_channels_list(struct ast_variable *headers, struct ast_ari_channels_list_args *args, struct ast_ari_response *response);
53 /*! Argument struct for ast_ari_channels_originate() */
55  /*! Endpoint to call. */
56  const char *endpoint;
57  /*! The extension to dial after the endpoint answers. Mutually exclusive with 'app'. */
58  const char *extension;
59  /*! The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'. */
60  const char *context;
61  /*! The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'. */
62  long priority;
63  /*! The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'. */
64  const char *label;
65  /*! The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'. */
66  const char *app;
67  /*! The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'. */
68  const char *app_args;
69  /*! CallerID to use when dialing the endpoint or extension. */
70  const char *caller_id;
71  /*! Timeout (in seconds) before giving up dialing, or -1 for no timeout. */
72  int timeout;
73  /*! 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" } } */
75  /*! The unique id to assign the channel on creation. */
76  const char *channel_id;
77  /*! The unique id to assign the second channel when using local channels. */
78  const char *other_channel_id;
79  /*! The unique id of the channel which is originating this one. */
80  const char *originator;
81  /*! The format name capability list to use if originator is not specified. Ex. "ulaw,slin16". Format names can be found with "core show codecs". */
82  const char *formats;
83 };
84 /*!
85  * \brief Body parsing function for /channels.
86  * \param body The JSON body from which to parse parameters.
87  * \param[out] args The args structure to parse into.
88  * \retval zero on success
89  * \retval non-zero on failure
90  */
92  struct ast_json *body,
93  struct ast_ari_channels_originate_args *args);
94 
95 /*!
96  * \brief Create a new channel (originate).
97  *
98  * The new channel is created immediately and a snapshot of it returned. If a Stasis application is provided it will be automatically subscribed to the originated channel for further events and updates.
99  *
100  * \param headers HTTP headers
101  * \param args Swagger parameters
102  * \param[out] response HTTP response
103  */
104 void ast_ari_channels_originate(struct ast_variable *headers, struct ast_ari_channels_originate_args *args, struct ast_ari_response *response);
105 /*! Argument struct for ast_ari_channels_create() */
107  /*! Endpoint for channel communication */
108  const char *endpoint;
109  /*! Stasis Application to place channel into */
110  const char *app;
111  /*! The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'. */
112  const char *app_args;
113  /*! The unique id to assign the channel on creation. */
114  const char *channel_id;
115  /*! The unique id to assign the second channel when using local channels. */
116  const char *other_channel_id;
117  /*! Unique ID of the calling channel */
118  const char *originator;
119  /*! The format name capability list to use if originator is not specified. Ex. "ulaw,slin16". Format names can be found with "core show codecs". */
120  const char *formats;
121  /*! 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" } } */
123 };
124 /*!
125  * \brief Body parsing function for /channels/create.
126  * \param body The JSON body from which to parse parameters.
127  * \param[out] args The args structure to parse into.
128  * \retval zero on success
129  * \retval non-zero on failure
130  */
132  struct ast_json *body,
133  struct ast_ari_channels_create_args *args);
134 
135 /*!
136  * \brief Create channel.
137  *
138  * \param headers HTTP headers
139  * \param args Swagger parameters
140  * \param[out] response HTTP response
141  */
142 void ast_ari_channels_create(struct ast_variable *headers, struct ast_ari_channels_create_args *args, struct ast_ari_response *response);
143 /*! Argument struct for ast_ari_channels_get() */
145  /*! Channel's id */
146  const char *channel_id;
147 };
148 /*!
149  * \brief Channel details.
150  *
151  * \param headers HTTP headers
152  * \param args Swagger parameters
153  * \param[out] response HTTP response
154  */
155 void ast_ari_channels_get(struct ast_variable *headers, struct ast_ari_channels_get_args *args, struct ast_ari_response *response);
156 /*! Argument struct for ast_ari_channels_originate_with_id() */
158  /*! The unique id to assign the channel on creation. */
159  const char *channel_id;
160  /*! Endpoint to call. */
161  const char *endpoint;
162  /*! The extension to dial after the endpoint answers. Mutually exclusive with 'app'. */
163  const char *extension;
164  /*! The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'. */
165  const char *context;
166  /*! The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'. */
167  long priority;
168  /*! The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'. */
169  const char *label;
170  /*! The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'. */
171  const char *app;
172  /*! The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'. */
173  const char *app_args;
174  /*! CallerID to use when dialing the endpoint or extension. */
175  const char *caller_id;
176  /*! Timeout (in seconds) before giving up dialing, or -1 for no timeout. */
177  int timeout;
178  /*! 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" } } */
180  /*! The unique id to assign the second channel when using local channels. */
181  const char *other_channel_id;
182  /*! The unique id of the channel which is originating this one. */
183  const char *originator;
184  /*! The format name capability list to use if originator is not specified. Ex. "ulaw,slin16". Format names can be found with "core show codecs". */
185  const char *formats;
186 };
187 /*!
188  * \brief Body parsing function for /channels/{channelId}.
189  * \param body The JSON body from which to parse parameters.
190  * \param[out] args The args structure to parse into.
191  * \retval zero on success
192  * \retval non-zero on failure
193  */
195  struct ast_json *body,
197 
198 /*!
199  * \brief Create a new channel (originate with id).
200  *
201  * The new channel is created immediately and a snapshot of it returned. If a Stasis application is provided it will be automatically subscribed to the originated channel for further events and updates.
202  *
203  * \param headers HTTP headers
204  * \param args Swagger parameters
205  * \param[out] response HTTP response
206  */
208 /*! Argument struct for ast_ari_channels_hangup() */
210  /*! Channel's id */
211  const char *channel_id;
212  /*! The reason code for hanging up the channel for detail use. Mutually exclusive with 'reason'. See detail hangup codes at here. https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause+Mappings */
213  const char *reason_code;
214  /*! Reason for hanging up the channel for simple use. Mutually exclusive with 'reason_code'. */
215  const char *reason;
216 };
217 /*!
218  * \brief Body parsing function for /channels/{channelId}.
219  * \param body The JSON body from which to parse parameters.
220  * \param[out] args The args structure to parse into.
221  * \retval zero on success
222  * \retval non-zero on failure
223  */
225  struct ast_json *body,
226  struct ast_ari_channels_hangup_args *args);
227 
228 /*!
229  * \brief Delete (i.e. hangup) a channel.
230  *
231  * \param headers HTTP headers
232  * \param args Swagger parameters
233  * \param[out] response HTTP response
234  */
235 void ast_ari_channels_hangup(struct ast_variable *headers, struct ast_ari_channels_hangup_args *args, struct ast_ari_response *response);
236 /*! Argument struct for ast_ari_channels_continue_in_dialplan() */
238  /*! Channel's id */
239  const char *channel_id;
240  /*! The context to continue to. */
241  const char *context;
242  /*! The extension to continue to. */
243  const char *extension;
244  /*! The priority to continue to. */
245  int priority;
246  /*! The label to continue to - will supersede 'priority' if both are provided. */
247  const char *label;
248 };
249 /*!
250  * \brief Body parsing function for /channels/{channelId}/continue.
251  * \param body The JSON body from which to parse parameters.
252  * \param[out] args The args structure to parse into.
253  * \retval zero on success
254  * \retval non-zero on failure
255  */
257  struct ast_json *body,
259 
260 /*!
261  * \brief Exit application; continue execution in the dialplan.
262  *
263  * \param headers HTTP headers
264  * \param args Swagger parameters
265  * \param[out] response HTTP response
266  */
268 /*! Argument struct for ast_ari_channels_move() */
270  /*! Channel's id */
271  const char *channel_id;
272  /*! The channel will be passed to this Stasis application. */
273  const char *app;
274  /*! The application arguments to pass to the Stasis application provided by 'app'. */
275  const char *app_args;
276 };
277 /*!
278  * \brief Body parsing function for /channels/{channelId}/move.
279  * \param body The JSON body from which to parse parameters.
280  * \param[out] args The args structure to parse into.
281  * \retval zero on success
282  * \retval non-zero on failure
283  */
285  struct ast_json *body,
286  struct ast_ari_channels_move_args *args);
287 
288 /*!
289  * \brief Move the channel from one Stasis application to another.
290  *
291  * \param headers HTTP headers
292  * \param args Swagger parameters
293  * \param[out] response HTTP response
294  */
295 void ast_ari_channels_move(struct ast_variable *headers, struct ast_ari_channels_move_args *args, struct ast_ari_response *response);
296 /*! Argument struct for ast_ari_channels_redirect() */
298  /*! Channel's id */
299  const char *channel_id;
300  /*! The endpoint to redirect the channel to */
301  const char *endpoint;
302 };
303 /*!
304  * \brief Body parsing function for /channels/{channelId}/redirect.
305  * \param body The JSON body from which to parse parameters.
306  * \param[out] args The args structure to parse into.
307  * \retval zero on success
308  * \retval non-zero on failure
309  */
311  struct ast_json *body,
312  struct ast_ari_channels_redirect_args *args);
313 
314 /*!
315  * \brief Redirect the channel to a different location.
316  *
317  * \param headers HTTP headers
318  * \param args Swagger parameters
319  * \param[out] response HTTP response
320  */
321 void ast_ari_channels_redirect(struct ast_variable *headers, struct ast_ari_channels_redirect_args *args, struct ast_ari_response *response);
322 /*! Argument struct for ast_ari_channels_answer() */
324  /*! Channel's id */
325  const char *channel_id;
326 };
327 /*!
328  * \brief Answer a channel.
329  *
330  * \param headers HTTP headers
331  * \param args Swagger parameters
332  * \param[out] response HTTP response
333  */
334 void ast_ari_channels_answer(struct ast_variable *headers, struct ast_ari_channels_answer_args *args, struct ast_ari_response *response);
335 /*! Argument struct for ast_ari_channels_ring() */
337  /*! Channel's id */
338  const char *channel_id;
339 };
340 /*!
341  * \brief Indicate ringing to a channel.
342  *
343  * \param headers HTTP headers
344  * \param args Swagger parameters
345  * \param[out] response HTTP response
346  */
347 void ast_ari_channels_ring(struct ast_variable *headers, struct ast_ari_channels_ring_args *args, struct ast_ari_response *response);
348 /*! Argument struct for ast_ari_channels_ring_stop() */
350  /*! Channel's id */
351  const char *channel_id;
352 };
353 /*!
354  * \brief Stop ringing indication on a channel if locally generated.
355  *
356  * \param headers HTTP headers
357  * \param args Swagger parameters
358  * \param[out] response HTTP response
359  */
360 void ast_ari_channels_ring_stop(struct ast_variable *headers, struct ast_ari_channels_ring_stop_args *args, struct ast_ari_response *response);
361 /*! Argument struct for ast_ari_channels_send_dtmf() */
363  /*! Channel's id */
364  const char *channel_id;
365  /*! DTMF To send. */
366  const char *dtmf;
367  /*! Amount of time to wait before DTMF digits (specified in milliseconds) start. */
368  int before;
369  /*! Amount of time in between DTMF digits (specified in milliseconds). */
370  int between;
371  /*! Length of each DTMF digit (specified in milliseconds). */
372  int duration;
373  /*! Amount of time to wait after DTMF digits (specified in milliseconds) end. */
374  int after;
375 };
376 /*!
377  * \brief Body parsing function for /channels/{channelId}/dtmf.
378  * \param body The JSON body from which to parse parameters.
379  * \param[out] args The args structure to parse into.
380  * \retval zero on success
381  * \retval non-zero on failure
382  */
384  struct ast_json *body,
385  struct ast_ari_channels_send_dtmf_args *args);
386 
387 /*!
388  * \brief Send provided DTMF to a given channel.
389  *
390  * \param headers HTTP headers
391  * \param args Swagger parameters
392  * \param[out] response HTTP response
393  */
394 void ast_ari_channels_send_dtmf(struct ast_variable *headers, struct ast_ari_channels_send_dtmf_args *args, struct ast_ari_response *response);
395 /*! Argument struct for ast_ari_channels_mute() */
397  /*! Channel's id */
398  const char *channel_id;
399  /*! Direction in which to mute audio */
400  const char *direction;
401 };
402 /*!
403  * \brief Body parsing function for /channels/{channelId}/mute.
404  * \param body The JSON body from which to parse parameters.
405  * \param[out] args The args structure to parse into.
406  * \retval zero on success
407  * \retval non-zero on failure
408  */
410  struct ast_json *body,
411  struct ast_ari_channels_mute_args *args);
412 
413 /*!
414  * \brief Mute a channel.
415  *
416  * \param headers HTTP headers
417  * \param args Swagger parameters
418  * \param[out] response HTTP response
419  */
420 void ast_ari_channels_mute(struct ast_variable *headers, struct ast_ari_channels_mute_args *args, struct ast_ari_response *response);
421 /*! Argument struct for ast_ari_channels_unmute() */
423  /*! Channel's id */
424  const char *channel_id;
425  /*! Direction in which to unmute audio */
426  const char *direction;
427 };
428 /*!
429  * \brief Body parsing function for /channels/{channelId}/mute.
430  * \param body The JSON body from which to parse parameters.
431  * \param[out] args The args structure to parse into.
432  * \retval zero on success
433  * \retval non-zero on failure
434  */
436  struct ast_json *body,
437  struct ast_ari_channels_unmute_args *args);
438 
439 /*!
440  * \brief Unmute a channel.
441  *
442  * \param headers HTTP headers
443  * \param args Swagger parameters
444  * \param[out] response HTTP response
445  */
446 void ast_ari_channels_unmute(struct ast_variable *headers, struct ast_ari_channels_unmute_args *args, struct ast_ari_response *response);
447 /*! Argument struct for ast_ari_channels_hold() */
449  /*! Channel's id */
450  const char *channel_id;
451 };
452 /*!
453  * \brief Hold a channel.
454  *
455  * \param headers HTTP headers
456  * \param args Swagger parameters
457  * \param[out] response HTTP response
458  */
459 void ast_ari_channels_hold(struct ast_variable *headers, struct ast_ari_channels_hold_args *args, struct ast_ari_response *response);
460 /*! Argument struct for ast_ari_channels_unhold() */
462  /*! Channel's id */
463  const char *channel_id;
464 };
465 /*!
466  * \brief Remove a channel from hold.
467  *
468  * \param headers HTTP headers
469  * \param args Swagger parameters
470  * \param[out] response HTTP response
471  */
472 void ast_ari_channels_unhold(struct ast_variable *headers, struct ast_ari_channels_unhold_args *args, struct ast_ari_response *response);
473 /*! Argument struct for ast_ari_channels_start_moh() */
475  /*! Channel's id */
476  const char *channel_id;
477  /*! Music on hold class to use */
478  const char *moh_class;
479 };
480 /*!
481  * \brief Body parsing function for /channels/{channelId}/moh.
482  * \param body The JSON body from which to parse parameters.
483  * \param[out] args The args structure to parse into.
484  * \retval zero on success
485  * \retval non-zero on failure
486  */
488  struct ast_json *body,
489  struct ast_ari_channels_start_moh_args *args);
490 
491 /*!
492  * \brief Play music on hold to a channel.
493  *
494  * Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.
495  *
496  * \param headers HTTP headers
497  * \param args Swagger parameters
498  * \param[out] response HTTP response
499  */
500 void ast_ari_channels_start_moh(struct ast_variable *headers, struct ast_ari_channels_start_moh_args *args, struct ast_ari_response *response);
501 /*! Argument struct for ast_ari_channels_stop_moh() */
503  /*! Channel's id */
504  const char *channel_id;
505 };
506 /*!
507  * \brief Stop playing music on hold to a channel.
508  *
509  * \param headers HTTP headers
510  * \param args Swagger parameters
511  * \param[out] response HTTP response
512  */
513 void ast_ari_channels_stop_moh(struct ast_variable *headers, struct ast_ari_channels_stop_moh_args *args, struct ast_ari_response *response);
514 /*! Argument struct for ast_ari_channels_start_silence() */
516  /*! Channel's id */
517  const char *channel_id;
518 };
519 /*!
520  * \brief Play silence to a channel.
521  *
522  * Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.
523  *
524  * \param headers HTTP headers
525  * \param args Swagger parameters
526  * \param[out] response HTTP response
527  */
528 void ast_ari_channels_start_silence(struct ast_variable *headers, struct ast_ari_channels_start_silence_args *args, struct ast_ari_response *response);
529 /*! Argument struct for ast_ari_channels_stop_silence() */
531  /*! Channel's id */
532  const char *channel_id;
533 };
534 /*!
535  * \brief Stop playing silence to a channel.
536  *
537  * \param headers HTTP headers
538  * \param args Swagger parameters
539  * \param[out] response HTTP response
540  */
541 void ast_ari_channels_stop_silence(struct ast_variable *headers, struct ast_ari_channels_stop_silence_args *args, struct ast_ari_response *response);
542 /*! Argument struct for ast_ari_channels_play() */
544  /*! Channel's id */
545  const char *channel_id;
546  /*! Array of Media URIs to play. */
547  const char **media;
548  /*! Length of media array. */
549  size_t media_count;
550  /*! Parsing context for media. */
551  char *media_parse;
552  /*! For sounds, selects language for sound. */
553  const char *lang;
554  /*! Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified. */
555  int offsetms;
556  /*! Number of milliseconds to skip for forward/reverse operations. */
557  int skipms;
558  /*! Playback ID. */
559  const char *playback_id;
560 };
561 /*!
562  * \brief Body parsing function for /channels/{channelId}/play.
563  * \param body The JSON body from which to parse parameters.
564  * \param[out] args The args structure to parse into.
565  * \retval zero on success
566  * \retval non-zero on failure
567  */
569  struct ast_json *body,
570  struct ast_ari_channels_play_args *args);
571 
572 /*!
573  * \brief Start playback of media.
574  *
575  * 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.)
576  *
577  * \param headers HTTP headers
578  * \param args Swagger parameters
579  * \param[out] response HTTP response
580  */
581 void ast_ari_channels_play(struct ast_variable *headers, struct ast_ari_channels_play_args *args, struct ast_ari_response *response);
582 /*! Argument struct for ast_ari_channels_play_with_id() */
584  /*! Channel's id */
585  const char *channel_id;
586  /*! Playback ID. */
587  const char *playback_id;
588  /*! Array of Media URIs to play. */
589  const char **media;
590  /*! Length of media array. */
591  size_t media_count;
592  /*! Parsing context for media. */
593  char *media_parse;
594  /*! For sounds, selects language for sound. */
595  const char *lang;
596  /*! Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified. */
597  int offsetms;
598  /*! Number of milliseconds to skip for forward/reverse operations. */
599  int skipms;
600 };
601 /*!
602  * \brief Body parsing function for /channels/{channelId}/play/{playbackId}.
603  * \param body The JSON body from which to parse parameters.
604  * \param[out] args The args structure to parse into.
605  * \retval zero on success
606  * \retval non-zero on failure
607  */
609  struct ast_json *body,
611 
612 /*!
613  * \brief Start playback of media and specify the playbackId.
614  *
615  * 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.)
616  *
617  * \param headers HTTP headers
618  * \param args Swagger parameters
619  * \param[out] response HTTP response
620  */
621 void ast_ari_channels_play_with_id(struct ast_variable *headers, struct ast_ari_channels_play_with_id_args *args, struct ast_ari_response *response);
622 /*! Argument struct for ast_ari_channels_record() */
624  /*! Channel's id */
625  const char *channel_id;
626  /*! Recording's filename */
627  const char *name;
628  /*! Format to encode audio in */
629  const char *format;
630  /*! Maximum duration of the recording, in seconds. 0 for no limit */
632  /*! Maximum duration of silence, in seconds. 0 for no limit */
634  /*! Action to take if a recording with the same name already exists. */
635  const char *if_exists;
636  /*! Play beep when recording begins */
637  int beep;
638  /*! DTMF input to terminate recording */
639  const char *terminate_on;
640 };
641 /*!
642  * \brief Body parsing function for /channels/{channelId}/record.
643  * \param body The JSON body from which to parse parameters.
644  * \param[out] args The args structure to parse into.
645  * \retval zero on success
646  * \retval non-zero on failure
647  */
649  struct ast_json *body,
650  struct ast_ari_channels_record_args *args);
651 
652 /*!
653  * \brief Start a recording.
654  *
655  * Record audio from a channel. Note that this will not capture audio sent to the channel. The bridge itself has a record feature if that's what you want.
656  *
657  * \param headers HTTP headers
658  * \param args Swagger parameters
659  * \param[out] response HTTP response
660  */
661 void ast_ari_channels_record(struct ast_variable *headers, struct ast_ari_channels_record_args *args, struct ast_ari_response *response);
662 /*! Argument struct for ast_ari_channels_get_channel_var() */
664  /*! Channel's id */
665  const char *channel_id;
666  /*! The channel variable or function to get */
667  const char *variable;
668 };
669 /*!
670  * \brief Body parsing function for /channels/{channelId}/variable.
671  * \param body The JSON body from which to parse parameters.
672  * \param[out] args The args structure to parse into.
673  * \retval zero on success
674  * \retval non-zero on failure
675  */
677  struct ast_json *body,
679 
680 /*!
681  * \brief Get the value of a channel variable or function.
682  *
683  * \param headers HTTP headers
684  * \param args Swagger parameters
685  * \param[out] response HTTP response
686  */
688 /*! Argument struct for ast_ari_channels_set_channel_var() */
690  /*! Channel's id */
691  const char *channel_id;
692  /*! The channel variable or function to set */
693  const char *variable;
694  /*! The value to set the variable to */
695  const char *value;
696 };
697 /*!
698  * \brief Body parsing function for /channels/{channelId}/variable.
699  * \param body The JSON body from which to parse parameters.
700  * \param[out] args The args structure to parse into.
701  * \retval zero on success
702  * \retval non-zero on failure
703  */
705  struct ast_json *body,
707 
708 /*!
709  * \brief Set the value of a channel variable or function.
710  *
711  * \param headers HTTP headers
712  * \param args Swagger parameters
713  * \param[out] response HTTP response
714  */
716 /*! Argument struct for ast_ari_channels_snoop_channel() */
718  /*! Channel's id */
719  const char *channel_id;
720  /*! Direction of audio to spy on */
721  const char *spy;
722  /*! Direction of audio to whisper into */
723  const char *whisper;
724  /*! Application the snooping channel is placed into */
725  const char *app;
726  /*! The application arguments to pass to the Stasis application */
727  const char *app_args;
728  /*! Unique ID to assign to snooping channel */
729  const char *snoop_id;
730 };
731 /*!
732  * \brief Body parsing function for /channels/{channelId}/snoop.
733  * \param body The JSON body from which to parse parameters.
734  * \param[out] args The args structure to parse into.
735  * \retval zero on success
736  * \retval non-zero on failure
737  */
739  struct ast_json *body,
741 
742 /*!
743  * \brief Start snooping.
744  *
745  * Snoop (spy/whisper) on a specific channel.
746  *
747  * \param headers HTTP headers
748  * \param args Swagger parameters
749  * \param[out] response HTTP response
750  */
751 void ast_ari_channels_snoop_channel(struct ast_variable *headers, struct ast_ari_channels_snoop_channel_args *args, struct ast_ari_response *response);
752 /*! Argument struct for ast_ari_channels_snoop_channel_with_id() */
754  /*! Channel's id */
755  const char *channel_id;
756  /*! Unique ID to assign to snooping channel */
757  const char *snoop_id;
758  /*! Direction of audio to spy on */
759  const char *spy;
760  /*! Direction of audio to whisper into */
761  const char *whisper;
762  /*! Application the snooping channel is placed into */
763  const char *app;
764  /*! The application arguments to pass to the Stasis application */
765  const char *app_args;
766 };
767 /*!
768  * \brief Body parsing function for /channels/{channelId}/snoop/{snoopId}.
769  * \param body The JSON body from which to parse parameters.
770  * \param[out] args The args structure to parse into.
771  * \retval zero on success
772  * \retval non-zero on failure
773  */
775  struct ast_json *body,
777 
778 /*!
779  * \brief Start snooping.
780  *
781  * Snoop (spy/whisper) on a specific channel.
782  *
783  * \param headers HTTP headers
784  * \param args Swagger parameters
785  * \param[out] response HTTP response
786  */
788 /*! Argument struct for ast_ari_channels_dial() */
790  /*! Channel's id */
791  const char *channel_id;
792  /*! Channel ID of caller */
793  const char *caller;
794  /*! Dial timeout */
795  int timeout;
796 };
797 /*!
798  * \brief Body parsing function for /channels/{channelId}/dial.
799  * \param body The JSON body from which to parse parameters.
800  * \param[out] args The args structure to parse into.
801  * \retval zero on success
802  * \retval non-zero on failure
803  */
805  struct ast_json *body,
806  struct ast_ari_channels_dial_args *args);
807 
808 /*!
809  * \brief Dial a created channel.
810  *
811  * \param headers HTTP headers
812  * \param args Swagger parameters
813  * \param[out] response HTTP response
814  */
815 void ast_ari_channels_dial(struct ast_variable *headers, struct ast_ari_channels_dial_args *args, struct ast_ari_response *response);
816 /*! Argument struct for ast_ari_channels_rtpstatistics() */
818  /*! Channel's id */
819  const char *channel_id;
820 };
821 /*!
822  * \brief RTP stats on a channel.
823  *
824  * \param headers HTTP headers
825  * \param args Swagger parameters
826  * \param[out] response HTTP response
827  */
828 void ast_ari_channels_rtpstatistics(struct ast_variable *headers, struct ast_ari_channels_rtpstatistics_args *args, struct ast_ari_response *response);
829 /*! Argument struct for ast_ari_channels_external_media() */
831  /*! The unique id to assign the channel on creation. */
832  const char *channel_id;
833  /*! Stasis Application to place channel into */
834  const char *app;
835  /*! 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" } } */
837  /*! Hostname/ip:port of external host */
838  const char *external_host;
839  /*! Payload encapsulation protocol */
840  const char *encapsulation;
841  /*! Transport protocol */
842  const char *transport;
843  /*! Connection type (client/server) */
844  const char *connection_type;
845  /*! Format to encode audio in */
846  const char *format;
847  /*! External media direction */
848  const char *direction;
849  /*! An arbitrary data field */
850  const char *data;
851 };
852 /*!
853  * \brief Body parsing function for /channels/externalMedia.
854  * \param body The JSON body from which to parse parameters.
855  * \param[out] args The args structure to parse into.
856  * \retval zero on success
857  * \retval non-zero on failure
858  */
860  struct ast_json *body,
862 
863 /*!
864  * \brief Start an External Media session.
865  *
866  * Create a channel to an External Media source/sink.
867  *
868  * \param headers HTTP headers
869  * \param args Swagger parameters
870  * \param[out] response HTTP response
871  */
872 void ast_ari_channels_external_media(struct ast_variable *headers, struct ast_ari_channels_external_media_args *args, struct ast_ari_response *response);
873 
874 #endif /* _ASTERISK_RESOURCE_CHANNELS_H */
int ast_ari_channels_external_media_parse_body(struct ast_json *body, struct ast_ari_channels_external_media_args *args)
Body parsing function for /channels/externalMedia.
void ast_ari_channels_play_with_id(struct ast_variable *headers, struct ast_ari_channels_play_with_id_args *args, struct ast_ari_response *response)
Start playback of media and specify the playbackId.
void ast_ari_channels_send_dtmf(struct ast_variable *headers, struct ast_ari_channels_send_dtmf_args *args, struct ast_ari_response *response)
Send provided DTMF to a given channel.
void ast_ari_channels_answer(struct ast_variable *headers, struct ast_ari_channels_answer_args *args, struct ast_ari_response *response)
Answer a channel.
int ast_ari_channels_mute_parse_body(struct ast_json *body, struct ast_ari_channels_mute_args *args)
Body parsing function for /channels/{channelId}/mute.
void ast_ari_channels_set_channel_var(struct ast_variable *headers, struct ast_ari_channels_set_channel_var_args *args, struct ast_ari_response *response)
Set the value of a channel variable or function.
void ast_ari_channels_get_channel_var(struct ast_variable *headers, struct ast_ari_channels_get_channel_var_args *args, struct ast_ari_response *response)
Get the value of a channel variable or function.
void ast_ari_channels_start_silence(struct ast_variable *headers, struct ast_ari_channels_start_silence_args *args, struct ast_ari_response *response)
Play silence to a channel.
void ast_ari_channels_mute(struct ast_variable *headers, struct ast_ari_channels_mute_args *args, struct ast_ari_response *response)
Mute a channel.
void ast_ari_channels_create(struct ast_variable *headers, struct ast_ari_channels_create_args *args, struct ast_ari_response *response)
Create channel.
int ast_ari_channels_create_parse_body(struct ast_json *body, struct ast_ari_channels_create_args *args)
Body parsing function for /channels/create.
void ast_ari_channels_start_moh(struct ast_variable *headers, struct ast_ari_channels_start_moh_args *args, struct ast_ari_response *response)
Play music on hold to a channel.
Structure for variables, used for configurations and for channel variables.
int ast_ari_channels_unmute_parse_body(struct ast_json *body, struct ast_ari_channels_unmute_args *args)
Body parsing function for /channels/{channelId}/mute.
void ast_ari_channels_ring_stop(struct ast_variable *headers, struct ast_ari_channels_ring_stop_args *args, struct ast_ari_response *response)
Stop ringing indication on a channel if locally generated.
Asterisk RESTful API hooks.
void ast_ari_channels_snoop_channel(struct ast_variable *headers, struct ast_ari_channels_snoop_channel_args *args, struct ast_ari_response *response)
Start snooping.
void ast_ari_channels_originate_with_id(struct ast_variable *headers, struct ast_ari_channels_originate_with_id_args *args, struct ast_ari_response *response)
Create a new channel (originate with id).
int ast_ari_channels_snoop_channel_parse_body(struct ast_json *body, struct ast_ari_channels_snoop_channel_args *args)
Body parsing function for /channels/{channelId}/snoop.
const char * args
void ast_ari_channels_ring(struct ast_variable *headers, struct ast_ari_channels_ring_args *args, struct ast_ari_response *response)
Indicate ringing to a channel.
void ast_ari_channels_hangup(struct ast_variable *headers, struct ast_ari_channels_hangup_args *args, struct ast_ari_response *response)
Delete (i.e. hangup) a channel.
void ast_ari_channels_play(struct ast_variable *headers, struct ast_ari_channels_play_args *args, struct ast_ari_response *response)
Start playback of media.
void ast_ari_channels_list(struct ast_variable *headers, struct ast_ari_channels_list_args *args, struct ast_ari_response *response)
List all active channels in Asterisk.
void ast_ari_channels_originate(struct ast_variable *headers, struct ast_ari_channels_originate_args *args, struct ast_ari_response *response)
Create a new channel (originate).
int ast_ari_channels_originate_parse_body(struct ast_json *body, struct ast_ari_channels_originate_args *args)
Body parsing function for /channels.
int ast_ari_channels_dial_parse_body(struct ast_json *body, struct ast_ari_channels_dial_args *args)
Body parsing function for /channels/{channelId}/dial.
int ast_ari_channels_start_moh_parse_body(struct ast_json *body, struct ast_ari_channels_start_moh_args *args)
Body parsing function for /channels/{channelId}/moh.
void ast_ari_channels_get(struct ast_variable *headers, struct ast_ari_channels_get_args *args, struct ast_ari_response *response)
Channel details.
void ast_ari_channels_stop_moh(struct ast_variable *headers, struct ast_ari_channels_stop_moh_args *args, struct ast_ari_response *response)
Stop playing music on hold to a channel.
void ast_ari_channels_hold(struct ast_variable *headers, struct ast_ari_channels_hold_args *args, struct ast_ari_response *response)
Hold a channel.
int ast_ari_channels_originate_with_id_parse_body(struct ast_json *body, struct ast_ari_channels_originate_with_id_args *args)
Body parsing function for /channels/{channelId}.
void ast_ari_channels_rtpstatistics(struct ast_variable *headers, struct ast_ari_channels_rtpstatistics_args *args, struct ast_ari_response *response)
RTP stats on a channel.
int ast_ari_channels_hangup_parse_body(struct ast_json *body, struct ast_ari_channels_hangup_args *args)
Body parsing function for /channels/{channelId}.
int ast_ari_channels_record_parse_body(struct ast_json *body, struct ast_ari_channels_record_args *args)
Body parsing function for /channels/{channelId}/record.
int ast_ari_channels_get_channel_var_parse_body(struct ast_json *body, struct ast_ari_channels_get_channel_var_args *args)
Body parsing function for /channels/{channelId}/variable.
void ast_ari_channels_redirect(struct ast_variable *headers, struct ast_ari_channels_redirect_args *args, struct ast_ari_response *response)
Redirect the channel to a different location.
void ast_ari_channels_unmute(struct ast_variable *headers, struct ast_ari_channels_unmute_args *args, struct ast_ari_response *response)
Unmute a channel.
void ast_ari_channels_external_media(struct ast_variable *headers, struct ast_ari_channels_external_media_args *args, struct ast_ari_response *response)
Start an External Media session.
void ast_ari_channels_dial(struct ast_variable *headers, struct ast_ari_channels_dial_args *args, struct ast_ari_response *response)
Dial a created channel.
void ast_ari_channels_record(struct ast_variable *headers, struct ast_ari_channels_record_args *args, struct ast_ari_response *response)
Start a recording.
void ast_ari_channels_stop_silence(struct ast_variable *headers, struct ast_ari_channels_stop_silence_args *args, struct ast_ari_response *response)
Stop playing silence to a channel.
int ast_ari_channels_continue_in_dialplan_parse_body(struct ast_json *body, struct ast_ari_channels_continue_in_dialplan_args *args)
Body parsing function for /channels/{channelId}/continue.
void ast_ari_channels_unhold(struct ast_variable *headers, struct ast_ari_channels_unhold_args *args, struct ast_ari_response *response)
Remove a channel from hold.
void ast_ari_channels_continue_in_dialplan(struct ast_variable *headers, struct ast_ari_channels_continue_in_dialplan_args *args, struct ast_ari_response *response)
Exit application; continue execution in the dialplan.
int ast_ari_channels_snoop_channel_with_id_parse_body(struct ast_json *body, struct ast_ari_channels_snoop_channel_with_id_args *args)
Body parsing function for /channels/{channelId}/snoop/{snoopId}.
int ast_ari_channels_move_parse_body(struct ast_json *body, struct ast_ari_channels_move_args *args)
Body parsing function for /channels/{channelId}/move.
int ast_ari_channels_redirect_parse_body(struct ast_json *body, struct ast_ari_channels_redirect_args *args)
Body parsing function for /channels/{channelId}/redirect.
int ast_ari_channels_play_with_id_parse_body(struct ast_json *body, struct ast_ari_channels_play_with_id_args *args)
Body parsing function for /channels/{channelId}/play/{playbackId}.
int ast_ari_channels_set_channel_var_parse_body(struct ast_json *body, struct ast_ari_channels_set_channel_var_args *args)
Body parsing function for /channels/{channelId}/variable.
void ast_ari_channels_move(struct ast_variable *headers, struct ast_ari_channels_move_args *args, struct ast_ari_response *response)
Move the channel from one Stasis application to another.
Abstract JSON element (object, array, string, int, ...).
int ast_ari_channels_send_dtmf_parse_body(struct ast_json *body, struct ast_ari_channels_send_dtmf_args *args)
Body parsing function for /channels/{channelId}/dtmf.
int ast_ari_channels_play_parse_body(struct ast_json *body, struct ast_ari_channels_play_args *args)
Body parsing function for /channels/{channelId}/play.
void ast_ari_channels_snoop_channel_with_id(struct ast_variable *headers, struct ast_ari_channels_snoop_channel_with_id_args *args, struct ast_ari_response *response)
Start snooping.