Asterisk - The Open Source Telephony Project
21.4.1
|
ConfBridge config parser. More...
#include "asterisk.h"
#include "asterisk/logger.h"
#include "asterisk/config.h"
#include "asterisk/config_options.h"
#include "include/confbridge.h"
#include "asterisk/astobj2.h"
#include "asterisk/cli.h"
#include "asterisk/bridge_features.h"
#include "asterisk/stringfields.h"
#include "asterisk/pbx.h"
Go to the source code of this file.
Data Structures | |
struct | confbridge_cfg |
struct | dtmf_menu_hook_pvt |
struct | func_confbridge_data |
Functions | |
static int | add_action_to_menu_entry (struct conf_menu_entry *menu_entry, enum conf_menu_action_id id, char *databuf) |
static int | add_menu_entry (struct conf_menu *menu, const char *dtmf, const char *action_names) |
static int | announce_user_count_all_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static | AO2_GLOBAL_OBJ_STATIC (cfg_handle) |
static int | apply_menu_to_user (struct confbridge_user *user, struct conf_menu *menu) |
static int | bridge_cmp_cb (void *obj, void *arg, int flags) |
static int | bridge_hash_cb (const void *obj, const int flags) |
static void * | bridge_profile_alloc (const char *category) |
static void | bridge_profile_destructor (void *obj) |
static void * | bridge_profile_find (struct ao2_container *container, const char *category) |
static struct bridge_profile_sounds * | bridge_profile_sounds_alloc (void) |
static void | bridge_profile_sounds_destroy_cb (void *obj) |
static int | bridge_template_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static char * | complete_bridge_profile_name (const char *line, const char *word, int pos, int state) |
static char * | complete_menu_name (const char *line, const char *word, int pos, int state) |
static char * | complete_user_profile_name (const char *line, const char *word, int pos, int state) |
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'. | |
void | conf_destroy_config (void) |
destroy the information loaded from the confbridge.conf file | |
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... | |
int | conf_load_config (void) |
load confbridge.conf file | |
void | conf_menu_entry_destroy (struct conf_menu_entry *menu_entry) |
Destroys and frees all the actions stored in a menu_entry structure. | |
static int | conf_menu_profile_copy (struct conf_menu *dst, struct conf_menu *src) |
int | conf_reload_config (void) |
reload confbridge.conf file | |
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... | |
static void | conf_user_profile_copy (struct user_profile *dst, struct user_profile *src) |
static void * | confbridge_cfg_alloc (void) |
static void | confbridge_cfg_destructor (void *obj) |
CONFIG_INFO_STANDARD (cfg_info, cfg_handle, confbridge_cfg_alloc,.files=ACO_FILES(&confbridge_conf),.pre_apply_config=verify_default_profiles,) | |
static int | copy_menu_entry (struct conf_menu_entry *dst, struct conf_menu_entry *src) |
static void | func_confbridge_data_destructor (struct func_confbridge_data *b_data) |
static void | func_confbridge_destroy_cb (void *data) |
int | func_confbridge_helper (struct ast_channel *chan, const char *cmd, char *data, const char *value) |
static char * | handle_cli_confbridge_show_bridge_profile (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_confbridge_show_bridge_profiles (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_confbridge_show_menu (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_confbridge_show_menus (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_confbridge_show_user_profile (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_confbridge_show_user_profiles (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static void * | menu_alloc (const char *category) |
static int | menu_cmp_cb (void *obj, void *arg, int flags) |
static void | menu_destructor (void *obj) |
static void * | menu_find (struct ao2_container *container, const char *category) |
static int | menu_hash_cb (const void *obj, const int flags) |
static int | menu_hook_callback (struct ast_bridge_channel *bridge_channel, void *hook_pvt) |
static void | menu_hook_destroy (void *hook_pvt) |
static int | menu_option_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | menu_template_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | mix_interval_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | remb_behavior_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | sample_rate_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | set_sound (const char *sound_name, const char *sound_file, struct bridge_profile *b_profile) |
static int | sound_option_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | user_cmp_cb (void *obj, void *arg, int flags) |
static int | user_hash_cb (const void *obj, const int flags) |
static void * | user_profile_alloc (const char *category) |
static void | user_profile_destructor (void *obj) |
static void * | user_profile_find (struct ao2_container *container, const char *category) |
static int | user_template_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | verify_default_profiles (void) |
static int | video_mode_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Variables | |
static struct aco_type | bridge_type |
static struct aco_type * | bridge_types [] = ACO_TYPES(&bridge_type) |
static struct ast_cli_entry | cli_confbridge_parser [] |
static struct aco_file | confbridge_conf |
static const struct ast_datastore_info | confbridge_datastore |
static struct aco_type | general_type |
static struct aco_type | menu_type |
static struct aco_type * | menu_types [] = ACO_TYPES(&menu_type) |
static struct aco_type | user_type |
static struct aco_type * | user_types [] = ACO_TYPES(&user_type) |
ConfBridge config parser.
Definition in file conf_config_parser.c.
|
static |
bridge profile container functions
Definition at line 853 of file conf_config_parser.c.
References CMP_MATCH, OBJ_KEY, OBJ_PARTIAL_KEY, and OBJ_POINTER.
|
static |
Bridge Profile Sounds functions
Definition at line 1002 of file conf_config_parser.c.
References ast_string_field_free_memory, and sounds.
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.
Referenced by conf_find_bridge_profile(), and join_conference_bridge().
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_global_obj_ref, ao2_ref, ast_channel_datastore_find(), func_confbridge_data::b_usable, conf_bridge_profile_copy(), ast_datastore::data, OBJ_KEY, and RAII_VAR.
Referenced by confbridge_exec().
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 AST_LIST_TRAVERSE, and conf_menu_entry::dtmf.
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_global_obj_ref, ao2_ref, ast_channel_datastore_find(), ast_datastore::data, OBJ_KEY, RAII_VAR, and func_confbridge_data::u_usable.
Referenced by conf_send_event_to_participants(), and confbridge_exec().
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_global_obj_ref, ast_channel_datastore_find(), ast_datastore::data, func_confbridge_data::m_usable, OBJ_KEY, and RAII_VAR.
Referenced by confbridge_exec().
|
static |
menu container functions
Definition at line 899 of file conf_config_parser.c.
References CMP_MATCH, OBJ_KEY, OBJ_PARTIAL_KEY, and OBJ_POINTER.
|
static |
User profile container functions
Definition at line 956 of file conf_config_parser.c.
References CMP_MATCH, OBJ_KEY, OBJ_PARTIAL_KEY, and OBJ_POINTER.
|
static |
Definition at line 838 of file conf_config_parser.c.
|
static |
Definition at line 1116 of file conf_config_parser.c.