Asterisk - The Open Source Telephony Project
18.5.0
|
Interface to mISDN - Config. More...
Go to the source code of this file.
Macros | |
#define | BUFFERSIZE 512 |
Functions | |
void | misdn_cfg_destroy (void) |
void | misdn_cfg_get (int port, enum misdn_cfg_elements elem, void *buf, int bufsize) |
void | misdn_cfg_get_config_string (int port, enum misdn_cfg_elements elem, char *buf, int bufsize) |
void | misdn_cfg_get_desc (enum misdn_cfg_elements elem, void *buf, int bufsize, void *buf_default, int bufsize_default) |
enum misdn_cfg_elements | misdn_cfg_get_elem (const char *name) |
void | misdn_cfg_get_name (enum misdn_cfg_elements elem, void *buf, int bufsize) |
int | misdn_cfg_get_next_port (int port) |
int | misdn_cfg_get_next_port_spin (int port) |
void | misdn_cfg_get_ports_string (char *ports) |
Generate a comma separated list of all active ports. More... | |
int | misdn_cfg_init (int max_ports, int reload) |
int | misdn_cfg_is_group_method (char *group, enum misdn_cfg_method meth) |
int | misdn_cfg_is_msn_valid (int port, char *msn) |
int | misdn_cfg_is_port_valid (int port) |
void | misdn_cfg_reload (void) |
void | misdn_cfg_update_ptp (void) |
struct ast_jb_conf * | misdn_get_global_jbconf (void) |
Interface to mISDN - Config.
Definition in file chan_misdn_config.h.
#define BUFFERSIZE 512 |
Definition at line 25 of file chan_misdn_config.h.
Referenced by _build_port_config(), complete_show_config(), handle_cli_misdn_show_config(), load_module(), misdn_cfg_get_config_string(), misdn_cfg_update_ptp(), misdn_check_l2l1(), misdn_request(), process_ast_dsp(), read_config(), and show_config_description().
enum misdn_cfg_elements |
Definition at line 27 of file chan_misdn_config.h.
enum misdn_cfg_method |
Enumerator | |
---|---|
METHOD_STANDARD | |
METHOD_ROUND_ROBIN | |
METHOD_STANDARD_DEC |
Definition at line 124 of file chan_misdn_config.h.
void misdn_cfg_destroy | ( | void | ) |
Definition at line 1187 of file misdn_config.c.
References _free_general_cfg(), _free_port_cfg(), ast_free, ast_mutex_destroy, map, misdn_cfg_lock(), misdn_cfg_unlock(), and ptp.
Referenced by unload_module().
void misdn_cfg_get | ( | int | port, |
enum misdn_cfg_elements | elem, | ||
void * | buf, | ||
int | bufsize | ||
) |
Definition at line 569 of file misdn_config.c.
References ast_copy_string(), ast_log, LOG_WARNING, map, misdn_cfg_is_port_valid(), MISDN_CFG_LAST, misdn_cfg_lock(), MISDN_CFG_PTP, misdn_cfg_unlock(), MISDN_CTYPE_ASTNAMEDGROUP, MISDN_CTYPE_STR, misdn_cfg_pt::namgrp, NULL, ptp, S_OR, str, and type.
Referenced by add_in_calls(), add_out_calls(), cb_events(), debug_numtype(), dialtone_indicate(), load_module(), misdn_add_number_prefix(), misdn_call(), misdn_cfg_update_ptp(), misdn_check_l2l1(), misdn_get_connected_line(), misdn_request(), misdn_set_opt_exec(), misdn_write(), process_ast_dsp(), read_config(), reload(), reload_config(), update_config(), and update_ec_config().
void misdn_cfg_get_config_string | ( | int | port, |
enum misdn_cfg_elements | elem, | ||
char * | buf, | ||
int | bufsize | ||
) |
Definition at line 805 of file misdn_config.c.
References ast_free, ast_log, ast_print_group(), ast_print_namedgroups(), ast_str_create, BUFFERSIZE, LOG_WARNING, map, MISDN_CFG_FIRST, misdn_cfg_is_port_valid(), MISDN_CFG_LAST, misdn_cfg_lock(), MISDN_CFG_PTP, misdn_cfg_unlock(), MISDN_CTYPE_ASTGROUP, MISDN_CTYPE_ASTNAMEDGROUP, MISDN_CTYPE_BOOL, MISDN_CTYPE_BOOLINT, MISDN_CTYPE_INT, MISDN_CTYPE_MSNLIST, MISDN_CTYPE_STR, MISDN_GEN_FIRST, MISDN_GEN_LAST, misdn_cfg_pt::ml, msn_list::msn, name, msn_list::next, ptp, str, and type.
Referenced by handle_cli_misdn_show_config().
void misdn_cfg_get_desc | ( | enum misdn_cfg_elements | elem, |
void * | buf, | ||
int | bufsize, | ||
void * | buf_default, | ||
int | bufsize_default | ||
) |
Definition at line 681 of file misdn_config.c.
References ast_copy_string(), misdn_cfg_spec::def, desc, misdn_cfg_spec::elem, map, MISDN_CFG_FIRST, MISDN_CFG_GROUPNAME, MISDN_CFG_LAST, MISDN_GEN_FIRST, MISDN_GEN_LAST, NO_DEFAULT, NULL, and ports_description.
Referenced by show_config_description().
enum misdn_cfg_elements misdn_cfg_get_elem | ( | const char * | name | ) |
Definition at line 634 of file misdn_config.c.
References misdn_cfg_spec::elem, GEN_CFG, get_cfg_position(), MISDN_CFG_FIRST, MISDN_CFG_GROUPNAME, and PORT_CFG.
Referenced by handle_cli_misdn_show_config().
void misdn_cfg_get_name | ( | enum misdn_cfg_elements | elem, |
void * | buf, | ||
int | bufsize | ||
) |
Definition at line 655 of file misdn_config.c.
References ast_copy_string(), misdn_cfg_spec::elem, map, MISDN_CFG_FIRST, MISDN_CFG_GROUPNAME, MISDN_CFG_LAST, MISDN_CFG_PTP, MISDN_GEN_FIRST, MISDN_GEN_LAST, name, and NULL.
Referenced by complete_show_config(), and show_config_description().
int misdn_cfg_get_next_port | ( | int | port | ) |
Definition at line 929 of file misdn_config.c.
References map, max_ports, MISDN_CFG_GROUPNAME, misdn_cfg_lock(), misdn_cfg_unlock(), and str.
Referenced by complete_show_config(), handle_cli_misdn_show_config(), handle_cli_misdn_show_ports_stats(), handle_cli_misdn_show_stacks(), load_module(), misdn_cfg_get_next_port_spin(), misdn_check_l2l1(), misdn_new(), misdn_request(), and update_name().
int misdn_cfg_get_next_port_spin | ( | int | port | ) |
Definition at line 946 of file misdn_config.c.
References misdn_cfg_get_next_port().
Referenced by misdn_request().
void misdn_cfg_get_ports_string | ( | char * | ports | ) |
Generate a comma separated list of all active ports.
Definition at line 779 of file misdn_config.c.
References map, max_ports, MISDN_CFG_GROUPNAME, misdn_cfg_lock(), misdn_cfg_unlock(), ptp, str, and tmp().
Referenced by load_module().
int misdn_cfg_init | ( | int | max_ports, |
int | reload | ||
) |
Definition at line 1203 of file misdn_config.c.
References _build_general_config(), _build_port_config(), _enum_array_map(), _fill_defaults(), _free_general_cfg(), _free_port_cfg(), ast_calloc, ast_category_browse(), ast_config_destroy(), ast_config_load2(), ast_log, ast_mutex_init, ast_variable_browse(), config, CONFIG_FLAG_FILEUNCHANGED, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEUNCHANGED, global_jbconf, LOG_WARNING, map, max_ports, misdn_cfg_lock(), misdn_cfg_unlock(), MISDN_GEN_LAST, NULL, NUM_GEN_ELEMENTS, NUM_PORT_ELEMENTS, and ptp.
Referenced by load_module(), and misdn_cfg_reload().
int misdn_cfg_is_group_method | ( | char * | group, |
enum misdn_cfg_method | meth | ||
) |
Definition at line 744 of file misdn_config.c.
References map, max_ports, method, METHOD_ROUND_ROBIN, METHOD_STANDARD, METHOD_STANDARD_DEC, MISDN_CFG_GROUPNAME, misdn_cfg_lock(), MISDN_CFG_METHOD, misdn_cfg_unlock(), misdn_cfg_pt::str, and str.
Referenced by misdn_request().
int misdn_cfg_is_msn_valid | ( | int | port, |
char * | msn | ||
) |
Definition at line 712 of file misdn_config.c.
References ast_extension_match(), ast_log, LOG_WARNING, map, misdn_cfg_is_port_valid(), misdn_cfg_lock(), MISDN_CFG_MSNS, misdn_cfg_unlock(), misdn_cfg_pt::ml, msn_list::msn, and msn_list::next.
Referenced by misdn_is_msn_valid().
int misdn_cfg_is_port_valid | ( | int | port | ) |
Definition at line 737 of file misdn_config.c.
References map, max_ports, MISDN_CFG_GROUPNAME, and str.
Referenced by handle_cli_misdn_show_config(), misdn_cfg_get(), misdn_cfg_get_config_string(), misdn_cfg_is_msn_valid(), and misdn_cfg_update_ptp().
void misdn_cfg_reload | ( | void | ) |
Definition at line 1182 of file misdn_config.c.
References misdn_cfg_init().
Referenced by reload_config().
void misdn_cfg_update_ptp | ( | void | ) |
Definition at line 1113 of file misdn_config.c.
References ast_log, ast_strlen_zero, BUFFERSIZE, end, errno, LOG_WARNING, max_ports, misdn_cfg_get(), misdn_cfg_is_port_valid(), misdn_cfg_lock(), misdn_cfg_unlock(), MISDN_GEN_MISDN_INIT, NULL, and ptp.
Referenced by load_module(), and reload_config().
struct ast_jb_conf* misdn_get_global_jbconf | ( | void | ) |
Definition at line 1271 of file misdn_config.c.
References global_jbconf.
Referenced by misdn_new().