resource_channels.h

Go to the documentation of this file.
00001 /*
00002  * Asterisk -- An open source telephony toolkit.
00003  *
00004  * Copyright (C) 2012 - 2013, Digium, Inc.
00005  *
00006  * David M. Lee, II <dlee@digium.com>
00007  *
00008  * See http://www.asterisk.org for more information about
00009  * the Asterisk project. Please do not directly contact
00010  * any of the maintainers of this project for assistance;
00011  * the project provides a web site, mailing lists and IRC
00012  * channels for your use.
00013  *
00014  * This program is free software, distributed under the terms of
00015  * the GNU General Public License Version 2. See the LICENSE file
00016  * at the top of the source tree.
00017  */
00018 
00019 /*! \file
00020  *
00021  * \brief Generated file - declares stubs to be implemented in
00022  * res/ari/resource_channels.c
00023  *
00024  * Channel resources
00025  *
00026  * \author David M. Lee, II <dlee@digium.com>
00027  */
00028 
00029 /*
00030  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00031  * !!!!!                               DO NOT EDIT                        !!!!!
00032  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00033  * This file is generated by a mustache template. Please see the original
00034  * template in rest-api-templates/ari_resource.h.mustache
00035  */
00036 
00037 #ifndef _ASTERISK_RESOURCE_CHANNELS_H
00038 #define _ASTERISK_RESOURCE_CHANNELS_H
00039 
00040 #include "asterisk/ari.h"
00041 
00042 /*! Argument struct for ast_ari_channels_list() */
00043 struct ast_ari_channels_list_args {
00044 };
00045 /*!
00046  * \brief List all active channels in Asterisk.
00047  *
00048  * \param headers HTTP headers
00049  * \param args Swagger parameters
00050  * \param[out] response HTTP response
00051  */
00052 void ast_ari_channels_list(struct ast_variable *headers, struct ast_ari_channels_list_args *args, struct ast_ari_response *response);
00053 /*! Argument struct for ast_ari_channels_originate() */
00054 struct ast_ari_channels_originate_args {
00055    /*! Endpoint to call. */
00056    const char *endpoint;
00057    /*! The extension to dial after the endpoint answers. Mutually exclusive with 'app'. */
00058    const char *extension;
00059    /*! The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'. */
00060    const char *context;
00061    /*! The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'. */
00062    long priority;
00063    /*! The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'. */
00064    const char *label;
00065    /*! 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'. */
00066    const char *app;
00067    /*! The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'. */
00068    const char *app_args;
00069    /*! CallerID to use when dialing the endpoint or extension. */
00070    const char *caller_id;
00071    /*! Timeout (in seconds) before giving up dialing, or -1 for no timeout. */
00072    int timeout;
00073    /*! 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" } } */
00074    struct ast_json *variables;
00075    /*! The unique id to assign the channel on creation. */
00076    const char *channel_id;
00077    /*! The unique id to assign the second channel when using local channels. */
00078    const char *other_channel_id;
00079    /*! The unique id of the channel which is originating this one. */
00080    const char *originator;
00081 };
00082 /*!
00083  * \brief Body parsing function for /channels.
00084  * \param body The JSON body from which to parse parameters.
00085  * \param[out] args The args structure to parse into.
00086  * \retval zero on success
00087  * \retval non-zero on failure
00088  */
00089 int ast_ari_channels_originate_parse_body(
00090    struct ast_json *body,
00091    struct ast_ari_channels_originate_args *args);
00092 
00093 /*!
00094  * \brief Create a new channel (originate).
00095  *
00096  * 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.
00097  *
00098  * \param headers HTTP headers
00099  * \param args Swagger parameters
00100  * \param[out] response HTTP response
00101  */
00102 void ast_ari_channels_originate(struct ast_variable *headers, struct ast_ari_channels_originate_args *args, struct ast_ari_response *response);
00103 /*! Argument struct for ast_ari_channels_get() */
00104 struct ast_ari_channels_get_args {
00105    /*! Channel's id */
00106    const char *channel_id;
00107 };
00108 /*!
00109  * \brief Channel details.
00110  *
00111  * \param headers HTTP headers
00112  * \param args Swagger parameters
00113  * \param[out] response HTTP response
00114  */
00115 void ast_ari_channels_get(struct ast_variable *headers, struct ast_ari_channels_get_args *args, struct ast_ari_response *response);
00116 /*! Argument struct for ast_ari_channels_originate_with_id() */
00117 struct ast_ari_channels_originate_with_id_args {
00118    /*! The unique id to assign the channel on creation. */
00119    const char *channel_id;
00120    /*! Endpoint to call. */
00121    const char *endpoint;
00122    /*! The extension to dial after the endpoint answers. Mutually exclusive with 'app'. */
00123    const char *extension;
00124    /*! The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'. */
00125    const char *context;
00126    /*! The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'. */
00127    long priority;
00128    /*! The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'. */
00129    const char *label;
00130    /*! 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'. */
00131    const char *app;
00132    /*! The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'. */
00133    const char *app_args;
00134    /*! CallerID to use when dialing the endpoint or extension. */
00135    const char *caller_id;
00136    /*! Timeout (in seconds) before giving up dialing, or -1 for no timeout. */
00137    int timeout;
00138    /*! 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" } } */
00139    struct ast_json *variables;
00140    /*! The unique id to assign the second channel when using local channels. */
00141    const char *other_channel_id;
00142    /*! The unique id of the channel which is originating this one. */
00143    const char *originator;
00144 };
00145 /*!
00146  * \brief Body parsing function for /channels/{channelId}.
00147  * \param body The JSON body from which to parse parameters.
00148  * \param[out] args The args structure to parse into.
00149  * \retval zero on success
00150  * \retval non-zero on failure
00151  */
00152 int ast_ari_channels_originate_with_id_parse_body(
00153    struct ast_json *body,
00154    struct ast_ari_channels_originate_with_id_args *args);
00155 
00156 /*!
00157  * \brief Create a new channel (originate with id).
00158  *
00159  * 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.
00160  *
00161  * \param headers HTTP headers
00162  * \param args Swagger parameters
00163  * \param[out] response HTTP response
00164  */
00165 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);
00166 /*! Argument struct for ast_ari_channels_hangup() */
00167 struct ast_ari_channels_hangup_args {
00168    /*! Channel's id */
00169    const char *channel_id;
00170    /*! Reason for hanging up the channel */
00171    const char *reason;
00172 };
00173 /*!
00174  * \brief Body parsing function for /channels/{channelId}.
00175  * \param body The JSON body from which to parse parameters.
00176  * \param[out] args The args structure to parse into.
00177  * \retval zero on success
00178  * \retval non-zero on failure
00179  */
00180 int ast_ari_channels_hangup_parse_body(
00181    struct ast_json *body,
00182    struct ast_ari_channels_hangup_args *args);
00183 
00184 /*!
00185  * \brief Delete (i.e. hangup) a channel.
00186  *
00187  * \param headers HTTP headers
00188  * \param args Swagger parameters
00189  * \param[out] response HTTP response
00190  */
00191 void ast_ari_channels_hangup(struct ast_variable *headers, struct ast_ari_channels_hangup_args *args, struct ast_ari_response *response);
00192 /*! Argument struct for ast_ari_channels_continue_in_dialplan() */
00193 struct ast_ari_channels_continue_in_dialplan_args {
00194    /*! Channel's id */
00195    const char *channel_id;
00196    /*! The context to continue to. */
00197    const char *context;
00198    /*! The extension to continue to. */
00199    const char *extension;
00200    /*! The priority to continue to. */
00201    int priority;
00202    /*! The label to continue to - will supersede 'priority' if both are provided. */
00203    const char *label;
00204 };
00205 /*!
00206  * \brief Body parsing function for /channels/{channelId}/continue.
00207  * \param body The JSON body from which to parse parameters.
00208  * \param[out] args The args structure to parse into.
00209  * \retval zero on success
00210  * \retval non-zero on failure
00211  */
00212 int ast_ari_channels_continue_in_dialplan_parse_body(
00213    struct ast_json *body,
00214    struct ast_ari_channels_continue_in_dialplan_args *args);
00215 
00216 /*!
00217  * \brief Exit application; continue execution in the dialplan.
00218  *
00219  * \param headers HTTP headers
00220  * \param args Swagger parameters
00221  * \param[out] response HTTP response
00222  */
00223 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);
00224 /*! Argument struct for ast_ari_channels_redirect() */
00225 struct ast_ari_channels_redirect_args {
00226    /*! Channel's id */
00227    const char *channel_id;
00228    /*! The endpoint to redirect the channel to */
00229    const char *endpoint;
00230 };
00231 /*!
00232  * \brief Body parsing function for /channels/{channelId}/redirect.
00233  * \param body The JSON body from which to parse parameters.
00234  * \param[out] args The args structure to parse into.
00235  * \retval zero on success
00236  * \retval non-zero on failure
00237  */
00238 int ast_ari_channels_redirect_parse_body(
00239    struct ast_json *body,
00240    struct ast_ari_channels_redirect_args *args);
00241 
00242 /*!
00243  * \brief Redirect the channel to a different location.
00244  *
00245  * \param headers HTTP headers
00246  * \param args Swagger parameters
00247  * \param[out] response HTTP response
00248  */
00249 void ast_ari_channels_redirect(struct ast_variable *headers, struct ast_ari_channels_redirect_args *args, struct ast_ari_response *response);
00250 /*! Argument struct for ast_ari_channels_answer() */
00251 struct ast_ari_channels_answer_args {
00252    /*! Channel's id */
00253    const char *channel_id;
00254 };
00255 /*!
00256  * \brief Answer a channel.
00257  *
00258  * \param headers HTTP headers
00259  * \param args Swagger parameters
00260  * \param[out] response HTTP response
00261  */
00262 void ast_ari_channels_answer(struct ast_variable *headers, struct ast_ari_channels_answer_args *args, struct ast_ari_response *response);
00263 /*! Argument struct for ast_ari_channels_ring() */
00264 struct ast_ari_channels_ring_args {
00265    /*! Channel's id */
00266    const char *channel_id;
00267 };
00268 /*!
00269  * \brief Indicate ringing to a channel.
00270  *
00271  * \param headers HTTP headers
00272  * \param args Swagger parameters
00273  * \param[out] response HTTP response
00274  */
00275 void ast_ari_channels_ring(struct ast_variable *headers, struct ast_ari_channels_ring_args *args, struct ast_ari_response *response);
00276 /*! Argument struct for ast_ari_channels_ring_stop() */
00277 struct ast_ari_channels_ring_stop_args {
00278    /*! Channel's id */
00279    const char *channel_id;
00280 };
00281 /*!
00282  * \brief Stop ringing indication on a channel if locally generated.
00283  *
00284  * \param headers HTTP headers
00285  * \param args Swagger parameters
00286  * \param[out] response HTTP response
00287  */
00288 void ast_ari_channels_ring_stop(struct ast_variable *headers, struct ast_ari_channels_ring_stop_args *args, struct ast_ari_response *response);
00289 /*! Argument struct for ast_ari_channels_send_dtmf() */
00290 struct ast_ari_channels_send_dtmf_args {
00291    /*! Channel's id */
00292    const char *channel_id;
00293    /*! DTMF To send. */
00294    const char *dtmf;
00295    /*! Amount of time to wait before DTMF digits (specified in milliseconds) start. */
00296    int before;
00297    /*! Amount of time in between DTMF digits (specified in milliseconds). */
00298    int between;
00299    /*! Length of each DTMF digit (specified in milliseconds). */
00300    int duration;
00301    /*! Amount of time to wait after DTMF digits (specified in milliseconds) end. */
00302    int after;
00303 };
00304 /*!
00305  * \brief Body parsing function for /channels/{channelId}/dtmf.
00306  * \param body The JSON body from which to parse parameters.
00307  * \param[out] args The args structure to parse into.
00308  * \retval zero on success
00309  * \retval non-zero on failure
00310  */
00311 int ast_ari_channels_send_dtmf_parse_body(
00312    struct ast_json *body,
00313    struct ast_ari_channels_send_dtmf_args *args);
00314 
00315 /*!
00316  * \brief Send provided DTMF to a given channel.
00317  *
00318  * \param headers HTTP headers
00319  * \param args Swagger parameters
00320  * \param[out] response HTTP response
00321  */
00322 void ast_ari_channels_send_dtmf(struct ast_variable *headers, struct ast_ari_channels_send_dtmf_args *args, struct ast_ari_response *response);
00323 /*! Argument struct for ast_ari_channels_mute() */
00324 struct ast_ari_channels_mute_args {
00325    /*! Channel's id */
00326    const char *channel_id;
00327    /*! Direction in which to mute audio */
00328    const char *direction;
00329 };
00330 /*!
00331  * \brief Body parsing function for /channels/{channelId}/mute.
00332  * \param body The JSON body from which to parse parameters.
00333  * \param[out] args The args structure to parse into.
00334  * \retval zero on success
00335  * \retval non-zero on failure
00336  */
00337 int ast_ari_channels_mute_parse_body(
00338    struct ast_json *body,
00339    struct ast_ari_channels_mute_args *args);
00340 
00341 /*!
00342  * \brief Mute a channel.
00343  *
00344  * \param headers HTTP headers
00345  * \param args Swagger parameters
00346  * \param[out] response HTTP response
00347  */
00348 void ast_ari_channels_mute(struct ast_variable *headers, struct ast_ari_channels_mute_args *args, struct ast_ari_response *response);
00349 /*! Argument struct for ast_ari_channels_unmute() */
00350 struct ast_ari_channels_unmute_args {
00351    /*! Channel's id */
00352    const char *channel_id;
00353    /*! Direction in which to unmute audio */
00354    const char *direction;
00355 };
00356 /*!
00357  * \brief Body parsing function for /channels/{channelId}/mute.
00358  * \param body The JSON body from which to parse parameters.
00359  * \param[out] args The args structure to parse into.
00360  * \retval zero on success
00361  * \retval non-zero on failure
00362  */
00363 int ast_ari_channels_unmute_parse_body(
00364    struct ast_json *body,
00365    struct ast_ari_channels_unmute_args *args);
00366 
00367 /*!
00368  * \brief Unmute a channel.
00369  *
00370  * \param headers HTTP headers
00371  * \param args Swagger parameters
00372  * \param[out] response HTTP response
00373  */
00374 void ast_ari_channels_unmute(struct ast_variable *headers, struct ast_ari_channels_unmute_args *args, struct ast_ari_response *response);
00375 /*! Argument struct for ast_ari_channels_hold() */
00376 struct ast_ari_channels_hold_args {
00377    /*! Channel's id */
00378    const char *channel_id;
00379 };
00380 /*!
00381  * \brief Hold a channel.
00382  *
00383  * \param headers HTTP headers
00384  * \param args Swagger parameters
00385  * \param[out] response HTTP response
00386  */
00387 void ast_ari_channels_hold(struct ast_variable *headers, struct ast_ari_channels_hold_args *args, struct ast_ari_response *response);
00388 /*! Argument struct for ast_ari_channels_unhold() */
00389 struct ast_ari_channels_unhold_args {
00390    /*! Channel's id */
00391    const char *channel_id;
00392 };
00393 /*!
00394  * \brief Remove a channel from hold.
00395  *
00396  * \param headers HTTP headers
00397  * \param args Swagger parameters
00398  * \param[out] response HTTP response
00399  */
00400 void ast_ari_channels_unhold(struct ast_variable *headers, struct ast_ari_channels_unhold_args *args, struct ast_ari_response *response);
00401 /*! Argument struct for ast_ari_channels_start_moh() */
00402 struct ast_ari_channels_start_moh_args {
00403    /*! Channel's id */
00404    const char *channel_id;
00405    /*! Music on hold class to use */
00406    const char *moh_class;
00407 };
00408 /*!
00409  * \brief Body parsing function for /channels/{channelId}/moh.
00410  * \param body The JSON body from which to parse parameters.
00411  * \param[out] args The args structure to parse into.
00412  * \retval zero on success
00413  * \retval non-zero on failure
00414  */
00415 int ast_ari_channels_start_moh_parse_body(
00416    struct ast_json *body,
00417    struct ast_ari_channels_start_moh_args *args);
00418 
00419 /*!
00420  * \brief Play music on hold to a channel.
00421  *
00422  * 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.
00423  *
00424  * \param headers HTTP headers
00425  * \param args Swagger parameters
00426  * \param[out] response HTTP response
00427  */
00428 void ast_ari_channels_start_moh(struct ast_variable *headers, struct ast_ari_channels_start_moh_args *args, struct ast_ari_response *response);
00429 /*! Argument struct for ast_ari_channels_stop_moh() */
00430 struct ast_ari_channels_stop_moh_args {
00431    /*! Channel's id */
00432    const char *channel_id;
00433 };
00434 /*!
00435  * \brief Stop playing music on hold to a channel.
00436  *
00437  * \param headers HTTP headers
00438  * \param args Swagger parameters
00439  * \param[out] response HTTP response
00440  */
00441 void ast_ari_channels_stop_moh(struct ast_variable *headers, struct ast_ari_channels_stop_moh_args *args, struct ast_ari_response *response);
00442 /*! Argument struct for ast_ari_channels_start_silence() */
00443 struct ast_ari_channels_start_silence_args {
00444    /*! Channel's id */
00445    const char *channel_id;
00446 };
00447 /*!
00448  * \brief Play silence to a channel.
00449  *
00450  * Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.
00451  *
00452  * \param headers HTTP headers
00453  * \param args Swagger parameters
00454  * \param[out] response HTTP response
00455  */
00456 void ast_ari_channels_start_silence(struct ast_variable *headers, struct ast_ari_channels_start_silence_args *args, struct ast_ari_response *response);
00457 /*! Argument struct for ast_ari_channels_stop_silence() */
00458 struct ast_ari_channels_stop_silence_args {
00459    /*! Channel's id */
00460    const char *channel_id;
00461 };
00462 /*!
00463  * \brief Stop playing silence to a channel.
00464  *
00465  * \param headers HTTP headers
00466  * \param args Swagger parameters
00467  * \param[out] response HTTP response
00468  */
00469 void ast_ari_channels_stop_silence(struct ast_variable *headers, struct ast_ari_channels_stop_silence_args *args, struct ast_ari_response *response);
00470 /*! Argument struct for ast_ari_channels_play() */
00471 struct ast_ari_channels_play_args {
00472    /*! Channel's id */
00473    const char *channel_id;
00474    /*! Media's URI to play. */
00475    const char *media;
00476    /*! For sounds, selects language for sound. */
00477    const char *lang;
00478    /*! Number of media to skip before playing. */
00479    int offsetms;
00480    /*! Number of milliseconds to skip for forward/reverse operations. */
00481    int skipms;
00482    /*! Playback ID. */
00483    const char *playback_id;
00484 };
00485 /*!
00486  * \brief Body parsing function for /channels/{channelId}/play.
00487  * \param body The JSON body from which to parse parameters.
00488  * \param[out] args The args structure to parse into.
00489  * \retval zero on success
00490  * \retval non-zero on failure
00491  */
00492 int ast_ari_channels_play_parse_body(
00493    struct ast_json *body,
00494    struct ast_ari_channels_play_args *args);
00495 
00496 /*!
00497  * \brief Start playback of media.
00498  *
00499  * 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.)
00500  *
00501  * \param headers HTTP headers
00502  * \param args Swagger parameters
00503  * \param[out] response HTTP response
00504  */
00505 void ast_ari_channels_play(struct ast_variable *headers, struct ast_ari_channels_play_args *args, struct ast_ari_response *response);
00506 /*! Argument struct for ast_ari_channels_play_with_id() */
00507 struct ast_ari_channels_play_with_id_args {
00508    /*! Channel's id */
00509    const char *channel_id;
00510    /*! Playback ID. */
00511    const char *playback_id;
00512    /*! Media's URI to play. */
00513    const char *media;
00514    /*! For sounds, selects language for sound. */
00515    const char *lang;
00516    /*! Number of media to skip before playing. */
00517    int offsetms;
00518    /*! Number of milliseconds to skip for forward/reverse operations. */
00519    int skipms;
00520 };
00521 /*!
00522  * \brief Body parsing function for /channels/{channelId}/play/{playbackId}.
00523  * \param body The JSON body from which to parse parameters.
00524  * \param[out] args The args structure to parse into.
00525  * \retval zero on success
00526  * \retval non-zero on failure
00527  */
00528 int ast_ari_channels_play_with_id_parse_body(
00529    struct ast_json *body,
00530    struct ast_ari_channels_play_with_id_args *args);
00531 
00532 /*!
00533  * \brief Start playback of media and specify the playbackId.
00534  *
00535  * 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.)
00536  *
00537  * \param headers HTTP headers
00538  * \param args Swagger parameters
00539  * \param[out] response HTTP response
00540  */
00541 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);
00542 /*! Argument struct for ast_ari_channels_record() */
00543 struct ast_ari_channels_record_args {
00544    /*! Channel's id */
00545    const char *channel_id;
00546    /*! Recording's filename */
00547    const char *name;
00548    /*! Format to encode audio in */
00549    const char *format;
00550    /*! Maximum duration of the recording, in seconds. 0 for no limit */
00551    int max_duration_seconds;
00552    /*! Maximum duration of silence, in seconds. 0 for no limit */
00553    int max_silence_seconds;
00554    /*! Action to take if a recording with the same name already exists. */
00555    const char *if_exists;
00556    /*! Play beep when recording begins */
00557    int beep;
00558    /*! DTMF input to terminate recording */
00559    const char *terminate_on;
00560 };
00561 /*!
00562  * \brief Body parsing function for /channels/{channelId}/record.
00563  * \param body The JSON body from which to parse parameters.
00564  * \param[out] args The args structure to parse into.
00565  * \retval zero on success
00566  * \retval non-zero on failure
00567  */
00568 int ast_ari_channels_record_parse_body(
00569    struct ast_json *body,
00570    struct ast_ari_channels_record_args *args);
00571 
00572 /*!
00573  * \brief Start a recording.
00574  *
00575  * 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.
00576  *
00577  * \param headers HTTP headers
00578  * \param args Swagger parameters
00579  * \param[out] response HTTP response
00580  */
00581 void ast_ari_channels_record(struct ast_variable *headers, struct ast_ari_channels_record_args *args, struct ast_ari_response *response);
00582 /*! Argument struct for ast_ari_channels_get_channel_var() */
00583 struct ast_ari_channels_get_channel_var_args {
00584    /*! Channel's id */
00585    const char *channel_id;
00586    /*! The channel variable or function to get */
00587    const char *variable;
00588 };
00589 /*!
00590  * \brief Body parsing function for /channels/{channelId}/variable.
00591  * \param body The JSON body from which to parse parameters.
00592  * \param[out] args The args structure to parse into.
00593  * \retval zero on success
00594  * \retval non-zero on failure
00595  */
00596 int ast_ari_channels_get_channel_var_parse_body(
00597    struct ast_json *body,
00598    struct ast_ari_channels_get_channel_var_args *args);
00599 
00600 /*!
00601  * \brief Get the value of a channel variable or function.
00602  *
00603  * \param headers HTTP headers
00604  * \param args Swagger parameters
00605  * \param[out] response HTTP response
00606  */
00607 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);
00608 /*! Argument struct for ast_ari_channels_set_channel_var() */
00609 struct ast_ari_channels_set_channel_var_args {
00610    /*! Channel's id */
00611    const char *channel_id;
00612    /*! The channel variable or function to set */
00613    const char *variable;
00614    /*! The value to set the variable to */
00615    const char *value;
00616 };
00617 /*!
00618  * \brief Body parsing function for /channels/{channelId}/variable.
00619  * \param body The JSON body from which to parse parameters.
00620  * \param[out] args The args structure to parse into.
00621  * \retval zero on success
00622  * \retval non-zero on failure
00623  */
00624 int ast_ari_channels_set_channel_var_parse_body(
00625    struct ast_json *body,
00626    struct ast_ari_channels_set_channel_var_args *args);
00627 
00628 /*!
00629  * \brief Set the value of a channel variable or function.
00630  *
00631  * \param headers HTTP headers
00632  * \param args Swagger parameters
00633  * \param[out] response HTTP response
00634  */
00635 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);
00636 /*! Argument struct for ast_ari_channels_snoop_channel() */
00637 struct ast_ari_channels_snoop_channel_args {
00638    /*! Channel's id */
00639    const char *channel_id;
00640    /*! Direction of audio to spy on */
00641    const char *spy;
00642    /*! Direction of audio to whisper into */
00643    const char *whisper;
00644    /*! Application the snooping channel is placed into */
00645    const char *app;
00646    /*! The application arguments to pass to the Stasis application */
00647    const char *app_args;
00648    /*! Unique ID to assign to snooping channel */
00649    const char *snoop_id;
00650 };
00651 /*!
00652  * \brief Body parsing function for /channels/{channelId}/snoop.
00653  * \param body The JSON body from which to parse parameters.
00654  * \param[out] args The args structure to parse into.
00655  * \retval zero on success
00656  * \retval non-zero on failure
00657  */
00658 int ast_ari_channels_snoop_channel_parse_body(
00659    struct ast_json *body,
00660    struct ast_ari_channels_snoop_channel_args *args);
00661 
00662 /*!
00663  * \brief Start snooping.
00664  *
00665  * Snoop (spy/whisper) on a specific channel.
00666  *
00667  * \param headers HTTP headers
00668  * \param args Swagger parameters
00669  * \param[out] response HTTP response
00670  */
00671 void ast_ari_channels_snoop_channel(struct ast_variable *headers, struct ast_ari_channels_snoop_channel_args *args, struct ast_ari_response *response);
00672 /*! Argument struct for ast_ari_channels_snoop_channel_with_id() */
00673 struct ast_ari_channels_snoop_channel_with_id_args {
00674    /*! Channel's id */
00675    const char *channel_id;
00676    /*! Unique ID to assign to snooping channel */
00677    const char *snoop_id;
00678    /*! Direction of audio to spy on */
00679    const char *spy;
00680    /*! Direction of audio to whisper into */
00681    const char *whisper;
00682    /*! Application the snooping channel is placed into */
00683    const char *app;
00684    /*! The application arguments to pass to the Stasis application */
00685    const char *app_args;
00686 };
00687 /*!
00688  * \brief Body parsing function for /channels/{channelId}/snoop/{snoopId}.
00689  * \param body The JSON body from which to parse parameters.
00690  * \param[out] args The args structure to parse into.
00691  * \retval zero on success
00692  * \retval non-zero on failure
00693  */
00694 int ast_ari_channels_snoop_channel_with_id_parse_body(
00695    struct ast_json *body,
00696    struct ast_ari_channels_snoop_channel_with_id_args *args);
00697 
00698 /*!
00699  * \brief Start snooping.
00700  *
00701  * Snoop (spy/whisper) on a specific channel.
00702  *
00703  * \param headers HTTP headers
00704  * \param args Swagger parameters
00705  * \param[out] response HTTP response
00706  */
00707 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);
00708 
00709 #endif /* _ASTERISK_RESOURCE_CHANNELS_H */

Generated on Thu Apr 16 06:27:53 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6