Asterisk - The Open Source Telephony Project
18.5.0
|
Generated file - declares stubs to be implemented in res/ari/resource_channels.c. More...
#include "asterisk/ari.h"
Go to the source code of this file.
Generated file - declares stubs to be implemented in res/ari/resource_channels.c.
Channel resources
Definition in file resource_channels.h.
void ast_ari_channels_answer | ( | struct ast_variable * | headers, |
struct ast_ari_channels_answer_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Answer a channel.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 338 of file resource_channels.c.
References ao2_cleanup, ast_ari_response_error(), ast_ari_response_no_content(), ast_ari_channels_answer_args::channel_id, channel_state_invalid(), find_control(), NULL, RAII_VAR, and stasis_app_control_answer().
Referenced by ast_ari_channels_answer_cb().
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.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 180 of file resource_channels.c.
References ao2_cleanup, ast_ari_response_alloc_failed(), ast_ari_response_error(), ast_ari_response_no_content(), ast_assert, ast_debug, ast_findlabel_extension(), ast_log, AST_LOG_ERROR, ast_strlen_zero, ast_ari_channels_continue_in_dialplan_args::channel_id, channel_state_invalid(), context, ast_ari_channels_continue_in_dialplan_args::context, exten, ast_ari_channels_continue_in_dialplan_args::extension, find_control(), ast_ari_channels_continue_in_dialplan_args::label, NULL, ast_ari_channels_continue_in_dialplan_args::priority, RAII_VAR, S_OR, stasis_app_control_continue(), and stasis_app_control_get_snapshot().
Referenced by ast_ari_channels_continue_in_dialplan_cb().
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.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 681 of file res_ari_channels.c.
References ast_json_integer_get(), ast_json_object_get(), ast_json_string_get(), ast_ari_channels_continue_in_dialplan_args::context, ast_ari_channels_continue_in_dialplan_args::extension, ast_ari_channels_continue_in_dialplan_args::label, and ast_ari_channels_continue_in_dialplan_args::priority.
Referenced by ast_ari_channels_continue_in_dialplan_cb().
void ast_ari_channels_create | ( | struct ast_variable * | headers, |
struct ast_ari_channels_create_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Create channel.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 1778 of file resource_channels.c.
References ao2_bump, ao2_cleanup, ao2_ref, ast_ari_channels_create_args::app, ast_ari_channels_create_args::app_args, ari_channel_thread(), ast_ari_channels_create_parse_body(), ast_ari_response_alloc_failed(), ast_ari_response_error(), ast_ari_response_ok(), ast_calloc, ast_channel_cleanup, ast_channel_errno(), AST_CHANNEL_ERROR_ID_EXISTS, ast_channel_get_by_name(), ast_channel_nativeformats(), ast_channel_snapshot_get_latest(), ast_channel_snapshot_to_json(), ast_channel_uniqueid(), ast_format_cache_get, ast_format_cap_alloc, ast_format_cap_append, ast_format_cap_append_by_type(), AST_FORMAT_CAP_FLAG_DEFAULT, ast_json_object_get(), AST_MEDIA_TYPE_AUDIO, ast_pthread_create_detached, ast_request(), ast_set_variables(), ast_str_append(), ast_str_create, ast_strdupa, ast_strip(), ast_strlen_zero, ari_channel_thread_data::chan, chan_data_destroy(), ast_ari_channels_create_args::channel_id, ast_ari_channels_create_args::endpoint, ast_ari_channels_create_args::formats, json_to_ast_variables(), NULL, ast_ari_channels_create_args::originator, ast_ari_channels_create_args::other_channel_id, save_dialstring(), stasis_app_subscribe_channel(), ari_channel_thread_data::stasis_stuff, strsep(), thread, ast_assigned_ids::uniqueid, ast_assigned_ids::uniqueid2, and ast_ari_channels_create_args::variables.
Referenced by ast_ari_channels_create_cb().
int ast_ari_channels_create_parse_body | ( | struct ast_json * | body, |
struct ast_ari_channels_create_args * | args | ||
) |
Body parsing function for /channels/create.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 264 of file res_ari_channels.c.
References ast_ari_channels_create_args::app, ast_ari_channels_create_args::app_args, ast_json_object_get(), ast_json_string_get(), ast_ari_channels_create_args::channel_id, ast_ari_channels_create_args::endpoint, ast_ari_channels_create_args::formats, ast_ari_channels_create_args::originator, and ast_ari_channels_create_args::other_channel_id.
Referenced by ast_ari_channels_create().
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.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 1939 of file resource_channels.c.
References ao2_cleanup, ast_ari_response_alloc_failed(), ast_ari_response_error(), ast_ari_response_no_content(), ast_channel_adsicpe_set(), ast_channel_caller(), ast_channel_cleanup, ast_channel_connected(), ast_channel_datastore_inherit(), ast_channel_dialed(), ast_channel_get_by_name(), ast_channel_inherit_variables(), ast_channel_language(), ast_channel_lock, ast_channel_lock_both, ast_channel_musicclass(), ast_channel_redirecting(), ast_channel_req_accountcodes(), AST_CHANNEL_REQUESTOR_BRIDGE_PEER, ast_channel_stage_snapshot(), ast_channel_stage_snapshot_done(), ast_channel_transfercapability(), ast_channel_transfercapability_set(), ast_channel_unlock, ast_connected_line_copy_from_caller(), ast_max_forwards_decrement(), ast_party_redirecting_copy(), AST_STATE_DOWN, AST_STATE_RESERVED, ast_strdupa, ast_strlen_zero, ast_ari_channels_dial_args::caller, ast_ari_channels_dial_args::channel_id, find_control(), NULL, RAII_VAR, restore_dialstring(), stasis_app_control_dial(), ast_ari_channels_dial_args::timeout, and ast_party_dialed::transit_network_select.
Referenced by ast_ari_channels_dial_cb().
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.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 2667 of file res_ari_channels.c.
References ast_json_integer_get(), ast_json_object_get(), ast_json_string_get(), ast_ari_channels_dial_args::caller, and ast_ari_channels_dial_args::timeout.
Referenced by ast_ari_channels_dial_cb().
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.
Create a channel to an External Media source/sink.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 2176 of file resource_channels.c.
References ast_ari_channels_external_media_args::app, ast_ari_channels_external_media_parse_body(), ast_ari_response_error(), ast_assert, ast_json_object_get(), ast_sockaddr_split_hostport(), ast_strdupa, ast_strlen_zero, ast_ari_channels_external_media_args::connection_type, ast_ari_channels_external_media_args::direction, ast_ari_channels_external_media_args::encapsulation, ast_ari_channels_external_media_args::external_host, external_media_audiosocket_tcp(), external_media_rtp_udp(), ast_ari_channels_external_media_args::format, host, json_to_ast_variables(), NULL, PARSE_PORT_REQUIRE, ast_ari_channels_external_media_args::transport, and ast_ari_channels_external_media_args::variables.
Referenced by ast_ari_channels_external_media_cb().
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.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 2814 of file res_ari_channels.c.
References ast_ari_channels_external_media_args::app, ast_json_object_get(), ast_json_string_get(), ast_ari_channels_external_media_args::channel_id, ast_ari_channels_external_media_args::connection_type, ast_ari_channels_external_media_args::data, ast_ari_channels_external_media_args::direction, ast_ari_channels_external_media_args::encapsulation, ast_ari_channels_external_media_args::external_host, ast_ari_channels_external_media_args::format, and ast_ari_channels_external_media_args::transport.
Referenced by ast_ari_channels_external_media().
void ast_ari_channels_get | ( | struct ast_variable * | headers, |
struct ast_ari_channels_get_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Channel details.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 888 of file resource_channels.c.
References ao2_ref, ast_ari_response_error(), ast_ari_response_ok(), ast_channel_snapshot_get_latest(), ast_channel_snapshot_to_json(), ast_ari_channels_get_args::channel_id, and NULL.
Referenced by ast_ari_channels_get_cb().
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.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 1472 of file resource_channels.c.
References ao2_cleanup, ast_ari_response_alloc_failed(), ast_ari_response_error(), ast_ari_response_ok(), ast_assert, ast_channel_cleanup, ast_channel_get_by_name(), ast_free, ast_func_read2(), ast_json_pack(), ast_json_ref(), ast_json_unref(), ast_str_buffer(), ast_str_create, ast_str_retrieve_variable(), ast_strlen_zero, ast_ari_channels_get_channel_var_args::channel_id, NULL, RAII_VAR, S_OR, value, and ast_ari_channels_get_channel_var_args::variable.
Referenced by ast_ari_channels_get_channel_var_cb().
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.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 2278 of file res_ari_channels.c.
References ast_json_object_get(), ast_json_string_get(), and ast_ari_channels_get_channel_var_args::variable.
Referenced by ast_ari_channels_get_channel_var_cb().
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.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 907 of file resource_channels.c.
References ao2_cleanup, ast_ari_response_error(), ast_ari_response_no_content(), AST_CAUSE_NORMAL, ast_channel_get_by_name(), ast_channel_hangupcause_set(), ast_softhangup(), AST_SOFTHANGUP_EXPLICIT, ast_strlen_zero, ast_ari_channels_hangup_args::channel_id, convert_reason_to_hangup_code(), NULL, RAII_VAR, ast_ari_channels_hangup_args::reason, and ast_ari_channels_hangup_args::reason_code.
Referenced by ast_ari_channels_hangup_cb().
int ast_ari_channels_hangup_parse_body | ( | struct ast_json * | body, |
struct ast_ari_channels_hangup_args * | args | ||
) |
Body parsing function for /channels/{channelId}.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 592 of file res_ari_channels.c.
References ast_json_object_get(), ast_json_string_get(), ast_ari_channels_hangup_args::reason, and ast_ari_channels_hangup_args::reason_code.
Referenced by ast_ari_channels_hangup_cb().
void ast_ari_channels_hold | ( | struct ast_variable * | headers, |
struct ast_ari_channels_hold_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Hold a channel.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 514 of file resource_channels.c.
References ao2_cleanup, ast_ari_response_no_content(), ast_ari_channels_hold_args::channel_id, channel_state_invalid(), find_control(), NULL, RAII_VAR, and stasis_app_control_hold().
Referenced by ast_ari_channels_hold_cb().
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.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 956 of file resource_channels.c.
References ao2_cleanup, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ast_ari_response_alloc_failed(), ast_ari_response_ok(), ast_channel_cache_all(), ast_channel_snapshot_to_json(), ast_json_array_append(), ast_json_array_create(), ast_json_ref(), ast_json_unref(), stasis_message_sanitizer::channel_snapshot, NULL, RAII_VAR, and stasis_app_get_sanitizer().
Referenced by ast_ari_channels_list_cb().
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.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 256 of file resource_channels.c.
References ao2_cleanup, ast_ari_channels_move_args::app, ast_ari_channels_move_args::app_args, ast_ari_response_error(), ast_ari_response_no_content(), ast_ari_channels_move_args::channel_id, find_control(), NULL, RAII_VAR, and stasis_app_control_move().
Referenced by ast_ari_channels_move_cb().
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.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 785 of file res_ari_channels.c.
References ast_ari_channels_move_args::app, ast_ari_channels_move_args::app_args, ast_json_object_get(), and ast_json_string_get().
Referenced by ast_ari_channels_move_cb().
void ast_ari_channels_mute | ( | struct ast_variable * | headers, |
struct ast_ari_channels_mute_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Mute a channel.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 403 of file resource_channels.c.
References ao2_cleanup, ast_ari_response_error(), ast_ari_response_no_content(), AST_FRAME_VOICE, AST_MUTE_DIRECTION_READ, AST_MUTE_DIRECTION_WRITE, ast_strlen_zero, ast_ari_channels_mute_args::channel_id, channel_state_invalid(), ast_ari_channels_mute_args::direction, find_control(), NULL, RAII_VAR, and stasis_app_control_mute().
Referenced by ast_ari_channels_mute_cb().
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.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 1251 of file res_ari_channels.c.
References ast_json_object_get(), ast_json_string_get(), and ast_ari_channels_mute_args::direction.
Referenced by ast_ari_channels_mute_cb().
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).
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.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 1433 of file resource_channels.c.
References ast_ari_channels_originate_args::app, ast_ari_channels_originate_args::app_args, ari_channels_handle_originate_with_id(), ast_ari_channels_originate_parse_body(), ast_channel_cleanup, ast_json_object_get(), ast_variables_destroy(), ast_ari_channels_originate_args::caller_id, ast_ari_channels_originate_args::channel_id, ast_ari_channels_originate_args::context, ast_ari_channels_originate_args::endpoint, ast_ari_channels_originate_args::extension, ast_ari_channels_originate_args::formats, json_to_ast_variables(), ast_ari_channels_originate_args::label, NULL, ast_ari_channels_originate_args::originator, ast_ari_channels_originate_args::other_channel_id, ast_ari_channels_originate_args::priority, ast_ari_channels_originate_args::timeout, and ast_ari_channels_originate_args::variables.
Referenced by ast_ari_channels_originate_cb().
int ast_ari_channels_originate_parse_body | ( | struct ast_json * | body, |
struct ast_ari_channels_originate_args * | args | ||
) |
Body parsing function for /channels.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 107 of file res_ari_channels.c.
References ast_ari_channels_originate_args::app, ast_ari_channels_originate_args::app_args, ast_json_integer_get(), ast_json_object_get(), ast_json_string_get(), ast_ari_channels_originate_args::caller_id, ast_ari_channels_originate_args::channel_id, ast_ari_channels_originate_args::context, ast_ari_channels_originate_args::endpoint, ast_ari_channels_originate_args::extension, ast_ari_channels_originate_args::formats, ast_ari_channels_originate_args::label, ast_ari_channels_originate_args::originator, ast_ari_channels_originate_args::other_channel_id, ast_ari_channels_originate_args::priority, and ast_ari_channels_originate_args::timeout.
Referenced by ast_ari_channels_originate().
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).
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.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 1394 of file resource_channels.c.
References ast_ari_channels_originate_with_id_args::app, ast_ari_channels_originate_with_id_args::app_args, ari_channels_handle_originate_with_id(), ast_ari_channels_originate_with_id_parse_body(), ast_channel_cleanup, ast_json_object_get(), ast_variables_destroy(), ast_ari_channels_originate_with_id_args::caller_id, ast_ari_channels_originate_with_id_args::channel_id, ast_ari_channels_originate_with_id_args::context, ast_ari_channels_originate_with_id_args::endpoint, ast_ari_channels_originate_with_id_args::extension, ast_ari_channels_originate_with_id_args::formats, json_to_ast_variables(), ast_ari_channels_originate_with_id_args::label, NULL, ast_ari_channels_originate_with_id_args::originator, ast_ari_channels_originate_with_id_args::other_channel_id, ast_ari_channels_originate_with_id_args::priority, ast_ari_channels_originate_with_id_args::timeout, and ast_ari_channels_originate_with_id_args::variables.
Referenced by ast_ari_channels_originate_with_id_cb().
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}.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 436 of file res_ari_channels.c.
References ast_ari_channels_originate_with_id_args::app, ast_ari_channels_originate_with_id_args::app_args, ast_json_integer_get(), ast_json_object_get(), ast_json_string_get(), ast_ari_channels_originate_with_id_args::caller_id, ast_ari_channels_originate_with_id_args::context, ast_ari_channels_originate_with_id_args::endpoint, ast_ari_channels_originate_with_id_args::extension, ast_ari_channels_originate_with_id_args::formats, ast_ari_channels_originate_with_id_args::label, ast_ari_channels_originate_with_id_args::originator, ast_ari_channels_originate_with_id_args::other_channel_id, ast_ari_channels_originate_with_id_args::priority, and ast_ari_channels_originate_with_id_args::timeout.
Referenced by ast_ari_channels_originate_with_id().
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.
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.)
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 718 of file resource_channels.c.
References ari_channels_handle_play(), ast_ari_channels_play_args::channel_id, ast_ari_channels_play_args::lang, ast_ari_channels_play_args::media, ast_ari_channels_play_args::media_count, ast_ari_channels_play_args::offsetms, ast_ari_channels_play_args::playback_id, and ast_ari_channels_play_args::skipms.
Referenced by ast_ari_channels_play_cb().
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.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 1800 of file res_ari_channels.c.
References ast_free, AST_JSON_ARRAY, ast_json_array_get(), ast_json_array_size(), ast_json_integer_get(), ast_json_object_get(), ast_json_string_get(), ast_json_typeof(), ast_malloc, ast_ari_channels_play_args::lang, ast_ari_channels_play_args::media, ast_ari_channels_play_args::media_count, ast_ari_channels_play_args::offsetms, ast_ari_channels_play_args::playback_id, and ast_ari_channels_play_args::skipms.
Referenced by ast_ari_channels_play_cb().
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.
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.)
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 733 of file resource_channels.c.
References ari_channels_handle_play(), ast_ari_channels_play_with_id_args::channel_id, ast_ari_channels_play_with_id_args::lang, ast_ari_channels_play_with_id_args::media, ast_ari_channels_play_with_id_args::media_count, ast_ari_channels_play_with_id_args::offsetms, ast_ari_channels_play_with_id_args::playback_id, and ast_ari_channels_play_with_id_args::skipms.
Referenced by ast_ari_channels_play_with_id_cb().
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}.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 1978 of file res_ari_channels.c.
References ast_free, AST_JSON_ARRAY, ast_json_array_get(), ast_json_array_size(), ast_json_integer_get(), ast_json_object_get(), ast_json_string_get(), ast_json_typeof(), ast_malloc, ast_ari_channels_play_with_id_args::lang, ast_ari_channels_play_with_id_args::media, ast_ari_channels_play_with_id_args::media_count, ast_ari_channels_play_with_id_args::offsetms, and ast_ari_channels_play_with_id_args::skipms.
Referenced by ast_ari_channels_play_with_id_cb().
void ast_ari_channels_record | ( | struct ast_variable * | headers, |
struct ast_ari_channels_record_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Start a recording.
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.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 748 of file resource_channels.c.
References ao2_cleanup, ast_ari_response_created(), ast_ari_response_error(), ast_asprintf, ast_assert, ast_free, ast_get_format_for_file_ext(), ast_log, ast_malloc, AST_RECORD_IF_EXISTS_ERROR, ast_string_field_build, ast_uri_encode(), ast_uri_http, ast_ari_channels_record_args::beep, ast_ari_channels_record_args::channel_id, errno, find_control(), ast_ari_channels_record_args::format, ast_ari_channels_record_args::if_exists, LOG_WARNING, ast_ari_channels_record_args::max_duration_seconds, ast_ari_channels_record_args::max_silence_seconds, ast_ari_channels_record_args::name, NULL, options, RAII_VAR, stasis_app_control_record(), stasis_app_recording_if_exists_parse(), stasis_app_recording_options_create(), STASIS_APP_RECORDING_TERMINATE_INVALID, stasis_app_recording_termination_parse(), stasis_app_recording_to_json(), and ast_ari_channels_record_args::terminate_on.
Referenced by ast_ari_channels_record_cb().
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.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 2152 of file res_ari_channels.c.
References ast_json_integer_get(), ast_json_is_true(), ast_json_object_get(), ast_json_string_get(), ast_ari_channels_record_args::beep, ast_ari_channels_record_args::format, ast_ari_channels_record_args::if_exists, ast_ari_channels_record_args::max_duration_seconds, ast_ari_channels_record_args::max_silence_seconds, ast_ari_channels_record_args::name, and ast_ari_channels_record_args::terminate_on.
Referenced by ast_ari_channels_record_cb().
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.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 276 of file resource_channels.c.
References ao2_cleanup, ast_ari_response_error(), ast_ari_response_no_content(), ast_channel_snapshot_get_latest(), ast_strdupa, ast_strlen_zero, ast_ari_channels_redirect_args::channel_id, channel_state_invalid(), ast_ari_channels_redirect_args::endpoint, find_control(), NULL, RAII_VAR, and stasis_app_control_redirect().
Referenced by ast_ari_channels_redirect_cb().
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.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 874 of file res_ari_channels.c.
References ast_json_object_get(), ast_json_string_get(), and ast_ari_channels_redirect_args::endpoint.
Referenced by ast_ari_channels_redirect_cb().
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.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 363 of file resource_channels.c.
References ao2_cleanup, ast_ari_response_no_content(), ast_ari_channels_ring_args::channel_id, channel_state_invalid(), find_control(), NULL, RAII_VAR, and stasis_app_control_ring().
Referenced by ast_ari_channels_ring_cb().
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.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 383 of file resource_channels.c.
References ao2_cleanup, ast_ari_response_no_content(), ast_ari_channels_ring_stop_args::channel_id, channel_state_invalid(), find_control(), NULL, RAII_VAR, and stasis_app_control_ring_stop().
Referenced by ast_ari_channels_ring_stop_cb().
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.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 2028 of file resource_channels.c.
References ao2_cleanup, ast_ari_response_error(), ast_ari_response_ok(), ast_channel_cleanup, ast_channel_get_by_name(), ast_channel_lock, ast_channel_tech(), ast_channel_unlock, ast_rtp_instance_get_glue(), ast_rtp_instance_get_stats_all_json(), ast_ari_channels_rtpstatistics_args::channel_id, ast_rtp_glue::get_rtp_info, NULL, RAII_VAR, and ast_channel_tech::type.
Referenced by ast_ari_channels_rtpstatistics_cb().
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.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 487 of file resource_channels.c.
References ast_ari_channels_send_dtmf_args::after, ao2_cleanup, ast_ari_response_error(), ast_ari_response_no_content(), ast_strlen_zero, ast_ari_channels_send_dtmf_args::before, ast_ari_channels_send_dtmf_args::between, ast_ari_channels_send_dtmf_args::channel_id, channel_state_invalid(), ast_ari_channels_send_dtmf_args::dtmf, ast_ari_channels_send_dtmf_args::duration, find_control(), NULL, RAII_VAR, and stasis_app_control_dtmf().
Referenced by ast_ari_channels_send_dtmf_cb().
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.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 1139 of file res_ari_channels.c.
References ast_ari_channels_send_dtmf_args::after, ast_json_integer_get(), ast_json_object_get(), ast_json_string_get(), ast_ari_channels_send_dtmf_args::before, ast_ari_channels_send_dtmf_args::between, ast_ari_channels_send_dtmf_args::dtmf, and ast_ari_channels_send_dtmf_args::duration.
Referenced by ast_ari_channels_send_dtmf_cb().
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.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 1541 of file resource_channels.c.
References ao2_cleanup, ast_ari_response_error(), ast_ari_response_no_content(), ast_assert, ast_strlen_zero, ast_ari_channels_set_channel_var_args::channel_id, find_control(), NULL, RAII_VAR, stasis_app_control_set_channel_var(), ast_ari_channels_set_channel_var_args::value, and ast_ari_channels_set_channel_var_args::variable.
Referenced by ast_ari_channels_set_channel_var_cb().
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.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 2361 of file res_ari_channels.c.
References ast_json_object_get(), ast_json_string_get(), ast_ari_channels_set_channel_var_args::value, and ast_ari_channels_set_channel_var_args::variable.
Referenced by ast_ari_channels_set_channel_var_cb().
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.
Snoop (spy/whisper) on a specific channel.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 1651 of file resource_channels.c.
References ast_ari_channels_snoop_channel_args::app, ast_ari_channels_snoop_channel_args::app_args, ari_channels_handle_snoop_channel(), ast_ari_channels_snoop_channel_args::channel_id, ast_ari_channels_snoop_channel_args::snoop_id, ast_ari_channels_snoop_channel_args::spy, and ast_ari_channels_snoop_channel_args::whisper.
Referenced by ast_ari_channels_snoop_channel_cb().
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.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 2451 of file res_ari_channels.c.
References ast_ari_channels_snoop_channel_args::app, ast_ari_channels_snoop_channel_args::app_args, ast_json_object_get(), ast_json_string_get(), ast_ari_channels_snoop_channel_args::snoop_id, ast_ari_channels_snoop_channel_args::spy, and ast_ari_channels_snoop_channel_args::whisper.
Referenced by ast_ari_channels_snoop_channel_cb().
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.
Snoop (spy/whisper) on a specific channel.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 1665 of file resource_channels.c.
References ast_ari_channels_snoop_channel_with_id_args::app, ast_ari_channels_snoop_channel_with_id_args::app_args, ari_channels_handle_snoop_channel(), ast_ari_channels_snoop_channel_with_id_args::channel_id, ast_ari_channels_snoop_channel_with_id_args::snoop_id, ast_ari_channels_snoop_channel_with_id_args::spy, and ast_ari_channels_snoop_channel_with_id_args::whisper.
Referenced by ast_ari_channels_snoop_channel_with_id_cb().
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}.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 2561 of file res_ari_channels.c.
References ast_ari_channels_snoop_channel_with_id_args::app, ast_ari_channels_snoop_channel_with_id_args::app_args, ast_json_object_get(), ast_json_string_get(), ast_ari_channels_snoop_channel_with_id_args::spy, and ast_ari_channels_snoop_channel_with_id_args::whisper.
Referenced by ast_ari_channels_snoop_channel_with_id_cb().
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.
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.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 556 of file resource_channels.c.
References ao2_cleanup, ast_ari_response_no_content(), ast_ari_channels_start_moh_args::channel_id, channel_state_invalid(), find_control(), ast_ari_channels_start_moh_args::moh_class, NULL, RAII_VAR, and stasis_app_control_moh_start().
Referenced by ast_ari_channels_start_moh_cb().
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.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 1537 of file res_ari_channels.c.
References ast_json_object_get(), ast_json_string_get(), and ast_ari_channels_start_moh_args::moh_class.
Referenced by ast_ari_channels_start_moh_cb().
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.
Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 596 of file resource_channels.c.
References ao2_cleanup, ast_ari_response_no_content(), ast_ari_channels_start_silence_args::channel_id, channel_state_invalid(), find_control(), NULL, RAII_VAR, and stasis_app_control_silence_start().
Referenced by ast_ari_channels_start_silence_cb().
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.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 576 of file resource_channels.c.
References ao2_cleanup, ast_ari_response_no_content(), ast_ari_channels_stop_moh_args::channel_id, channel_state_invalid(), find_control(), NULL, RAII_VAR, and stasis_app_control_moh_stop().
Referenced by ast_ari_channels_stop_moh_cb().
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.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 616 of file resource_channels.c.
References ao2_cleanup, ast_ari_response_no_content(), ast_ari_channels_stop_silence_args::channel_id, channel_state_invalid(), find_control(), NULL, RAII_VAR, and stasis_app_control_silence_stop().
Referenced by ast_ari_channels_stop_silence_cb().
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.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 535 of file resource_channels.c.
References ao2_cleanup, ast_ari_response_no_content(), ast_ari_channels_unhold_args::channel_id, channel_state_invalid(), find_control(), NULL, RAII_VAR, and stasis_app_control_unhold().
Referenced by ast_ari_channels_unhold_cb().
void ast_ari_channels_unmute | ( | struct ast_variable * | headers, |
struct ast_ari_channels_unmute_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Unmute a channel.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 445 of file resource_channels.c.
References ao2_cleanup, ast_ari_response_error(), ast_ari_response_no_content(), AST_FRAME_VOICE, AST_MUTE_DIRECTION_READ, AST_MUTE_DIRECTION_WRITE, ast_strlen_zero, ast_ari_channels_unmute_args::channel_id, channel_state_invalid(), ast_ari_channels_unmute_args::direction, find_control(), NULL, RAII_VAR, and stasis_app_control_unmute().
Referenced by ast_ari_channels_unmute_cb().
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.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 1334 of file res_ari_channels.c.
References ast_json_object_get(), ast_json_string_get(), and ast_ari_channels_unmute_args::direction.
Referenced by ast_ari_channels_unmute_cb().