Asterisk - The Open Source Telephony Project
18.5.0
|
Implementation for ARI stubs. More...
#include "asterisk.h"
#include "resource_bridges.h"
#include "asterisk/stasis.h"
#include "asterisk/stasis_bridges.h"
#include "asterisk/stasis_app.h"
#include "asterisk/stasis_app_impl.h"
#include "asterisk/stasis_app_playback.h"
#include "asterisk/stasis_app_recording.h"
#include "asterisk/stasis_channels.h"
#include "asterisk/core_unreal.h"
#include "asterisk/channel.h"
#include "asterisk/bridge.h"
#include "asterisk/format_cap.h"
#include "asterisk/file.h"
#include "asterisk/musiconhold.h"
#include "asterisk/format_cache.h"
Go to the source code of this file.
Data Structures | |
struct | bridge_channel_control_thread_data |
struct | control_list |
Enumerations | |
enum | play_found_result { PLAY_FOUND_SUCCESS, PLAY_FOUND_FAILURE, PLAY_FOUND_CHANNEL_UNAVAILABLE } |
Functions | |
static void | ari_bridges_handle_play (const char *args_bridge_id, const char **args_media, size_t args_media_count, const char *args_lang, int args_offset_ms, int args_skipms, const char *args_playback_id, struct ast_ari_response *response) |
static enum play_found_result | ari_bridges_play_found (const char **args_media, size_t args_media_count, const char *args_lang, int args_offset_ms, int args_skipms, const char *args_playback_id, struct ast_ari_response *response, struct ast_bridge *bridge, struct ast_channel *found_channel) |
Performs common setup for a bridge playback operation with both new controls and when existing controls are found. More... | |
static int | ari_bridges_play_helper (const char **args_media, size_t args_media_count, const char *args_lang, int args_offset_ms, int args_skipms, const char *args_playback_id, struct ast_ari_response *response, struct ast_bridge *bridge, struct stasis_app_control *control, struct ast_json **json, char **playback_url) |
Performs common setup for a bridge playback operation with both new controls and when existing controls are found. More... | |
static void | ari_bridges_play_new (const char **args_media, size_t args_media_count, const char *args_lang, int args_offset_ms, int args_skipms, const char *args_playback_id, struct ast_ari_response *response, struct ast_bridge *bridge) |
void | ast_ari_bridges_add_channel (struct ast_variable *headers, struct ast_ari_bridges_add_channel_args *args, struct ast_ari_response *response) |
Add a channel to a bridge. More... | |
void | ast_ari_bridges_clear_video_source (struct ast_variable *headers, struct ast_ari_bridges_clear_video_source_args *args, struct ast_ari_response *response) |
Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream. More... | |
void | ast_ari_bridges_create (struct ast_variable *headers, struct ast_ari_bridges_create_args *args, struct ast_ari_response *response) |
Create a new bridge. More... | |
void | ast_ari_bridges_create_with_id (struct ast_variable *headers, struct ast_ari_bridges_create_with_id_args *args, struct ast_ari_response *response) |
Create a new bridge or updates an existing one. More... | |
void | ast_ari_bridges_destroy (struct ast_variable *headers, struct ast_ari_bridges_destroy_args *args, struct ast_ari_response *response) |
Shut down a bridge. More... | |
void | ast_ari_bridges_get (struct ast_variable *headers, struct ast_ari_bridges_get_args *args, struct ast_ari_response *response) |
Get bridge details. More... | |
void | ast_ari_bridges_list (struct ast_variable *headers, struct ast_ari_bridges_list_args *args, struct ast_ari_response *response) |
List all active bridges in Asterisk. More... | |
void | ast_ari_bridges_play (struct ast_variable *headers, struct ast_ari_bridges_play_args *args, struct ast_ari_response *response) |
Start playback of media on a bridge. More... | |
void | ast_ari_bridges_play_with_id (struct ast_variable *headers, struct ast_ari_bridges_play_with_id_args *args, struct ast_ari_response *response) |
Start playback of media on a bridge. More... | |
void | ast_ari_bridges_record (struct ast_variable *headers, struct ast_ari_bridges_record_args *args, struct ast_ari_response *response) |
Start a recording. More... | |
void | ast_ari_bridges_remove_channel (struct ast_variable *headers, struct ast_ari_bridges_remove_channel_args *args, struct ast_ari_response *response) |
Remove a channel from a bridge. More... | |
void | ast_ari_bridges_set_video_source (struct ast_variable *headers, struct ast_ari_bridges_set_video_source_args *args, struct ast_ari_response *response) |
Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. More... | |
void | ast_ari_bridges_start_moh (struct ast_variable *headers, struct ast_ari_bridges_start_moh_args *args, struct ast_ari_response *response) |
Play music on hold to a bridge or change the MOH class that is playing. More... | |
void | ast_ari_bridges_stop_moh (struct ast_variable *headers, struct ast_ari_bridges_stop_moh_args *args, struct ast_ari_response *response) |
Stop playing music on hold to a bridge. More... | |
static void * | bridge_channel_control_thread (void *data) |
static int | bridge_set_video_source_cb (struct stasis_app_control *control, struct ast_channel *chan, void *data) |
static int | check_add_remove_channel (struct ast_ari_response *response, struct stasis_app_control *control, enum stasis_app_control_channel_result result) |
static struct control_list * | control_list_create (struct ast_ari_response *response, size_t count, const char **channels) |
static void | control_list_dtor (void *obj) |
static struct ast_bridge * | find_bridge (struct ast_ari_response *response, const char *bridge_id) |
Finds a bridge, filling the response with an error, if appropriate. More... | |
static struct stasis_app_control * | find_channel_control (struct ast_ari_response *response, const char *channel_id) |
Finds the control object for a channel, filling the response with an error, if appropriate. More... | |
static struct ast_channel * | prepare_bridge_media_channel (const char *type) |
Implementation for ARI stubs.
Definition in file resource_bridges.c.
enum play_found_result |
Enumerator | |
---|---|
PLAY_FOUND_SUCCESS | |
PLAY_FOUND_FAILURE | |
PLAY_FOUND_CHANNEL_UNAVAILABLE |
Definition at line 503 of file resource_bridges.c.
|
static |
Definition at line 567 of file resource_bridges.c.
References ao2_cleanup, ari_bridges_play_found(), ari_bridges_play_new(), ast_assert, find_bridge(), NULL, PLAY_FOUND_CHANNEL_UNAVAILABLE, RAII_VAR, and stasis_app_bridge_playback_channel_find().
Referenced by ast_ari_bridges_play(), and ast_ari_bridges_play_with_id().
|
static |
Performs common setup for a bridge playback operation with both new controls and when existing controls are found.
args_media | medias to play |
args_media_count | number of media items in media |
args_lang | language string split from arguments |
args_offset_ms | milliseconds offset split from arguments |
args_playback_id | string to use for playback split from arguments (null valid) |
response | ARI response being built |
bridge | Bridge the playback is being peformed on |
found_channel | The channel that was found controlling playback |
PLAY_FOUND_SUCCESS | The operation was successful |
PLAY_FOUND_FAILURE | The operation failed (terminal failure) |
PLAY_FOUND_CHANNEL_UNAVAILABLE | The operation failed because the channel requested to playback with is breaking down. |
Definition at line 528 of file resource_bridges.c.
References ao2_cleanup, ao2_lock, ao2_unlock, ari_bridges_play_helper(), ast_ari_response_created(), ast_free, ast_json_ref(), ast_json_unref(), bridge_channel_control_thread_data::control, NULL, PLAY_FOUND_CHANNEL_UNAVAILABLE, PLAY_FOUND_FAILURE, PLAY_FOUND_SUCCESS, RAII_VAR, stasis_app_control_find_by_channel(), and stasis_app_control_is_done().
Referenced by ari_bridges_handle_play().
|
static |
Performs common setup for a bridge playback operation with both new controls and when existing controls are found.
args_media | medias to play |
args_media_count | number of media items in media |
args_lang | language string split from arguments |
args_offset_ms | milliseconds offset split from arguments |
args_playback_id | string to use for playback split from arguments (null valid) |
response | ARI response being built |
bridge | Bridge the playback is being peformed on |
control | Control being used for the playback channel |
json | contents of the response to ARI |
playback_url | stores playback URL for use with response |
-1 | operation failed |
operation | was successful |
Definition at line 357 of file resource_bridges.c.
References ao2_cleanup, ast_ari_response_alloc_failed(), ast_ari_response_error(), ast_asprintf, language, NULL, RAII_VAR, S_OR, stasis_app_control_get_snapshot(), stasis_app_control_play_uri(), stasis_app_playback_get_id(), stasis_app_playback_to_json(), STASIS_PLAYBACK_TARGET_BRIDGE, and ast_bridge::uniqueid.
Referenced by ari_bridges_play_found(), and ari_bridges_play_new().
|
static |
Definition at line 407 of file resource_bridges.c.
References ao2_cleanup, ao2_lock, ao2_unlock, ari_bridges_play_helper(), ast_ari_response_alloc_failed(), ast_ari_response_created(), ast_ari_response_error(), AST_BRIDGE_CHANNEL_FLAG_IMMOVABLE, AST_BRIDGE_CHANNEL_FLAG_LONELY, ast_bridge_topic(), ast_channel_name(), ast_channel_topic(), ast_debug, ast_free, ast_hangup(), ast_json_ref(), ast_json_unref(), ast_malloc, ast_pthread_create_detached, ast_unreal_channel_push_to_bridge(), bridge_channel_control_thread_data::bridge_channel, bridge_channel_control_thread(), bridge_channel_control_thread_data::bridge_id, bridge_channel_control_thread_data::control, bridge_channel_control_thread_data::forward, NULL, prepare_bridge_media_channel(), RAII_VAR, stasis_app_bridge_playback_channel_add(), stasis_app_bridge_playback_channel_remove(), stasis_app_control_create(), stasis_forward_all(), stasis_forward_cancel(), and ast_bridge::uniqueid.
Referenced by ari_bridges_handle_play().
void ast_ari_bridges_add_channel | ( | struct ast_variable * | headers, |
struct ast_ari_bridges_add_channel_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Add a channel to a bridge.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 191 of file resource_bridges.c.
References ast_ari_bridges_add_channel_args::absorb_dtmf, ao2_cleanup, ast_ari_response_alloc_failed(), ast_ari_response_no_content(), ast_strlen_zero, ast_ari_bridges_add_channel_args::bridge_id, ast_ari_bridges_add_channel_args::channel, ast_ari_bridges_add_channel_args::channel_count, check_add_remove_channel(), control_list_create(), find_bridge(), ast_ari_bridges_add_channel_args::inhibit_connected_line_updates, ast_ari_bridges_add_channel_args::mute, NULL, RAII_VAR, ast_ari_bridges_add_channel_args::role, stasis_app_control_absorb_dtmf_in_bridge(), stasis_app_control_add_channel_to_bridge(), stasis_app_control_add_role(), stasis_app_control_bridge_features_init(), stasis_app_control_clear_roles(), stasis_app_control_inhibit_colp_in_bridge(), and stasis_app_control_mute_in_bridge().
Referenced by ast_ari_bridges_add_channel_cb().
void ast_ari_bridges_clear_video_source | ( | struct ast_variable * | headers, |
struct ast_ari_bridges_clear_video_source_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 1051 of file resource_bridges.c.
References ao2_ref, ast_ari_response_no_content(), ast_bridge_lock, ast_bridge_set_talker_src_video_mode(), ast_bridge_unlock, ast_ari_bridges_clear_video_source_args::bridge_id, and find_bridge().
Referenced by ast_ari_bridges_clear_video_source_cb().
void ast_ari_bridges_create | ( | struct ast_variable * | headers, |
struct ast_ari_bridges_create_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Create a new bridge.
This bridge persists until it has been shut down, or Asterisk has been shut down.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 925 of file resource_bridges.c.
References ao2_cleanup, ast_ari_response_error(), ast_ari_response_ok(), ast_bridge_lock, ast_bridge_snapshot_create(), ast_bridge_snapshot_to_json(), ast_bridge_unlock, ast_ari_bridges_create_args::bridge_id, ast_ari_bridges_create_args::name, NULL, RAII_VAR, stasis_app_bridge_create(), stasis_app_get_sanitizer(), and ast_ari_bridges_create_args::type.
Referenced by ast_ari_bridges_create_cb().
void ast_ari_bridges_create_with_id | ( | struct ast_variable * | headers, |
struct ast_ari_bridges_create_with_id_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Create a new bridge or updates an existing one.
This bridge persists until it has been shut down, or Asterisk has been shut down.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 954 of file resource_bridges.c.
References ao2_cleanup, ast_ari_response_error(), ast_ari_response_ok(), ast_bridge_lock, ast_bridge_snapshot_create(), ast_bridge_snapshot_to_json(), ast_bridge_unlock, ast_strlen_zero, ast_ari_bridges_create_with_id_args::bridge_id, find_bridge(), ast_ari_bridges_create_with_id_args::name, NULL, RAII_VAR, stasis_app_bridge_create(), stasis_app_get_sanitizer(), and ast_ari_bridges_create_with_id_args::type.
Referenced by ast_ari_bridges_create_with_id_cb().
void ast_ari_bridges_destroy | ( | struct ast_variable * | headers, |
struct ast_ari_bridges_destroy_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Shut down a bridge.
If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 872 of file resource_bridges.c.
References ao2_cleanup, ast_ari_response_no_content(), ast_ari_bridges_destroy_args::bridge_id, find_bridge(), RAII_VAR, and stasis_app_bridge_destroy().
Referenced by ast_ari_bridges_destroy_cb().
void ast_ari_bridges_get | ( | struct ast_variable * | headers, |
struct ast_ari_bridges_get_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Get bridge details.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 856 of file resource_bridges.c.
References ao2_cleanup, ast_ari_response_error(), ast_ari_response_ok(), ast_bridge_get_snapshot_by_uniqueid(), ast_bridge_snapshot_to_json(), ast_ari_bridges_get_args::bridge_id, RAII_VAR, and stasis_app_get_sanitizer().
Referenced by ast_ari_bridges_get_cb().
void ast_ari_bridges_list | ( | struct ast_variable * | headers, |
struct ast_ari_bridges_list_args * | args, | ||
struct ast_ari_response * | response | ||
) |
List all active bridges in Asterisk.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 885 of file resource_bridges.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_bridge_get_snapshot(), ast_bridge_snapshot_to_json(), ast_bridges(), ast_json_array_append(), ast_json_array_create(), ast_json_ref(), ast_json_unref(), bridges, NULL, RAII_VAR, and stasis_app_get_sanitizer().
Referenced by ast_ari_bridges_list_cb().
void ast_ari_bridges_play | ( | struct ast_variable * | headers, |
struct ast_ari_bridges_play_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Start playback of media on a bridge.
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 606 of file resource_bridges.c.
References ari_bridges_handle_play(), ast_ari_bridges_play_args::bridge_id, ast_ari_bridges_play_args::lang, ast_ari_bridges_play_args::media, ast_ari_bridges_play_args::media_count, ast_ari_bridges_play_args::offsetms, ast_ari_bridges_play_args::playback_id, and ast_ari_bridges_play_args::skipms.
Referenced by ast_ari_bridges_play_cb().
void ast_ari_bridges_play_with_id | ( | struct ast_variable * | headers, |
struct ast_ari_bridges_play_with_id_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Start playback of media on a bridge.
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 620 of file resource_bridges.c.
References ari_bridges_handle_play(), ast_ari_bridges_play_with_id_args::bridge_id, ast_ari_bridges_play_with_id_args::lang, ast_ari_bridges_play_with_id_args::media, ast_ari_bridges_play_with_id_args::media_count, ast_ari_bridges_play_with_id_args::offsetms, ast_ari_bridges_play_with_id_args::playback_id, and ast_ari_bridges_play_with_id_args::skipms.
Referenced by ast_ari_bridges_play_with_id_cb().
void ast_ari_bridges_record | ( | struct ast_variable * | headers, |
struct ast_ari_bridges_record_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Start a recording.
This records the mixed audio from all channels participating in this bridge.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 634 of file resource_bridges.c.
References ao2_cleanup, ast_ari_response_alloc_failed(), ast_ari_response_created(), ast_ari_response_error(), ast_asprintf, ast_assert, AST_BRIDGE_CHANNEL_FLAG_IMMOVABLE, AST_BRIDGE_CHANNEL_FLAG_LONELY, ast_bridge_topic(), ast_calloc, ast_channel_topic(), ast_free, ast_get_format_for_file_ext(), ast_hangup(), ast_json_ref(), ast_json_unref(), ast_log, ast_malloc, ast_pthread_create_detached, AST_RECORD_IF_EXISTS_ERROR, ast_string_field_build, ast_unreal_channel_push_to_bridge(), ast_uri_encode(), ast_uri_http, ast_ari_bridges_record_args::beep, bridge_channel_control_thread_data::bridge_channel, bridge_channel_control_thread(), ast_ari_bridges_record_args::bridge_id, bridge_channel_control_thread_data::control, errno, find_bridge(), ast_ari_bridges_record_args::format, bridge_channel_control_thread_data::forward, ast_ari_bridges_record_args::if_exists, LOG_WARNING, ast_ari_bridges_record_args::max_duration_seconds, ast_ari_bridges_record_args::max_silence_seconds, ast_ari_bridges_record_args::name, NULL, options, prepare_bridge_media_channel(), RAII_VAR, stasis_app_control_create(), 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(), stasis_forward_all(), stasis_forward_cancel(), and ast_ari_bridges_record_args::terminate_on.
Referenced by ast_ari_bridges_record_cb().
void ast_ari_bridges_remove_channel | ( | struct ast_variable * | headers, |
struct ast_ari_bridges_remove_channel_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Remove a channel from a bridge.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 241 of file resource_bridges.c.
References ao2_cleanup, ast_ari_response_error(), ast_ari_response_no_content(), ast_log, ast_ari_bridges_remove_channel_args::bridge_id, ast_ari_bridges_remove_channel_args::channel, ast_ari_bridges_remove_channel_args::channel_count, control_list_create(), find_bridge(), LOG_WARNING, NULL, RAII_VAR, stasis_app_control_remove_channel_from_bridge(), and stasis_app_get_bridge().
Referenced by ast_ari_bridges_remove_channel_cb().
void ast_ari_bridges_set_video_source | ( | struct ast_variable * | headers, |
struct ast_ari_bridges_set_video_source_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 1016 of file resource_bridges.c.
References __ao2_cleanup(), ao2_bump, ao2_ref, ast_ari_response_error(), ast_ari_response_no_content(), ast_ari_bridges_set_video_source_args::bridge_id, bridge_set_video_source_cb(), ast_ari_bridges_set_video_source_args::channel_id, find_bridge(), find_channel_control(), stasis_app_get_bridge(), and stasis_app_send_command().
Referenced by ast_ari_bridges_set_video_source_cb().
void ast_ari_bridges_start_moh | ( | struct ast_variable * | headers, |
struct ast_ari_bridges_start_moh_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Play music on hold to a bridge or change the MOH class that is playing.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 809 of file resource_bridges.c.
References ao2_cleanup, ast_ari_response_alloc_failed(), ast_ari_response_no_content(), ast_channel_cleanup, ast_moh_start(), ast_ari_bridges_start_moh_args::bridge_id, find_bridge(), ast_ari_bridges_start_moh_args::moh_class, NULL, RAII_VAR, and stasis_app_bridge_moh_channel().
Referenced by ast_ari_bridges_start_moh_cb().
void ast_ari_bridges_stop_moh | ( | struct ast_variable * | headers, |
struct ast_ari_bridges_stop_moh_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Stop playing music on hold to a bridge.
This will only stop music on hold being played via POST bridges/{bridgeId}/moh.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 835 of file resource_bridges.c.
References ao2_cleanup, ast_ari_response_error(), ast_ari_response_no_content(), ast_ari_bridges_stop_moh_args::bridge_id, find_bridge(), RAII_VAR, and stasis_app_bridge_moh_stop().
Referenced by ast_ari_bridges_stop_moh_cb().
|
static |
Definition at line 288 of file resource_bridges.c.
References ao2_cleanup, ast_callid_threadassoc_add(), ast_channel_callid(), ast_free, ast_hangup(), ast_strdupa, bridge_channel_control_thread_data::bridge_channel, bridge_channel_control_thread_data::bridge_id, bridge_channel_control_thread_data::control, bridge_channel_control_thread_data::forward, NULL, stasis_app_bridge_playback_channel_remove(), stasis_app_control_execute_until_exhausted(), stasis_app_control_flush_queue(), and stasis_forward_cancel().
Referenced by ari_bridges_play_new(), and ast_ari_bridges_record().
|
static |
Definition at line 1004 of file resource_bridges.c.
References ast_bridge_lock, ast_bridge_set_single_src_video_mode(), and ast_bridge_unlock.
Referenced by ast_ari_bridges_set_video_source().
|
static |
Definition at line 175 of file resource_bridges.c.
References ast_ari_response_error(), STASIS_APP_CHANNEL_OKAY, STASIS_APP_CHANNEL_RECORDING, and stasis_app_control_get_channel_id().
Referenced by ast_ari_bridges_add_channel().
|
static |
Definition at line 138 of file resource_bridges.c.
References ao2_alloc, ao2_cleanup, ao2_ref, ast_ari_response_alloc_failed(), ast_ari_response_error(), ast_strlen_zero, control_list_dtor(), control_list::count, find_channel_control(), NULL, and RAII_VAR.
Referenced by ast_ari_bridges_add_channel(), and ast_ari_bridges_remove_channel().
|
static |
Definition at line 128 of file resource_bridges.c.
References ao2_cleanup, control_list::controls, control_list::count, and NULL.
Referenced by control_list_create().
|
static |
Finds a bridge, filling the response with an error, if appropriate.
[out] | response | Response to fill with an error if control is not found. |
bridge_id | ID of the bridge to lookup. |
NULL
if bridge does not exist. Definition at line 57 of file resource_bridges.c.
References ao2_cleanup, ao2_ref, ast_ari_response_error(), ast_assert, ast_bridge_get_snapshot_by_uniqueid(), NULL, RAII_VAR, and stasis_app_bridge_find_by_id().
Referenced by ari_bridges_handle_play(), ast_ari_bridges_add_channel(), ast_ari_bridges_clear_video_source(), ast_ari_bridges_create_with_id(), ast_ari_bridges_destroy(), ast_ari_bridges_record(), ast_ari_bridges_remove_channel(), ast_ari_bridges_set_video_source(), ast_ari_bridges_start_moh(), and ast_ari_bridges_stop_moh().
|
static |
Finds the control object for a channel, filling the response with an error, if appropriate.
[out] | response | Response to fill with an error if control is not found. |
channel_id | ID of the channel to lookup. |
NULL
if control object does not exist. Definition at line 92 of file resource_bridges.c.
References ao2_cleanup, ao2_ref, ast_ari_response_error(), ast_assert, ast_channel_snapshot_get_latest(), ast_log, LOG_DEBUG, NULL, RAII_VAR, and stasis_app_control_find_by_channel_id().
Referenced by ast_ari_bridges_set_video_source(), and control_list_create().
|
static |
Definition at line 314 of file resource_bridges.c.
References ao2_cleanup, ast_channel_cleanup, ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_slin, ast_request(), NULL, RAII_VAR, and stasis_app_channel_unreal_set_internal().
Referenced by ari_bridges_play_new(), and ast_ari_bridges_record().