Asterisk - The Open Source Telephony Project GIT-master-8f1982c
|
Conference Bridge application. More...
#include "asterisk.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <signal.h>
#include "asterisk/cli.h"
#include "asterisk/file.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/lock.h"
#include "asterisk/bridge.h"
#include "asterisk/musiconhold.h"
#include "asterisk/say.h"
#include "asterisk/audiohook.h"
#include "asterisk/astobj2.h"
#include "confbridge/include/confbridge.h"
#include "asterisk/paths.h"
#include "asterisk/manager.h"
#include "asterisk/test.h"
#include "asterisk/stasis.h"
#include "asterisk/stasis_bridges.h"
#include "asterisk/stasis_channels.h"
#include "asterisk/json.h"
#include "asterisk/format_cache.h"
#include "asterisk/taskprocessor.h"
#include "asterisk/stream.h"
#include "asterisk/message.h"
Go to the source code of this file.
Data Structures | |
struct | async_datastore_data |
struct | async_delete_name_rec_task_data |
struct | async_playback_task_data |
struct | confbridge_hook_data |
struct | hangup_data |
struct | playback_task_data |
Macros | |
#define | CONFERENCE_BRIDGE_BUCKETS 53 |
#define | RECORD_FILENAME_INITIAL_SPACE 128 |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static int | action_confbridgekick (struct mansession *s, const struct message *m) |
static int | action_confbridgelist (struct mansession *s, const struct message *m) |
static int | action_confbridgelist_item (struct mansession *s, const char *id_text, struct confbridge_conference *conference, struct confbridge_user *user, int waiting) |
static int | action_confbridgelistrooms (struct mansession *s, const struct message *m) |
static int | action_confbridgelock (struct mansession *s, const struct message *m) |
static int | action_confbridgemute (struct mansession *s, const struct message *m) |
static int | action_confbridgesetsinglevideosrc (struct mansession *s, const struct message *m) |
static int | action_confbridgestartrecord (struct mansession *s, const struct message *m) |
static int | action_confbridgestoprecord (struct mansession *s, const struct message *m) |
static int | action_confbridgeunlock (struct mansession *s, const struct message *m) |
static int | action_confbridgeunmute (struct mansession *s, const struct message *m) |
static int | action_dialplan_exec (struct ast_bridge_channel *bridge_channel, struct conf_menu_action *menu_action) |
static int | action_kick_last (struct confbridge_conference *conference, struct ast_bridge_channel *bridge_channel, struct confbridge_user *user) |
static int | action_lock_unlock_helper (struct mansession *s, const struct message *m, int lock) |
static int | action_mute_unmute_helper (struct mansession *s, const struct message *m, int mute) |
static int | action_playback (struct ast_bridge_channel *bridge_channel, const char *playback_file) |
static int | action_playback_and_continue (struct confbridge_conference *conference, struct confbridge_user *user, struct ast_bridge_channel *bridge_channel, struct conf_menu *menu, const char *playback_file, const char *cur_dtmf, int *stop_prompts) |
static int | action_toggle_binaural (struct confbridge_conference *conference, struct confbridge_user *user, struct ast_bridge_channel *bridge_channel) |
static int | action_toggle_mute (struct confbridge_conference *conference, struct confbridge_user *user, struct ast_bridge_channel *bridge_channel) |
static int | action_toggle_mute_participants (struct confbridge_conference *conference, struct confbridge_user *user) |
static int | alloc_playback_chan (struct confbridge_conference *conference) |
static int | announce_user_count (struct confbridge_conference *conference, struct confbridge_user *user, struct ast_bridge_channel *bridge_channel) |
Announce number of users in the conference bridge to the caller. More... | |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static struct async_datastore_data * | async_datastore_data_alloc (void) |
static void | async_datastore_data_destroy (void *data) |
static int | async_delete_name_rec (struct confbridge_conference *conference, const char *filename) |
static int | async_delete_name_rec_task (void *data) |
Delete user's name file asynchronously. More... | |
static struct async_delete_name_rec_task_data * | async_delete_name_rec_task_data_alloc (struct confbridge_conference *conference, const char *filename) |
static void | async_delete_name_rec_task_data_destroy (struct async_delete_name_rec_task_data *atd) |
int | async_play_sound_file (struct confbridge_conference *conference, const char *filename, struct ast_channel *initiator) |
Play sound file into conference bridge asynchronously. More... | |
static int | async_play_sound_helper (struct confbridge_conference *conference, const char *filename, int say_number, struct ast_channel *initiator) |
void | async_play_sound_ready (struct ast_channel *chan) |
Indicate the initiator of an async sound file is ready for it to play. More... | |
static int | async_playback_task (void *data) |
Play an announcement into a confbridge asynchronously. More... | |
static struct async_playback_task_data * | async_playback_task_data_alloc (struct confbridge_conference *conference, const char *filename, int say_number, struct ast_channel *initiator) |
static void | async_playback_task_data_destroy (struct async_playback_task_data *aptd) |
static int | cli_mute_unmute_helper (int mute, struct ast_cli_args *a) |
static char * | complete_confbridge_name (const char *line, const char *word, int pos, int state) |
static char * | complete_confbridge_participant (const char *conference_name, const char *line, const char *word, int pos, int state) |
int | conf_add_post_join_action (struct confbridge_user *user, int(*func)(struct confbridge_user *user)) |
Queue a function to run with the given conference bridge user as an argument once the state transition is complete. More... | |
void | conf_add_user_active (struct confbridge_conference *conference, struct confbridge_user *user) |
Add a conference bridge user as an unmarked active user of the conference. More... | |
void | conf_add_user_marked (struct confbridge_conference *conference, struct confbridge_user *user) |
Add a conference bridge user as a marked active user of the conference. More... | |
void | conf_add_user_waiting (struct confbridge_conference *conference, struct confbridge_user *user) |
Add a conference bridge user as an waiting user of the conference. More... | |
void | conf_ended (struct confbridge_conference *conference) |
Callback to be called when the conference has become empty. More... | |
struct confbridge_conference * | conf_find_bridge (const char *conference_name) |
Find a confbridge by name. More... | |
static int | conf_get_pin (struct ast_channel *chan, struct confbridge_user *user) |
const char * | conf_get_sound (enum conf_sounds sound, struct bridge_profile_sounds *custom_sounds) |
Looks to see if sound file is stored in bridge profile sounds, if not default sound is provided. More... | |
int | conf_handle_dtmf (struct ast_bridge_channel *bridge_channel, struct confbridge_user *user, struct conf_menu_entry *menu_entry, struct conf_menu *menu) |
Once a DTMF sequence matches a sequence in the user's DTMF menu, this function will get called to perform the menu action. More... | |
void | conf_handle_first_join (struct confbridge_conference *conference) |
Callback to execute any time we transition from zero to one active users. More... | |
int | conf_handle_inactive_waitmarked (struct confbridge_user *user) |
Handle actions every time a waitmarked user joins w/o a marked user present. More... | |
int | conf_handle_only_person (struct confbridge_user *user) |
Handle actions whenever an user joins an empty conference. More... | |
void | conf_handle_second_active (struct confbridge_conference *conference) |
Handle when a conference moves to having more than one active participant. More... | |
static int | conf_handle_talker_cb (struct ast_bridge_channel *bridge_channel, void *hook_pvt, int talking) |
static int | conf_is_recording (struct confbridge_conference *conference) |
void | conf_moh_start (struct confbridge_user *user) |
Start MOH for the conference user. More... | |
void | conf_moh_stop (struct confbridge_user *user) |
Stop MOH for the conference user. More... | |
static void | conf_moh_suspend (struct confbridge_user *user) |
static void | conf_moh_unsuspend (struct confbridge_user *user) |
void | conf_mute_only_active (struct confbridge_conference *conference) |
Attempt to mute/play MOH to the only user in the conference if they require it. More... | |
static int | conf_rec_name (struct confbridge_user *user, const char *conf_name) |
void | conf_remove_user_active (struct confbridge_conference *conference, struct confbridge_user *user) |
Remove a conference bridge user from the unmarked active conference users in the conference. More... | |
void | conf_remove_user_marked (struct confbridge_conference *conference, struct confbridge_user *user) |
Remove a conference bridge user from the marked active conference users in the conference. More... | |
void | conf_remove_user_waiting (struct confbridge_conference *conference, struct confbridge_user *user) |
Remove a conference bridge user from the waiting conference users in the conference. More... | |
static int | conf_start_record (struct confbridge_conference *conference) |
static int | conf_stop_record (struct confbridge_conference *conference) |
void | conf_update_user_mute (struct confbridge_user *user) |
Update the actual mute status of the user and set it on the bridge. More... | |
static int | confbridge_exec (struct ast_channel *chan, const char *data) |
The ConfBridge application. More... | |
void | confbridge_handle_atxfer (struct ast_attended_transfer_message *msg) |
Create join/leave events for attended transfers. More... | |
static void | confbridge_unlock_and_unref (void *obj) |
static int | conference_bridge_cmp_cb (void *obj, void *arg, int flags) |
Comparison function used for conference bridges container. More... | |
static int | conference_bridge_hash_cb (const void *obj, const int flags) |
Hashing function used for conference bridges container. More... | |
static int | confkick_exec (struct ast_channel *chan, const char *data) |
static void | destroy_conference_bridge (void *obj) |
Destroy a conference bridge. More... | |
static int | execute_menu_entry (struct confbridge_conference *conference, struct confbridge_user *user, struct ast_bridge_channel *bridge_channel, struct conf_menu_entry *menu_entry, struct conf_menu *menu) |
static int | func_confbridge_channels (struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) |
static int | func_confbridge_info (struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) |
static int | generic_lock_unlock_helper (int lock, const char *conference_name) |
static int | generic_mute_unmute_helper (int mute, const char *conference_name, const char *chan_name) |
static void | generic_mute_unmute_user (struct confbridge_conference *conference, struct confbridge_user *user, int mute) |
static char * | handle_cli_confbridge_kick (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_confbridge_list (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static void | handle_cli_confbridge_list_item (struct ast_cli_args *a, struct confbridge_user *user, int waiting) |
static char * | handle_cli_confbridge_lock (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_confbridge_mute (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_confbridge_start_record (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_confbridge_stop_record (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_confbridge_unlock (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_confbridge_unmute (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static int | handle_conf_user_join (struct confbridge_user *user) |
Call the proper join event handler for the user for the conference bridge's current state. More... | |
static int | handle_conf_user_leave (struct confbridge_user *user) |
Call the proper leave event handler for the user for the conference bridge's current state. More... | |
static void | handle_video_on_exit (struct confbridge_conference *conference, struct ast_channel *chan) |
static void | handle_video_on_join (struct confbridge_conference *conference, struct ast_channel *chan, int marked) |
static void | hangup_data_destroy (struct hangup_data *hangup) |
static void | hangup_data_init (struct hangup_data *hangup, struct confbridge_conference *conference) |
static int | hangup_playback (void *data) |
Hang up the announcer channel. More... | |
static int | is_new_rec_file (const char *rec_file, struct ast_str **orig_rec_file) |
static int | join_callback (struct ast_bridge_channel *bridge_channel, void *ignore) |
static struct confbridge_conference * | join_conference_bridge (const char *conference_name, struct confbridge_user *user) |
Join a conference bridge. More... | |
static int | kick_conference_participant (struct confbridge_conference *conference, const char *channel) |
static void | leave_conference (struct confbridge_user *user) |
Leave a conference. More... | |
static int | load_module (void) |
Load the module. More... | |
static int | play_file (struct ast_bridge_channel *bridge_channel, struct ast_channel *channel, const char *filename) |
Playback the given filename and monitor for any dtmf interrupts. More... | |
static int | play_prompt_to_user (struct confbridge_user *user, const char *filename) |
Play back an audio file to a channel. More... | |
int | play_sound_file (struct confbridge_conference *conference, const char *filename) |
Play sound file into conference bridge. More... | |
static int | play_sound_helper (struct confbridge_conference *conference, const char *filename, int say_number) |
static int | play_sound_number (struct confbridge_conference *conference, int say_number) |
Play number into the conference bridge. More... | |
static void | playback_common (struct confbridge_conference *conference, const char *filename, int say_number) |
static int | playback_task (void *data) |
Play an announcement into a confbridge. More... | |
static void | playback_task_data_destroy (struct playback_task_data *ptd) |
static void | playback_task_data_init (struct playback_task_data *ptd, struct confbridge_conference *conference, const char *filename, int say_number) |
static int | push_announcer (struct confbridge_conference *conference) |
Push the announcer channel into the bridge. More... | |
static int | register_channel_tech (struct ast_channel_tech *tech) |
static int | reload (void) |
static void | send_conf_end_event (struct confbridge_conference *conference) |
static void | send_conf_start_event (struct confbridge_conference *conference) |
static void | send_conf_stasis (struct confbridge_conference *conference, struct ast_channel *chan, struct stasis_message_type *type, struct ast_json *extras, int channel_topic) |
static void | send_conf_stasis_snapshots (struct confbridge_conference *conference, struct ast_channel_snapshot *chan_snapshot, struct stasis_message_type *type, struct ast_json *extras) |
static int | send_event_hook_callback (struct ast_bridge_channel *bridge_channel, void *data) |
static void | send_join_event (struct confbridge_user *user, struct confbridge_conference *conference) |
static void | send_leave_event (struct confbridge_user *user, struct confbridge_conference *conference) |
static void | send_mute_event (struct confbridge_user *user, struct confbridge_conference *conference) |
static void | send_start_record_event (struct confbridge_conference *conference) |
static void | send_stop_record_event (struct confbridge_conference *conference) |
static void | send_unmute_event (struct confbridge_user *user, struct confbridge_conference *conference) |
static void | set_rec_filename (struct confbridge_conference *conference, struct ast_str **filename, int is_new) |
static int | setup_async_playback_datastore (struct ast_channel *initiator) |
Prepare the async playback datastore. More... | |
static int | sound_file_exists (const char *filename) |
static int | unload_module (void) |
Called when module is being unloaded. More... | |
static void | unregister_channel_tech (struct ast_channel_tech *tech) |
static int | user_timeout (struct ast_bridge_channel *bridge_channel, void *ignore) |
static void | wait_for_initiator (struct ast_channel *initiator) |
Wait for the initiator of an async playback to be ready. More... | |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Conference Bridge Application" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .reload = reload, .load_pri = AST_MODPRI_DEVSTATE_PROVIDER, .optional_modules = "codec_speex,func_jitterbuffer", } |
static const char | app [] = "ConfBridge" |
static const char | app2 [] = "ConfKick" |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_datastore_info | async_datastore_info |
Datastore used for timing of async announcement playback. More... | |
static struct ast_cli_entry | cli_confbridge [] |
static struct ast_custom_function | confbridge_channels_function |
static struct ast_custom_function | confbridge_function |
static struct ast_custom_function | confbridge_info_function |
struct ao2_container * | conference_bridges |
Container to hold all conference bridges in progress. More... | |
Conference Bridge application.
This is a conference bridge application utilizing the bridging core.
Definition in file app_confbridge.c.
#define CONFERENCE_BRIDGE_BUCKETS 53 |
Number of buckets our conference bridges container can have
Definition at line 598 of file app_confbridge.c.
#define RECORD_FILENAME_INITIAL_SPACE 128 |
Initial recording filename space.
Definition at line 601 of file app_confbridge.c.
|
static |
Definition at line 4733 of file app_confbridge.c.
|
static |
Definition at line 4733 of file app_confbridge.c.
|
static |
Definition at line 4266 of file app_confbridge.c.
References ao2_container_count(), ao2_find, ao2_ref, ast_strlen_zero(), astman_get_header(), astman_send_ack(), astman_send_error(), conference_bridges, kick_conference_participant(), and OBJ_KEY.
Referenced by load_module().
|
static |
Definition at line 4098 of file app_confbridge.c.
References action_confbridgelist_item(), confbridge_conference::active_list, ao2_container_count(), ao2_find, ao2_lock, ao2_ref, ao2_unlock, AST_LIST_TRAVERSE, ast_strlen_zero(), astman_get_header(), astman_send_error(), astman_send_list_complete_end(), astman_send_list_complete_start(), astman_send_listack(), conference_bridges, OBJ_KEY, total, user, and confbridge_conference::waiting_list.
Referenced by load_module().
|
static |
Definition at line 4048 of file app_confbridge.c.
References ao2_ref, ast_channel_get_up_time(), ast_channel_snapshot_get_latest(), ast_channel_uniqueid(), ast_free, ast_manager_build_channel_state_string(), ast_str_buffer(), ast_test_flag, AST_YESNO, astman_append(), confbridge_conference::name, USER_OPT_ADMIN, USER_OPT_ENDMARKED, USER_OPT_ENDMARKEDANY, USER_OPT_MARKEDUSER, and USER_OPT_WAITMARKED.
Referenced by action_confbridgelist().
|
static |
Definition at line 4143 of file app_confbridge.c.
References confbridge_conference::activeusers, ao2_container_count(), ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_lock, ao2_ref, ao2_unlock, ast_strlen_zero(), AST_YESNO, astman_append(), astman_get_header(), astman_send_error(), astman_send_list_complete_end(), astman_send_list_complete_start(), astman_send_listack(), conference_bridges, confbridge_conference::locked, confbridge_conference::markedusers, confbridge_conference::muted, confbridge_conference::name, and confbridge_conference::waitingusers.
Referenced by load_module().
|
static |
Definition at line 4261 of file app_confbridge.c.
References action_lock_unlock_helper().
Referenced by load_module().
|
static |
Definition at line 4232 of file app_confbridge.c.
References action_mute_unmute_helper().
Referenced by load_module().
|
static |
Definition at line 4378 of file app_confbridge.c.
References confbridge_conference::active_list, ao2_container_count(), ao2_find, ao2_lock, ao2_ref, ao2_unlock, ast_bridge_set_single_src_video_mode(), ast_channel_name(), AST_LIST_TRAVERSE, ast_strlen_zero(), astman_get_header(), astman_send_ack(), astman_send_error(), confbridge_conference::bridge, conference_bridges, OBJ_KEY, and user.
Referenced by load_module().
|
static |
Definition at line 4299 of file app_confbridge.c.
References ao2_container_count(), ao2_find, ao2_lock, ao2_ref, ao2_unlock, ast_copy_string(), ast_strlen_zero(), astman_get_header(), astman_send_ack(), astman_send_error(), confbridge_conference::b_profile, conf_is_recording(), conf_start_record(), conference_bridges, OBJ_KEY, and bridge_profile::rec_file.
Referenced by load_module().
|
static |
Definition at line 4344 of file app_confbridge.c.
References ao2_container_count(), ao2_find, ao2_lock, ao2_ref, ao2_unlock, ast_strlen_zero(), astman_get_header(), astman_send_ack(), astman_send_error(), conf_stop_record(), conference_bridges, and OBJ_KEY.
Referenced by load_module().
|
static |
Definition at line 4257 of file app_confbridge.c.
References action_lock_unlock_helper().
Referenced by load_module().
|
static |
Definition at line 4228 of file app_confbridge.c.
References action_mute_unmute_helper().
Referenced by load_module().
|
static |
Definition at line 3202 of file app_confbridge.c.
References args, ast_channel_context(), ast_channel_context_set(), ast_channel_exten(), ast_channel_exten_set(), ast_channel_lock, ast_channel_pbx(), ast_channel_pbx_set(), ast_channel_priority(), ast_channel_priority_set(), ast_channel_unlock, ast_pbx_run_args(), ast_strdupa, ast_bridge_channel::chan, conf_menu_action::context, voicemailpwcheck::context, conf_menu_action::data, conf_menu_action::dialplan_args, conf_menu_action::exten, NULL, conf_menu_action::priority, and priority.
Referenced by execute_menu_entry().
|
static |
Definition at line 3165 of file app_confbridge.c.
References confbridge_conference::active_list, ao2_lock, ao2_unlock, ast_bridge_remove(), ast_channel_name(), AST_LIST_LAST, ast_log, ast_test_flag, confbridge_conference::b_profile, confbridge_conference::bridge, confbridge_user::chan, ast_bridge_channel::chan, conf_get_sound(), CONF_SOUND_ERROR_MENU, confbridge_user::conference, confbridge_user::kicked, LOG_WARNING, confbridge_conference::name, NULL, pbx_builtin_setvar_helper(), play_file(), bridge_profile::sounds, confbridge_user::u_profile, and USER_OPT_ADMIN.
Referenced by execute_menu_entry().
|
static |
Definition at line 4237 of file app_confbridge.c.
References ao2_container_count(), ast_strlen_zero(), astman_get_header(), astman_send_ack(), astman_send_error(), conference_bridges, generic_lock_unlock_helper(), and lock.
Referenced by action_confbridgelock(), and action_confbridgeunlock().
|
static |
Definition at line 4195 of file app_confbridge.c.
References ao2_container_count(), ast_strlen_zero(), astman_get_header(), astman_send_ack(), astman_send_error(), conference_bridges, and generic_mute_unmute_helper().
Referenced by action_confbridgemute(), and action_confbridgeunmute().
|
static |
Definition at line 3080 of file app_confbridge.c.
References ast_log, ast_strdupa, ast_stream_and_wait(), ast_strsep(), AST_STRSEP_STRIP, AST_STRSEP_TRIM, ast_bridge_channel::chan, make_ari_stubs::file, LOG_WARNING, and NULL.
Referenced by execute_menu_entry().
|
static |
Definition at line 3094 of file app_confbridge.c.
References ast_channel_language(), ast_copy_string(), AST_DIGIT_ANY, ast_log, ast_stopstream(), ast_strdupa, ast_streamfile(), ast_strsep(), AST_STRSEP_STRIP, AST_STRSEP_TRIM, ast_waitstream(), ast_bridge_channel::chan, conf_find_menu_entry_by_sequence(), conf_menu_entry_destroy(), digit, conf_menu_entry::dtmf, execute_menu_entry(), make_ari_stubs::file, LOG_WARNING, MAXIMUM_DTMF_FEATURE_STRING, and NULL.
Referenced by execute_menu_entry().
|
static |
Definition at line 3024 of file app_confbridge.c.
References ast_bridge_channel_lock_bridge(), ast_bridge_unlock, ast_bridge_channel::binaural_suspended, ast_bridge_channel::bridge, conf_get_sound(), CONF_SOUND_BINAURAL_OFF, CONF_SOUND_BINAURAL_ON, NULL, and play_file().
Referenced by execute_menu_entry().
|
static |
Definition at line 3009 of file app_confbridge.c.
References confbridge_conference::b_profile, conf_get_sound(), CONF_SOUND_MUTED, CONF_SOUND_UNMUTED, confbridge_hook_data::conference, generic_mute_unmute_user(), NULL, play_file(), and bridge_profile::sounds.
Referenced by execute_menu_entry().
|
static |
Definition at line 3038 of file app_confbridge.c.
References confbridge_conference::active_list, ao2_lock, ao2_unlock, ast_autoservice_start(), ast_autoservice_stop(), ast_channel_language(), AST_LIST_TRAVERSE, ast_stream_and_wait(), ast_test_flag, async_play_sound_file(), confbridge_conference::b_profile, conf_get_sound(), CONF_SOUND_PARTICIPANTS_MUTED, CONF_SOUND_PARTICIPANTS_UNMUTED, conf_update_user_mute(), confbridge_user::conference, bridge_profile::language, confbridge_user::list, confbridge_conference::muted, confbridge_user::muted, NULL, play_sound_file(), bridge_profile::sounds, confbridge_user::u_profile, and USER_OPT_ADMIN.
Referenced by execute_menu_entry().
|
static |
Definition at line 1630 of file app_confbridge.c.
References ao2_ref, ast_channel_lock, ast_channel_name(), ast_channel_unlock, ast_debug, ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_slin, ast_hangup(), ast_request(), ast_taskprocessor_build_name(), ast_taskprocessor_get(), AST_TASKPROCESSOR_MAX_NAME, confbridge_conference::b_profile, bridge_profile::language, confbridge_conference::name, NULL, confbridge_conference::playback_chan, confbridge_conference::playback_queue, and TPS_REF_DEFAULT.
Referenced by join_conference_bridge().
|
static |
Announce number of users in the conference bridge to the caller.
conference | Conference bridge to peek at |
user | Optional Caller |
bridge_channel | The bridged channel involved |
0 | on success. |
-1 | if the user hung up. |
Definition at line 1123 of file app_confbridge.c.
References confbridge_conference::activeusers, ast_channel_language(), ast_say_number(), ast_stream_and_wait(), confbridge_conference::b_profile, ast_channel::bridge_channel, conf_get_sound(), CONF_SOUND_ONLY_ONE, CONF_SOUND_OTHER_IN_PARTY, CONF_SOUND_THERE_ARE, NULL, play_file(), play_sound_file(), play_sound_number(), sound_file_exists(), and bridge_profile::sounds.
Referenced by execute_menu_entry(), and join_conference_bridge().
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 4733 of file app_confbridge.c.
|
static |
Definition at line 2221 of file app_confbridge.c.
References ast_cond_init, ast_malloc, ast_mutex_init, async_datastore_data::cond, async_datastore_data::lock, NULL, and async_datastore_data::wait.
Referenced by setup_async_playback_datastore().
|
static |
Definition at line 2189 of file app_confbridge.c.
References ast_cond_destroy, ast_free, ast_mutex_destroy, async_datastore_data::cond, and async_datastore_data::lock.
|
static |
Definition at line 2628 of file app_confbridge.c.
References ast_log, ast_strlen_zero(), ast_taskprocessor_push(), async_delete_name_rec_task(), async_delete_name_rec_task_data_alloc(), async_delete_name_rec_task_data_destroy(), async_delete_name_rec_task_data::conference, async_delete_name_rec_task_data::filename, LOG_WARNING, confbridge_conference::name, confbridge_conference::playback_queue, and sound_file_exists().
Referenced by confbridge_exec().
|
static |
Delete user's name file asynchronously.
This runs in the playback queue taskprocessor. This ensures that sound file is removed after playback is finished and not before.
data | An async_delete_name_rec_task_data |
Definition at line 2616 of file app_confbridge.c.
References ast_filedelete(), ast_log, async_delete_name_rec_task_data_destroy(), async_delete_name_rec_task_data::conference, async_delete_name_rec_task_data::filename, LOG_DEBUG, confbridge_conference::name, and NULL.
Referenced by async_delete_name_rec().
|
static |
Definition at line 2585 of file app_confbridge.c.
References ast_malloc, async_delete_name_rec_task_data::conference, async_delete_name_rec_task_data::filename, and NULL.
Referenced by async_delete_name_rec().
|
static |
Definition at line 2602 of file app_confbridge.c.
References ast_free.
Referenced by async_delete_name_rec(), and async_delete_name_rec_task().
int async_play_sound_file | ( | struct confbridge_conference * | conference, |
const char * | filename, | ||
struct ast_channel * | initiator | ||
) |
Play sound file into conference bridge asynchronously.
If the initiator parameter is non-NULL, then the playback will wait for that initiator channel to get back in the bridge before playing the sound file. This way, the initiator has no danger of hearing a "clipped" file.
conference | The conference bridge to play sound file into |
filename | Sound file to play |
initiator | Channel that initiated playback. |
0 | success |
-1 | failure |
Definition at line 2418 of file app_confbridge.c.
References async_play_sound_helper(), async_playback_task_data::conference, async_playback_task_data::filename, and async_playback_task_data::initiator.
Referenced by action_toggle_mute_participants(), confbridge_exec(), and leave_marked().
|
static |
Definition at line 2384 of file app_confbridge.c.
References ast_log, ast_strlen_zero(), ast_taskprocessor_push(), async_playback_task(), async_playback_task_data_alloc(), async_playback_task_data_destroy(), async_playback_task_data::conference, async_playback_task_data::filename, async_playback_task_data::initiator, LOG_WARNING, confbridge_conference::name, confbridge_conference::playback_queue, async_playback_task_data::say_number, and sound_file_exists().
Referenced by async_play_sound_file().
void async_play_sound_ready | ( | struct ast_channel * | chan | ) |
Indicate the initiator of an async sound file is ready for it to play.
When playing an async sound file, the initiator is typically either out of the bridge or not in a position to hear the queued announcement. This function lets the announcement thread know that the initiator is now ready for the sound to play.
If an async announcement was queued and no initiator channel was provided, then this is a no-op
chan | The channel that initiated the async announcement |
Definition at line 2424 of file app_confbridge.c.
References ast_channel_datastore_find(), ast_channel_lock, ast_channel_unlock, ast_cond_signal, ast_mutex_lock, ast_mutex_unlock, async_datastore_info, async_datastore_data::cond, ast_datastore::data, async_datastore_data::lock, NULL, and async_datastore_data::wait.
Referenced by conf_handle_dtmf(), confbridge_exec(), and join_callback().
|
static |
Play an announcement into a confbridge asynchronously.
This runs in the playback queue taskprocessor. This ensures that all playbacks are handled in sequence and do not play over top one another.
data | An async_playback_task_data |
Definition at line 2369 of file app_confbridge.c.
References async_playback_task_data_destroy(), async_playback_task_data::conference, async_playback_task_data::filename, async_playback_task_data::initiator, playback_common(), async_playback_task_data::say_number, and wait_for_initiator().
Referenced by async_play_sound_helper().
|
static |
Definition at line 2277 of file app_confbridge.c.
References ast_channel_lock, ast_channel_ref, ast_channel_unlock, ast_malloc, async_playback_task_data::conference, async_playback_task_data::filename, async_playback_task_data::initiator, NULL, async_playback_task_data::say_number, and setup_async_playback_datastore().
Referenced by async_play_sound_helper().
|
static |
Definition at line 2323 of file app_confbridge.c.
References ast_channel_cleanup, ast_free, and async_playback_task_data::initiator.
Referenced by async_play_sound_helper(), and async_playback_task().
|
static |
Definition at line 3717 of file app_confbridge.c.
References a, ast_cli(), and generic_mute_unmute_helper().
Referenced by handle_cli_confbridge_mute(), and handle_cli_confbridge_unmute().
|
static |
Definition at line 3423 of file app_confbridge.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ast_strdup, conference_bridges, confbridge_conference::name, and NULL.
Referenced by handle_cli_confbridge_kick(), handle_cli_confbridge_list(), handle_cli_confbridge_lock(), handle_cli_confbridge_mute(), handle_cli_confbridge_start_record(), handle_cli_confbridge_stop_record(), handle_cli_confbridge_unlock(), and handle_cli_confbridge_unmute().
|
static |
Definition at line 3445 of file app_confbridge.c.
References confbridge_conference::active_list, ao2_cleanup, ao2_find, ast_channel_name(), AST_LIST_TRAVERSE, ast_strdup, confbridge_user::conference, conference_bridges, confbridge_user::list, NULL, OBJ_KEY, RAII_VAR, SCOPED_AO2LOCK, user, and confbridge_conference::waiting_list.
Referenced by handle_cli_confbridge_kick(), handle_cli_confbridge_mute(), and handle_cli_confbridge_unmute().
int conf_add_post_join_action | ( | struct confbridge_user * | user, |
int(*)(struct confbridge_user *user) | func | ||
) |
Queue a function to run with the given conference bridge user as an argument once the state transition is complete.
user | The conference bridge user to pass to the function |
func | The function to queue |
0 | success |
non-zero | failure |
Definition at line 1579 of file app_confbridge.c.
References ast_calloc, AST_LIST_INSERT_TAIL, post_join_action::func, and post_join_action::list.
Referenced by conf_default_join_waitmarked(), join_marked(), join_unmarked(), and transition_to_marked().
void conf_add_user_active | ( | struct confbridge_conference * | conference, |
struct confbridge_user * | user | ||
) |
Add a conference bridge user as an unmarked active user of the conference.
conference | The conference bridge to add the user to |
user | The conference bridge user to add to the conference |
Definition at line 4532 of file app_confbridge.c.
References confbridge_conference::active_list, confbridge_conference::activeusers, and AST_LIST_INSERT_TAIL.
Referenced by join_active(), and join_unmarked().
void conf_add_user_marked | ( | struct confbridge_conference * | conference, |
struct confbridge_user * | user | ||
) |
Add a conference bridge user as a marked active user of the conference.
conference | The conference bridge to add the user to |
user | The conference bridge user to add to the conference |
Definition at line 4538 of file app_confbridge.c.
References confbridge_conference::active_list, confbridge_conference::activeusers, AST_LIST_INSERT_TAIL, and confbridge_conference::markedusers.
Referenced by join_marked().
void conf_add_user_waiting | ( | struct confbridge_conference * | conference, |
struct confbridge_user * | user | ||
) |
Add a conference bridge user as an waiting user of the conference.
conference | The conference bridge to add the user to |
user | The conference bridge user to add to the conference |
Definition at line 4545 of file app_confbridge.c.
References AST_LIST_INSERT_TAIL, confbridge_conference::waiting_list, and confbridge_conference::waitingusers.
Referenced by conf_default_join_waitmarked().
void conf_ended | ( | struct confbridge_conference * | conference | ) |
Callback to be called when the conference has become empty.
conference | The conference bridge |
Definition at line 1607 of file app_confbridge.c.
References ao2_lock, ao2_unlink, ao2_unlock, ast_context_remove_extension(), ast_strlen_zero(), confbridge_conference::b_profile, conf_stop_record(), conference_bridges, E_MATCH, confbridge_conference::name, NULL, pbx_find_extension(), bridge_profile::regcontext, send_conf_end_event(), and pbx_find_info::stacklen.
Referenced by transition_to_empty().
struct confbridge_conference * conf_find_bridge | ( | const char * | conference_name | ) |
Find a confbridge by name.
conference_name | The name to search for |
Definition at line 922 of file app_confbridge.c.
References ao2_find, conference_bridges, and OBJ_KEY.
Referenced by confbridge_publish_manager_event().
|
static |
Definition at line 2486 of file app_confbridge.c.
References ast_app_getdata(), ast_channel_language(), AST_DIGIT_ANY, ast_streamfile(), ast_waitstream(), conf_get_sound(), CONF_SOUND_GET_PIN, CONF_SOUND_INVALID_PIN, len(), and MAX_PIN.
Referenced by confbridge_exec().
const char * conf_get_sound | ( | enum conf_sounds | sound, |
struct bridge_profile_sounds * | custom_sounds | ||
) |
Looks to see if sound file is stored in bridge profile sounds, if not default sound is provided.
Definition at line 661 of file app_confbridge.c.
References bridge_profile_sounds::begin, bridge_profile_sounds::binauraloff, bridge_profile_sounds::binauralon, CONF_SOUND_BEGIN, CONF_SOUND_BINAURAL_OFF, CONF_SOUND_BINAURAL_ON, CONF_SOUND_ERROR_MENU, CONF_SOUND_GET_PIN, CONF_SOUND_HAS_JOINED, CONF_SOUND_HAS_LEFT, CONF_SOUND_INVALID_PIN, CONF_SOUND_JOIN, CONF_SOUND_KICKED, CONF_SOUND_LEADER_HAS_LEFT, CONF_SOUND_LEAVE, CONF_SOUND_LOCKED, CONF_SOUND_LOCKED_NOW, CONF_SOUND_MUTED, CONF_SOUND_ONLY_ONE, CONF_SOUND_ONLY_PERSON, CONF_SOUND_OTHER_IN_PARTY, CONF_SOUND_PARTICIPANTS_MUTED, CONF_SOUND_PARTICIPANTS_UNMUTED, CONF_SOUND_PLACE_IN_CONF, CONF_SOUND_THERE_ARE, CONF_SOUND_UNLOCKED_NOW, CONF_SOUND_UNMUTED, CONF_SOUND_WAIT_FOR_LEADER, bridge_profile_sounds::errormenu, bridge_profile_sounds::getpin, bridge_profile_sounds::hasjoin, bridge_profile_sounds::hasleft, bridge_profile_sounds::invalidpin, bridge_profile_sounds::join, bridge_profile_sounds::kicked, bridge_profile_sounds::leaderhasleft, bridge_profile_sounds::leave, bridge_profile_sounds::locked, bridge_profile_sounds::lockednow, bridge_profile_sounds::muted, bridge_profile_sounds::onlyone, bridge_profile_sounds::onlyperson, bridge_profile_sounds::otherinparty, bridge_profile_sounds::participantsmuted, bridge_profile_sounds::participantsunmuted, bridge_profile_sounds::placeintoconf, S_OR, bridge_profile_sounds::thereare, bridge_profile_sounds::unlockednow, bridge_profile_sounds::unmuted, and bridge_profile_sounds::waitforleader.
Referenced by action_kick_last(), action_toggle_binaural(), action_toggle_mute(), action_toggle_mute_participants(), announce_user_count(), conf_get_pin(), conf_handle_inactive_waitmarked(), conf_handle_only_person(), confbridge_exec(), execute_menu_entry(), handle_cli_confbridge_show_bridge_profile(), join_conference_bridge(), leave_marked(), and post_join_play_begin().
int conf_handle_dtmf | ( | struct ast_bridge_channel * | bridge_channel, |
struct confbridge_user * | user, | ||
struct conf_menu_entry * | menu_entry, | ||
struct conf_menu * | menu | ||
) |
Once a DTMF sequence matches a sequence in the user's DTMF menu, this function will get called to perform the menu action.
bridge_channel | Bridged channel this is involving |
user | the conference user to perform the action on. |
menu_entry | the menu entry that invoked this callback to occur. |
menu | an AO2 referenced pointer to the entire menu structure the menu_entry derived from. |
0 | success |
-1 | failure |
Definition at line 3357 of file app_confbridge.c.
References async_play_sound_ready(), ast_bridge_channel::chan, conf_moh_suspend(), conf_moh_unsuspend(), and execute_menu_entry().
Referenced by menu_hook_callback().
void conf_handle_first_join | ( | struct confbridge_conference * | conference | ) |
Callback to execute any time we transition from zero to one active users.
conference | The conference bridge with a single active user joined |
Definition at line 1591 of file app_confbridge.c.
References AST_DEVICE_INUSE, AST_DEVSTATE_CACHABLE, ast_devstate_changed(), and confbridge_conference::name.
Referenced by join_marked(), join_unmarked(), and join_waitmarked().
int conf_handle_inactive_waitmarked | ( | struct confbridge_user * | user | ) |
Handle actions every time a waitmarked user joins w/o a marked user present.
user | The waitmarked user |
0 | success |
-1 | failure |
Definition at line 1555 of file app_confbridge.c.
References ast_test_flag, conf_get_sound(), CONF_SOUND_WAIT_FOR_LEADER, play_prompt_to_user(), and USER_OPT_QUIET.
Referenced by conf_default_join_waitmarked().
int conf_handle_only_person | ( | struct confbridge_user * | user | ) |
Handle actions whenever an user joins an empty conference.
user | The user |
Definition at line 1566 of file app_confbridge.c.
References ast_test_flag, conf_get_sound(), CONF_SOUND_ONLY_PERSON, play_prompt_to_user(), USER_OPT_NOONLYPERSON, and USER_OPT_QUIET.
Referenced by join_marked(), and join_unmarked().
void conf_handle_second_active | ( | struct confbridge_conference * | conference | ) |
Handle when a conference moves to having more than one active participant.
conference | The conference bridge with more than one active participant |
Definition at line 1596 of file app_confbridge.c.
References confbridge_conference::active_list, AST_LIST_FIRST, ast_test_flag, conf_moh_stop(), conf_update_user_mute(), confbridge_user::conference, confbridge_user::u_profile, and USER_OPT_MUSICONHOLD.
Referenced by join_active(), join_marked(), and join_unmarked().
|
static |
Definition at line 2458 of file app_confbridge.c.
References ao2_cleanup, ao2_find, ao2_lock, ao2_unlock, ast_json_pack(), ast_json_unref(), ast_test_flag, ast_bridge_channel::chan, confbridge_talking_type(), confbridge_user::conference, conference_bridges, NULL, OBJ_KEY, RAII_VAR, send_conf_stasis(), and USER_OPT_ADMIN.
Referenced by confbridge_exec().
|
static |
Definition at line 938 of file app_confbridge.c.
References NULL, and confbridge_conference::record_chan.
Referenced by action_confbridgestartrecord(), conf_start_record(), conf_stop_record(), and handle_cli_confbridge_start_record().
void conf_moh_start | ( | struct confbridge_user * | user | ) |
Start MOH for the conference user.
user | Conference user to start MOH on. |
Definition at line 1498 of file app_confbridge.c.
References ast_bridge_lock, ast_bridge_suspend(), ast_bridge_unlock, ast_bridge_unsuspend(), ast_moh_start(), and NULL.
Referenced by conf_mute_moh_inactive_waitmarked(), conf_mute_only_active(), and leave_marked().
void conf_moh_stop | ( | struct confbridge_user * | user | ) |
Stop MOH for the conference user.
user | Conference user to stop MOH on. |
Definition at line 1471 of file app_confbridge.c.
References ast_bridge_lock, ast_bridge_suspend(), ast_bridge_unlock, ast_bridge_unsuspend(), and ast_moh_stop().
Referenced by conf_default_leave_waitmarked(), conf_handle_second_active(), leave_marked(), leave_unmarked(), and transition_to_marked().
|
static |
Definition at line 1546 of file app_confbridge.c.
References ao2_lock, ao2_unlock, and ast_moh_stop().
Referenced by conf_handle_dtmf().
|
static |
Definition at line 1531 of file app_confbridge.c.
References ao2_lock, ao2_unlock, ast_moh_start(), and NULL.
Referenced by conf_handle_dtmf(), and confbridge_exec().
void conf_mute_only_active | ( | struct confbridge_conference * | conference | ) |
Attempt to mute/play MOH to the only user in the conference if they require it.
conference | A conference bridge containing a single user |
Definition at line 4564 of file app_confbridge.c.
References confbridge_conference::active_list, AST_LIST_FIRST, ast_test_flag, conf_moh_start(), conf_update_user_mute(), confbridge_user::conference, confbridge_user::u_profile, and USER_OPT_MUSICONHOLD.
Referenced by transition_to_single(), and transition_to_single_marked().
|
static |
Definition at line 2535 of file app_confbridge.c.
References ast_channel_uniqueid(), ast_config_AST_SPOOL_DIR, ast_dsp_get_threshold_from_settings(), ast_filedelete(), ast_log, ast_mkdir(), ast_play_and_record(), ast_record_review(), ast_test_flag, errno, LOG_WARNING, NULL, PATH_MAX, THRESHOLD_SILENCE, and USER_OPT_ANNOUNCE_JOIN_LEAVE_REVIEW.
Referenced by confbridge_exec().
void conf_remove_user_active | ( | struct confbridge_conference * | conference, |
struct confbridge_user * | user | ||
) |
Remove a conference bridge user from the unmarked active conference users in the conference.
conference | The conference bridge to remove the user from |
user | The conference bridge user to remove from the conference |
Definition at line 4551 of file app_confbridge.c.
References confbridge_conference::active_list, confbridge_conference::activeusers, and AST_LIST_REMOVE.
Referenced by leave_active(), and leave_unmarked().
void conf_remove_user_marked | ( | struct confbridge_conference * | conference, |
struct confbridge_user * | user | ||
) |
Remove a conference bridge user from the marked active conference users in the conference.
conference | The conference bridge to remove the user from |
user | The conference bridge user to remove from the conference |
Definition at line 4557 of file app_confbridge.c.
References confbridge_conference::active_list, confbridge_conference::activeusers, AST_LIST_REMOVE, and confbridge_conference::markedusers.
Referenced by leave_marked().
void conf_remove_user_waiting | ( | struct confbridge_conference * | conference, |
struct confbridge_user * | user | ||
) |
Remove a conference bridge user from the waiting conference users in the conference.
conference | The conference bridge to remove the user from |
user | The conference bridge user to remove from the conference |
Definition at line 4575 of file app_confbridge.c.
References AST_LIST_REMOVE, confbridge_user::conference, confbridge_user::list, confbridge_conference::waiting_list, and confbridge_conference::waitingusers.
Referenced by conf_default_leave_waitmarked().
|
static |
Definition at line 986 of file app_confbridge.c.
References ao2_ref, ast_answer(), AST_BRIDGE_CHANNEL_FLAG_IMMOVABLE, ast_bridge_features_destroy(), ast_bridge_features_new(), ast_bridge_impart(), AST_BRIDGE_IMPART_CHAN_INDEPENDENT, ast_channel_ref, ast_channel_unref, ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_slin, ast_hangup(), ast_log, ast_request(), ast_set_flag, ast_str_buffer(), ast_test_suite_event_notify, confbridge_conference::b_profile, confbridge_conference::bridge, conf_is_recording(), ast_bridge_features::feature_flags, is_new_rec_file(), LOG_WARNING, confbridge_conference::name, bridge_profile::name, NULL, confbridge_conference::orig_rec_file, pbx_exec(), pbx_findapp(), bridge_profile::rec_file, confbridge_conference::record_chan, confbridge_conference::record_filename, send_start_record_event(), and set_rec_filename().
Referenced by action_confbridgestartrecord(), handle_cli_confbridge_start_record(), and join_conference_bridge().
|
static |
Definition at line 954 of file app_confbridge.c.
References ast_channel_unref, AST_CONTROL_HANGUP, AST_FRAME_CONTROL, ast_queue_frame(), ast_test_suite_event_notify, confbridge_conference::b_profile, conf_is_recording(), bridge_profile::name, NULL, confbridge_conference::record_chan, and send_stop_record_event().
Referenced by action_confbridgestoprecord(), conf_ended(), and handle_cli_confbridge_stop_record().
void conf_update_user_mute | ( | struct confbridge_user * | user | ) |
Update the actual mute status of the user and set it on the bridge.
user | User to update the mute status. |
Definition at line 1413 of file app_confbridge.c.
References ast_channel_name(), ast_debug, ast_test_flag, ast_test_suite_event_notify, and USER_OPT_WAITMARKED.
Referenced by action_toggle_mute_participants(), conf_handle_second_active(), conf_mute_moh_inactive_waitmarked(), conf_mute_only_active(), generic_mute_unmute_user(), join_active(), join_marked(), join_unmarked(), leave_marked(), and transition_to_marked().
|
static |
The ConfBridge application.
Definition at line 2680 of file app_confbridge.c.
References app, args, ast_answer(), AST_APP_ARG, AST_AUDIOHOOK_DIRECTION_READ, AST_AUDIOHOOK_DIRECTION_WRITE, ast_audiohook_volume_get(), ast_audiohook_volume_set(), ast_autoservice_start(), ast_autoservice_stop(), ast_bridge_features_cleanup(), ast_bridge_features_init(), AST_BRIDGE_HOOK_REMOVE_ON_PULL, AST_BRIDGE_HOOK_TYPE_JOIN, AST_BRIDGE_HOOK_TYPE_LEAVE, ast_bridge_interval_hook(), ast_bridge_join(), ast_bridge_join_hook(), ast_bridge_leave_hook(), ast_bridge_talk_detector_hook(), ast_channel_language(), ast_channel_name(), ast_check_hangup(), AST_DECLARE_APP_ARGS, ast_filedelete(), ast_free, ast_free_ptr(), ast_func_write(), ast_log, ast_malloc, ast_shutting_down(), AST_STANDARD_APP_ARGS, AST_STATE_UP, ast_strdupa, ast_stream_and_wait(), ast_strlen_zero(), ast_test_flag, async_delete_name_rec(), async_play_sound_file(), async_play_sound_ready(), confbridge_conference::b_profile, confbridge_conference::bridge, confbridge_user::chan, conf_bridge_profile_destroy(), conf_find_bridge_profile(), conf_find_user_profile(), conf_get_pin(), conf_get_sound(), conf_handle_talker_cb(), conf_moh_unsuspend(), conf_rec_name(), conf_set_menu_to_user(), CONF_SOUND_HAS_JOINED, CONF_SOUND_HAS_LEFT, CONF_SOUND_JOIN, CONF_SOUND_KICKED, CONF_SOUND_LEAVE, confbridge_hook_data::conference, DEFAULT_BRIDGE_PROFILE, DEFAULT_MENU_PROFILE, DEFAULT_SILENCE_THRESHOLD, DEFAULT_TALKING_THRESHOLD, DEFAULT_USER_PROFILE, handle_video_on_exit(), handle_video_on_join(), confbridge_hook_data::hook_type, join_callback(), join_conference_bridge(), bridge_profile::language, leave_conference(), LOG_ERROR, LOG_WARNING, MAX_CONF_NAME, NULL, pbx_builtin_setvar_helper(), play_sound_file(), quiet, send_event_hook_callback(), bridge_profile::sounds, confbridge_hook_data::user, user, USER_OPT_ANNOUNCE_JOIN_LEAVE, USER_OPT_ANNOUNCE_JOIN_LEAVE_REVIEW, USER_OPT_ANSWER_CHANNEL, USER_OPT_DENOISE, USER_OPT_DROP_SILENCE, USER_OPT_DTMF_PASS, USER_OPT_HEAR_OWN_JOIN_SOUND, USER_OPT_JITTERBUFFER, USER_OPT_MARKEDUSER, USER_OPT_QUIET, USER_OPT_TALKER_DETECT, USER_OPT_TEXT_MESSAGING, and user_timeout().
Referenced by load_module().
void confbridge_handle_atxfer | ( | struct ast_attended_transfer_message * | msg | ) |
Create join/leave events for attended transfers.
msg | The attended transfer stasis message |
Definition at line 1696 of file app_confbridge.c.
References ao2_find, ao2_lock, ast_channel_snapshot_dialplan::appl, ast_channel_name(), ast_debug, ast_json_pack(), ast_json_unref(), AST_LIST_TRAVERSE, ast_log, ast_strdupa, ast_strlen_zero(), ast_test_flag, ast_channel_snapshot::base, ast_bridge_channel_snapshot_pair::channel_snapshot, confbridge_join_type(), confbridge_leave_type(), confbridge_unlock_and_unref(), conference_bridges, ast_channel_snapshot_dialplan::data, ast_channel_snapshot::dialplan, LOG_ERROR, ast_channel_snapshot_base::name, NULL, OBJ_SEARCH_KEY, RAII_VAR, send_conf_stasis_snapshots(), ast_attended_transfer_message::target, ast_attended_transfer_message::to_transfer_target, ast_attended_transfer_message::to_transferee, ast_attended_transfer_message::transferee, and USER_OPT_ADMIN.
Referenced by confbridge_atxfer_cb().
|
static |
Definition at line 1685 of file app_confbridge.c.
References ao2_ref, and ao2_unlock.
Referenced by confbridge_handle_atxfer().
|
static |
Comparison function used for conference bridges container.
Definition at line 639 of file app_confbridge.c.
References CMP_MATCH, confbridge_conference::name, OBJ_KEY, OBJ_PARTIAL_KEY, and OBJ_POINTER.
Referenced by load_module().
|
static |
Hashing function used for conference bridges container.
Definition at line 615 of file app_confbridge.c.
References ast_assert, ast_str_case_hash(), name, confbridge_conference::name, OBJ_KEY, OBJ_PARTIAL_KEY, and OBJ_POINTER.
Referenced by load_module().
|
static |
Definition at line 4485 of file app_confbridge.c.
References ao2_find, ao2_ref, args, AST_APP_ARG, ast_debug, AST_DECLARE_APP_ARGS, ast_log, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero(), conference_bridges, kick_conference_participant(), LOG_WARNING, OBJ_KEY, and pbx_builtin_setvar_helper().
Referenced by load_module().
|
static |
Destroy a conference bridge.
obj | The conference bridge object |
Definition at line 1311 of file app_confbridge.c.
References ast_bridge_destroy(), ast_channel_cleanup, ast_cond_wait, ast_debug, ast_free, ast_hangup(), ast_mutex_lock, ast_mutex_unlock, ast_taskprocessor_push(), ast_taskprocessor_unreference(), confbridge_conference::b_profile, confbridge_conference::bridge, conf_bridge_profile_destroy(), hangup_data::conference, hangup(), hangup_data_destroy(), hangup_data_init(), hangup_playback(), confbridge_conference::name, NULL, confbridge_conference::orig_rec_file, confbridge_conference::playback_chan, confbridge_conference::playback_queue, confbridge_conference::record_chan, and confbridge_conference::record_filename.
Referenced by join_conference_bridge().
|
static |
Definition at line 3246 of file app_confbridge.c.
References conf_menu_action::action, action_dialplan_exec(), action_kick_last(), action_playback(), action_playback_and_continue(), action_toggle_binaural(), action_toggle_mute(), action_toggle_mute_participants(), conf_menu_entry::actions, announce_user_count(), ao2_lock, ao2_unlock, AST_AUDIOHOOK_DIRECTION_READ, AST_AUDIOHOOK_DIRECTION_WRITE, ast_audiohook_volume_adjust(), ast_audiohook_volume_set(), ast_bridge_remove(), ast_bridge_set_single_src_video_mode(), ast_channel_name(), AST_LIST_TRAVERSE, ast_test_flag, ast_test_suite_event_notify, confbridge_conference::b_profile, confbridge_conference::bridge, BRIDGE_OPT_VIDEO_SRC_SFU, ast_bridge_channel::chan, conf_get_sound(), CONF_SOUND_LOCKED_NOW, CONF_SOUND_UNLOCKED_NOW, conf_menu_action::data, conf_menu_entry::dtmf, handle_video_on_exit(), conf_menu_action::id, confbridge_conference::locked, MENU_ACTION_ADMIN_KICK_LAST, MENU_ACTION_ADMIN_TOGGLE_LOCK, MENU_ACTION_ADMIN_TOGGLE_MUTE_PARTICIPANTS, MENU_ACTION_DECREASE_LISTENING, MENU_ACTION_DECREASE_TALKING, MENU_ACTION_DIALPLAN_EXEC, MENU_ACTION_INCREASE_LISTENING, MENU_ACTION_INCREASE_TALKING, MENU_ACTION_LEAVE, MENU_ACTION_NOOP, MENU_ACTION_PARTICIPANT_COUNT, MENU_ACTION_PLAYBACK, MENU_ACTION_PLAYBACK_AND_CONTINUE, MENU_ACTION_RELEASE_SINGLE_VIDEO_SRC, MENU_ACTION_RESET_LISTENING, MENU_ACTION_RESET_TALKING, MENU_ACTION_SET_SINGLE_VIDEO_SRC, MENU_ACTION_TOGGLE_BINAURAL, MENU_ACTION_TOGGLE_MUTE, NULL, pbx_builtin_setvar_helper(), play_file(), conf_menu_action::playback_file, bridge_profile::sounds, and USER_OPT_ADMIN.
Referenced by action_playback_and_continue(), and conf_handle_dtmf().
|
static |
Definition at line 3964 of file app_confbridge.c.
References confbridge_conference::active_list, ao2_find, ao2_lock, ao2_ref, ao2_unlock, args, AST_APP_ARG, ast_channel_name(), ast_debug, AST_DECLARE_APP_ARGS, AST_LIST_TRAVERSE, ast_log, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero(), ast_test_flag, buf, confbridge_user::conference, conference_bridges, len(), confbridge_user::list, LOG_ERROR, LOG_WARNING, OBJ_KEY, type, user, USER_OPT_ADMIN, USER_OPT_MARKEDUSER, and confbridge_conference::waiting_list.
|
static |
Definition at line 4425 of file app_confbridge.c.
References confbridge_conference::active_list, ao2_find, ao2_lock, ao2_ref, ao2_unlock, args, AST_APP_ARG, AST_DECLARE_APP_ARGS, AST_LIST_TRAVERSE, ast_log, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero(), ast_test_flag, buf, confbridge_user::conference, conference_bridges, len(), confbridge_user::list, confbridge_conference::locked, LOG_ERROR, confbridge_conference::muted, OBJ_KEY, type, user, USER_OPT_ADMIN, USER_OPT_MARKEDUSER, and confbridge_conference::waiting_list.
|
static |
Definition at line 3646 of file app_confbridge.c.
References ao2_find, ao2_lock, ao2_ref, ao2_unlock, ast_test_suite_event_notify, confbridge_conference::b_profile, conference_bridges, lock, confbridge_conference::locked, bridge_profile::name, and OBJ_KEY.
Referenced by action_lock_unlock_helper(), handle_cli_confbridge_lock(), and handle_cli_confbridge_unlock().
|
static |
Definition at line 3671 of file app_confbridge.c.
References confbridge_conference::active_list, ao2_cleanup, ao2_find, ast_channel_name(), AST_LIST_TRAVERSE, ast_test_flag, confbridge_user::conference, conference_bridges, generic_mute_unmute_user(), confbridge_user::list, match(), NULL, OBJ_KEY, RAII_VAR, SCOPED_AO2LOCK, user, USER_OPT_ADMIN, and confbridge_conference::waiting_list.
Referenced by action_mute_unmute_helper(), and cli_mute_unmute_helper().
|
static |
Definition at line 1450 of file app_confbridge.c.
References ast_channel_name(), ast_test_suite_event_notify, confbridge_conference::b_profile, conf_update_user_mute(), hangup_data::conference, bridge_profile::name, send_mute_event(), and send_unmute_event().
Referenced by action_toggle_mute(), and generic_mute_unmute_helper().
|
static |
Definition at line 3485 of file app_confbridge.c.
References a, ao2_find, ao2_ref, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_confbridge_name(), complete_confbridge_participant(), conference_bridges, kick_conference_participant(), NULL, OBJ_KEY, and ast_cli_entry::usage.
|
static |
Definition at line 3567 of file app_confbridge.c.
References a, confbridge_conference::active_list, confbridge_conference::activeusers, ao2_find, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_lock, ao2_ref, ao2_unlock, ast_cli(), AST_CLI_YESNO, AST_LIST_TRAVERSE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_confbridge_name(), confbridge_user::conference, conference_bridges, handle_cli_confbridge_list_item(), confbridge_user::list, confbridge_conference::locked, confbridge_conference::markedusers, confbridge_conference::muted, confbridge_conference::name, NULL, OBJ_KEY, ast_cli_entry::usage, user, confbridge_conference::waiting_list, and confbridge_conference::waitingusers.
|
static |
Definition at line 3531 of file app_confbridge.c.
References a, ast_channel_caller(), ast_channel_name(), ast_cli(), ast_test_flag, ast_party_caller::id, ast_party_id::number, S_COR, ast_party_number::str, USER_OPT_ADMIN, USER_OPT_ENDMARKED, USER_OPT_MARKEDUSER, USER_OPT_WAITMARKED, and ast_party_number::valid.
Referenced by handle_cli_confbridge_list().
|
static |
Definition at line 3798 of file app_confbridge.c.
References a, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_confbridge_name(), generic_lock_unlock_helper(), NULL, and ast_cli_entry::usage.
|
static |
Definition at line 3736 of file app_confbridge.c.
References a, CLI_GENERATE, CLI_INIT, cli_mute_unmute_helper(), CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_confbridge_name(), complete_confbridge_participant(), NULL, and ast_cli_entry::usage.
|
static |
Definition at line 3851 of file app_confbridge.c.
References a, ao2_find, ao2_lock, ao2_ref, ao2_unlock, ast_cli(), ast_copy_string(), ast_strlen_zero(), confbridge_conference::b_profile, CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_confbridge_name(), conf_is_recording(), conf_start_record(), conference_bridges, NULL, OBJ_KEY, bridge_profile::rec_file, and ast_cli_entry::usage.
|
static |
Definition at line 3908 of file app_confbridge.c.
References a, ao2_find, ao2_lock, ao2_ref, ao2_unlock, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_confbridge_name(), conf_stop_record(), conference_bridges, NULL, OBJ_KEY, and ast_cli_entry::usage.
|
static |
Definition at line 3825 of file app_confbridge.c.
References a, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_confbridge_name(), generic_lock_unlock_helper(), NULL, and ast_cli_entry::usage.
|
static |
Definition at line 3767 of file app_confbridge.c.
References a, CLI_GENERATE, CLI_INIT, cli_mute_unmute_helper(), CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_confbridge_name(), complete_confbridge_participant(), NULL, and ast_cli_entry::usage.
|
static |
Call the proper join event handler for the user for the conference bridge's current state.
Definition at line 1358 of file app_confbridge.c.
References ast_assert, ast_test_flag, conf_invalid_event_fn(), handler(), NULL, USER_OPT_MARKEDUSER, and USER_OPT_WAITMARKED.
Referenced by join_conference_bridge().
|
static |
Call the proper leave event handler for the user for the conference bridge's current state.
Definition at line 1387 of file app_confbridge.c.
References ast_assert, ast_test_flag, conf_invalid_event_fn(), handler(), NULL, USER_OPT_MARKEDUSER, and USER_OPT_WAITMARKED.
Referenced by leave_conference().
|
static |
Definition at line 1215 of file app_confbridge.c.
References confbridge_conference::active_list, ao2_lock, ao2_unlock, ast_bridge_is_video_src(), ast_bridge_remove_video_src(), ast_bridge_set_single_src_video_mode(), ast_bridge_set_talker_src_video_mode(), AST_LIST_TRAVERSE, ast_test_flag, confbridge_conference::b_profile, confbridge_conference::bridge, BRIDGE_OPT_VIDEO_SRC_FIRST_MARKED, BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER, BRIDGE_OPT_VIDEO_SRC_LAST_MARKED, confbridge_user::chan, confbridge_user::conference, confbridge_user::list, NULL, and USER_OPT_MARKEDUSER.
Referenced by confbridge_exec(), and execute_menu_entry().
|
static |
Definition at line 1183 of file app_confbridge.c.
References confbridge_conference::active_list, ao2_lock, ao2_unlock, ast_bridge_is_video_src(), ast_bridge_set_single_src_video_mode(), AST_LIST_TRAVERSE, ast_test_flag, confbridge_conference::b_profile, confbridge_conference::bridge, BRIDGE_OPT_VIDEO_SRC_FIRST_MARKED, BRIDGE_OPT_VIDEO_SRC_LAST_MARKED, confbridge_user::chan, confbridge_user::conference, confbridge_user::list, NULL, and set().
Referenced by confbridge_exec().
|
static |
Definition at line 1300 of file app_confbridge.c.
References ast_cond_destroy, ast_mutex_destroy, and hangup().
Referenced by destroy_conference_bridge().
|
static |
Definition at line 1291 of file app_confbridge.c.
References ast_cond_init, ast_mutex_init, hangup_data::conference, hangup(), and NULL.
Referenced by destroy_conference_bridge().
|
static |
Hang up the announcer channel.
This hangs up the announcer channel in the conference. This runs in the playback queue taskprocessor since we do not want to hang up the channel while it's trying to play an announcement.
This task is performed synchronously, so there is no need to perform any cleanup on the passed-in data.
data | A hangup_data structure |
Definition at line 1274 of file app_confbridge.c.
References ast_autoservice_stop(), ast_cond_signal, ast_hangup(), ast_mutex_lock, ast_mutex_unlock, hangup(), and NULL.
Referenced by destroy_conference_bridge().
|
static |
Definition at line 906 of file app_confbridge.c.
References ast_str_buffer(), ast_str_create, ast_str_set(), ast_strlen_zero(), and RECORD_FILENAME_INITIAL_SPACE.
Referenced by conf_start_record().
|
static |
Definition at line 2654 of file app_confbridge.c.
References async_play_sound_ready(), and ast_bridge_channel::chan.
Referenced by confbridge_exec().
|
static |
Join a conference bridge.
conference_name | The conference name |
user | Conference bridge user structure |
Definition at line 1813 of file app_confbridge.c.
References confbridge_conference::activeusers, alloc_playback_chan(), announce_user_count(), ao2_alloc, ao2_find, ao2_link, ao2_lock, ao2_ref, ao2_unlink, ao2_unlock, app, ast_add_extension(), ast_autoservice_start(), ast_autoservice_stop(), ast_bridge_base_new(), AST_BRIDGE_CAPABILITY_MULTIMIX, AST_BRIDGE_FLAG_MASQUERADE_ONLY, AST_BRIDGE_FLAG_TRANSFER_BRIDGE_ONLY, ast_bridge_set_binaural_active(), ast_bridge_set_internal_sample_rate(), ast_bridge_set_maximum_sample_rate(), ast_bridge_set_mixing_interval(), ast_bridge_set_remb_estimated_bitrate(), ast_bridge_set_remb_send_interval(), ast_bridge_set_send_sdp_label(), ast_bridge_set_sfu_video_mode(), ast_bridge_set_talker_src_video_mode(), ast_bridge_set_video_update_discard(), AST_BRIDGE_VIDEO_SFU_REMB_AVERAGE, AST_BRIDGE_VIDEO_SFU_REMB_AVERAGE_ALL, AST_BRIDGE_VIDEO_SFU_REMB_FORCE, AST_BRIDGE_VIDEO_SFU_REMB_HIGHEST, AST_BRIDGE_VIDEO_SFU_REMB_HIGHEST_ALL, AST_BRIDGE_VIDEO_SFU_REMB_LOWEST, AST_BRIDGE_VIDEO_SFU_REMB_LOWEST_ALL, ast_brige_set_remb_behavior(), ast_check_hangup(), ast_copy_string(), ast_debug, ast_exists_extension(), ast_free, AST_LIST_REMOVE_HEAD, ast_log, ast_str_create, ast_stream_and_wait(), ast_strlen_zero(), ast_test_flag, confbridge_conference::b_profile, confbridge_conference::bridge, BRIDGE_OPT_BINAURAL_ACTIVE, BRIDGE_OPT_ENABLE_EVENTS, BRIDGE_OPT_RECORD_CONFERENCE, BRIDGE_OPT_REMB_BEHAVIOR_AVERAGE, BRIDGE_OPT_REMB_BEHAVIOR_AVERAGE_ALL, BRIDGE_OPT_REMB_BEHAVIOR_FORCE, BRIDGE_OPT_REMB_BEHAVIOR_HIGHEST, BRIDGE_OPT_REMB_BEHAVIOR_HIGHEST_ALL, BRIDGE_OPT_REMB_BEHAVIOR_LOWEST, BRIDGE_OPT_REMB_BEHAVIOR_LOWEST_ALL, BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER, BRIDGE_OPT_VIDEO_SRC_SFU, conf_bridge_profile_copy(), conf_get_sound(), CONF_SOUND_LOCKED, conf_start_record(), CONF_STATE_EMPTY, conference_bridges, destroy_conference_bridge(), post_join_action::func, handle_conf_user_join(), bridge_profile::internal_sample_rate, leave_conference(), post_join_action::list, confbridge_conference::locked, LOG_ERROR, bridge_profile::max_members, bridge_profile::maximum_sample_rate, bridge_profile::mix_interval, confbridge_conference::muted, confbridge_conference::name, NULL, OBJ_KEY, play_prompt_to_user(), push_announcer(), confbridge_conference::record_filename, RECORD_FILENAME_INITIAL_SPACE, bridge_profile::regcontext, bridge_profile::remb_estimated_bitrate, bridge_profile::remb_send_interval, send_conf_start_event(), bridge_profile::sounds, confbridge_conference::state, USER_OPT_ADMIN, USER_OPT_ANNOUNCEUSERCOUNT, USER_OPT_ANNOUNCEUSERCOUNTALL, USER_OPT_STARTMUTED, and bridge_profile::video_update_discard.
Referenced by confbridge_exec().
|
static |
Definition at line 3376 of file app_confbridge.c.
References confbridge_conference::active_list, ast_bridge_remove(), ast_channel_name(), AST_LIST_TRAVERSE, ast_test_flag, confbridge_conference::bridge, confbridge_user::conference, confbridge_user::list, match(), NULL, pbx_builtin_setvar_helper(), SCOPED_AO2LOCK, USER_OPT_ADMIN, and confbridge_conference::waiting_list.
Referenced by action_confbridgekick(), confkick_exec(), and handle_cli_confbridge_kick().
|
static |
Leave a conference.
user | The conference user |
Definition at line 2041 of file app_confbridge.c.
References ao2_lock, ao2_ref, ao2_unlock, ast_free, AST_LIST_REMOVE_HEAD, handle_conf_user_leave(), post_join_action::list, and NULL.
Referenced by confbridge_exec(), and join_conference_bridge().
|
static |
Load the module.
Module loading including tests for configuration or dependencies. This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE, or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails tests return AST_MODULE_LOAD_FAILURE. If the module can not load the configuration file or other non-critical problem return AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
Definition at line 4667 of file app_confbridge.c.
References action_confbridgekick(), action_confbridgelist(), action_confbridgelistrooms(), action_confbridgelock(), action_confbridgemute(), action_confbridgesetsinglevideosrc(), action_confbridgestartrecord(), action_confbridgestoprecord(), action_confbridgeunlock(), action_confbridgeunmute(), AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, app, app2, ARRAY_LEN, AST_CFE_WRITE, ast_cli_register_multiple, ast_custom_function_register, ast_custom_function_register_escalating, ast_log, ast_manager_register_xml, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, ast_register_application_xml, cli_confbridge, conf_announce_get_tech(), conf_load_config(), conf_record_get_tech(), confbridge_channels_function, confbridge_exec(), confbridge_function, confbridge_info_function, CONFERENCE_BRIDGE_BUCKETS, conference_bridge_cmp_cb(), conference_bridge_hash_cb(), conference_bridges, confkick_exec(), EVENT_FLAG_CALL, EVENT_FLAG_REPORTING, EVENT_FLAG_SYSTEM, LOG_ERROR, manager_confbridge_init(), NULL, register_channel_tech(), and unload_module().
|
static |
Playback the given filename and monitor for any dtmf interrupts.
This function is used to playback sound files on a given channel and optionally allow dtmf interrupts to occur.
If the optional bridge_channel parameter is given then sound file playback is played on that channel and dtmf interruptions are allowed. However, if bridge_channel is not set then the channel parameter is expected to be set instead and non interruptible playback is played on that channel.
bridge_channel | Bridge channel to play file on |
channel | Optional channel to play file on if bridge_channel not given |
filename | The file name to playback |
-1 | failure during playback. |
0 | on file was fully played. |
1 | on dtmf interrupt. |
Definition at line 1065 of file app_confbridge.c.
References ast_bridge_channel_feature_digit_add(), AST_DIGIT_ANY, AST_DIGIT_NONE, ast_log, ast_stopstream(), ast_stream_and_wait(), ast_channel::bridge_channel, ast_bridge_channel::chan, digit, and LOG_WARNING.
Referenced by action_kick_last(), action_toggle_binaural(), action_toggle_mute(), announce_user_count(), check_bridge_play_sound(), and execute_menu_entry().
|
static |
Play back an audio file to a channel.
user | User to play audio prompt to |
filename | Prompt to play |
0 | on success. |
-1 | if the user hung up. |
Definition at line 1178 of file app_confbridge.c.
References ast_stream_and_wait().
Referenced by conf_handle_inactive_waitmarked(), conf_handle_only_person(), and join_conference_bridge().
int play_sound_file | ( | struct confbridge_conference * | conference, |
const char * | filename | ||
) |
Play sound file into conference bridge.
conference | The conference bridge to play sound file into |
filename | Sound file to play |
0 | success |
-1 | failure |
Definition at line 2171 of file app_confbridge.c.
References playback_task_data::conference, playback_task_data::filename, and play_sound_helper().
Referenced by action_toggle_mute_participants(), announce_user_count(), confbridge_exec(), and post_join_play_begin().
|
static |
Definition at line 2133 of file app_confbridge.c.
References ast_cond_wait, ast_log, ast_mutex_lock, ast_mutex_unlock, ast_strlen_zero(), ast_taskprocessor_push(), playback_task_data::cond, playback_task_data::conference, playback_task_data::filename, playback_task_data::lock, LOG_WARNING, confbridge_conference::name, playback_task_data::playback_finished, confbridge_conference::playback_queue, playback_task(), playback_task_data_destroy(), playback_task_data_init(), playback_task_data::say_number, and sound_file_exists().
Referenced by play_sound_file(), and play_sound_number().
|
static |
Play number into the conference bridge.
conference | The conference bridge to say the number into |
say_number | number to say |
0 | success |
-1 | failure |
Definition at line 2453 of file app_confbridge.c.
References NULL, and play_sound_helper().
Referenced by announce_user_count().
|
static |
Definition at line 2059 of file app_confbridge.c.
References ast_autoservice_start(), ast_autoservice_stop(), ast_channel_language(), ast_say_number(), ast_stream_and_wait(), ast_strlen_zero(), NULL, and confbridge_conference::playback_chan.
Referenced by async_playback_task(), and playback_task().
|
static |
Play an announcement into a confbridge.
This runs in the playback queue taskprocessor. This ensures that all playbacks are handled in sequence and do not play over top one another.
This task runs synchronously so there is no need for performing any sort of cleanup on the input parameter.
data | A playback_task_data |
Definition at line 2101 of file app_confbridge.c.
References ast_cond_signal, ast_mutex_lock, ast_mutex_unlock, playback_task_data::cond, playback_task_data::conference, playback_task_data::filename, playback_task_data::lock, playback_common(), playback_task_data::playback_finished, and playback_task_data::say_number.
Referenced by play_sound_helper().
|
static |
Definition at line 2127 of file app_confbridge.c.
References ast_cond_destroy, ast_mutex_destroy, playback_task_data::cond, and playback_task_data::lock.
Referenced by play_sound_helper().
|
static |
Definition at line 2115 of file app_confbridge.c.
References ast_cond_init, ast_mutex_init, playback_task_data::cond, playback_task_data::conference, playback_task_data::filename, playback_task_data::lock, NULL, playback_task_data::playback_finished, and playback_task_data::say_number.
Referenced by play_sound_helper().
|
static |
Push the announcer channel into the bridge.
conference | Conference bridge to push the announcer to |
0 | Success |
-1 | Failed to push the channel to the bridge |
Definition at line 1673 of file app_confbridge.c.
References ast_autoservice_start(), ast_hangup(), conf_announce_channel_push(), NULL, and confbridge_conference::playback_chan.
Referenced by join_conference_bridge().
|
static |
Definition at line 4604 of file app_confbridge.c.
References ast_channel_register(), ast_format_cap_alloc, ast_format_cap_append_by_type(), AST_FORMAT_CAP_FLAG_DEFAULT, ast_log, AST_MEDIA_TYPE_UNKNOWN, ast_channel_tech::capabilities, ast_channel_tech::description, LOG_ERROR, and ast_channel_tech::type.
Referenced by load_module().
|
static |
Definition at line 4721 of file app_confbridge.c.
References conf_reload_config().
|
static |
Definition at line 799 of file app_confbridge.c.
References confbridge_end_type(), NULL, and send_conf_stasis().
Referenced by conf_ended().
|
static |
Definition at line 794 of file app_confbridge.c.
References confbridge_start_type(), NULL, and send_conf_stasis().
Referenced by join_conference_bridge().
|
static |
Definition at line 720 of file app_confbridge.c.
References ao2_cleanup, ast_bridge_blob_create(), ast_bridge_lock, ast_bridge_topic(), ast_bridge_unlock, ast_channel_topic(), ast_json_object_update(), ast_json_pack(), ast_json_unref(), ast_test_flag, confbridge_conference::b_profile, confbridge_conference::bridge, BRIDGE_OPT_ENABLE_EVENTS, conf_send_event_to_participants(), confbridge_conference::name, NULL, RAII_VAR, stasis_publish(), and type.
Referenced by conf_handle_talker_cb(), send_conf_end_event(), send_conf_start_event(), send_join_event(), send_leave_event(), send_mute_event(), send_start_record_event(), send_stop_record_event(), and send_unmute_event().
|
static |
Definition at line 757 of file app_confbridge.c.
References ao2_cleanup, ast_bridge_blob_create_from_snapshots(), ast_bridge_lock, ast_bridge_snapshot_create(), ast_bridge_topic(), ast_bridge_unlock, ast_json_object_update(), ast_json_pack(), ast_json_unref(), confbridge_conference::bridge, confbridge_conference::name, NULL, RAII_VAR, stasis_publish(), and type.
Referenced by confbridge_handle_atxfer().
|
static |
Definition at line 2666 of file app_confbridge.c.
References AST_BRIDGE_HOOK_TYPE_JOIN, confbridge_hook_data::conference, confbridge_hook_data::hook_type, send_join_event(), send_leave_event(), and confbridge_hook_data::user.
Referenced by confbridge_exec().
|
static |
Definition at line 804 of file app_confbridge.c.
References ast_json_pack(), ast_json_unref(), ast_test_flag, confbridge_join_type(), send_conf_stasis(), and USER_OPT_ADMIN.
Referenced by send_event_hook_callback().
|
static |
Definition at line 818 of file app_confbridge.c.
References ast_json_pack(), ast_json_unref(), ast_test_flag, confbridge_leave_type(), send_conf_stasis(), and USER_OPT_ADMIN.
Referenced by send_event_hook_callback().
|
static |
Definition at line 842 of file app_confbridge.c.
References ast_json_pack(), ast_json_unref(), ast_test_flag, confbridge_mute_type(), send_conf_stasis(), and USER_OPT_ADMIN.
Referenced by generic_mute_unmute_user().
|
static |
Definition at line 832 of file app_confbridge.c.
References confbridge_start_record_type(), NULL, and send_conf_stasis().
Referenced by conf_start_record().
|
static |
Definition at line 837 of file app_confbridge.c.
References confbridge_stop_record_type(), NULL, and send_conf_stasis().
Referenced by conf_stop_record().
|
static |
Definition at line 856 of file app_confbridge.c.
References ast_json_pack(), ast_json_unref(), ast_test_flag, confbridge_unmute_type(), send_conf_stasis(), and USER_OPT_ADMIN.
Referenced by generic_mute_unmute_user().
|
static |
Definition at line 870 of file app_confbridge.c.
References ast_str_append(), ast_str_reset(), ast_str_set(), ast_str_set_substr(), ast_str_strlen(), ast_strlen_zero(), ast_test_flag, confbridge_conference::b_profile, BRIDGE_OPT_RECORD_FILE_APPEND, BRIDGE_OPT_RECORD_FILE_TIMESTAMP, ext, confbridge_conference::name, bridge_profile::rec_command, bridge_profile::rec_file, and bridge_profile::rec_options.
Referenced by conf_start_record().
|
static |
Prepare the async playback datastore.
This is done prior to queuing an async announcement. If the datastore has not yet been created, it is allocated and initialized. If it already exists, we set it to be in "waiting" mode.
initiator | The channel that is queuing the async playback |
0 | Success |
-1 | Failure :( |
Definition at line 2248 of file app_confbridge.c.
References ast_channel_datastore_add(), ast_channel_datastore_find(), ast_datastore_alloc, ast_datastore_free(), async_datastore_data_alloc(), async_datastore_info, ast_datastore::data, NULL, and async_datastore_data::wait.
Referenced by async_playback_task_data_alloc().
|
static |
Definition at line 1103 of file app_confbridge.c.
References ast_fileexists(), ast_log, LOG_WARNING, and NULL.
Referenced by announce_user_count(), async_delete_name_rec(), async_play_sound_helper(), and play_sound_helper().
|
static |
Called when module is being unloaded.
Definition at line 4620 of file app_confbridge.c.
References ao2_cleanup, app, app2, ARRAY_LEN, ast_cli_unregister_multiple(), ast_custom_function_unregister(), ast_manager_unregister(), ast_unregister_application(), cli_confbridge, conf_announce_get_tech(), conf_destroy_config(), conf_record_get_tech(), confbridge_channels_function, confbridge_function, confbridge_info_function, conference_bridges, manager_confbridge_shutdown(), NULL, and unregister_channel_tech().
Referenced by load_module().
|
static |
Definition at line 4588 of file app_confbridge.c.
References ao2_cleanup, ast_channel_unregister(), and ast_channel_tech::capabilities.
Referenced by unload_module().
|
static |
Definition at line 2528 of file app_confbridge.c.
References ast_bridge_channel_leave_bridge(), BRIDGE_CHANNEL_STATE_END, ast_bridge_channel::chan, and pbx_builtin_setvar_helper().
Referenced by confbridge_exec().
|
static |
Wait for the initiator of an async playback to be ready.
See the description on the async_datastore_info structure for more information about what this is about.
initiator | The channel that queued the async announcement |
Definition at line 2337 of file app_confbridge.c.
References ast_channel_datastore_find(), ast_channel_lock, ast_channel_unlock, ast_cond_wait, ast_mutex_lock, ast_mutex_unlock, async_datastore_info, async_datastore_data::cond, ast_datastore::data, async_datastore_data::lock, NULL, and async_datastore_data::wait.
Referenced by async_playback_task().
|
static |
Definition at line 4733 of file app_confbridge.c.
|
static |
Definition at line 594 of file app_confbridge.c.
Referenced by confbridge_exec(), join_conference_bridge(), load_module(), and unload_module().
|
static |
Definition at line 595 of file app_confbridge.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 4733 of file app_confbridge.c.
|
static |
Datastore used for timing of async announcement playback.
Announcements that are played to the entire conference can be played asynchronously (i.e. The channel that queues the playback does not wait for the playback to complete before continuing)
The thing about async announcements is that the channel that queues the announcement is either not in the bridge or is in some other way "occupied" at the time the announcement is queued. Because of that, the initiator of the announcement may enter after the announcement has already started, resulting in the sound being "clipped".
This datastore makes it so that the channel that queues the async announcement can say "I'm ready now". This way the announcement does not start until the initiator of the announcement is ready to hear the sound.
Definition at line 2216 of file app_confbridge.c.
Referenced by async_play_sound_ready(), setup_async_playback_datastore(), and wait_for_initiator().
|
static |
Definition at line 3943 of file app_confbridge.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 4043 of file app_confbridge.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 3953 of file app_confbridge.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 3959 of file app_confbridge.c.
Referenced by load_module(), and unload_module().
struct ao2_container* conference_bridges |
Container to hold all conference bridges in progress.
Definition at line 604 of file app_confbridge.c.
Referenced by action_confbridgekick(), action_confbridgelist(), action_confbridgelistrooms(), action_confbridgesetsinglevideosrc(), action_confbridgestartrecord(), action_confbridgestoprecord(), action_lock_unlock_helper(), action_mute_unmute_helper(), announce_request(), complete_confbridge_name(), complete_confbridge_participant(), conf_ended(), conf_find_bridge(), conf_handle_talker_cb(), confbridge_handle_atxfer(), confkick_exec(), func_confbridge_channels(), func_confbridge_info(), generic_lock_unlock_helper(), generic_mute_unmute_helper(), handle_cli_confbridge_kick(), handle_cli_confbridge_list(), handle_cli_confbridge_start_record(), handle_cli_confbridge_stop_record(), join_conference_bridge(), load_module(), and unload_module().