Custom SQLite3 CDR records.
More...
Go to the source code of this file.
◆ free_config()
static void free_config |
( |
int |
reload | ) |
|
|
static |
◆ load_column_config()
static int load_column_config |
( |
const char * |
tmp | ) |
|
|
static |
Definition at line 75 of file cdr_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_values_config().
87 ast_log(
LOG_ERROR,
"Out of memory creating temporary buffer for column list for table '%s.'\n",
table);
91 ast_log(
LOG_ERROR,
"Out of memory creating temporary buffer for column list for table '%s.'\n",
table);
95 while ((col =
strsep(&cols,
","))) {
97 escaped = sqlite3_mprintf(
"%q", col);
105 sqlite3_free(escaped);
char * ast_str_buffer(const struct ast_str *buf)
Returns the string buffer within the ast_str buf.
int ast_str_append(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Append to a thread local dynamic string.
#define ast_strdup(str)
A wrapper for strdup()
#define ast_strlen_zero(foo)
char * ast_strip(char *s)
Strip leading/trailing whitespace from a string.
The descriptor of a dynamic string XXX storage will be optimized later if needed We use the ts field ...
size_t ast_str_strlen(const struct ast_str *buf)
Returns the current length of the string stored within buf.
char * strsep(char **str, const char *delims)
#define ast_str_create(init_len)
Create a malloc'ed dynamic length string.
◆ load_values_config()
static int load_values_config |
( |
const char * |
tmp | ) |
|
|
static |
Definition at line 119 of file cdr_sqlite3_custom.c.
References AST_APP_ARG, ast_calloc, ast_cdr_dup(), ast_cdr_register(), ast_cdr_unregister(), ast_channel_cdr_set(), ast_channel_unref, ast_config_AST_LOG_DIR, ast_config_destroy(), ast_config_load, ast_copy_string(), ast_debug, AST_DECLARE_APP_ARGS, ast_dummy_channel_alloc, ast_free, AST_LIST_INSERT_TAIL, AST_LIST_REMOVE_HEAD, AST_LIST_TRAVERSE, ast_log, AST_MODFLAG_LOAD_ORDER, AST_MODPRI_CDR_DRIVER, AST_MODULE_INFO(), AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, AST_MODULE_SUPPORT_EXTENDED, ast_mutex_lock, ast_mutex_unlock, ast_parse_arg(), AST_STANDARD_RAW_ARGS, ast_str_append(), ast_str_buffer(), ast_str_create, ast_str_strlen(), ast_strdup, ast_strip_quoted(), ast_strlen_zero, ast_variable_browse(), ast_variable_retrieve(), ast_verb, ASTERISK_GPL_KEY, busy_timeout, config_file, CONFIG_FLAG_FILEUNCHANGED, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEMISSING, CONFIG_STATUS_FILEUNCHANGED, db, desc, dummy(), error(), values::expression, free_config(), values::list, load_column_config(), load_config(), load_module(), lock, LOG_ERROR, LOG_WARNING, name, NULL, PARSE_DEFAULT, PARSE_INT32, PATH_MAX, pbx_substitute_variables_helper(), reload(), table, tmp(), unload_module, and value.
◆ busy_timeout
◆ columns
◆ config_file
const char config_file[] = "cdr_sqlite3_custom.conf" |
|
static |
◆ db
Definition at line 60 of file cdr_sqlite3_custom.c.
Referenced by __bt_put(), __rec_iput(), ast_config_internal_load(), ast_destroy_realtime_fields(), ast_load_realtime_all_fields(), ast_load_realtime_multientry_fields(), ast_realtime_require_field(), ast_store_realtime_fields(), ast_unload_realtime(), ast_update2_realtime_fields(), ast_update_realtime_fields(), db_cmp_fn(), db_destructor(), db_hash_fn(), db_sync_thread(), dbm_close(), dbm_open(), is_dirty_cb(), load_values_config(), mark_dirty_cb(), my_swap_subchannels(), new_realtime_sqlite3_db(), parse_config(), realtime_sqlite3_exec_query(), realtime_sqlite3_exec_update(), realtime_sqlite3_require(), stop_batch_cb(), and trace_cb().
◆ desc
const char desc[] = "Customizable SQLite3 CDR Backend" |
|
static |
◆ lock
ast_mutex_t lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } |
|
static |
◆ name
const char name[] = "cdr_sqlite3_custom" |
|
static |
◆ sql_values
◆ table