Asterisk - The Open Source Telephony Project
18.5.0
|
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 = "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 = "30ef0c93b36035ec78c9cfd712d36d9b" , .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 |
#define DATE_FORMAT "%Y-%m-%d %T" |
Definition at line 54 of file cdr_odbc.c.
Referenced by execute_cb().
anonymous enum |
Enumerator | |
---|---|
CONFIG_LOGUNIQUEID | |
CONFIG_USEGMTIME | |
CONFIG_DISPOSITIONSTRING | |
CONFIG_HRTIME | |
CONFIG_REGISTERED | |
CONFIG_NEWCDRCOLUMNS |
Definition at line 60 of file cdr_odbc.c.
|
static |
Definition at line 332 of file cdr_odbc.c.
|
static |
Definition at line 332 of file cdr_odbc.c.
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 332 of file cdr_odbc.c.
|
static |
Definition at line 71 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_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 193 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_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(), table, tmp(), and var.
Referenced by load_module(), and reload().
|
static |
Definition at line 168 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 320 of file cdr_odbc.c.
References AST_MODFLAG_LOAD_ORDER, AST_MODPRI_CDR_DRIVER, AST_MODULE_INFO(), AST_MODULE_SUPPORT_EXTENDED, ASTERISK_GPL_KEY, load_module(), odbc_load_module(), and unload_module().
|
static |
Definition at line 304 of file cdr_odbc.c.
References ast_cdr_unregister(), ast_free, name, and table.
Referenced by reload().
|
static |
Definition at line 332 of file cdr_odbc.c.
|
static |
Definition at line 332 of file cdr_odbc.c.
|
static |
Definition at line 69 of file cdr_odbc.c.
|
static |
Definition at line 57 of file cdr_odbc.c.
Referenced by AST_TEST_DEFINE(), odbc_load_module(), pbx_load_config(), pbx_substitute_variables_helper(), and write_config_file().
Definition at line 58 of file cdr_odbc.c.
Referenced by create_dsn(), and get_dsn().
|
static |
Definition at line 56 of file cdr_odbc.c.
Referenced by odbc_load_module(), and unload_module().
|
static |
Definition at line 58 of file cdr_odbc.c.
Referenced by __ast_vm_greeter_register(), __ast_vm_register(), ast_config_internal_load(), ast_parking_blind_transfer_park(), ast_parking_is_exten_park(), ast_parking_park_bridge_channel(), ast_parking_park_call(), ast_parking_provider_registered(), ast_vm_greeter_is_registered(), ast_vm_greeter_unregister(), ast_vm_is_registered(), ast_vm_unregister(), execute_cb(), find_table(), free_config(), load_config(), odbc_load_module(), quan(), realtime_common(), reload(), reload_module(), require_mysql(), require_pgsql(), unload_module(), update2_mysql(), update2_odbc(), update2_pgsql(), update_mysql(), and update_pgsql().