| 1 | /* |
| 2 | * Asterisk -- An open source telephony toolkit. |
| 3 | * |
| 4 | * Copyright (C) 2012 - 2013, Digium, Inc. |
| 5 | * |
| 6 | * David M. Lee, II <[email protected]> |
| 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 <[email protected]> |
| 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() */ |
| 43 | struct ast_ari_channels_list_args { |
| 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() */ |
| 54 | struct ast_ari_channels_originate_args { |
| 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. 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 channel events (defaults to false). Other keys in the body object are interpreted as query parameters. Ex. { "endpoint": "SIP/Alice", "variables": { "CALLERID(name)": "Alice", "Call_State": { "value": "WaitingForAgent", "report_events": true } } } */ |
| 74 | struct ast_json *variables; |
| 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 | */ |
| 91 | int ast_ari_channels_originate_parse_body( |
| 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() */ |
| 106 | struct ast_ari_channels_create_args { |
| 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. 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 channel events (defaults to false). Other keys in the body object are interpreted as query parameters. Ex. { "endpoint": "SIP/Alice", "variables": { "CALLERID(name)": "Alice", "Call_State": { "value": "WaitingForAgent", "report_events": true } } } */ |
| 122 | struct ast_json *variables; |
| 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 | */ |
| 131 | int ast_ari_channels_create_parse_body( |
| 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() */ |
| 144 | struct ast_ari_channels_get_args { |
| 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() */ |
| 157 | struct ast_ari_channels_originate_with_id_args { |
| 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. 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 channel events (defaults to false). Other keys in the body object are interpreted as query parameters. Ex. { "endpoint": "SIP/Alice", "variables": { "CALLERID(name)": "Alice", "Call_State": { "value": "WaitingForAgent", "report_events": true } } } */ |
| 179 | struct ast_json *variables; |
| 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 | */ |
| 194 | int ast_ari_channels_originate_with_id_parse_body( |
| 195 | struct ast_json *body, |
| 196 | struct ast_ari_channels_originate_with_id_args *args); |
| 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 | */ |
| 207 | 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); |
| 208 | /*! Argument struct for ast_ari_channels_hangup() */ |
| 209 | struct ast_ari_channels_hangup_args { |
| 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://docs.asterisk.org/Configuration/Miscellaneous/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 | */ |
| 224 | int ast_ari_channels_hangup_parse_body( |
| 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() */ |
| 237 | struct ast_ari_channels_continue_in_dialplan_args { |
| 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 | */ |
| 256 | int ast_ari_channels_continue_in_dialplan_parse_body( |
| 257 | struct ast_json *body, |
| 258 | struct ast_ari_channels_continue_in_dialplan_args *args); |
| 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 | */ |
| 267 | 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); |
| 268 | /*! Argument struct for ast_ari_channels_move() */ |
| 269 | struct ast_ari_channels_move_args { |
| 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 | */ |
| 284 | int ast_ari_channels_move_parse_body( |
| 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() */ |
| 297 | struct ast_ari_channels_redirect_args { |
| 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 | */ |
| 310 | int ast_ari_channels_redirect_parse_body( |
| 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() */ |
| 323 | struct ast_ari_channels_answer_args { |
| 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() */ |
| 336 | struct ast_ari_channels_ring_args { |
| 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() */ |
| 349 | struct ast_ari_channels_ring_stop_args { |
| 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_progress() */ |
| 362 | struct ast_ari_channels_progress_args { |
| 363 | /*! Channel's id */ |
| 364 | const char *channel_id; |
| 365 | }; |
| 366 | /*! |
| 367 | * \brief Indicate progress on a channel. |
| 368 | * |
| 369 | * \param headers HTTP headers |
| 370 | * \param args Swagger parameters |
| 371 | * \param[out] response HTTP response |
| 372 | */ |
| 373 | void ast_ari_channels_progress(struct ast_variable *headers, struct ast_ari_channels_progress_args *args, struct ast_ari_response *response); |
| 374 | /*! Argument struct for ast_ari_channels_send_dtmf() */ |
| 375 | struct ast_ari_channels_send_dtmf_args { |
| 376 | /*! Channel's id */ |
| 377 | const char *channel_id; |
| 378 | /*! DTMF To send. */ |
| 379 | const char *dtmf; |
| 380 | /*! Amount of time to wait before DTMF digits (specified in milliseconds) start. */ |
| 381 | int before; |
| 382 | /*! Amount of time in between DTMF digits (specified in milliseconds). */ |
| 383 | int between; |
| 384 | /*! Length of each DTMF digit (specified in milliseconds). */ |
| 385 | int duration; |
| 386 | /*! Amount of time to wait after DTMF digits (specified in milliseconds) end. */ |
| 387 | int after; |
| 388 | }; |
| 389 | /*! |
| 390 | * \brief Body parsing function for /channels/{channelId}/dtmf. |
| 391 | * \param body The JSON body from which to parse parameters. |
| 392 | * \param[out] args The args structure to parse into. |
| 393 | * \retval zero on success |
| 394 | * \retval non-zero on failure |
| 395 | */ |
| 396 | int ast_ari_channels_send_dtmf_parse_body( |
| 397 | struct ast_json *body, |
| 398 | struct ast_ari_channels_send_dtmf_args *args); |
| 399 | |
| 400 | /*! |
| 401 | * \brief Send provided DTMF to a given channel. |
| 402 | * |
| 403 | * \param headers HTTP headers |
| 404 | * \param args Swagger parameters |
| 405 | * \param[out] response HTTP response |
| 406 | */ |
| 407 | void ast_ari_channels_send_dtmf(struct ast_variable *headers, struct ast_ari_channels_send_dtmf_args *args, struct ast_ari_response *response); |
| 408 | /*! Argument struct for ast_ari_channels_mute() */ |
| 409 | struct ast_ari_channels_mute_args { |
| 410 | /*! Channel's id */ |
| 411 | const char *channel_id; |
| 412 | /*! Direction in which to mute audio */ |
| 413 | const char *direction; |
| 414 | }; |
| 415 | /*! |
| 416 | * \brief Body parsing function for /channels/{channelId}/mute. |
| 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 | */ |
| 422 | int ast_ari_channels_mute_parse_body( |
| 423 | struct ast_json *body, |
| 424 | struct ast_ari_channels_mute_args *args); |
| 425 | |
| 426 | /*! |
| 427 | * \brief Mute a channel. |
| 428 | * |
| 429 | * \param headers HTTP headers |
| 430 | * \param args Swagger parameters |
| 431 | * \param[out] response HTTP response |
| 432 | */ |
| 433 | void ast_ari_channels_mute(struct ast_variable *headers, struct ast_ari_channels_mute_args *args, struct ast_ari_response *response); |
| 434 | /*! Argument struct for ast_ari_channels_unmute() */ |
| 435 | struct ast_ari_channels_unmute_args { |
| 436 | /*! Channel's id */ |
| 437 | const char *channel_id; |
| 438 | /*! Direction in which to unmute audio */ |
| 439 | const char *direction; |
| 440 | }; |
| 441 | /*! |
| 442 | * \brief Body parsing function for /channels/{channelId}/mute. |
| 443 | * \param body The JSON body from which to parse parameters. |
| 444 | * \param[out] args The args structure to parse into. |
| 445 | * \retval zero on success |
| 446 | * \retval non-zero on failure |
| 447 | */ |
| 448 | int ast_ari_channels_unmute_parse_body( |
| 449 | struct ast_json *body, |
| 450 | struct ast_ari_channels_unmute_args *args); |
| 451 | |
| 452 | /*! |
| 453 | * \brief Unmute 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_unmute(struct ast_variable *headers, struct ast_ari_channels_unmute_args *args, struct ast_ari_response *response); |
| 460 | /*! Argument struct for ast_ari_channels_hold() */ |
| 461 | struct ast_ari_channels_hold_args { |
| 462 | /*! Channel's id */ |
| 463 | const char *channel_id; |
| 464 | }; |
| 465 | /*! |
| 466 | * \brief Hold a channel. |
| 467 | * |
| 468 | * \param headers HTTP headers |
| 469 | * \param args Swagger parameters |
| 470 | * \param[out] response HTTP response |
| 471 | */ |
| 472 | void ast_ari_channels_hold(struct ast_variable *headers, struct ast_ari_channels_hold_args *args, struct ast_ari_response *response); |
| 473 | /*! Argument struct for ast_ari_channels_unhold() */ |
| 474 | struct ast_ari_channels_unhold_args { |
| 475 | /*! Channel's id */ |
| 476 | const char *channel_id; |
| 477 | }; |
| 478 | /*! |
| 479 | * \brief Remove a channel from hold. |
| 480 | * |
| 481 | * \param headers HTTP headers |
| 482 | * \param args Swagger parameters |
| 483 | * \param[out] response HTTP response |
| 484 | */ |
| 485 | void ast_ari_channels_unhold(struct ast_variable *headers, struct ast_ari_channels_unhold_args *args, struct ast_ari_response *response); |
| 486 | /*! Argument struct for ast_ari_channels_start_moh() */ |
| 487 | struct ast_ari_channels_start_moh_args { |
| 488 | /*! Channel's id */ |
| 489 | const char *channel_id; |
| 490 | /*! Music on hold class to use */ |
| 491 | const char *moh_class; |
| 492 | }; |
| 493 | /*! |
| 494 | * \brief Body parsing function for /channels/{channelId}/moh. |
| 495 | * \param body The JSON body from which to parse parameters. |
| 496 | * \param[out] args The args structure to parse into. |
| 497 | * \retval zero on success |
| 498 | * \retval non-zero on failure |
| 499 | */ |
| 500 | int ast_ari_channels_start_moh_parse_body( |
| 501 | struct ast_json *body, |
| 502 | struct ast_ari_channels_start_moh_args *args); |
| 503 | |
| 504 | /*! |
| 505 | * \brief Play music on hold to a channel. |
| 506 | * |
| 507 | * 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. |
| 508 | * |
| 509 | * \param headers HTTP headers |
| 510 | * \param args Swagger parameters |
| 511 | * \param[out] response HTTP response |
| 512 | */ |
| 513 | void ast_ari_channels_start_moh(struct ast_variable *headers, struct ast_ari_channels_start_moh_args *args, struct ast_ari_response *response); |
| 514 | /*! Argument struct for ast_ari_channels_stop_moh() */ |
| 515 | struct ast_ari_channels_stop_moh_args { |
| 516 | /*! Channel's id */ |
| 517 | const char *channel_id; |
| 518 | }; |
| 519 | /*! |
| 520 | * \brief Stop playing music on hold to a channel. |
| 521 | * |
| 522 | * \param headers HTTP headers |
| 523 | * \param args Swagger parameters |
| 524 | * \param[out] response HTTP response |
| 525 | */ |
| 526 | void ast_ari_channels_stop_moh(struct ast_variable *headers, struct ast_ari_channels_stop_moh_args *args, struct ast_ari_response *response); |
| 527 | /*! Argument struct for ast_ari_channels_start_silence() */ |
| 528 | struct ast_ari_channels_start_silence_args { |
| 529 | /*! Channel's id */ |
| 530 | const char *channel_id; |
| 531 | }; |
| 532 | /*! |
| 533 | * \brief Play silence to a channel. |
| 534 | * |
| 535 | * Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically. |
| 536 | * |
| 537 | * \param headers HTTP headers |
| 538 | * \param args Swagger parameters |
| 539 | * \param[out] response HTTP response |
| 540 | */ |
| 541 | void ast_ari_channels_start_silence(struct ast_variable *headers, struct ast_ari_channels_start_silence_args *args, struct ast_ari_response *response); |
| 542 | /*! Argument struct for ast_ari_channels_stop_silence() */ |
| 543 | struct ast_ari_channels_stop_silence_args { |
| 544 | /*! Channel's id */ |
| 545 | const char *channel_id; |
| 546 | }; |
| 547 | /*! |
| 548 | * \brief Stop playing silence to a channel. |
| 549 | * |
| 550 | * \param headers HTTP headers |
| 551 | * \param args Swagger parameters |
| 552 | * \param[out] response HTTP response |
| 553 | */ |
| 554 | void ast_ari_channels_stop_silence(struct ast_variable *headers, struct ast_ari_channels_stop_silence_args *args, struct ast_ari_response *response); |
| 555 | /*! Argument struct for ast_ari_channels_play() */ |
| 556 | struct ast_ari_channels_play_args { |
| 557 | /*! Channel's id */ |
| 558 | const char *channel_id; |
| 559 | /*! Array of Media URIs to play. */ |
| 560 | const char **media; |
| 561 | /*! Length of media array. */ |
| 562 | size_t media_count; |
| 563 | /*! Parsing context for media. */ |
| 564 | char *media_parse; |
| 565 | /*! For sounds, selects language for sound. */ |
| 566 | const char *lang; |
| 567 | /*! Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified. */ |
| 568 | int offsetms; |
| 569 | /*! Number of milliseconds to skip for forward/reverse operations. */ |
| 570 | int skipms; |
| 571 | /*! Playback ID. */ |
| 572 | const char *playback_id; |
| 573 | }; |
| 574 | /*! |
| 575 | * \brief Body parsing function for /channels/{channelId}/play. |
| 576 | * \param body The JSON body from which to parse parameters. |
| 577 | * \param[out] args The args structure to parse into. |
| 578 | * \retval zero on success |
| 579 | * \retval non-zero on failure |
| 580 | */ |
| 581 | int ast_ari_channels_play_parse_body( |
| 582 | struct ast_json *body, |
| 583 | struct ast_ari_channels_play_args *args); |
| 584 | |
| 585 | /*! |
| 586 | * \brief Start playback of media. |
| 587 | * |
| 588 | * 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.) |
| 589 | * |
| 590 | * \param headers HTTP headers |
| 591 | * \param args Swagger parameters |
| 592 | * \param[out] response HTTP response |
| 593 | */ |
| 594 | void ast_ari_channels_play(struct ast_variable *headers, struct ast_ari_channels_play_args *args, struct ast_ari_response *response); |
| 595 | /*! Argument struct for ast_ari_channels_play_with_id() */ |
| 596 | struct ast_ari_channels_play_with_id_args { |
| 597 | /*! Channel's id */ |
| 598 | const char *channel_id; |
| 599 | /*! Playback ID. */ |
| 600 | const char *playback_id; |
| 601 | /*! Array of Media URIs to play. */ |
| 602 | const char **media; |
| 603 | /*! Length of media array. */ |
| 604 | size_t media_count; |
| 605 | /*! Parsing context for media. */ |
| 606 | char *media_parse; |
| 607 | /*! For sounds, selects language for sound. */ |
| 608 | const char *lang; |
| 609 | /*! Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified. */ |
| 610 | int offsetms; |
| 611 | /*! Number of milliseconds to skip for forward/reverse operations. */ |
| 612 | int skipms; |
| 613 | }; |
| 614 | /*! |
| 615 | * \brief Body parsing function for /channels/{channelId}/play/{playbackId}. |
| 616 | * \param body The JSON body from which to parse parameters. |
| 617 | * \param[out] args The args structure to parse into. |
| 618 | * \retval zero on success |
| 619 | * \retval non-zero on failure |
| 620 | */ |
| 621 | int ast_ari_channels_play_with_id_parse_body( |
| 622 | struct ast_json *body, |
| 623 | struct ast_ari_channels_play_with_id_args *args); |
| 624 | |
| 625 | /*! |
| 626 | * \brief Start playback of media and specify the playbackId. |
| 627 | * |
| 628 | * 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.) |
| 629 | * |
| 630 | * \param headers HTTP headers |
| 631 | * \param args Swagger parameters |
| 632 | * \param[out] response HTTP response |
| 633 | */ |
| 634 | 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); |
| 635 | /*! Argument struct for ast_ari_channels_record() */ |
| 636 | struct ast_ari_channels_record_args { |
| 637 | /*! Channel's id */ |
| 638 | const char *channel_id; |
| 639 | /*! Recording's filename */ |
| 640 | const char *name; |
| 641 | /*! Format to encode audio in */ |
| 642 | const char *format; |
| 643 | /*! Maximum duration of the recording, in seconds. 0 for no limit */ |
| 644 | int max_duration_seconds; |
| 645 | /*! Maximum duration of silence, in seconds. 0 for no limit */ |
| 646 | int max_silence_seconds; |
| 647 | /*! Action to take if a recording with the same name already exists. */ |
| 648 | const char *if_exists; |
| 649 | /*! Play beep when recording begins */ |
| 650 | int beep; |
| 651 | /*! DTMF input to terminate recording */ |
| 652 | const char *terminate_on; |
| 653 | }; |
| 654 | /*! |
| 655 | * \brief Body parsing function for /channels/{channelId}/record. |
| 656 | * \param body The JSON body from which to parse parameters. |
| 657 | * \param[out] args The args structure to parse into. |
| 658 | * \retval zero on success |
| 659 | * \retval non-zero on failure |
| 660 | */ |
| 661 | int ast_ari_channels_record_parse_body( |
| 662 | struct ast_json *body, |
| 663 | struct ast_ari_channels_record_args *args); |
| 664 | |
| 665 | /*! |
| 666 | * \brief Start a recording. |
| 667 | * |
| 668 | * 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. |
| 669 | * |
| 670 | * \param headers HTTP headers |
| 671 | * \param args Swagger parameters |
| 672 | * \param[out] response HTTP response |
| 673 | */ |
| 674 | void ast_ari_channels_record(struct ast_variable *headers, struct ast_ari_channels_record_args *args, struct ast_ari_response *response); |
| 675 | /*! Argument struct for ast_ari_channels_get_channel_var() */ |
| 676 | struct ast_ari_channels_get_channel_var_args { |
| 677 | /*! Channel's id */ |
| 678 | const char *channel_id; |
| 679 | /*! The channel variable or function to get */ |
| 680 | const char *variable; |
| 681 | }; |
| 682 | /*! |
| 683 | * \brief Body parsing function for /channels/{channelId}/variable. |
| 684 | * \param body The JSON body from which to parse parameters. |
| 685 | * \param[out] args The args structure to parse into. |
| 686 | * \retval zero on success |
| 687 | * \retval non-zero on failure |
| 688 | */ |
| 689 | int ast_ari_channels_get_channel_var_parse_body( |
| 690 | struct ast_json *body, |
| 691 | struct ast_ari_channels_get_channel_var_args *args); |
| 692 | |
| 693 | /*! |
| 694 | * \brief Get the value of a channel variable or function. |
| 695 | * |
| 696 | * \param headers HTTP headers |
| 697 | * \param args Swagger parameters |
| 698 | * \param[out] response HTTP response |
| 699 | */ |
| 700 | 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); |
| 701 | /*! Argument struct for ast_ari_channels_set_channel_var() */ |
| 702 | struct ast_ari_channels_set_channel_var_args { |
| 703 | /*! Channel's id */ |
| 704 | const char *channel_id; |
| 705 | /*! The channel variable or function to set */ |
| 706 | const char *variable; |
| 707 | /*! The value to set the variable to */ |
| 708 | const char *value; |
| 709 | /*! Whether this variable should be included in channel events. Defaults to false. */ |
| 710 | int report_events; |
| 711 | }; |
| 712 | /*! |
| 713 | * \brief Body parsing function for /channels/{channelId}/variable. |
| 714 | * \param body The JSON body from which to parse parameters. |
| 715 | * \param[out] args The args structure to parse into. |
| 716 | * \retval zero on success |
| 717 | * \retval non-zero on failure |
| 718 | */ |
| 719 | int ast_ari_channels_set_channel_var_parse_body( |
| 720 | struct ast_json *body, |
| 721 | struct ast_ari_channels_set_channel_var_args *args); |
| 722 | |
| 723 | /*! |
| 724 | * \brief Set the value of a channel variable or function. |
| 725 | * |
| 726 | * \param headers HTTP headers |
| 727 | * \param args Swagger parameters |
| 728 | * \param[out] response HTTP response |
| 729 | */ |
| 730 | 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); |
| 731 | /*! Argument struct for ast_ari_channels_get_channel_vars() */ |
| 732 | struct ast_ari_channels_get_channel_vars_args { |
| 733 | /*! Channel's id */ |
| 734 | const char *channel_id; |
| 735 | /*! Array of The channel variables or functions to get */ |
| 736 | const char **variables; |
| 737 | /*! Length of variables array. */ |
| 738 | size_t variables_count; |
| 739 | /*! Parsing context for variables. */ |
| 740 | char *variables_parse; |
| 741 | }; |
| 742 | /*! |
| 743 | * \brief Body parsing function for /channels/{channelId}/variables. |
| 744 | * \param body The JSON body from which to parse parameters. |
| 745 | * \param[out] args The args structure to parse into. |
| 746 | * \retval zero on success |
| 747 | * \retval non-zero on failure |
| 748 | */ |
| 749 | int ast_ari_channels_get_channel_vars_parse_body( |
| 750 | struct ast_json *body, |
| 751 | struct ast_ari_channels_get_channel_vars_args *args); |
| 752 | |
| 753 | /*! |
| 754 | * \brief Get the value of multiple channel variables or functions. |
| 755 | * |
| 756 | * \param headers HTTP headers |
| 757 | * \param args Swagger parameters |
| 758 | * \param[out] response HTTP response |
| 759 | */ |
| 760 | void ast_ari_channels_get_channel_vars(struct ast_variable *headers, struct ast_ari_channels_get_channel_vars_args *args, struct ast_ari_response *response); |
| 761 | /*! Argument struct for ast_ari_channels_set_channel_vars() */ |
| 762 | struct ast_ari_channels_set_channel_vars_args { |
| 763 | /*! Channel's id */ |
| 764 | const char *channel_id; |
| 765 | /*! The "variables" key in the body object holds variable key/value pairs to set on the channel. 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 channel events (defaults to false). Ex. { "variables": { "CALLERID(name)": "Alice", "Call_State": { "value": "WaitingForAgent", "report_events": true } } } */ |
| 766 | struct ast_json *variables; |
| 767 | }; |
| 768 | /*! |
| 769 | * \brief Body parsing function for /channels/{channelId}/variables. |
| 770 | * \param body The JSON body from which to parse parameters. |
| 771 | * \param[out] args The args structure to parse into. |
| 772 | * \retval zero on success |
| 773 | * \retval non-zero on failure |
| 774 | */ |
| 775 | int ast_ari_channels_set_channel_vars_parse_body( |
| 776 | struct ast_json *body, |
| 777 | struct ast_ari_channels_set_channel_vars_args *args); |
| 778 | |
| 779 | /*! |
| 780 | * \brief Set the values of multiple channel variables or functions. |
| 781 | * |
| 782 | * \param headers HTTP headers |
| 783 | * \param args Swagger parameters |
| 784 | * \param[out] response HTTP response |
| 785 | */ |
| 786 | void ast_ari_channels_set_channel_vars(struct ast_variable *headers, struct ast_ari_channels_set_channel_vars_args *args, struct ast_ari_response *response); |
| 787 | /*! Argument struct for ast_ari_channels_snoop_channel() */ |
| 788 | struct ast_ari_channels_snoop_channel_args { |
| 789 | /*! Channel's id */ |
| 790 | const char *channel_id; |
| 791 | /*! Direction of audio to spy on */ |
| 792 | const char *spy; |
| 793 | /*! Direction of audio to whisper into */ |
| 794 | const char *whisper; |
| 795 | /*! Application the snooping channel is placed into */ |
| 796 | const char *app; |
| 797 | /*! The application arguments to pass to the Stasis application */ |
| 798 | const char *app_args; |
| 799 | /*! Unique ID to assign to snooping channel */ |
| 800 | const char *snoop_id; |
| 801 | }; |
| 802 | /*! |
| 803 | * \brief Body parsing function for /channels/{channelId}/snoop. |
| 804 | * \param body The JSON body from which to parse parameters. |
| 805 | * \param[out] args The args structure to parse into. |
| 806 | * \retval zero on success |
| 807 | * \retval non-zero on failure |
| 808 | */ |
| 809 | int ast_ari_channels_snoop_channel_parse_body( |
| 810 | struct ast_json *body, |
| 811 | struct ast_ari_channels_snoop_channel_args *args); |
| 812 | |
| 813 | /*! |
| 814 | * \brief Start snooping. |
| 815 | * |
| 816 | * Snoop (spy/whisper) on a specific channel. |
| 817 | * |
| 818 | * \param headers HTTP headers |
| 819 | * \param args Swagger parameters |
| 820 | * \param[out] response HTTP response |
| 821 | */ |
| 822 | void ast_ari_channels_snoop_channel(struct ast_variable *headers, struct ast_ari_channels_snoop_channel_args *args, struct ast_ari_response *response); |
| 823 | /*! Argument struct for ast_ari_channels_snoop_channel_with_id() */ |
| 824 | struct ast_ari_channels_snoop_channel_with_id_args { |
| 825 | /*! Channel's id */ |
| 826 | const char *channel_id; |
| 827 | /*! Unique ID to assign to snooping channel */ |
| 828 | const char *snoop_id; |
| 829 | /*! Direction of audio to spy on */ |
| 830 | const char *spy; |
| 831 | /*! Direction of audio to whisper into */ |
| 832 | const char *whisper; |
| 833 | /*! Application the snooping channel is placed into */ |
| 834 | const char *app; |
| 835 | /*! The application arguments to pass to the Stasis application */ |
| 836 | const char *app_args; |
| 837 | }; |
| 838 | /*! |
| 839 | * \brief Body parsing function for /channels/{channelId}/snoop/{snoopId}. |
| 840 | * \param body The JSON body from which to parse parameters. |
| 841 | * \param[out] args The args structure to parse into. |
| 842 | * \retval zero on success |
| 843 | * \retval non-zero on failure |
| 844 | */ |
| 845 | int ast_ari_channels_snoop_channel_with_id_parse_body( |
| 846 | struct ast_json *body, |
| 847 | struct ast_ari_channels_snoop_channel_with_id_args *args); |
| 848 | |
| 849 | /*! |
| 850 | * \brief Start snooping. |
| 851 | * |
| 852 | * Snoop (spy/whisper) on a specific channel. |
| 853 | * |
| 854 | * \param headers HTTP headers |
| 855 | * \param args Swagger parameters |
| 856 | * \param[out] response HTTP response |
| 857 | */ |
| 858 | 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); |
| 859 | /*! Argument struct for ast_ari_channels_dial() */ |
| 860 | struct ast_ari_channels_dial_args { |
| 861 | /*! Channel's id */ |
| 862 | const char *channel_id; |
| 863 | /*! Channel ID of caller */ |
| 864 | const char *caller; |
| 865 | /*! Dial timeout */ |
| 866 | int timeout; |
| 867 | }; |
| 868 | /*! |
| 869 | * \brief Body parsing function for /channels/{channelId}/dial. |
| 870 | * \param body The JSON body from which to parse parameters. |
| 871 | * \param[out] args The args structure to parse into. |
| 872 | * \retval zero on success |
| 873 | * \retval non-zero on failure |
| 874 | */ |
| 875 | int ast_ari_channels_dial_parse_body( |
| 876 | struct ast_json *body, |
| 877 | struct ast_ari_channels_dial_args *args); |
| 878 | |
| 879 | /*! |
| 880 | * \brief Dial a created channel. |
| 881 | * |
| 882 | * \param headers HTTP headers |
| 883 | * \param args Swagger parameters |
| 884 | * \param[out] response HTTP response |
| 885 | */ |
| 886 | void ast_ari_channels_dial(struct ast_variable *headers, struct ast_ari_channels_dial_args *args, struct ast_ari_response *response); |
| 887 | /*! Argument struct for ast_ari_channels_rtpstatistics() */ |
| 888 | struct ast_ari_channels_rtpstatistics_args { |
| 889 | /*! Channel's id */ |
| 890 | const char *channel_id; |
| 891 | }; |
| 892 | /*! |
| 893 | * \brief RTP stats on a channel. |
| 894 | * |
| 895 | * \param headers HTTP headers |
| 896 | * \param args Swagger parameters |
| 897 | * \param[out] response HTTP response |
| 898 | */ |
| 899 | void ast_ari_channels_rtpstatistics(struct ast_variable *headers, struct ast_ari_channels_rtpstatistics_args *args, struct ast_ari_response *response); |
| 900 | /*! Argument struct for ast_ari_channels_external_media() */ |
| 901 | struct ast_ari_channels_external_media_args { |
| 902 | /*! The unique id to assign the channel on creation. */ |
| 903 | const char *channel_id; |
| 904 | /*! Stasis Application to place channel into */ |
| 905 | const char *app; |
| 906 | /*! The "variables" key in the body object holds variable key/value pairs to set on the channel on creation. 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 channel events (defaults to false). Other keys in the body object are interpreted as query parameters. Ex. { "endpoint": "SIP/Alice", "variables": { "CALLERID(name)": "Alice", "Call_State": { "value": "WaitingForAgent", "report_events": true } } } */ |
| 907 | struct ast_json *variables; |
| 908 | /*! Hostname/ip:port or websocket_client connection ID of external host. May be empty for a websocket server connection. */ |
| 909 | const char *external_host; |
| 910 | /*! Payload encapsulation protocol. Must be 'none' for the websocket transport. */ |
| 911 | const char *encapsulation; |
| 912 | /*! Transport protocol */ |
| 913 | const char *transport; |
| 914 | /*! Connection type (client/server). 'server' is only valid for the websocket transport. */ |
| 915 | const char *connection_type; |
| 916 | /*! Format to encode audio in */ |
| 917 | const char *format; |
| 918 | /*! External media direction */ |
| 919 | const char *direction; |
| 920 | /*! An arbitrary data field */ |
| 921 | const char *data; |
| 922 | /*! Transport-specific data. For websocket this is appended to the dialstring. */ |
| 923 | const char *transport_data; |
| 924 | }; |
| 925 | /*! |
| 926 | * \brief Body parsing function for /channels/externalMedia. |
| 927 | * \param body The JSON body from which to parse parameters. |
| 928 | * \param[out] args The args structure to parse into. |
| 929 | * \retval zero on success |
| 930 | * \retval non-zero on failure |
| 931 | */ |
| 932 | int ast_ari_channels_external_media_parse_body( |
| 933 | struct ast_json *body, |
| 934 | struct ast_ari_channels_external_media_args *args); |
| 935 | |
| 936 | /*! |
| 937 | * \brief Start an External Media session. |
| 938 | * |
| 939 | * Create a channel to an External Media source/sink. The combination of transport and encapsulation will select one of chan_rtp(udp/rtp), chan_audiosocket(tcp/audiosocket) or chan_websocket(websocket/none) channel drivers. |
| 940 | * |
| 941 | * \param headers HTTP headers |
| 942 | * \param args Swagger parameters |
| 943 | * \param[out] response HTTP response |
| 944 | */ |
| 945 | void ast_ari_channels_external_media(struct ast_variable *headers, struct ast_ari_channels_external_media_args *args, struct ast_ari_response *response); |
| 946 | /*! Argument struct for ast_ari_channels_transfer_progress() */ |
| 947 | struct ast_ari_channels_transfer_progress_args { |
| 948 | /*! Channel's id */ |
| 949 | const char *channel_id; |
| 950 | /*! The state of the progress */ |
| 951 | const char *states; |
| 952 | }; |
| 953 | /*! |
| 954 | * \brief Body parsing function for /channels/{channelId}/transfer_progress. |
| 955 | * \param body The JSON body from which to parse parameters. |
| 956 | * \param[out] args The args structure to parse into. |
| 957 | * \retval zero on success |
| 958 | * \retval non-zero on failure |
| 959 | */ |
| 960 | int ast_ari_channels_transfer_progress_parse_body( |
| 961 | struct ast_json *body, |
| 962 | struct ast_ari_channels_transfer_progress_args *args); |
| 963 | |
| 964 | /*! |
| 965 | * \brief Inform the channel about the progress of the attended/blind transfer. |
| 966 | * |
| 967 | * \param headers HTTP headers |
| 968 | * \param args Swagger parameters |
| 969 | * \param[out] response HTTP response |
| 970 | */ |
| 971 | void ast_ari_channels_transfer_progress(struct ast_variable *headers, struct ast_ari_channels_transfer_progress_args *args, struct ast_ari_response *response); |
| 972 | |
| 973 | #endif /* _ASTERISK_RESOURCE_CHANNELS_H */ |