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/stasis_http/resource_channels.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/stasis_http_resource.h.mustache
37 #ifndef _ASTERISK_RESOURCE_CHANNELS_H
38 #define _ASTERISK_RESOURCE_CHANNELS_H
40 #include "asterisk/stasis_http.h"
42 /*! \brief Argument struct for stasis_http_get_channels() */
43 struct ast_get_channels_args {
46 * \brief List active channels.
48 * \param headers HTTP headers
49 * \param args Swagger parameters
50 * \param[out] response HTTP response
52 void stasis_http_get_channels(struct ast_variable *headers, struct ast_get_channels_args *args, struct stasis_http_response *response);
53 /*! \brief Argument struct for stasis_http_originate() */
54 struct ast_originate_args {
55 /*! \brief Endpoint to call. */
57 /*! \brief The extension to dial after the endpoint answers */
58 const char *extension;
59 /*! \brief The context to dial after the endpoint answers. If omitted, uses 'default' */
61 /*! \brief The priority to dial after the endpoint answers. If omitted, uses 1 */
63 /*! \brief The application name to pass to the Stasis application. */
65 /*! \brief The application arguments to pass to the Stasis application. */
67 /*! \brief CallerID to use when dialing the endpoint or extension. */
68 const char *caller_id;
69 /*! \brief Timeout (in seconds) before giving up dialing, or -1 for no timeout. */
73 * \brief Create a new channel (originate).
75 * \param headers HTTP headers
76 * \param args Swagger parameters
77 * \param[out] response HTTP response
79 void stasis_http_originate(struct ast_variable *headers, struct ast_originate_args *args, struct stasis_http_response *response);
80 /*! \brief Argument struct for stasis_http_get_channel() */
81 struct ast_get_channel_args {
82 /*! \brief Channel's id */
83 const char *channel_id;
86 * \brief Channel details.
88 * \param headers HTTP headers
89 * \param args Swagger parameters
90 * \param[out] response HTTP response
92 void stasis_http_get_channel(struct ast_variable *headers, struct ast_get_channel_args *args, struct stasis_http_response *response);
93 /*! \brief Argument struct for stasis_http_delete_channel() */
94 struct ast_delete_channel_args {
95 /*! \brief Channel's id */
96 const char *channel_id;
99 * \brief Delete (i.e. hangup) a channel.
101 * \param headers HTTP headers
102 * \param args Swagger parameters
103 * \param[out] response HTTP response
105 void stasis_http_delete_channel(struct ast_variable *headers, struct ast_delete_channel_args *args, struct stasis_http_response *response);
106 /*! \brief Argument struct for stasis_http_dial() */
107 struct ast_dial_args {
108 /*! \brief Channel's id */
109 const char *channel_id;
110 /*! \brief Endpoint to call. If not specified, dial is routed via dialplan */
111 const char *endpoint;
112 /*! \brief Extension to dial */
113 const char *extension;
114 /*! \brief When routing via dialplan, the context use. If omitted, uses 'default' */
116 /*! \brief Timeout (in seconds) before giving up dialing, or -1 for no timeout. */
120 * \brief Create a new channel (originate) and bridge to this channel.
122 * \param headers HTTP headers
123 * \param args Swagger parameters
124 * \param[out] response HTTP response
126 void stasis_http_dial(struct ast_variable *headers, struct ast_dial_args *args, struct stasis_http_response *response);
127 /*! \brief Argument struct for stasis_http_continue_in_dialplan() */
128 struct ast_continue_in_dialplan_args {
129 /*! \brief Channel's id */
130 const char *channel_id;
131 /*! \brief The context to continue to. */
133 /*! \brief The extension to continue to. */
134 const char *extension;
135 /*! \brief The priority to continue to. */
139 * \brief Exit application; continue execution in the dialplan.
141 * \param headers HTTP headers
142 * \param args Swagger parameters
143 * \param[out] response HTTP response
145 void stasis_http_continue_in_dialplan(struct ast_variable *headers, struct ast_continue_in_dialplan_args *args, struct stasis_http_response *response);
146 /*! \brief Argument struct for stasis_http_answer_channel() */
147 struct ast_answer_channel_args {
148 /*! \brief Channel's id */
149 const char *channel_id;
152 * \brief Answer a channel.
154 * \param headers HTTP headers
155 * \param args Swagger parameters
156 * \param[out] response HTTP response
158 void stasis_http_answer_channel(struct ast_variable *headers, struct ast_answer_channel_args *args, struct stasis_http_response *response);
159 /*! \brief Argument struct for stasis_http_mute_channel() */
160 struct ast_mute_channel_args {
161 /*! \brief Channel's id */
162 const char *channel_id;
163 /*! \brief Direction in which to mute audio */
164 const char *direction;
167 * \brief Mute a channel.
169 * \param headers HTTP headers
170 * \param args Swagger parameters
171 * \param[out] response HTTP response
173 void stasis_http_mute_channel(struct ast_variable *headers, struct ast_mute_channel_args *args, struct stasis_http_response *response);
174 /*! \brief Argument struct for stasis_http_unmute_channel() */
175 struct ast_unmute_channel_args {
176 /*! \brief Channel's id */
177 const char *channel_id;
178 /*! \brief Direction in which to unmute audio */
179 const char *direction;
182 * \brief Unmute a channel.
184 * \param headers HTTP headers
185 * \param args Swagger parameters
186 * \param[out] response HTTP response
188 void stasis_http_unmute_channel(struct ast_variable *headers, struct ast_unmute_channel_args *args, struct stasis_http_response *response);
189 /*! \brief Argument struct for stasis_http_hold_channel() */
190 struct ast_hold_channel_args {
191 /*! \brief Channel's id */
192 const char *channel_id;
195 * \brief Hold a channel.
197 * \param headers HTTP headers
198 * \param args Swagger parameters
199 * \param[out] response HTTP response
201 void stasis_http_hold_channel(struct ast_variable *headers, struct ast_hold_channel_args *args, struct stasis_http_response *response);
202 /*! \brief Argument struct for stasis_http_unhold_channel() */
203 struct ast_unhold_channel_args {
204 /*! \brief Channel's id */
205 const char *channel_id;
208 * \brief Remove a channel from hold.
210 * \param headers HTTP headers
211 * \param args Swagger parameters
212 * \param[out] response HTTP response
214 void stasis_http_unhold_channel(struct ast_variable *headers, struct ast_unhold_channel_args *args, struct stasis_http_response *response);
215 /*! \brief Argument struct for stasis_http_moh_start_channel() */
216 struct ast_moh_start_channel_args {
217 /*! \brief Channel's id */
218 const char *channel_id;
219 /*! \brief Music on hold class to use */
220 const char *moh_class;
223 * \brief Play music on hold to a channel.
225 * Using media operations such as playOnChannel 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.
227 * \param headers HTTP headers
228 * \param args Swagger parameters
229 * \param[out] response HTTP response
231 void stasis_http_moh_start_channel(struct ast_variable *headers, struct ast_moh_start_channel_args *args, struct stasis_http_response *response);
232 /*! \brief Argument struct for stasis_http_moh_stop_channel() */
233 struct ast_moh_stop_channel_args {
234 /*! \brief Channel's id */
235 const char *channel_id;
238 * \brief Stop playing music on hold to a channel.
240 * \param headers HTTP headers
241 * \param args Swagger parameters
242 * \param[out] response HTTP response
244 void stasis_http_moh_stop_channel(struct ast_variable *headers, struct ast_moh_stop_channel_args *args, struct stasis_http_response *response);
245 /*! \brief Argument struct for stasis_http_play_on_channel() */
246 struct ast_play_on_channel_args {
247 /*! \brief Channel's id */
248 const char *channel_id;
249 /*! \brief Media's URI to play. */
251 /*! \brief For sounds, selects language for sound. */
253 /*! \brief Number of media to skip before playing. */
255 /*! \brief Number of milliseconds to skip for forward/reverse operations. */
259 * \brief Start playback of media.
261 * The media URI may be any of a number of URI's. You may use http: and https: URI's, as well as sound: and recording: URI's. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)
263 * \param headers HTTP headers
264 * \param args Swagger parameters
265 * \param[out] response HTTP response
267 void stasis_http_play_on_channel(struct ast_variable *headers, struct ast_play_on_channel_args *args, struct stasis_http_response *response);
268 /*! \brief Argument struct for stasis_http_record_channel() */
269 struct ast_record_channel_args {
270 /*! \brief Channel's id */
271 const char *channel_id;
272 /*! \brief Recording's filename */
274 /*! \brief Format to encode audio in */
276 /*! \brief Maximum duration of the recording, in seconds. 0 for no limit */
277 int max_duration_seconds;
278 /*! \brief Maximum duration of silence, in seconds. 0 for no limit */
279 int max_silence_seconds;
280 /*! \brief Action to take if a recording with the same name already exists. */
281 const char *if_exists;
282 /*! \brief Play beep when recording begins */
284 /*! \brief DTMF input to terminate recording */
285 const char *terminate_on;
288 * \brief Start a recording.
290 * 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.
292 * \param headers HTTP headers
293 * \param args Swagger parameters
294 * \param[out] response HTTP response
296 void stasis_http_record_channel(struct ast_variable *headers, struct ast_record_channel_args *args, struct stasis_http_response *response);
297 /*! \brief Argument struct for stasis_http_get_channel_var() */
298 struct ast_get_channel_var_args {
299 /*! \brief Channel's id */
300 const char *channel_id;
301 /*! \brief The channel variable or function to get */
302 const char *variable;
305 * \brief Get the value of a channel variable or function.
307 * \param headers HTTP headers
308 * \param args Swagger parameters
309 * \param[out] response HTTP response
311 void stasis_http_get_channel_var(struct ast_variable *headers, struct ast_get_channel_var_args *args, struct stasis_http_response *response);
312 /*! \brief Argument struct for stasis_http_set_channel_var() */
313 struct ast_set_channel_var_args {
314 /*! \brief Channel's id */
315 const char *channel_id;
316 /*! \brief The channel variable or function to set */
317 const char *variable;
318 /*! \brief The value to set the variable to */
322 * \brief Set the value of a channel variable or function.
324 * \param headers HTTP headers
325 * \param args Swagger parameters
326 * \param[out] response HTTP response
328 void stasis_http_set_channel_var(struct ast_variable *headers, struct ast_set_channel_var_args *args, struct stasis_http_response *response);
330 #endif /* _ASTERISK_RESOURCE_CHANNELS_H */