Asterisk - The Open Source Telephony Project
18.5.0
|
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_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) |
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 = "30ef0c93b36035ec78c9cfd712d36d9b" , .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_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 463 of file app_confbridge.c.
Referenced by load_module().
#define RECORD_FILENAME_INITIAL_SPACE 128 |
Initial recording filename space.
Definition at line 466 of file app_confbridge.c.
Referenced by is_new_rec_file(), and join_conference_bridge().
|
static |
Definition at line 4504 of file app_confbridge.c.
|
static |
Definition at line 4504 of file app_confbridge.c.
|
static |
Definition at line 4037 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(), hangup_data::conference, kick_conference_participant(), and OBJ_KEY.
Referenced by load_module().
|
static |
Definition at line 3869 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(), hangup_data::conference, OBJ_KEY, total, user, and confbridge_conference::waiting_list.
Referenced by load_module().
|
static |
Definition at line 3821 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_user::chan, confbridge_user::muted, confbridge_conference::name, confbridge_user::talking, confbridge_user::u_profile, USER_OPT_ADMIN, USER_OPT_ENDMARKED, USER_OPT_MARKEDUSER, and USER_OPT_WAITMARKED.
Referenced by action_confbridgelist().
|
static |
Definition at line 3914 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(), hangup_data::conference, confbridge_conference::locked, confbridge_conference::markedusers, confbridge_conference::muted, confbridge_conference::name, and confbridge_conference::waitingusers.
Referenced by load_module().
|
static |
Definition at line 4032 of file app_confbridge.c.
References action_lock_unlock_helper().
Referenced by load_module().
|
static |
Definition at line 4003 of file app_confbridge.c.
References action_mute_unmute_helper().
Referenced by load_module().
|
static |
Definition at line 4149 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, confbridge_user::chan, hangup_data::conference, OBJ_KEY, and user.
Referenced by load_module().
|
static |
Definition at line 4070 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(), hangup_data::conference, OBJ_KEY, and bridge_profile::rec_file.
Referenced by load_module().
|
static |
Definition at line 4115 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(), hangup_data::conference, and OBJ_KEY.
Referenced by load_module().
|
static |
Definition at line 4028 of file app_confbridge.c.
References action_lock_unlock_helper().
Referenced by load_module().
|
static |
Definition at line 3999 of file app_confbridge.c.
References action_mute_unmute_helper().
Referenced by load_module().
|
static |
Definition at line 3059 of file app_confbridge.c.
References 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, context, conf_menu_action::data, conf_menu_action::dialplan_args, exten, ast_pbx_args::no_hangup_chan, NULL, and priority.
Referenced by execute_menu_entry().
|
static |
Definition at line 3022 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, ast_bridge_channel::chan, confbridge_user::chan, conf_get_sound(), CONF_SOUND_ERROR_MENU, 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 4008 of file app_confbridge.c.
References ao2_container_count(), ast_strlen_zero, astman_get_header(), astman_send_ack(), astman_send_error(), and generic_lock_unlock_helper().
Referenced by action_confbridgelock(), and action_confbridgeunlock().
|
static |
Definition at line 3966 of file app_confbridge.c.
References ao2_container_count(), ast_strlen_zero, astman_get_header(), astman_send_ack(), astman_send_error(), and generic_mute_unmute_helper().
Referenced by action_confbridgemute(), and action_confbridgeunmute().
|
static |
Definition at line 2937 of file app_confbridge.c.
References ast_log, ast_strdupa, ast_stream_and_wait(), ast_bridge_channel::chan, make_ari_stubs::file, LOG_WARNING, NULL, and strsep().
Referenced by execute_menu_entry().
|
static |
Definition at line 2951 of file app_confbridge.c.
References ast_channel_language(), ast_copy_string(), AST_DIGIT_ANY, ast_log, ast_stopstream(), ast_strdupa, ast_streamfile(), ast_waitstream(), ast_bridge_channel::chan, conf_find_menu_entry_by_sequence(), conf_menu_entry_destroy(), digit, execute_menu_entry(), make_ari_stubs::file, LOG_WARNING, MAXIMUM_DTMF_FEATURE_STRING, NULL, and strsep().
Referenced by execute_menu_entry().
|
static |
Definition at line 2881 of file app_confbridge.c.
References ast_bridge_channel_lock_bridge(), ast_bridge_unlock, confbridge_user::b_profile, ast_bridge_channel::binaural_suspended, ast_bridge_channel::bridge, conf_get_sound(), CONF_SOUND_BINAURAL_OFF, CONF_SOUND_BINAURAL_ON, NULL, play_file(), and bridge_profile::sounds.
Referenced by execute_menu_entry().
|
static |
Definition at line 2866 of file app_confbridge.c.
References confbridge_conference::b_profile, conf_get_sound(), CONF_SOUND_MUTED, CONF_SOUND_UNMUTED, generic_mute_unmute_user(), mute, confbridge_user::muted, NULL, play_file(), and bridge_profile::sounds.
Referenced by execute_menu_entry().
|
static |
Definition at line 2895 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, confbridge_user::chan, conf_get_sound(), CONF_SOUND_PARTICIPANTS_MUTED, CONF_SOUND_PARTICIPANTS_UNMUTED, conf_update_user_mute(), bridge_profile::language, confbridge_user::list, mute, 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 1496 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 |
Definition at line 985 of file app_confbridge.c.
References confbridge_conference::activeusers, ast_channel_language(), ast_say_number(), ast_stream_and_wait(), confbridge_conference::b_profile, confbridge_user::chan, 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 4504 of file app_confbridge.c.
|
static |
Definition at line 2085 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 2053 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 2492 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(), 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 2480 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 2449 of file app_confbridge.c.
References ast_malloc, hangup_data::conference, 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 2466 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 2282 of file app_confbridge.c.
References async_play_sound_helper().
Referenced by action_toggle_mute_participants(), confbridge_exec(), and leave_marked().
|
static |
Definition at line 2248 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(), LOG_WARNING, confbridge_conference::name, confbridge_conference::playback_queue, 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 2288 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_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 2233 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 2141 of file app_confbridge.c.
References ast_channel_lock, ast_channel_ref, ast_channel_unlock, ast_malloc, hangup_data::conference, 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 2187 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 3574 of file app_confbridge.c.
References ast_cli_args::argv, ast_cli(), ast_cli_args::fd, and generic_mute_unmute_helper().
Referenced by handle_cli_confbridge_mute(), and handle_cli_confbridge_unmute().
|
static |
Definition at line 3280 of file app_confbridge.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ast_strdup, hangup_data::conference, 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 3302 of file app_confbridge.c.
References confbridge_conference::active_list, ao2_cleanup, ao2_find, ast_channel_name(), AST_LIST_TRAVERSE, ast_strdup, confbridge_user::chan, hangup_data::conference, 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 1445 of file app_confbridge.c.
References ast_calloc, AST_LIST_INSERT_TAIL, post_join_action::func, post_join_action::list, and confbridge_user::post_join_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 4303 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 4309 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 4316 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 1473 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(), 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.
confbridge_name | The name to search for |
Definition at line 787 of file app_confbridge.c.
References ao2_find, and OBJ_KEY.
Referenced by confbridge_publish_manager_event().
|
static |
Definition at line 2350 of file app_confbridge.c.
References ast_app_getdata(), ast_channel_language(), AST_DIGIT_ANY, ast_streamfile(), ast_waitstream(), confbridge_user::b_profile, conf_get_sound(), CONF_SOUND_GET_PIN, CONF_SOUND_INVALID_PIN, len(), MAX_PIN, user_profile::pin, bridge_profile::sounds, tmp(), and confbridge_user::u_profile.
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 526 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 3214 of file app_confbridge.c.
References async_play_sound_ready(), ast_bridge_channel::chan, conf_moh_suspend(), conf_moh_unsuspend(), confbridge_user::conference, 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 |
0 | success |
-1 | failure |
Definition at line 1457 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 1421 of file app_confbridge.c.
References ast_test_flag, confbridge_conference::b_profile, conf_get_sound(), CONF_SOUND_WAIT_FOR_LEADER, confbridge_user::conference, play_prompt_to_user(), bridge_profile::sounds, confbridge_user::u_profile, 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 1432 of file app_confbridge.c.
References ast_test_flag, confbridge_conference::b_profile, conf_get_sound(), CONF_SOUND_ONLY_PERSON, confbridge_user::conference, play_prompt_to_user(), bridge_profile::sounds, confbridge_user::u_profile, 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 1462 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::u_profile, and USER_OPT_MUSICONHOLD.
Referenced by join_active(), join_marked(), and join_unmarked().
|
static |
Definition at line 2322 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, hangup_data::conference, confbridge_conference::name, NULL, OBJ_KEY, RAII_VAR, send_conf_stasis(), confbridge_user::talking, confbridge_user::u_profile, and USER_OPT_ADMIN.
Referenced by confbridge_exec().
|
static |
Definition at line 803 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 1360 of file app_confbridge.c.
References ast_bridge_lock, ast_bridge_suspend(), ast_bridge_unlock, ast_bridge_unsuspend(), ast_moh_start(), confbridge_conference::bridge, confbridge_user::chan, confbridge_user::conference, user_profile::moh_class, NULL, confbridge_user::playing_moh, confbridge_user::suspended_moh, and confbridge_user::u_profile.
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 1333 of file app_confbridge.c.
References ast_bridge_lock, ast_bridge_suspend(), ast_bridge_unlock, ast_bridge_unsuspend(), ast_moh_stop(), confbridge_conference::bridge, confbridge_user::chan, confbridge_user::conference, confbridge_user::playing_moh, and confbridge_user::suspended_moh.
Referenced by conf_default_leave_waitmarked(), conf_handle_second_active(), leave_marked(), leave_unmarked(), and transition_to_marked().
|
static |
Definition at line 1412 of file app_confbridge.c.
References ao2_lock, ao2_unlock, ast_moh_stop(), confbridge_user::chan, confbridge_user::conference, confbridge_user::playing_moh, and confbridge_user::suspended_moh.
Referenced by conf_handle_dtmf().
|
static |
Definition at line 1395 of file app_confbridge.c.
References ao2_lock, ao2_unlock, ast_moh_start(), confbridge_user::chan, confbridge_user::conference, user_profile::moh_class, NULL, confbridge_user::playing_moh, confbridge_user::suspended_moh, and confbridge_user::u_profile.
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 4335 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::u_profile, and USER_OPT_MUSICONHOLD.
Referenced by transition_to_single(), and transition_to_single_marked().
|
static |
Definition at line 2399 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, confbridge_user::chan, errno, LOG_WARNING, confbridge_user::name_rec_location, NULL, PATH_MAX, THRESHOLD_SILENCE, confbridge_user::u_profile, 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 4322 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 4328 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 4346 of file app_confbridge.c.
References AST_LIST_REMOVE, confbridge_user::list, confbridge_conference::waiting_list, and confbridge_conference::waitingusers.
Referenced by conf_default_leave_waitmarked().
|
static |
Definition at line 851 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, bridge_profile::name, confbridge_conference::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 819 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 1275 of file app_confbridge.c.
References ast_channel_name(), ast_debug, ast_test_flag, ast_test_suite_event_notify, confbridge_conference::b_profile, confbridge_user::chan, confbridge_user::conference, confbridge_user::features, confbridge_conference::markedusers, ast_bridge_features::mute, confbridge_user::muted, bridge_profile::name, confbridge_user::playing_moh, confbridge_user::u_profile, 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 2544 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_user::b_profile, confbridge_conference::bridge, confbridge_user::chan, hangup_data::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, hangup_data::conference, confbridge_hook_data::conference, DEFAULT_BRIDGE_PROFILE, DEFAULT_MENU_PROFILE, DEFAULT_SILENCE_THRESHOLD, DEFAULT_TALKING_THRESHOLD, DEFAULT_USER_PROFILE, ast_bridge_tech_optimizations::drop_silence, ast_bridge_features::dtmf_passthrough, confbridge_user::features, handle_video_on_exit(), handle_video_on_join(), confbridge_hook_data::hook_type, join_callback(), join_conference_bridge(), confbridge_user::kicked, bridge_profile::language, leave_conference(), LOG_ERROR, LOG_WARNING, MAX_CONF_NAME, confbridge_user::name_rec_location, NULL, parse(), pbx_builtin_setvar_helper(), user_profile::pin, play_sound_file(), quiet, send_event_hook_callback(), ast_bridge_tech_optimizations::silence_threshold, user_profile::silence_threshold, bridge_profile::sounds, ast_bridge_tech_optimizations::talking_threshold, user_profile::talking_threshold, confbridge_user::tech_args, ast_bridge_features::text_messaging, user_profile::timeout, confbridge_user::u_profile, user, confbridge_hook_data::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_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 1562 of file app_confbridge.c.
References confbridge_conference::active_list, 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, confbridge_user::chan, ast_bridge_channel_snapshot_pair::channel_snapshot, confbridge_join_type(), confbridge_leave_type(), confbridge_unlock_and_unref(), hangup_data::conference, ast_channel_snapshot_dialplan::data, ast_channel_snapshot::dialplan, LOG_ERROR, confbridge_user::muted, 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, confbridge_user::u_profile, USER_OPT_ADMIN, confbridge_conference::waiting_list, and confbridge_conference::waitingusers.
Referenced by confbridge_atxfer_cb().
|
static |
Definition at line 1551 of file app_confbridge.c.
References ao2_ref, ao2_unlock, and hangup_data::conference.
Referenced by confbridge_handle_atxfer().
|
static |
Comparison function used for conference bridges container.
Definition at line 504 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 480 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 4256 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, hangup_data::conference, kick_conference_participant(), LOG_WARNING, OBJ_KEY, parse(), and pbx_builtin_setvar_helper().
Referenced by load_module().
|
static |
Destroy a conference bridge.
obj | The conference bridge object |
Definition at line 1173 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, hangup_data::cond, conf_bridge_profile_destroy(), hangup_data::conference, hangup_data_destroy(), hangup_data_init(), hangup_playback(), hangup_data::hungup, hangup_data::lock, 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 3103 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, confbridge_user::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, confbridge_user::u_profile, and USER_OPT_ADMIN.
Referenced by action_playback_and_continue(), and conf_handle_dtmf().
|
static |
Definition at line 4196 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, hangup_data::conference, confbridge_user::list, confbridge_conference::locked, LOG_ERROR, confbridge_conference::muted, OBJ_KEY, parse(), type, confbridge_user::u_profile, user, USER_OPT_ADMIN, USER_OPT_MARKEDUSER, and confbridge_conference::waiting_list.
|
static |
Definition at line 3503 of file app_confbridge.c.
References ao2_find, ao2_lock, ao2_ref, ao2_unlock, ast_test_suite_event_notify, confbridge_conference::b_profile, hangup_data::conference, hangup_data::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 3528 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::chan, hangup_data::conference, generic_mute_unmute_user(), confbridge_user::list, match(), NULL, OBJ_KEY, RAII_VAR, SCOPED_AO2LOCK, confbridge_user::u_profile, user, USER_OPT_ADMIN, and confbridge_conference::waiting_list.
Referenced by action_mute_unmute_helper(), and cli_mute_unmute_helper().
|
static |
Definition at line 1312 of file app_confbridge.c.
References ast_channel_name(), ast_test_suite_event_notify, confbridge_conference::b_profile, confbridge_user::chan, conf_update_user_mute(), confbridge_user::muted, bridge_profile::name, send_mute_event(), and send_unmute_event().
Referenced by action_toggle_mute(), and generic_mute_unmute_helper().
|
static |
Definition at line 3342 of file app_confbridge.c.
References ao2_find, ao2_ref, ast_cli_args::argc, ast_cli_args::argv, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_confbridge_name(), complete_confbridge_participant(), hangup_data::conference, ast_cli_args::fd, kick_conference_participant(), ast_cli_args::line, ast_cli_args::n, NULL, OBJ_KEY, ast_cli_args::pos, ast_cli_entry::usage, and ast_cli_args::word.
|
static |
Definition at line 3424 of file app_confbridge.c.
References 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_args::argc, ast_cli_args::argv, ast_cli(), AST_CLI_YESNO, AST_LIST_TRAVERSE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_confbridge_name(), hangup_data::conference, ast_cli_args::fd, handle_cli_confbridge_list_item(), ast_cli_args::line, confbridge_user::list, confbridge_conference::locked, confbridge_conference::markedusers, confbridge_conference::muted, ast_cli_args::n, confbridge_conference::name, NULL, OBJ_KEY, ast_cli_args::pos, ast_cli_entry::usage, user, confbridge_conference::waiting_list, confbridge_conference::waitingusers, and ast_cli_args::word.
|
static |
Definition at line 3388 of file app_confbridge.c.
References ast_channel_caller(), ast_channel_name(), ast_cli(), ast_test_flag, confbridge_conference::b_profile, confbridge_user::chan, confbridge_user::conference, ast_cli_args::fd, ast_party_caller::id, confbridge_user::menu_name, confbridge_user::muted, user_profile::name, bridge_profile::name, ast_party_id::number, S_COR, ast_party_number::str, confbridge_user::u_profile, 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 3655 of file app_confbridge.c.
References ast_cli_args::argc, ast_cli_args::argv, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_confbridge_name(), ast_cli_args::fd, generic_lock_unlock_helper(), ast_cli_args::line, ast_cli_args::n, NULL, ast_cli_args::pos, ast_cli_entry::usage, and ast_cli_args::word.
|
static |
Definition at line 3593 of file app_confbridge.c.
References ast_cli_args::argc, ast_cli_args::argv, CLI_GENERATE, CLI_INIT, cli_mute_unmute_helper(), CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_confbridge_name(), complete_confbridge_participant(), ast_cli_args::line, ast_cli_args::n, NULL, ast_cli_args::pos, ast_cli_entry::usage, and ast_cli_args::word.
|
static |
Definition at line 3708 of file app_confbridge.c.
References ao2_find, ao2_lock, ao2_ref, ao2_unlock, ast_cli_args::argc, ast_cli_args::argv, 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(), hangup_data::conference, ast_cli_args::fd, ast_cli_args::line, ast_cli_args::n, NULL, OBJ_KEY, ast_cli_args::pos, bridge_profile::rec_file, ast_cli_entry::usage, and ast_cli_args::word.
|
static |
Definition at line 3765 of file app_confbridge.c.
References ao2_find, ao2_lock, ao2_ref, ao2_unlock, ast_cli_args::argc, ast_cli_args::argv, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_confbridge_name(), conf_stop_record(), hangup_data::conference, ast_cli_args::fd, ast_cli_args::line, ast_cli_args::n, NULL, OBJ_KEY, ast_cli_args::pos, ast_cli_entry::usage, and ast_cli_args::word.
|
static |
Definition at line 3682 of file app_confbridge.c.
References ast_cli_args::argc, ast_cli_args::argv, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_confbridge_name(), ast_cli_args::fd, generic_lock_unlock_helper(), ast_cli_args::line, ast_cli_args::n, NULL, ast_cli_args::pos, ast_cli_entry::usage, and ast_cli_args::word.
|
static |
Definition at line 3624 of file app_confbridge.c.
References ast_cli_args::argc, ast_cli_args::argv, CLI_GENERATE, CLI_INIT, cli_mute_unmute_helper(), CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_confbridge_name(), complete_confbridge_participant(), ast_cli_args::line, ast_cli_args::n, NULL, ast_cli_args::pos, ast_cli_entry::usage, and ast_cli_args::word.
|
static |
Call the proper join event handler for the user for the conference bridge's current state.
Definition at line 1220 of file app_confbridge.c.
References ast_assert, ast_test_flag, conf_invalid_event_fn(), confbridge_user::conference, handler(), confbridge_state::join_marked, confbridge_state::join_unmarked, confbridge_state::join_waitmarked, NULL, confbridge_conference::state, confbridge_user::u_profile, 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 1249 of file app_confbridge.c.
References ast_assert, ast_test_flag, conf_invalid_event_fn(), confbridge_user::conference, handler(), confbridge_state::leave_marked, confbridge_state::leave_unmarked, confbridge_state::leave_waitmarked, NULL, confbridge_conference::state, confbridge_user::u_profile, USER_OPT_MARKEDUSER, and USER_OPT_WAITMARKED.
Referenced by leave_conference().
|
static |
Definition at line 1075 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::list, NULL, confbridge_user::u_profile, and USER_OPT_MARKEDUSER.
Referenced by confbridge_exec(), and execute_menu_entry().
|
static |
Definition at line 1043 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::list, and NULL.
Referenced by confbridge_exec().
|
static |
Definition at line 1160 of file app_confbridge.c.
References ast_cond_destroy, ast_mutex_destroy, hangup_data::cond, and hangup_data::lock.
Referenced by destroy_conference_bridge().
|
static |
Definition at line 1151 of file app_confbridge.c.
References ast_cond_init, ast_mutex_init, hangup_data::cond, hangup_data::conference, hangup_data::hungup, hangup_data::lock, 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 1134 of file app_confbridge.c.
References ast_autoservice_stop(), ast_cond_signal, ast_hangup(), ast_mutex_lock, ast_mutex_unlock, hangup_data::cond, hangup_data::conference, hangup(), hangup_data::hungup, hangup_data::lock, NULL, and confbridge_conference::playback_chan.
Referenced by destroy_conference_bridge().
|
static |
Definition at line 771 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 2518 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 1679 of file app_confbridge.c.
References confbridge_conference::activeusers, alloc_playback_chan(), announce_user_count(), user_profile::announce_user_count_all_after, user_profile::announcement, 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_user::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, confbridge_user::chan, conf_bridge_profile_copy(), conf_get_sound(), CONF_SOUND_LOCKED, conf_start_record(), CONF_STATE_EMPTY, confbridge_user::conference, hangup_data::conference, 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_user::muted, confbridge_conference::name, NULL, OBJ_KEY, play_prompt_to_user(), confbridge_user::post_join_list, 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, confbridge_user::suspended_moh, confbridge_user::u_profile, 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 3233 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::chan, confbridge_user::kicked, confbridge_user::list, match(), NULL, pbx_builtin_setvar_helper(), SCOPED_AO2LOCK, confbridge_user::u_profile, 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 1905 of file app_confbridge.c.
References ao2_lock, ao2_ref, ao2_unlock, ast_free, AST_LIST_REMOVE_HEAD, confbridge_user::conference, handle_conf_user_leave(), post_join_action::list, NULL, and confbridge_user::post_join_list.
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 4439 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, conf_announce_get_tech(), conf_load_config(), conf_record_get_tech(), confbridge_exec(), CONFERENCE_BRIDGE_BUCKETS, conference_bridge_cmp_cb(), conference_bridge_hash_cb(), confkick_exec(), EVENT_FLAG_CALL, EVENT_FLAG_REPORTING, EVENT_FLAG_SYSTEM, LOG_ERROR, manager_confbridge_init(), NULL, register_channel_tech(), and unload_module().
Referenced by reload().
|
static |
Definition at line 928 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_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 |
Definition at line 1038 of file app_confbridge.c.
References ast_stream_and_wait(), and confbridge_user::chan.
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 2035 of file app_confbridge.c.
References play_sound_helper().
Referenced by action_toggle_mute_participants(), announce_user_count(), confbridge_exec(), and post_join_play_begin().
|
static |
Definition at line 1997 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::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(), 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 2317 of file app_confbridge.c.
References NULL, and play_sound_helper().
Referenced by announce_user_count().
|
static |
Definition at line 1923 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 1965 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 1991 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 1979 of file app_confbridge.c.
References ast_cond_init, ast_mutex_init, playback_task_data::cond, hangup_data::conference, 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 1539 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 4377 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 4492 of file app_confbridge.c.
References AST_MODFLAG_LOAD_ORDER, AST_MODPRI_DEVSTATE_PROVIDER, AST_MODULE_INFO(), AST_MODULE_SUPPORT_CORE, ASTERISK_GPL_KEY, conf_reload_config(), load_module(), and unload_module().
|
static |
Definition at line 664 of file app_confbridge.c.
References confbridge_end_type(), NULL, and send_conf_stasis().
Referenced by conf_ended().
|
static |
Definition at line 659 of file app_confbridge.c.
References confbridge_start_type(), NULL, and send_conf_stasis().
Referenced by join_conference_bridge().
|
static |
Definition at line 585 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, and stasis_publish().
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 622 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, and stasis_publish().
Referenced by confbridge_handle_atxfer().
|
static |
Definition at line 2530 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 669 of file app_confbridge.c.
References ast_json_pack(), ast_json_unref(), ast_test_flag, confbridge_user::chan, confbridge_join_type(), confbridge_user::muted, send_conf_stasis(), confbridge_user::u_profile, and USER_OPT_ADMIN.
Referenced by send_event_hook_callback().
|
static |
Definition at line 683 of file app_confbridge.c.
References ast_json_pack(), ast_json_unref(), ast_test_flag, confbridge_user::chan, confbridge_leave_type(), send_conf_stasis(), confbridge_user::u_profile, and USER_OPT_ADMIN.
Referenced by send_event_hook_callback().
|
static |
Definition at line 707 of file app_confbridge.c.
References ast_json_pack(), ast_json_unref(), ast_test_flag, confbridge_user::chan, confbridge_mute_type(), send_conf_stasis(), confbridge_user::u_profile, and USER_OPT_ADMIN.
Referenced by generic_mute_unmute_user().
|
static |
Definition at line 697 of file app_confbridge.c.
References confbridge_start_record_type(), NULL, and send_conf_stasis().
Referenced by conf_start_record().
|
static |
Definition at line 702 of file app_confbridge.c.
References confbridge_stop_record_type(), NULL, and send_conf_stasis().
Referenced by conf_stop_record().
|
static |
Definition at line 721 of file app_confbridge.c.
References ast_json_pack(), ast_json_unref(), ast_test_flag, confbridge_user::chan, confbridge_unmute_type(), send_conf_stasis(), confbridge_user::u_profile, and USER_OPT_ADMIN.
Referenced by generic_mute_unmute_user().
|
static |
Definition at line 735 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 2112 of file app_confbridge.c.
References ast_channel_datastore_add(), ast_channel_datastore_find(), ast_datastore_alloc, ast_datastore_free(), async_datastore_data_alloc(), ast_datastore::data, NULL, and async_datastore_data::wait.
Referenced by async_playback_task_data_alloc().
|
static |
Definition at line 966 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 4393 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(), conf_announce_get_tech(), conf_destroy_config(), conf_record_get_tech(), manager_confbridge_shutdown(), NULL, and unregister_channel_tech().
Referenced by load_module(), and reload().
|
static |
Definition at line 4361 of file app_confbridge.c.
References ao2_cleanup, ast_channel_unregister(), and ast_channel_tech::capabilities.
Referenced by unload_module().
|
static |
Definition at line 2392 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 2201 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_data::cond, ast_datastore::data, async_datastore_data::lock, NULL, and async_datastore_data::wait.
Referenced by async_playback_task().
|
static |
Definition at line 4504 of file app_confbridge.c.
|
static |
Definition at line 459 of file app_confbridge.c.
Referenced by confbridge_exec(), join_conference_bridge(), load_module(), and unload_module().
|
static |
Definition at line 460 of file app_confbridge.c.
Referenced by _macro_exec(), load_module(), and unload_module().
|
static |
Definition at line 4504 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 2080 of file app_confbridge.c.
|
static |
Definition at line 3800 of file app_confbridge.c.
|
static |
Definition at line 3810 of file app_confbridge.c.
|
static |
Definition at line 3816 of file app_confbridge.c.
struct ao2_container* conference_bridges |
Container to hold all conference bridges in progress.
Definition at line 469 of file app_confbridge.c.
Referenced by announce_request().