| Asterisk - The Open Source Telephony Project GIT-master-27fb039
    | 
Custom SQLite3 CEL records. More...
#include "asterisk.h"#include <sqlite3.h>#include "asterisk/paths.h"#include "asterisk/channel.h"#include "asterisk/cel.h"#include "asterisk/module.h"#include "asterisk/config.h"#include "asterisk/pbx.h"#include "asterisk/logger.h"#include "asterisk/utils.h"#include "asterisk/cli.h"#include "asterisk/options.h"#include "asterisk/stringfields.h"
Go to the source code of this file.
| Data Structures | |
| struct | sql_values | 
| struct | values | 
| Macros | |
| #define | SQLITE_BACKEND_NAME "CEL sqlite3 custom backend" | 
| Functions | |
| static void | __reg_module (void) | 
| static void | __unreg_module (void) | 
| struct ast_module * | AST_MODULE_SELF_SYM (void) | 
| static void | free_config (void) | 
| static int | load_column_config (const char *tmp) | 
| static int | load_config (int reload) | 
| static int | load_module (void) | 
| static int | load_values_config (const char *tmp) | 
| static int | reload (void) | 
| static int | unload_module (void) | 
| static void | write_cel (struct ast_event *event) | 
| Variables | |
| static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "SQLite3 Custom CEL Module" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_EXTENDED, .load = load_module, .unload = unload_module, .reload = reload, .load_pri = AST_MODPRI_CDR_DRIVER, .requires = "cel", } | 
| static const struct ast_module_info * | ast_module_info = &__mod_info | 
| static int | busy_timeout | 
| static char * | columns | 
| static const char | config_file [] = "cel_sqlite3_custom.conf" | 
| static sqlite3 * | db = NULL | 
| static ast_mutex_t | lock = AST_MUTEX_INIT_VALUE | 
| static struct sql_values | sql_values = AST_LIST_HEAD_INIT_VALUE | 
| static char | table [80] | 
Custom SQLite3 CEL records.
Definition in file cel_sqlite3_custom.c.
| #define SQLITE_BACKEND_NAME "CEL sqlite3 custom backend" | 
Definition at line 53 of file cel_sqlite3_custom.c.
| 
 | static | 
Definition at line 359 of file cel_sqlite3_custom.c.
| 
 | static | 
Definition at line 359 of file cel_sqlite3_custom.c.
| struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) | 
Definition at line 359 of file cel_sqlite3_custom.c.
| 
 | static | 
Definition at line 216 of file cel_sqlite3_custom.c.
References ast_free, AST_LIST_REMOVE_HEAD, db, values::list, NULL, and value.
Referenced by load_config(), load_module(), and unload_module().
| 
 | static | 
Definition at line 77 of file cel_sqlite3_custom.c.
References ast_free, ast_log, ast_str_append(), ast_str_buffer(), ast_str_create, ast_str_strlen(), ast_strdup, ast_strip(), ast_strlen_zero(), LOG_ERROR, LOG_WARNING, NULL, strsep(), and table.
Referenced by load_config().
| 
 | static | 
Definition at line 153 of file cel_sqlite3_custom.c.
References ast_config_destroy(), ast_config_load, ast_copy_string(), ast_log, ast_parse_arg(), ast_strlen_zero(), ast_variable_browse(), ast_variable_retrieve(), ast_verb, busy_timeout, config_file, CONFIG_FLAG_FILEUNCHANGED, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEMISSING, CONFIG_STATUS_FILEUNCHANGED, free_config(), load_column_config(), load_values_config(), LOG_WARNING, NULL, PARSE_DEFAULT, PARSE_INT32, reload(), and table.
| 
 | static | 
Definition at line 295 of file cel_sqlite3_custom.c.
References ast_cel_backend_register(), ast_config_AST_LOG_DIR, ast_log, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, busy_timeout, db, error(), free_config(), load_config(), LOG_ERROR, LOG_WARNING, NULL, PATH_MAX, SQLITE_BACKEND_NAME, table, and write_cel().
| 
 | static | 
Definition at line 121 of file cel_sqlite3_custom.c.
References ast_calloc, ast_copy_string(), ast_free, AST_LIST_INSERT_TAIL, ast_log, ast_strdup, ast_strip_quoted(), ast_strlen_zero(), values::list, LOG_ERROR, LOG_WARNING, NULL, strsep(), and value.
Referenced by load_config().
| 
 | static | 
Definition at line 341 of file cel_sqlite3_custom.c.
References ast_mutex_lock, ast_mutex_unlock, load_config(), and lock.
Referenced by load_config().
| 
 | static | 
Definition at line 286 of file cel_sqlite3_custom.c.
References ast_cel_backend_unregister(), free_config(), and SQLITE_BACKEND_NAME.
| 
 | static | 
Definition at line 235 of file cel_sqlite3_custom.c.
References ast_cel_fabricate_channel_from_event(), ast_channel_unref, ast_debug, ast_free, AST_LIST_TRAVERSE, ast_log, ast_mutex_lock, ast_mutex_unlock, ast_str_append(), ast_str_buffer(), ast_str_create, ast_str_strlen(), db, dummy(), error(), lock, LOG_ERROR, NULL, pbx_substitute_variables_helper(), table, and value.
Referenced by load_module().
| 
 | static | 
Definition at line 359 of file cel_sqlite3_custom.c.
| 
 | static | 
Definition at line 359 of file cel_sqlite3_custom.c.
| 
 | static | 
Definition at line 66 of file cel_sqlite3_custom.c.
Referenced by load_config(), and load_module().
| 
 | static | 
Definition at line 65 of file cel_sqlite3_custom.c.
| 
 | static | 
Definition at line 57 of file cel_sqlite3_custom.c.
Referenced by load_config().
| 
 | static | 
Definition at line 59 of file cel_sqlite3_custom.c.
Referenced by free_config(), load_module(), and write_cel().
| 
 | static | 
Definition at line 55 of file cel_sqlite3_custom.c.
Referenced by reload(), and write_cel().
| 
 | static | 
| 
 | static | 
Definition at line 61 of file cel_sqlite3_custom.c.
Referenced by load_column_config(), load_config(), load_module(), and write_cel().