Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
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 = 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, tmp(), 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(), set_config(), and write_config_file().
Definition at line 55 of file cdr_odbc.c.
Referenced by create_dsn(), get_dsn(), and load_odbc_config().
|
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 __ast_vm_greeter_register(), __ast_vm_register(), alloc_and_initialize_sorcery(), ast_config_internal_load(), ast_destroy_realtime_fields(), ast_load_realtime_all_fields(), ast_load_realtime_multientry_fields(), ast_odbc_find_column(), ast_parking_blind_transfer_park(), ast_parking_is_exten_park(), ast_parking_park_bridge_channel(), ast_parking_park_call(), ast_parking_provider_registered(), ast_realtime_append_mapping(), ast_realtime_require_field(), ast_store_realtime_fields(), ast_unload_realtime(), ast_update2_realtime_fields(), ast_update_realtime_fields(), ast_vm_greeter_is_registered(), ast_vm_greeter_unregister(), ast_vm_is_registered(), ast_vm_unregister(), config_mysql(), config_odbc(), config_pgsql(), context_table_create_autohints(), destroy_mysql(), destroy_odbc(), destroy_pgsql(), destroy_table(), destroy_table_cache(), 74dc751dfe8e_more_permission_boolean_columns::downgrade(), execute_cb(), find_column(), find_engine(), find_table(), free_config(), handle_missing_column(), handle_missing_table(), load_config(), odbc_load_module(), quan(), quantize(), realtime_common(), realtime_multi_mysql(), realtime_multi_odbc(), realtime_multi_pgsql(), realtime_mysql(), realtime_odbc(), realtime_sqlite3(), realtime_sqlite3_destroy(), realtime_sqlite3_helper(), realtime_sqlite3_load(), realtime_sqlite3_multi(), realtime_sqlite3_require(), realtime_sqlite3_store(), realtime_sqlite3_update(), realtime_sqlite3_update2(), realtime_switch_common(), release_table(), reload(), reload_module(), require_mysql(), require_odbc(), require_pgsql(), route_table_add(), route_table_dtor(), route_table_find(), route_table_remove(), store_mysql(), store_odbc(), store_pgsql(), tds_load_module(), unload_module(), update2_mysql(), update2_odbc(), update2_pgsql(), update_mysql(), update_odbc(), and update_pgsql().