res_config_sqlite module. More...
#include "asterisk.h"
#include <sqlite.h>
#include "asterisk/logger.h"
#include "asterisk/app.h"
#include "asterisk/pbx.h"
#include "asterisk/cdr.h"
#include "asterisk/cli.h"
#include "asterisk/lock.h"
#include "asterisk/config.h"
#include "asterisk/module.h"
#include "asterisk/linkedlists.h"
Go to the source code of this file.
Data Structures | |
struct | sqlite_cache_tables::_columns |
struct | cfg_entry_args |
struct | rt_cfg_entry_args |
struct | rt_multi_cfg_entry_args |
struct | sqlite_cache_columns |
struct | sqlite_cache_tables |
struct | sqlite_tables |
Macros | |
#define | MACRO_BEGIN do { |
#define | MACRO_END } while (0) |
#define | release_table(a) AST_RWLIST_UNLOCK(&((a)->columns)) |
#define | RES_CONFIG_SQLITE_BEGIN |
#define | RES_CONFIG_SQLITE_CONF_FILE "res_config_sqlite.conf" |
#define | RES_CONFIG_SQLITE_DESCRIPTION "Resource Module for SQLite 2" |
#define | RES_CONFIG_SQLITE_DRIVER "sqlite" |
#define | RES_CONFIG_SQLITE_END(error) |
#define | RES_CONFIG_SQLITE_MAX_LOOPS 10 |
#define | RES_CONFIG_SQLITE_NAME "res_config_sqlite" |
#define | SET_VAR(config, to, from) |
#define | sql_get_config_table |
#define | sql_table_structure "SELECT sql FROM sqlite_master WHERE type='table' AND tbl_name='%s'" |
Functions | |
static void | __init_sql_buf (void) |
static void | __init_where_buf (void) |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static int | add_cfg_entry (void *arg, int argc, char **argv, char **columnNames) |
SQLite callback function for static configuration. More... | |
static int | add_rt_cfg_entry (void *arg, int argc, char **argv, char **columnNames) |
SQLite callback function for RealTime configuration. More... | |
static int | add_rt_multi_cfg_entry (void *arg, int argc, char **argv, char **columnNames) |
SQLite callback function for RealTime configuration. More... | |
static int | cdr_handler (struct ast_cdr *cdr) |
Asterisk callback function for CDR support. More... | |
static int | check_vars (void) |
static struct ast_config * | config_handler (const char *database, const char *table, const char *file, struct ast_config *cfg, struct ast_flags flags, const char *suggested_incl, const char *who_asked) |
Asterisk callback function for static configuration. More... | |
static struct sqlite_cache_tables * | find_table (const char *tablename) |
static int | find_table_cb (void *vtblptr, int argc, char **argv, char **columnNames) |
static void | free_table (struct sqlite_cache_tables *tblptr) |
static size_t | get_params (va_list ap, const char ***params_ptr, const char ***vals_ptr, int warn) |
Helper function to parse a va_list object into 2 dynamic arrays of strings, parameters and values. More... | |
static char * | handle_cli_show_sqlite_status (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
Asterisk callback function for the CLI status command. More... | |
static char * | handle_cli_sqlite_show_tables (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static int | load_config (void) |
Load the configuration file. More... | |
static int | load_module (void) |
static int | realtime_destroy_handler (const char *database, const char *table, const char *keyfield, const char *entity, va_list ap) |
Asterisk callback function for RealTime configuration (destroys variable). More... | |
static struct ast_variable * | realtime_handler (const char *database, const char *table, va_list ap) |
Asterisk callback function for RealTime configuration. More... | |
static struct ast_config * | realtime_multi_handler (const char *database, const char *table, va_list ap) |
Asterisk callback function for RealTime configuration. More... | |
static int | realtime_require_handler (const char *database, const char *table, va_list ap) |
static int | realtime_store_handler (const char *database, const char *table, va_list ap) |
Asterisk callback function for RealTime configuration (variable create/store). More... | |
static int | realtime_unload_handler (const char *unused, const char *tablename) |
static int | realtime_update2_handler (const char *database, const char *table, va_list ap) |
static int | realtime_update_handler (const char *database, const char *table, const char *keyfield, const char *entity, va_list ap) |
Asterisk callback function for RealTime configuration (variable update). More... | |
static int | set_var (char **var, const char *name, const char *value) |
Allocate a variable. More... | |
static void | unload_config (void) |
Free resources related to configuration. More... | |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Realtime SQLite configuration" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "ac1f6a56484a8820659555499174e588" , .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_REALTIME_DRIVER, } |
static struct ast_module_info * | ast_module_info = &__mod_info |
static int | cdr_registered |
static char * | cdr_table |
static struct ast_cli_entry | cli_status [] |
static int | cli_status_registered |
static char * | config_table |
static sqlite * | db |
static char * | dbfile |
static ast_mutex_t | mutex = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, 1 } |
static struct ast_threadstorage | sql_buf = { .once = PTHREAD_ONCE_INIT , .key_init = __init_sql_buf , .custom_init = NULL , } |
static char * | sql_create_cdr_table |
static struct ast_config_engine | sqlite_engine |
static struct sqlite_tables | sqlite_tables = { .first = NULL, .last = NULL, .lock = { PTHREAD_RWLOCK_INITIALIZER , NULL, 1 } , } |
static int | use_cdr |
static struct ast_threadstorage | where_buf = { .once = PTHREAD_ONCE_INIT , .key_init = __init_where_buf , .custom_init = NULL , } |
res_config_sqlite module.
Definition in file res_config_sqlite.c.
#define MACRO_BEGIN do { |
Definition at line 94 of file res_config_sqlite.c.
#define MACRO_END } while (0) |
Definition at line 95 of file res_config_sqlite.c.
#define release_table | ( | a | ) | AST_RWLIST_UNLOCK(&((a)->columns)) |
Definition at line 711 of file res_config_sqlite.c.
Referenced by cdr_handler().
#define RES_CONFIG_SQLITE_BEGIN |
Macro used before executing a query.
Definition at line 153 of file res_config_sqlite.c.
Referenced by cdr_handler(), config_handler(), load_module(), realtime_destroy_handler(), realtime_handler(), realtime_multi_handler(), realtime_store_handler(), realtime_update2_handler(), and realtime_update_handler().
#define RES_CONFIG_SQLITE_CONF_FILE "res_config_sqlite.conf" |
Definition at line 100 of file res_config_sqlite.c.
Referenced by load_config().
#define RES_CONFIG_SQLITE_DESCRIPTION "Resource Module for SQLite 2" |
Definition at line 99 of file res_config_sqlite.c.
Referenced by load_module().
#define RES_CONFIG_SQLITE_DRIVER "sqlite" |
Definition at line 98 of file res_config_sqlite.c.
#define RES_CONFIG_SQLITE_END | ( | error | ) |
Macro used after executing a query.
Definition at line 164 of file res_config_sqlite.c.
Referenced by cdr_handler(), config_handler(), load_module(), realtime_destroy_handler(), realtime_handler(), realtime_multi_handler(), realtime_store_handler(), realtime_update2_handler(), and realtime_update_handler().
#define RES_CONFIG_SQLITE_MAX_LOOPS 10 |
Maximum number of loops before giving up executing a query. Calls to sqlite_xxx() functions which can return SQLITE_BUSY are enclosed by RES_CONFIG_SQLITE_BEGIN and RES_CONFIG_SQLITE_END, e.g.
char *errormsg; int error;
RES_CONFIG_SQLITE_BEGIN error = sqlite_exec(db, query, NULL, NULL, &errormsg); RES_CONFIG_SQLITE_END(error)
if (error) ...;
Definition at line 146 of file res_config_sqlite.c.
#define RES_CONFIG_SQLITE_NAME "res_config_sqlite" |
Definition at line 97 of file res_config_sqlite.c.
Referenced by load_module(), and unload_module().
#define SET_VAR | ( | config, | |
to, | |||
from | |||
) |
Definition at line 114 of file res_config_sqlite.c.
Referenced by load_config().
#define sql_get_config_table |
SQL query format to fetch the static configuration of a file. Rows must be sorted by category.
Definition at line 569 of file res_config_sqlite.c.
Referenced by config_handler().
SQL query format to describe the table structure
Definition at line 561 of file res_config_sqlite.c.
Referenced by find_table().
anonymous enum |
Definition at line 102 of file res_config_sqlite.c.
|
static |
Definition at line 127 of file res_config_sqlite.c.
|
static |
Definition at line 128 of file res_config_sqlite.c.
|
static |
Definition at line 1877 of file res_config_sqlite.c.
|
static |
Definition at line 1877 of file res_config_sqlite.c.
|
static |
SQLite callback function for static configuration.
This function is passed to the SQLite engine as a callback function to parse a row and store it in a struct ast_config object. It relies on resulting rows being sorted by category.
arg | a pointer to a struct cfg_entry_args object |
argc | number of columns |
argv | values in the row |
columnNames | names and types of the columns |
0 | on success |
1 | if an error occurred |
Definition at line 858 of file res_config_sqlite.c.
References args, ast_category_append(), ast_category_destroy(), ast_category_new(), ast_config_internal_load(), ast_free, ast_log(), ast_strdup, ast_variable_append(), ast_variable_new(), cfg_entry_args::cat, cfg_entry_args::cat_name, cfg_entry_args::cfg, cfg_entry_args::flags, LOG_WARNING, RES_CONFIG_SQLITE_CONFIG_CATEGORY, RES_CONFIG_SQLITE_CONFIG_COLUMNS, RES_CONFIG_SQLITE_CONFIG_VAR_NAME, RES_CONFIG_SQLITE_CONFIG_VAR_VAL, var, and cfg_entry_args::who_asked.
Referenced by config_handler().
|
static |
SQLite callback function for RealTime configuration.
This function is passed to the SQLite engine as a callback function to parse a row and store it in a linked list of struct ast_variable objects.
arg | a pointer to a struct rt_cfg_entry_args object |
argc | number of columns |
argv | values in the row |
columnNames | names and types of the columns |
0 | on success. |
1 | if an error occurred. |
Definition at line 1006 of file res_config_sqlite.c.
References args, ast_variable_new(), rt_cfg_entry_args::last, ast_variable::next, rt_cfg_entry_args::var, and var.
Referenced by realtime_handler().
|
static |
SQLite callback function for RealTime configuration.
This function performs the same actions as add_rt_cfg_entry() except that the rt_multi_cfg_entry_args structure is designed to store categories in addition to variables.
arg | a pointer to a struct rt_multi_cfg_entry_args object |
argc | number of columns |
argv | values in the row |
columnNames | names and types of the columns |
0 | on success. |
1 | if an error occurred. |
Definition at line 1125 of file res_config_sqlite.c.
References args, ast_category_append(), ast_category_new(), ast_log(), ast_variable_append(), ast_variable_new(), rt_multi_cfg_entry_args::cfg, rt_multi_cfg_entry_args::initfield, LOG_ERROR, LOG_WARNING, and var.
Referenced by realtime_multi_handler().
|
static |
Asterisk callback function for CDR support.
cdr | the CDR entry Asterisk sends us. |
Asterisk will call this function each time a CDR entry must be logged if CDR support is enabled.
0 | on success |
1 | if an error occurred |
Definition at line 792 of file res_config_sqlite.c.
References ast_cdr_getvar(), ast_debug, ast_free, ast_log(), ast_mutex_lock, ast_mutex_unlock, AST_RWLIST_TRAVERSE, ast_str_append(), ast_str_buffer(), ast_str_create(), ast_str_set(), sqlite_cache_tables::columns, find_table(), first, sqlite_cache_columns::isint, LOG_ERROR, LOG_WARNING, mutex, sqlite_cache_columns::name, release_table, RES_CONFIG_SQLITE_BEGIN, RES_CONFIG_SQLITE_END, and S_OR.
Referenced by load_module().
|
static |
Definition at line 728 of file res_config_sqlite.c.
References ast_log(), and LOG_ERROR.
Referenced by load_config().
|
static |
Asterisk callback function for static configuration.
Asterisk will call this function when it loads its static configuration, which usually happens at startup and reload.
database | the database to use (ignored) |
table | the table to use |
file | the file to load from the database |
cfg | the struct ast_config object to use when storing variables |
flags | Optional flags. Not used. |
suggested_incl | suggest include. |
who_asked |
cfg | object |
NULL | if an error occurred |
Definition at line 917 of file res_config_sqlite.c.
References add_cfg_entry(), ast_debug, ast_free, ast_log(), ast_mutex_lock, ast_mutex_unlock, cfg_entry_args::cat, cfg_entry_args::cat_name, cfg_entry_args::cfg, config_table, cfg_entry_args::flags, LOG_ERROR, LOG_WARNING, mutex, RES_CONFIG_SQLITE_BEGIN, RES_CONFIG_SQLITE_END, S_OR, sql_get_config_table, and cfg_entry_args::who_asked.
|
static |
Definition at line 644 of file res_config_sqlite.c.
References ast_asprintf, ast_calloc, ast_debug, ast_free, AST_LIST_EMPTY, ast_log(), ast_mutex_lock, ast_mutex_unlock, AST_RWLIST_HEAD_INIT, AST_RWLIST_INSERT_TAIL, AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, sqlite_cache_tables::columns, find_table_cb(), free_table(), LOG_ERROR, LOG_WARNING, mutex, sqlite_cache_tables::name, and sql_table_structure.
Referenced by cdr_handler(), and realtime_require_handler().
|
static |
Definition at line 589 of file res_config_sqlite.c.
References AST_APP_ARG, ast_calloc, ast_debug, AST_DECLARE_APP_ARGS, AST_LIST_INSERT_TAIL, AST_RWLIST_TRAVERSE, ast_skip_blanks(), AST_STANDARD_APP_ARGS, ast_strdupa, sqlite_cache_tables::columns, sqlite_cache_columns::isint, sqlite_cache_columns::name, strcasestr(), and sqlite_cache_columns::type.
Referenced by find_table().
|
static |
Definition at line 575 of file res_config_sqlite.c.
References ast_free, AST_RWLIST_HEAD_DESTROY, AST_RWLIST_REMOVE_HEAD, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, and sqlite_cache_tables::columns.
Referenced by find_table(), realtime_unload_handler(), and unload_config().
|
static |
Helper function to parse a va_list object into 2 dynamic arrays of strings, parameters and values.
ap must have the following format : param1 val1 param2 val2 param3 val3 ... arguments will be extracted to create 2 arrays:
The address of these arrays are stored in params_ptr and vals_ptr. It is the responsibility of the caller to release the memory of these arrays. It is considered an error that va_list has a null or odd number of strings.
ap | the va_list object to parse |
params_ptr | where the address of the params array is stored |
vals_ptr | where the address of the vals array is stored |
warn |
the | number of elements in the arrays (which have the same size). |
0 | if an error occurred. |
Definition at line 967 of file res_config_sqlite.c.
References ast_free, ast_log(), ast_realloc, and LOG_WARNING.
Referenced by auth_http_callback(), generic_http_callback(), realtime_destroy_handler(), realtime_handler(), realtime_multi_handler(), realtime_store_handler(), and realtime_update_handler().
|
static |
Asterisk callback function for the CLI status command.
e | CLI command |
cmd | |
a | CLI argument list |
Definition at line 1671 of file res_config_sqlite.c.
References ast_cli_args::argc, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, ast_cli_args::fd, and ast_cli_entry::usage.
|
static |
Definition at line 1705 of file res_config_sqlite.c.
References ast_cli_args::argc, ast_cli(), AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, sqlite_cache_tables::columns, ast_cli_entry::command, ast_cli_args::fd, sqlite_cache_columns::name, sqlite_cache_tables::name, sqlite_cache_columns::type, and ast_cli_entry::usage.
|
static |
Load the configuration file.
This function sets dbfile, config_table, and cdr_table. It calls check_vars() before returning, and unload_config() if an error occurred.
0 | on success |
1 | if an error occurred |
Definition at line 740 of file res_config_sqlite.c.
References ast_config_destroy(), ast_config_load, ast_log(), ast_variable_browse(), check_vars(), config, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEMISSING, LOG_ERROR, LOG_WARNING, ast_variable::name, ast_variable::next, RES_CONFIG_SQLITE_CONF_FILE, SET_VAR, unload_config(), and var.
Referenced by load_module().
|
static |
Definition at line 1761 of file res_config_sqlite.c.
References ARRAY_LEN, ast_cdr_register(), ast_cli_register_multiple(), ast_config_engine_register(), ast_debug, ast_log(), AST_MODULE_LOAD_DECLINE, cdr_handler(), load_config(), LOG_ERROR, RES_CONFIG_SQLITE_BEGIN, RES_CONFIG_SQLITE_DESCRIPTION, RES_CONFIG_SQLITE_END, RES_CONFIG_SQLITE_NAME, S_OR, sql_create_cdr_table, and unload_module().
|
static |
Asterisk callback function for RealTime configuration (destroys variable).
Asterisk will call this function each time a variable has been destroyed internally and must be removed from the backend engine. keyfield and entity are used to find the row to delete, e.g. DELETE FROM table WHERE keyfield = 'entity';
. ap is a list of parameters and values with the same format as the other realtime functions.
database | the database to use (ignored) |
table | the table to use |
keyfield | the column of the matching cell |
entity | the value of the matching cell |
ap | list of additional parameters for cell matching |
the | number of affected rows. |
-1 | if an error occurred. |
Definition at line 1543 of file res_config_sqlite.c.
References ast_debug, ast_free, ast_log(), ast_mutex_lock, ast_mutex_unlock, get_params(), LOG_WARNING, mutex, RES_CONFIG_SQLITE_BEGIN, RES_CONFIG_SQLITE_END, and S_OR.
|
static |
Asterisk callback function for RealTime configuration.
Asterisk will call this function each time it requires a variable through the RealTime architecture. ap is a list of parameters and values used to find a specific row, e.g one parameter "name" and one value "123" so that the SQL query becomes SELECT * FROM table WHERE name = '123';
.
database | the database to use (ignored) |
table | the table to use |
ap | list of parameters and values to match |
a | linked list of struct ast_variable objects |
NULL | if an error occurred |
Definition at line 1035 of file res_config_sqlite.c.
References add_rt_cfg_entry(), ast_debug, ast_free, ast_log(), ast_mutex_lock, ast_mutex_unlock, ast_variables_destroy(), get_params(), rt_cfg_entry_args::last, LOG_WARNING, mutex, RES_CONFIG_SQLITE_BEGIN, RES_CONFIG_SQLITE_END, S_OR, and rt_cfg_entry_args::var.
|
static |
Asterisk callback function for RealTime configuration.
This function performs the same actions as realtime_handler() except that it can store variables per category, and can return several categories.
database | the database to use (ignored) |
table | the table to use |
ap | list of parameters and values to match |
a | struct ast_config object storing categories and variables. |
NULL | if an error occurred. |
Definition at line 1174 of file res_config_sqlite.c.
References add_rt_multi_cfg_entry(), ast_config_destroy(), ast_config_new(), ast_debug, ast_free, ast_log(), ast_mutex_lock, ast_mutex_unlock, ast_strdup, rt_multi_cfg_entry_args::cfg, get_params(), rt_multi_cfg_entry_args::initfield, LOG_WARNING, mutex, RES_CONFIG_SQLITE_BEGIN, RES_CONFIG_SQLITE_END, and S_OR.
|
static |
Definition at line 1620 of file res_config_sqlite.c.
References ast_log(), ast_rq_is_int(), AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, sqlite_cache_tables::columns, find_table(), sqlite_cache_columns::isint, LOG_WARNING, sqlite_cache_columns::name, and sqlite_cache_columns::type.
|
static |
Asterisk callback function for RealTime configuration (variable create/store).
Asterisk will call this function each time a variable has been created internally and must be stored in the backend engine. are used to find the row to update, e.g. ap is a list of parameters and values with the same format as the other realtime functions.
database | the database to use (ignored) |
table | the table to use |
ap | list of parameters and new values to insert into the database |
the | rowid of inserted row. |
-1 | if an error occurred. |
Definition at line 1449 of file res_config_sqlite.c.
References ast_debug, ast_free, ast_log(), ast_mutex_lock, ast_mutex_unlock, get_params(), LOG_WARNING, mutex, RES_CONFIG_SQLITE_BEGIN, RES_CONFIG_SQLITE_END, and S_OR.
|
static |
Definition at line 1656 of file res_config_sqlite.c.
References AST_RWLIST_REMOVE_CURRENT, AST_RWLIST_TRAVERSE_SAFE_BEGIN, AST_RWLIST_TRAVERSE_SAFE_END, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, free_table(), and sqlite_cache_tables::name.
|
static |
Definition at line 1375 of file res_config_sqlite.c.
References ast_debug, ast_log(), ast_mutex_lock, ast_mutex_unlock, ast_str_append(), ast_str_buffer(), ast_str_set(), ast_str_thread_get(), first, LOG_ERROR, LOG_WARNING, mutex, RES_CONFIG_SQLITE_BEGIN, RES_CONFIG_SQLITE_END, S_OR, sql_buf, value, and where_buf.
|
static |
Asterisk callback function for RealTime configuration (variable update).
Asterisk will call this function each time a variable has been modified internally and must be updated in the backend engine. keyfield and entity are used to find the row to update, e.g. UPDATE table SET ... WHERE keyfield = 'entity';
. ap is a list of parameters and values with the same format as the other realtime functions.
database | the database to use (ignored) |
table | the table to use |
keyfield | the column of the matching cell |
entity | the value of the matching cell |
ap | list of parameters and new values to update in the database |
the | number of affected rows. |
-1 | if an error occurred. |
Definition at line 1293 of file res_config_sqlite.c.
References ast_debug, ast_free, ast_log(), ast_mutex_lock, ast_mutex_unlock, get_params(), LOG_WARNING, mutex, RES_CONFIG_SQLITE_BEGIN, RES_CONFIG_SQLITE_END, and S_OR.
|
static |
Allocate a variable.
var | the address of the variable to set (it will be allocated) |
name | the name of the variable (for error handling) |
value | the value to store in var |
0 | on success |
1 | if an allocation error occurred |
Definition at line 713 of file res_config_sqlite.c.
References ast_free, ast_log(), ast_strdup, and LOG_WARNING.
|
static |
Free resources related to configuration.
Definition at line 776 of file res_config_sqlite.c.
References ast_free, AST_RWLIST_REMOVE_HEAD, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, and free_table().
Referenced by load_config(), and unload_module().
|
static |
Definition at line 1743 of file res_config_sqlite.c.
References ARRAY_LEN, ast_cdr_unregister(), ast_cli_unregister_multiple(), ast_config_engine_deregister(), RES_CONFIG_SQLITE_NAME, and unload_config().
Referenced by load_module().
|
static |
Definition at line 1877 of file res_config_sqlite.c.
|
static |
Definition at line 1877 of file res_config_sqlite.c.
|
static |
Set to 1 if the CDR callback function was registered.
Definition at line 468 of file res_config_sqlite.c.
|
static |
The name of the table used to store CDR entries.
Definition at line 480 of file res_config_sqlite.c.
|
static |
Structure containing details and callback functions for the CLI status command.
Definition at line 509 of file res_config_sqlite.c.
|
static |
Set to 1 if the CLI status command callback function was registered.
Definition at line 471 of file res_config_sqlite.c.
|
static |
The name of the static configuration table.
Definition at line 477 of file res_config_sqlite.c.
Referenced by config_handler().
|
static |
The SQLite database object.
Definition at line 462 of file res_config_sqlite.c.
|
static |
The path of the database file.
Definition at line 474 of file res_config_sqlite.c.
|
static |
The mutex used to prevent simultaneous access to the SQLite database.
Definition at line 503 of file res_config_sqlite.c.
Referenced by cdr_handler(), config_handler(), find_table(), realtime_destroy_handler(), realtime_handler(), realtime_multi_handler(), realtime_store_handler(), realtime_update2_handler(), and realtime_update_handler().
|
static |
Definition at line 127 of file res_config_sqlite.c.
Referenced by realtime_update2_handler().
|
static |
SQL query format to create the CDR table if non existent.
Definition at line 534 of file res_config_sqlite.c.
Referenced by load_module().
|
static |
The structure specifying all callback functions used by Asterisk for static and RealTime configuration.
Definition at line 486 of file res_config_sqlite.c.
|
static |
|
static |
Set to 1 if CDR support is enabled.
Definition at line 465 of file res_config_sqlite.c.
|
static |
Definition at line 128 of file res_config_sqlite.c.
Referenced by realtime_update2_handler().