Asterisk - The Open Source Telephony Project GIT-master-a63eec2
|
ODBC CDR Backend. More...
#include "asterisk.h"
#include "asterisk/config.h"
#include "asterisk/channel.h"
#include "asterisk/cdr.h"
#include "asterisk/module.h"
#include "asterisk/res_odbc.h"
Go to the source code of this file.
Macros | |
#define | DATE_FORMAT "%Y-%m-%d %T" |
Enumerations | |
enum | { CONFIG_LOGUNIQUEID = 1 << 0 , CONFIG_USEGMTIME = 1 << 1 , CONFIG_DISPOSITIONSTRING = 1 << 2 , CONFIG_HRTIME = 1 << 3 , CONFIG_REGISTERED = 1 << 4 , CONFIG_NEWCDRCOLUMNS = 1 << 5 } |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static SQLHSTMT | execute_cb (struct odbc_obj *obj, void *data) |
static int | load_module (void) |
static int | odbc_load_module (int reload) |
static int | odbc_log (struct ast_cdr *cdr) |
static int | reload (void) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "ODBC CDR Backend" , .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 = "cdr,res_odbc", } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_flags | config = { 0 } |
static const char | config_file [] = "cdr_odbc.conf" |
static char * | dsn = NULL |
static const char | name [] = "ODBC" |
static char * | table = NULL |
ODBC CDR Backend.
Definition in file cdr_odbc.c.
#define DATE_FORMAT "%Y-%m-%d %T" |
Definition at line 51 of file cdr_odbc.c.
anonymous enum |
Enumerator | |
---|---|
CONFIG_LOGUNIQUEID | |
CONFIG_USEGMTIME | |
CONFIG_DISPOSITIONSTRING | |
CONFIG_HRTIME | |
CONFIG_REGISTERED | |
CONFIG_NEWCDRCOLUMNS |
Definition at line 57 of file cdr_odbc.c.
|
static |
Definition at line 329 of file cdr_odbc.c.
|
static |
Definition at line 329 of file cdr_odbc.c.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 329 of file cdr_odbc.c.
|
static |
Definition at line 68 of file cdr_odbc.c.
References ast_cdr::accountcode, ast_cdr::amaflags, ast_cdr::answer, ast_cdr_disp2str(), ast_localtime(), ast_log, ast_odbc_execute_sql(), ast_strdupa, ast_strftime(), ast_test_flag, ast_tvdiff_us(), ast_tvzero(), ast_cdr::billsec, ast_cdr::channel, ast_cdr::clid, odbc_obj::con, config, CONFIG_DISPOSITIONSTRING, CONFIG_HRTIME, CONFIG_LOGUNIQUEID, CONFIG_NEWCDRCOLUMNS, CONFIG_USEGMTIME, DATE_FORMAT, ast_cdr::dcontext, ast_cdr::disposition, ast_cdr::dst, ast_cdr::dstchannel, ast_cdr::duration, ast_cdr::end, ast_cdr::lastapp, ast_cdr::lastdata, ast_cdr::linkedid, LOG_WARNING, NULL, ast_cdr::peeraccount, ast_cdr::sequence, ast_cdr::src, ast_cdr::start, table, ast_cdr::uniqueid, and ast_cdr::userfield.
Referenced by odbc_log().
|
static |
|
static |
Definition at line 190 of file cdr_odbc.c.
References ast_cdr_backend_suspend(), ast_cdr_backend_unsuspend(), ast_cdr_register(), ast_clear_flag, ast_config_destroy(), ast_config_load, ast_debug, ast_free, ast_log, AST_MODULE_LOAD_DECLINE, ast_set_flag, ast_strdup, ast_test_flag, ast_true(), ast_variable_browse(), ast_variable_retrieve(), config, CONFIG_DISPOSITIONSTRING, config_file, CONFIG_FLAG_FILEUNCHANGED, CONFIG_HRTIME, CONFIG_LOGUNIQUEID, CONFIG_NEWCDRCOLUMNS, CONFIG_REGISTERED, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEUNCHANGED, CONFIG_USEGMTIME, ast_module_info::description, LOG_ERROR, LOG_WARNING, name, NULL, odbc_log(), reload(), table, and var.
Referenced by load_module(), and reload().
|
static |
Definition at line 165 of file cdr_odbc.c.
References ast_log, ast_odbc_direct_execute(), ast_odbc_release_obj(), ast_odbc_request_obj, execute_cb(), LOG_ERROR, and LOG_WARNING.
Referenced by odbc_load_module().
|
static |
Definition at line 317 of file cdr_odbc.c.
References odbc_load_module().
Referenced by odbc_load_module().
|
static |
Definition at line 301 of file cdr_odbc.c.
References ast_cdr_unregister(), ast_free, name, and table.
|
static |
Definition at line 329 of file cdr_odbc.c.
|
static |
Definition at line 329 of file cdr_odbc.c.
|
static |
Definition at line 66 of file cdr_odbc.c.
Referenced by execute_cb(), and odbc_load_module().
|
static |
Definition at line 54 of file cdr_odbc.c.
Referenced by AST_TEST_DEFINE(), odbc_load_module(), pbx_load_config(), pbx_load_config(), set_config(), set_config(), and write_config_file().
Definition at line 55 of file cdr_odbc.c.
|
static |
Definition at line 53 of file cdr_odbc.c.
Referenced by odbc_load_module(), and unload_module().
|
static |
Definition at line 55 of file cdr_odbc.c.
Referenced by execute_cb(), odbc_load_module(), and unload_module().