Asterisk - The Open Source Telephony Project GIT-master-0bf3178
|
Confbridge manager events for stasis messages. More...
#include "asterisk.h"
#include "asterisk/channel.h"
#include "asterisk/bridge.h"
#include "asterisk/stasis.h"
#include "asterisk/stasis_channels.h"
#include "asterisk/stasis_bridges.h"
#include "asterisk/manager.h"
#include "asterisk/stasis_message_router.h"
#include "include/confbridge.h"
#include "asterisk/message.h"
#include "asterisk/stream.h"
Go to the source code of this file.
Variables | |
static struct stasis_message_router * | bridge_state_router |
static struct stasis_message_router * | channel_state_router |
Confbridge manager events for stasis messages.
Definition in file confbridge_manager.c.
|
static |
Definition at line 311 of file confbridge_manager.c.
References ast_bridge_snapshot_to_json(), ast_json_object_del(), and NULL.
Referenced by conf_send_event_to_participants(), and pack_snapshots().
|
static |
Definition at line 276 of file confbridge_manager.c.
References ast_channel_snapshot_to_json(), ast_json_copy(), ast_json_object_del(), ast_json_object_update(), ast_json_unref(), and NULL.
Referenced by conf_send_event_to_participants(), and pack_snapshots().
void conf_send_event_to_participants | ( | struct confbridge_conference * | conference, |
struct ast_channel * | chan, | ||
struct stasis_message * | msg | ||
) |
Send events to bridge participants.
conference | The conference bridge |
chan | The channel triggering the action |
msg | The stasis message describing the event |
Definition at line 414 of file confbridge_manager.c.
References confbridge_conference::active_list, ao2_lock, ao2_ref, ao2_unlock, ast_channel_name(), ast_channel_snapshot_get_latest(), ast_channel_uniqueid(), ast_debug, ast_json_array_append(), ast_json_array_create(), ast_json_object_get(), ast_json_string_set(), ast_json_unref(), AST_LIST_TRAVERSE, ast_log, ast_test_flag, ast_bridge_blob::blob, ast_bridge_blob::bridge, bridge_to_json(), confbridge_user::chan, ast_bridge_blob::channel, channel_to_json(), conf_find_user_profile(), confbridge_event_type_to_string(), confbridge_join_type(), confbridge_welcome_type(), confbridge_user::conference, confbridge_user::list, LOG_ERROR, confbridge_conference::name, user_profile::name, NULL, pack_bridge_and_channels(), pack_snapshots(), send_message(), stasis_message_data(), stasis_message_type(), confbridge_user::u_profile, user, USER_OPT_ECHO_EVENTS, and USER_OPT_SEND_EVENTS.
Referenced by send_conf_stasis().
|
static |
Definition at line 624 of file confbridge_manager.c.
References ast_attended_transfer_message::app, AST_ATTENDED_TRANSFER_DEST_APP, AST_BRIDGE_TRANSFER_SUCCESS, confbridge_handle_atxfer(), ast_attended_transfer_message::dest, ast_attended_transfer_message::dest_type, ast_attended_transfer_message::result, and stasis_message_data().
Referenced by manager_confbridge_init().
|
static |
Definition at line 595 of file confbridge_manager.c.
References confbridge_publish_manager_event(), and NULL.
Referenced by manager_confbridge_init().
const char * confbridge_event_type_to_string | ( | struct stasis_message_type * | event_type | ) |
Get the string representation of a confbridge stasis message type.
event_type | The confbridge event type such as 'confbridge_welcome_type()' |
The | string representation of the message type |
unknown | if not found |
Definition at line 249 of file confbridge_manager.c.
References confbridge_end_type(), confbridge_join_type(), confbridge_leave_type(), confbridge_mute_type(), confbridge_start_record_type(), confbridge_start_type(), confbridge_stop_record_type(), confbridge_talking_type(), confbridge_unmute_type(), and confbridge_welcome_type().
Referenced by conf_send_event_to_participants(), confbridge_publish_manager_event(), pack_bridge_and_channels(), and send_message().
|
static |
Definition at line 612 of file confbridge_manager.c.
References ast_free, confbridge_publish_manager_event(), get_admin_header(), get_muted_header(), and NULL.
Referenced by manager_confbridge_init().
|
static |
Definition at line 601 of file confbridge_manager.c.
References ast_free, confbridge_publish_manager_event(), get_admin_header(), and NULL.
Referenced by manager_confbridge_init().
|
static |
Definition at line 656 of file confbridge_manager.c.
References ast_free, confbridge_publish_manager_event(), get_admin_header(), and NULL.
Referenced by manager_confbridge_init().
|
static |
Definition at line 525 of file confbridge_manager.c.
References ao2_cleanup, ast_assert, ast_free, ast_json_object_get(), ast_json_string_get(), ast_manager_build_bridge_state_string(), ast_manager_build_channel_state_string(), ast_str_buffer(), ast_bridge_blob::blob, ast_bridge_blob::channel, conf_find_bridge(), confbridge_event_type_to_string(), EVENT_FLAG_CALL, manager_event, NULL, RAII_VAR, stasis_message_data(), and stasis_message_type().
Referenced by confbridge_end_cb(), confbridge_join_cb(), confbridge_leave_cb(), confbridge_mute_cb(), confbridge_start_cb(), confbridge_start_record_cb(), confbridge_stop_record_cb(), confbridge_talking_cb(), and confbridge_unmute_cb().
|
static |
Definition at line 589 of file confbridge_manager.c.
References confbridge_publish_manager_event(), and NULL.
Referenced by manager_confbridge_init().
|
static |
Definition at line 644 of file confbridge_manager.c.
References confbridge_publish_manager_event(), and NULL.
Referenced by manager_confbridge_init().
|
static |
Definition at line 650 of file confbridge_manager.c.
References confbridge_publish_manager_event(), and NULL.
Referenced by manager_confbridge_init().
|
static |
Definition at line 678 of file confbridge_manager.c.
References ast_free, ast_json_object_get(), ast_json_string_get(), ast_str_append_event_header(), ast_bridge_blob::blob, confbridge_publish_manager_event(), get_admin_header(), NULL, RAII_VAR, and stasis_message_data().
Referenced by manager_confbridge_init().
|
static |
Definition at line 667 of file confbridge_manager.c.
References ast_free, confbridge_publish_manager_event(), get_admin_header(), and NULL.
Referenced by manager_confbridge_init().
|
static |
Definition at line 579 of file confbridge_manager.c.
References get_bool_header().
Referenced by confbridge_join_cb(), confbridge_leave_cb(), confbridge_mute_cb(), confbridge_talking_cb(), and confbridge_unmute_cb().
|
static |
Definition at line 564 of file confbridge_manager.c.
References ast_json_is_true(), ast_json_object_get(), ast_str_append_event_header(), AST_YESNO, ast_bridge_blob::blob, and stasis_message_data().
Referenced by get_admin_header(), and get_muted_header().
|
static |
Definition at line 584 of file confbridge_manager.c.
References get_bool_header().
Referenced by confbridge_join_cb().
int manager_confbridge_init | ( | void | ) |
register stasis message routers to handle manager events for confbridge messages
0 | success |
non-zero | failure |
Definition at line 721 of file confbridge_manager.c.
References ast_attended_transfer_type(), ast_bridge_topic_all(), ast_channel_topic_all(), bridge_state_router, channel_state_router, confbridge_atxfer_cb(), confbridge_end_cb(), confbridge_end_type(), confbridge_join_cb(), confbridge_join_type(), confbridge_leave_cb(), confbridge_leave_type(), confbridge_mute_cb(), confbridge_mute_type(), confbridge_start_cb(), confbridge_start_record_cb(), confbridge_start_record_type(), confbridge_start_type(), confbridge_stop_record_cb(), confbridge_stop_record_type(), confbridge_talking_cb(), confbridge_talking_type(), confbridge_unmute_cb(), confbridge_unmute_type(), confbridge_welcome_type(), manager_confbridge_shutdown(), NULL, stasis_message_router_add(), stasis_message_router_create, and STASIS_MESSAGE_TYPE_INIT.
Referenced by load_module().
void manager_confbridge_shutdown | ( | void | ) |
unregister stasis message routers to handle manager events for confbridge messages
Definition at line 698 of file confbridge_manager.c.
References bridge_state_router, channel_state_router, confbridge_end_type(), confbridge_join_type(), confbridge_leave_type(), confbridge_mute_type(), confbridge_start_record_type(), confbridge_start_type(), confbridge_stop_record_type(), confbridge_talking_type(), confbridge_unmute_type(), confbridge_welcome_type(), NULL, stasis_message_router_unsubscribe(), and STASIS_MESSAGE_TYPE_CLEANUP.
Referenced by manager_confbridge_init(), and unload_module().
|
static |
Definition at line 329 of file confbridge_manager.c.
References AST_JSON_ARRAY, ast_json_pack(), ast_json_timeval(), ast_json_typeof(), confbridge_event_type_to_string(), NULL, stasis_message_timestamp(), and stasis_message_type().
Referenced by conf_send_event_to_participants(), and pack_snapshots().
|
static |
Definition at line 345 of file confbridge_manager.c.
References bridge_to_json(), channel_to_json(), and pack_bridge_and_channels().
Referenced by conf_send_event_to_participants().
|
static |
Definition at line 358 of file confbridge_manager.c.
References ao2_cleanup, ARRAY_LEN, ast_bridge_channel_queue_frame(), ast_channel_get_bridge_channel(), ast_channel_name(), ast_debug, AST_FRAME_TEXT_DATA, ast_free, ast_json_dump_string_format(), ast_json_free(), AST_JSON_PRETTY, ast_log, ast_msg_data_alloc(), AST_MSG_DATA_ATTR_BODY, AST_MSG_DATA_ATTR_CONTENT_TYPE, AST_MSG_DATA_ATTR_FROM, ast_msg_data_get_length(), AST_MSG_DATA_SOURCE_TYPE_IN_DIALOG, confbridge_event_type_to_string(), confbridge_leave_type(), ast_frame::data, ast_frame::datalen, ast_frame::frametype, LOG_ERROR, NULL, ast_frame::ptr, RAII_VAR, ast_msg_data_attribute::type, and ast_msg_data_attribute::value.
Referenced by conf_send_event_to_participants().
STASIS_MESSAGE_TYPE_DEFN | ( | confbridge_end_type | ) |
STASIS_MESSAGE_TYPE_DEFN | ( | confbridge_join_type | ) |
STASIS_MESSAGE_TYPE_DEFN | ( | confbridge_leave_type | ) |
STASIS_MESSAGE_TYPE_DEFN | ( | confbridge_mute_type | ) |
STASIS_MESSAGE_TYPE_DEFN | ( | confbridge_start_record_type | ) |
STASIS_MESSAGE_TYPE_DEFN | ( | confbridge_start_type | ) |
STASIS_MESSAGE_TYPE_DEFN | ( | confbridge_stop_record_type | ) |
STASIS_MESSAGE_TYPE_DEFN | ( | confbridge_talking_type | ) |
STASIS_MESSAGE_TYPE_DEFN | ( | confbridge_unmute_type | ) |
STASIS_MESSAGE_TYPE_DEFN | ( | confbridge_welcome_type | ) |
|
static |
Definition at line 229 of file confbridge_manager.c.
Referenced by manager_confbridge_init(), and manager_confbridge_shutdown().
|
static |
Definition at line 230 of file confbridge_manager.c.
Referenced by manager_confbridge_init(), and manager_confbridge_shutdown().