Asterisk - The Open Source Telephony Project GIT-master-0bf3178
|
#include "asterisk.h"
#include "asterisk/app.h"
#include "asterisk/logger.h"
#include "asterisk/linkedlists.h"
#include "asterisk/channel.h"
#include "asterisk/bridge.h"
#include "asterisk/bridge_features.h"
#include "asterisk/stasis_bridges.h"
#include "conf_state.h"
Go to the source code of this file.
Data Structures | |
struct | bridge_profile |
struct | bridge_profile_sounds |
struct | conf_menu |
struct | conf_menu_action |
struct | conf_menu_entry |
struct | confbridge_conference |
The structure that represents a conference bridge. More... | |
struct | confbridge_user |
The structure that represents a conference bridge user. More... | |
struct | post_join_action |
struct | user_profile |
Macros | |
#define | DEFAULT_BRIDGE_PROFILE "default_bridge" |
#define | DEFAULT_MENU_PROFILE "default_menu" |
#define | DEFAULT_SILENCE_THRESHOLD 2500 |
#define | DEFAULT_TALKING_THRESHOLD 160 |
#define | DEFAULT_USER_PROFILE "default_user" |
#define | MAX_CONF_NAME AST_MAX_EXTENSION |
#define | MAX_PIN 80 |
#define | MAX_PROFILE_NAME 128 |
Functions | |
int | async_play_sound_file (struct confbridge_conference *conference, const char *filename, struct ast_channel *initiator) |
Play sound file into conference bridge asynchronously. More... | |
void | async_play_sound_ready (struct ast_channel *chan) |
Indicate the initiator of an async sound file is ready for it to play. More... | |
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... | |
int | conf_announce_channel_push (struct ast_channel *ast) |
Push the announcer channel into the conference. More... | |
struct ast_channel_tech * | conf_announce_get_tech (void) |
Get ConfBridge announce channel technology struct. More... | |
void | conf_bridge_profile_copy (struct bridge_profile *dst, struct bridge_profile *src) |
copies a bridge profile More... | |
void | conf_bridge_profile_destroy (struct bridge_profile *b_profile) |
Destroy a bridge profile found by 'conf_find_bridge_profile'. More... | |
void | conf_destroy_config (void) |
destroy the information loaded from the confbridge.conf file 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... | |
const struct bridge_profile * | conf_find_bridge_profile (struct ast_channel *chan, const char *bridge_profile_name, struct bridge_profile *result) |
Find a bridge profile given a bridge profile's name and store that profile in result structure. More... | |
int | conf_find_menu_entry_by_sequence (const char *dtmf_sequence, struct conf_menu *menu, struct conf_menu_entry *result) |
Finds a menu_entry in a menu structure matched by DTMF sequence. More... | |
const struct user_profile * | conf_find_user_profile (struct ast_channel *chan, const char *user_profile_name, struct user_profile *result) |
find a user profile given a user profile's name and store that profile in result structure. More... | |
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... | |
int | conf_load_config (void) |
load confbridge.conf file More... | |
void | conf_menu_entry_destroy (struct conf_menu_entry *menu_entry) |
Destroys and frees all the actions stored in a menu_entry structure. More... | |
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... | |
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... | |
struct ast_channel_tech * | conf_record_get_tech (void) |
Get ConfBridge record channel technology struct. More... | |
int | conf_reload_config (void) |
reload confbridge.conf file More... | |
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... | |
void | conf_send_event_to_participants (struct confbridge_conference *conference, struct ast_channel *chan, struct stasis_message *msg) |
Send events to bridge participants. More... | |
int | conf_set_menu_to_user (struct ast_channel *chan, struct confbridge_user *user, const char *menu_profile_name) |
find a menu profile given a menu profile's name and apply the menu in DTMF hooks. More... | |
void | conf_update_user_mute (struct confbridge_user *user) |
Update the actual mute status of the user and set it on the bridge. More... | |
struct stasis_message_type * | confbridge_end_type (void) |
get the confbridge end stasis message type More... | |
const char * | confbridge_event_type_to_string (struct stasis_message_type *event_type) |
Get the string representation of a confbridge stasis message type. More... | |
void | confbridge_handle_atxfer (struct ast_attended_transfer_message *msg) |
Create join/leave events for attended transfers. More... | |
struct stasis_message_type * | confbridge_join_type (void) |
get the confbridge join stasis message type More... | |
struct stasis_message_type * | confbridge_leave_type (void) |
get the confbridge leave stasis message type More... | |
struct stasis_message_type * | confbridge_mute_type (void) |
get the confbridge mute stasis message type More... | |
struct stasis_message_type * | confbridge_start_record_type (void) |
get the confbridge start_record stasis message type More... | |
struct stasis_message_type * | confbridge_start_type (void) |
get the confbridge start stasis message type More... | |
struct stasis_message_type * | confbridge_stop_record_type (void) |
get the confbridge stop_record stasis message type More... | |
struct stasis_message_type * | confbridge_talking_type (void) |
get the confbridge talking stasis message type More... | |
struct stasis_message_type * | confbridge_unmute_type (void) |
get the confbridge unmute stasis message type More... | |
struct stasis_message_type * | confbridge_welcome_type (void) |
get the confbridge welcome stasis message type More... | |
int | func_confbridge_helper (struct ast_channel *chan, const char *cmd, char *data, const char *value) |
int | manager_confbridge_init (void) |
register stasis message routers to handle manager events for confbridge messages More... | |
void | manager_confbridge_shutdown (void) |
unregister stasis message routers to handle manager events for confbridge messages More... | |
int | play_sound_file (struct confbridge_conference *conference, const char *filename) |
Play sound file into conference bridge. More... | |
Variables | |
struct ao2_container * | conference_bridges |
Container to hold all conference bridges in progress. More... | |
#define DEFAULT_BRIDGE_PROFILE "default_bridge" |
Definition at line 42 of file confbridge.h.
#define DEFAULT_MENU_PROFILE "default_menu" |
Definition at line 43 of file confbridge.h.
#define DEFAULT_SILENCE_THRESHOLD 2500 |
Default time in ms of silence necessary to declare talking stopped by the bridge.
Definition at line 49 of file confbridge.h.
#define DEFAULT_TALKING_THRESHOLD 160 |
Default minimum average magnitude threshold to determine talking by the DSP.
Definition at line 46 of file confbridge.h.
#define DEFAULT_USER_PROFILE "default_user" |
Definition at line 41 of file confbridge.h.
#define MAX_CONF_NAME AST_MAX_EXTENSION |
Maximum length of a conference bridge name
Definition at line 35 of file confbridge.h.
#define MAX_PIN 80 |
Maximum length of a conference pin
Definition at line 37 of file confbridge.h.
#define MAX_PROFILE_NAME 128 |
Maximum length of bridge/user/menu profile names
Definition at line 39 of file confbridge.h.
enum bridge_profile_flags |
Definition at line 77 of file confbridge.h.
enum conf_menu_action_id |
Definition at line 96 of file confbridge.h.
enum conf_sounds |
Definition at line 169 of file confbridge.h.
enum user_profile_flags |
Definition at line 51 of file confbridge.h.
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 2371 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().
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 2377 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().
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 1532 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 4485 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 4491 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 4498 of file app_confbridge.c.
References AST_LIST_INSERT_TAIL, confbridge_conference::waiting_list, and confbridge_conference::waitingusers.
Referenced by conf_default_join_waitmarked().
int conf_announce_channel_push | ( | struct ast_channel * | ast | ) |
Push the announcer channel into the conference.
ast | Either channel in the announcer channel pair. |
0 | on success. |
-1 | on error. |
Definition at line 144 of file conf_chan_announce.c.
References ao2_cleanup, ao2_lock, ao2_ref, ao2_unlock, AST_BRIDGE_CHANNEL_FLAG_IMMOVABLE, ast_bridge_features_new(), ast_bridge_impart(), AST_BRIDGE_IMPART_CHAN_INDEPENDENT, ast_channel_tech_pvt(), ast_set_flag, AST_UNREAL_CARETAKER_THREAD, ast_bridge_features::feature_flags, lock, NULL, RAII_VAR, and SCOPED_CHANNELLOCK.
Referenced by push_announcer().
struct ast_channel_tech * conf_announce_get_tech | ( | void | ) |
Get ConfBridge announce channel technology struct.
Definition at line 139 of file conf_chan_announce.c.
References announce_tech.
Referenced by announce_request(), load_module(), and unload_module().
void conf_bridge_profile_copy | ( | struct bridge_profile * | dst, |
struct bridge_profile * | src | ||
) |
copies a bridge profile
Definition at line 2558 of file conf_config_parser.c.
References ao2_ref, and bridge_profile::sounds.
Referenced by conf_find_bridge_profile(), and join_conference_bridge().
void conf_bridge_profile_destroy | ( | struct bridge_profile * | b_profile | ) |
Destroy a bridge profile found by 'conf_find_bridge_profile'.
Definition at line 2566 of file conf_config_parser.c.
References ao2_ref, NULL, and bridge_profile::sounds.
Referenced by confbridge_exec(), destroy_conference_bridge(), func_confbridge_data_destructor(), func_confbridge_helper(), and handle_cli_confbridge_show_bridge_profile().
void conf_destroy_config | ( | void | ) |
destroy the information loaded from the confbridge.conf file
Definition at line 2729 of file conf_config_parser.c.
References aco_info_destroy(), ao2_global_obj_release, ARRAY_LEN, ast_cli_unregister_multiple(), cfg_handle, and cli_confbridge_parser.
Referenced by conf_load_config(), and unload_module().
void conf_ended | ( | struct confbridge_conference * | conference | ) |
Callback to be called when the conference has become empty.
conference | The conference bridge |
Definition at line 1560 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 875 of file app_confbridge.c.
References ao2_find, conference_bridges, and OBJ_KEY.
Referenced by confbridge_publish_manager_event().
const struct bridge_profile * conf_find_bridge_profile | ( | struct ast_channel * | chan, |
const char * | bridge_profile_name, | ||
struct bridge_profile * | result | ||
) |
Find a bridge profile given a bridge profile's name and store that profile in result structure.
chan | channel the bridge profile is requested for |
bridge_profile_name | name of the profile requested (optional) |
result | data contained by the bridge profile will be copied to this struct pointer |
If bridge_profile_name is not provided, this function will check for the presence of a bridge profile set by the CONFBRIDGE function on a channel datastore. If that doesn't exist, the default_bridge profile is used.
bridge | profile on success |
NULL | on failure |
Definition at line 2574 of file conf_config_parser.c.
References ao2_cleanup, ao2_find, ao2_global_obj_ref, ao2_lock, ao2_ref, ao2_unlock, ast_channel_datastore_find(), ast_channel_lock, ast_channel_unlock, ast_strlen_zero(), func_confbridge_data::b_profile, func_confbridge_data::b_usable, cfg_handle, conf_bridge_profile_copy(), confbridge_datastore, ast_datastore::data, DEFAULT_BRIDGE_PROFILE, NULL, OBJ_KEY, RAII_VAR, and result.
Referenced by bridge_template_handler(), confbridge_exec(), and handle_cli_confbridge_show_bridge_profile().
int conf_find_menu_entry_by_sequence | ( | const char * | dtmf_sequence, |
struct conf_menu * | menu, | ||
struct conf_menu_entry * | result | ||
) |
Finds a menu_entry in a menu structure matched by DTMF sequence.
1 | success, entry is found and stored in result |
0 | failure, no entry found for given DTMF sequence |
Definition at line 2645 of file conf_config_parser.c.
References ao2_lock, ao2_unlock, AST_LIST_TRAVERSE, copy_menu_entry(), conf_menu_entry::dtmf, conf_menu::entries, NULL, and result.
Referenced by action_playback_and_continue().
const struct user_profile * conf_find_user_profile | ( | struct ast_channel * | chan, |
const char * | user_profile_name, | ||
struct user_profile * | result | ||
) |
find a user profile given a user profile's name and store that profile in result structure.
chan | channel the user profile is requested for |
user_profile_name | name of the profile requested (optional) |
result | data contained by the user profile will be copied to this struct pointer |
If user_profile_name is not provided, this function will check for the presence of a user profile set by the CONFBRIDGE function on a channel datastore. If that doesn't exist, the default_user profile is used.
user | profile on success |
NULL | on failure |
Definition at line 2521 of file conf_config_parser.c.
References ao2_cleanup, ao2_find, ao2_global_obj_ref, ao2_lock, ao2_ref, ao2_unlock, ast_channel_datastore_find(), ast_channel_lock, ast_channel_unlock, ast_strlen_zero(), cfg_handle, conf_user_profile_copy(), confbridge_datastore, ast_datastore::data, DEFAULT_USER_PROFILE, NULL, OBJ_KEY, RAII_VAR, result, func_confbridge_data::u_profile, and func_confbridge_data::u_usable.
Referenced by conf_send_event_to_participants(), confbridge_exec(), handle_cli_confbridge_show_user_profile(), and user_template_handler().
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 614 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 3310 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 1544 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 1508 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 1519 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 1549 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().
int conf_load_config | ( | void | ) |
load confbridge.conf file
Definition at line 2418 of file conf_config_parser.c.
References __stringify, ACO_EXACT, aco_info_init(), aco_option_register, aco_option_register_custom, ACO_PREFIX, aco_process_config(), ACO_PROCESS_ERROR, ACO_REGEX, announce_user_count_all_handler(), ARRAY_LEN, ast_cli_register_multiple, BRIDGE_OPT_BINAURAL_ACTIVE, BRIDGE_OPT_ENABLE_EVENTS, BRIDGE_OPT_RECORD_CONFERENCE, BRIDGE_OPT_RECORD_FILE_APPEND, BRIDGE_OPT_RECORD_FILE_TIMESTAMP, bridge_template_handler(), bridge_types, CHARFLDSET, cli_confbridge_parser, conf_destroy_config(), DEFAULT_SILENCE_THRESHOLD, DEFAULT_TALKING_THRESHOLD, error(), FLDSET, language, menu_option_handler(), menu_template_handler(), menu_types, mix_interval_handler(), NULL, OPT_BOOLFLAG_T, OPT_CHAR_ARRAY_T, OPT_NOOP_T, OPT_UINT_T, regcontext, remb_behavior_handler(), sample_rate_handler(), sound_option_handler(), USER_OPT_ADMIN, USER_OPT_ANNOUNCE_JOIN_LEAVE, USER_OPT_ANNOUNCE_JOIN_LEAVE_REVIEW, USER_OPT_ANNOUNCEUSERCOUNT, USER_OPT_ANSWER_CHANNEL, USER_OPT_DENOISE, USER_OPT_DROP_SILENCE, USER_OPT_DTMF_PASS, USER_OPT_ECHO_EVENTS, USER_OPT_ENDMARKED, USER_OPT_ENDMARKEDANY, USER_OPT_HEAR_OWN_JOIN_SOUND, USER_OPT_JITTERBUFFER, USER_OPT_MARKEDUSER, USER_OPT_MUSICONHOLD, USER_OPT_NOONLYPERSON, USER_OPT_QUIET, USER_OPT_SEND_EVENTS, USER_OPT_STARTMUTED, USER_OPT_TALKER_DETECT, USER_OPT_TEXT_MESSAGING, USER_OPT_WAITMARKED, user_template_handler(), user_types, and video_mode_handler().
Referenced by load_module().
void conf_menu_entry_destroy | ( | struct conf_menu_entry * | menu_entry | ) |
Destroys and frees all the actions stored in a menu_entry structure.
Definition at line 2637 of file conf_config_parser.c.
References conf_menu_entry::actions, ast_free, AST_LIST_REMOVE_HEAD, and NULL.
Referenced by action_playback_and_continue(), add_menu_entry(), conf_menu_profile_copy(), and menu_destructor().
void conf_moh_start | ( | struct confbridge_user * | user | ) |
Start MOH for the conference user.
user | Conference user to start MOH on. |
Definition at line 1451 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 1424 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().
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 4517 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().
struct ast_channel_tech * conf_record_get_tech | ( | void | ) |
Get ConfBridge record channel technology struct.
Definition at line 102 of file conf_chan_record.c.
References record_tech.
Referenced by load_module(), rec_request(), and unload_module().
int conf_reload_config | ( | void | ) |
reload confbridge.conf file
Definition at line 2507 of file conf_config_parser.c.
References aco_process_config(), and ACO_PROCESS_ERROR.
Referenced by reload().
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 4504 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 4510 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 4528 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().
void conf_send_event_to_participants | ( | struct confbridge_conference * | conference, |
struct ast_channel * | chan, | ||
struct stasis_message * | msg | ||
) |
Send events to bridge participants.
conference | The conference bridge |
chan | The channel triggering the action |
msg | The stasis message describing the event |
Definition at line 414 of file confbridge_manager.c.
References confbridge_conference::active_list, ao2_lock, ao2_ref, ao2_unlock, ast_channel_name(), ast_channel_snapshot_get_latest(), ast_channel_uniqueid(), ast_debug, ast_json_array_append(), ast_json_array_create(), ast_json_object_get(), ast_json_string_set(), ast_json_unref(), AST_LIST_TRAVERSE, ast_log, ast_test_flag, ast_bridge_blob::blob, ast_bridge_blob::bridge, bridge_to_json(), confbridge_user::chan, ast_bridge_blob::channel, channel_to_json(), conf_find_user_profile(), confbridge_event_type_to_string(), confbridge_join_type(), confbridge_welcome_type(), confbridge_user::conference, confbridge_user::list, LOG_ERROR, confbridge_conference::name, user_profile::name, NULL, pack_bridge_and_channels(), pack_snapshots(), send_message(), stasis_message_data(), stasis_message_type(), confbridge_user::u_profile, user, USER_OPT_ECHO_EVENTS, and USER_OPT_SEND_EVENTS.
Referenced by send_conf_stasis().
int conf_set_menu_to_user | ( | struct ast_channel * | chan, |
struct confbridge_user * | user, | ||
const char * | menu_profile_name | ||
) |
find a menu profile given a menu profile's name and apply the menu in DTMF hooks.
chan | channel the menu profile is requested for |
user | user profile the menu is being applied to |
menu_profile_name | name of the profile requested (optional) |
If menu_profile_name is not provided, this function will check for the presence of a menu profile set by the CONFBRIDGE function on a channel datastore. If that doesn't exist, the default_menu profile is used.
0 | on success |
-1 | on failure |
Definition at line 2691 of file conf_config_parser.c.
References ao2_bump, ao2_cleanup, ao2_find, ao2_global_obj_ref, apply_menu_to_user(), ast_channel_datastore_find(), ast_channel_lock, ast_channel_unlock, ast_strlen_zero(), cfg_handle, confbridge_datastore, ast_datastore::data, DEFAULT_MENU_PROFILE, func_confbridge_data::m_usable, func_confbridge_data::menu, NULL, OBJ_KEY, and RAII_VAR.
Referenced by confbridge_exec().
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 1366 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().
struct stasis_message_type * confbridge_end_type | ( | void | ) |
get the confbridge end stasis message type
stasis | message type for confbridge end messages if it's available |
NULL | if it isn't |
Referenced by confbridge_event_type_to_string(), manager_confbridge_init(), manager_confbridge_shutdown(), and send_conf_end_event().
const char * confbridge_event_type_to_string | ( | struct stasis_message_type * | event_type | ) |
Get the string representation of a confbridge stasis message type.
event_type | The confbridge event type such as 'confbridge_welcome_type()' |
The | string representation of the message type |
unknown | if not found |
Definition at line 249 of file confbridge_manager.c.
References confbridge_end_type(), confbridge_join_type(), confbridge_leave_type(), confbridge_mute_type(), confbridge_start_record_type(), confbridge_start_type(), confbridge_stop_record_type(), confbridge_talking_type(), confbridge_unmute_type(), and confbridge_welcome_type().
Referenced by conf_send_event_to_participants(), confbridge_publish_manager_event(), pack_bridge_and_channels(), and send_message().
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 1649 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().
struct stasis_message_type * confbridge_join_type | ( | void | ) |
get the confbridge join stasis message type
stasis | message type for confbridge join messages if it's available |
NULL | if it isn't |
Referenced by conf_send_event_to_participants(), confbridge_event_type_to_string(), confbridge_handle_atxfer(), manager_confbridge_init(), manager_confbridge_shutdown(), and send_join_event().
struct stasis_message_type * confbridge_leave_type | ( | void | ) |
get the confbridge leave stasis message type
stasis | message type for confbridge leave messages if it's available |
NULL | if it isn't |
Referenced by confbridge_event_type_to_string(), confbridge_handle_atxfer(), manager_confbridge_init(), manager_confbridge_shutdown(), send_leave_event(), and send_message().
struct stasis_message_type * confbridge_mute_type | ( | void | ) |
get the confbridge mute stasis message type
stasis | message type for confbridge mute messages if it's available |
NULL | if it isn't |
Referenced by confbridge_event_type_to_string(), manager_confbridge_init(), manager_confbridge_shutdown(), and send_mute_event().
struct stasis_message_type * confbridge_start_record_type | ( | void | ) |
get the confbridge start_record stasis message type
stasis | message type for confbridge start_record messages if it's available |
NULL | if it isn't |
Referenced by confbridge_event_type_to_string(), manager_confbridge_init(), manager_confbridge_shutdown(), and send_start_record_event().
struct stasis_message_type * confbridge_start_type | ( | void | ) |
get the confbridge start stasis message type
stasis | message type for confbridge start messages if it's available |
NULL | if it isn't |
Referenced by confbridge_event_type_to_string(), manager_confbridge_init(), manager_confbridge_shutdown(), and send_conf_start_event().
struct stasis_message_type * confbridge_stop_record_type | ( | void | ) |
get the confbridge stop_record stasis message type
stasis | message type for confbridge stop_record messages if it's available |
NULL | if it isn't |
Referenced by confbridge_event_type_to_string(), manager_confbridge_init(), manager_confbridge_shutdown(), and send_stop_record_event().
struct stasis_message_type * confbridge_talking_type | ( | void | ) |
get the confbridge talking stasis message type
stasis | message type for confbridge talking messages if it's available |
NULL | if it isn't |
Referenced by conf_handle_talker_cb(), confbridge_event_type_to_string(), manager_confbridge_init(), and manager_confbridge_shutdown().
struct stasis_message_type * confbridge_unmute_type | ( | void | ) |
get the confbridge unmute stasis message type
stasis | message type for confbridge unmute messages if it's available |
NULL | if it isn't |
Referenced by confbridge_event_type_to_string(), manager_confbridge_init(), manager_confbridge_shutdown(), and send_unmute_event().
struct stasis_message_type * confbridge_welcome_type | ( | void | ) |
get the confbridge welcome stasis message type
stasis | message type for confbridge welcome messages if it's available |
NULL | if it isn't |
Referenced by conf_send_event_to_participants(), confbridge_event_type_to_string(), manager_confbridge_init(), and manager_confbridge_shutdown().
int func_confbridge_helper | ( | struct ast_channel * | chan, |
const char * | cmd, | ||
char * | data, | ||
const char * | value | ||
) |
Definition at line 1121 of file conf_config_parser.c.
References aco_process_var(), ao2_cleanup, args, AST_APP_ARG, ast_calloc, ast_channel_datastore_add(), ast_channel_datastore_find(), ast_channel_datastore_remove(), ast_channel_lock, ast_channel_unlock, ast_datastore_alloc, ast_datastore_free(), AST_DECLARE_APP_ARGS, ast_log, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero(), func_confbridge_data::b_profile, func_confbridge_data::b_usable, bridge_profile_sounds_alloc(), bridge_type, conf_bridge_profile_destroy(), confbridge_datastore, ast_datastore::data, DEFAULT_BRIDGE_PROFILE, DEFAULT_MENU_PROFILE, DEFAULT_USER_PROFILE, ast_variable::file, LOG_WARNING, func_confbridge_data::m_usable, func_confbridge_data::menu, menu_alloc(), menu_type, ast_variable::name, NULL, bridge_profile::sounds, type, func_confbridge_data::u_profile, func_confbridge_data::u_usable, user_profile_destructor(), user_type, ast_variable::value, and value.
int manager_confbridge_init | ( | void | ) |
register stasis message routers to handle manager events for confbridge messages
0 | success |
non-zero | failure |
Definition at line 721 of file confbridge_manager.c.
References ast_attended_transfer_type(), ast_bridge_topic_all(), ast_channel_topic_all(), bridge_state_router, channel_state_router, confbridge_atxfer_cb(), confbridge_end_cb(), confbridge_end_type(), confbridge_join_cb(), confbridge_join_type(), confbridge_leave_cb(), confbridge_leave_type(), confbridge_mute_cb(), confbridge_mute_type(), confbridge_start_cb(), confbridge_start_record_cb(), confbridge_start_record_type(), confbridge_start_type(), confbridge_stop_record_cb(), confbridge_stop_record_type(), confbridge_talking_cb(), confbridge_talking_type(), confbridge_unmute_cb(), confbridge_unmute_type(), confbridge_welcome_type(), manager_confbridge_shutdown(), NULL, stasis_message_router_add(), stasis_message_router_create, and STASIS_MESSAGE_TYPE_INIT.
Referenced by load_module().
void manager_confbridge_shutdown | ( | void | ) |
unregister stasis message routers to handle manager events for confbridge messages
Definition at line 698 of file confbridge_manager.c.
References bridge_state_router, channel_state_router, confbridge_end_type(), confbridge_join_type(), confbridge_leave_type(), confbridge_mute_type(), confbridge_start_record_type(), confbridge_start_type(), confbridge_stop_record_type(), confbridge_talking_type(), confbridge_unmute_type(), confbridge_welcome_type(), NULL, stasis_message_router_unsubscribe(), and STASIS_MESSAGE_TYPE_CLEANUP.
Referenced by manager_confbridge_init(), and unload_module().
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 2124 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().
|
extern |
Container to hold all conference bridges in progress.
Definition at line 557 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().