Adaptive ODBC CDR backend. More...
#include "asterisk.h"
#include <sys/types.h>
#include <time.h>
#include <sql.h>
#include <sqlext.h>
#include <sqltypes.h>
#include "asterisk/config.h"
#include "asterisk/channel.h"
#include "asterisk/lock.h"
#include "asterisk/linkedlists.h"
#include "asterisk/res_odbc.h"
#include "asterisk/cdr.h"
#include "asterisk/module.h"
Go to the source code of this file.
Data Structures | |
struct | columns |
struct | tables::odbc_columns |
struct | odbc_tables |
struct | tables |
Macros | |
#define | CONFIG "cdr_adaptive_odbc.conf" |
#define | LENGTHEN_BUF1(size) |
#define | LENGTHEN_BUF2(size) |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static int | free_config (void) |
static SQLHSTMT | generic_prepare (struct odbc_obj *obj, void *data) |
static int | load_config (void) |
static int | load_module (void) |
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 = "Adaptive 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 = "ac1f6a56484a8820659555499174e588" , .load = load_module, .unload = unload_module, .reload = reload, .load_pri = AST_MODPRI_CDR_DRIVER, } |
static struct ast_module_info * | ast_module_info = &__mod_info |
static int | maxsize = 512 |
static int | maxsize2 = 512 |
static const char | name [] = "Adaptive ODBC" |
static struct odbc_tables | odbc_tables = { .first = NULL, .last = NULL, .lock = { PTHREAD_RWLOCK_INITIALIZER , NULL, 1 } , } |
Adaptive ODBC CDR backend.
Definition in file cdr_adaptive_odbc.c.
#define CONFIG "cdr_adaptive_odbc.conf" |
Definition at line 51 of file cdr_adaptive_odbc.c.
Referenced by load_config().
#define LENGTHEN_BUF1 | ( | size | ) |
Definition at line 316 of file cdr_adaptive_odbc.c.
Referenced by odbc_log().
#define LENGTHEN_BUF2 | ( | size | ) |
Definition at line 330 of file cdr_adaptive_odbc.c.
Referenced by odbc_log().
|
static |
Definition at line 773 of file cdr_adaptive_odbc.c.
|
static |
Definition at line 773 of file cdr_adaptive_odbc.c.
|
static |
Definition at line 270 of file cdr_adaptive_odbc.c.
References ast_free, AST_LIST_REMOVE_HEAD, AST_RWLIST_REMOVE_HEAD, tables::columns, and table.
Referenced by reload(), and unload_module().
|
static |
Definition at line 283 of file cdr_adaptive_odbc.c.
References ast_log(), odbc_obj::con, and LOG_WARNING.
Referenced by odbc_log().
|
static |
Definition at line 81 of file cdr_adaptive_odbc.c.
References ast_calloc, ast_category_browse(), ast_config_destroy(), ast_config_load, ast_copy_string(), ast_free, AST_LIST_FIRST, AST_LIST_INSERT_TAIL, ast_log(), ast_odbc_release_obj(), ast_odbc_request_obj, AST_RWLIST_INSERT_TAIL, ast_strdupa, ast_strip(), ast_strlen_zero(), ast_true(), ast_variable_browse(), ast_variable_retrieve(), ast_verb, columns::cdrname, tables::columns, odbc_obj::con, CONFIG, CONFIG_STATUS_FILEINVALID, tables::connection, columns::decimals, columns::filtervalue, LOG_ERROR, LOG_NOTICE, LOG_WARNING, columns::name, ast_variable::name, ast_variable::next, columns::nullable, columns::octetlen, columns::radix, columns::size, columns::staticvalue, tables::table, columns::type, usegmtime, tables::usegmtime, ast_variable::value, and var.
Referenced by load_module(), and reload().
|
static |
Definition at line 742 of file cdr_adaptive_odbc.c.
References ast_cdr_register(), ast_log(), AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_module_info::description, load_config(), LOG_ERROR, and odbc_log().
|
static |
Definition at line 343 of file cdr_adaptive_odbc.c.
References ast_cdr::answer, ast_cdr_getvar(), ast_copy_string(), ast_free, AST_LIST_TRAVERSE, ast_localtime(), ast_log(), ast_odbc_backslash_is_escape(), ast_odbc_prepare_and_execute(), ast_odbc_release_obj(), ast_odbc_request_obj, AST_RWLIST_RDLOCK, AST_RWLIST_UNLOCK, ast_str_append(), ast_str_buffer(), ast_str_create(), ast_str_set(), ast_str_strlen(), ast_strdupa, ast_strftime(), ast_strlen_zero(), ast_tvdiff_us(), ast_tvzero(), ast_verb, columns::cdrname, tables::columns, tables::connection, columns::decimals, ast_cdr::end, columns::filtervalue, first, generic_prepare(), LENGTHEN_BUF1, LENGTHEN_BUF2, LOG_ERROR, LOG_WARNING, maxsize2, columns::name, columns::octetlen, columns::radix, ast_cdr::start, columns::staticvalue, tables::table, columns::type, and tables::usegmtime.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 755 of file cdr_adaptive_odbc.c.
References ast_log(), AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, free_config(), load_config(), and LOG_ERROR.
|
static |
Definition at line 728 of file cdr_adaptive_odbc.c.
References ast_cdr_register(), ast_cdr_unregister(), ast_log(), AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_module_info::description, free_config(), LOG_ERROR, and odbc_log().
|
static |
Definition at line 773 of file cdr_adaptive_odbc.c.
|
static |
Definition at line 773 of file cdr_adaptive_odbc.c.
|
static |
Definition at line 55 of file cdr_adaptive_odbc.c.
Referenced by ast_func_read2().
|
static |
Definition at line 55 of file cdr_adaptive_odbc.c.
Referenced by odbc_log().
|
static |
Definition at line 53 of file cdr_adaptive_odbc.c.
Referenced by __analog_ss_thread(), __ast_change_name_nolink(), __ast_channel_alloc_ap(), __dahdi_exception(), __iax2_show_peers(), _sip_show_peers_one(), acf_curl_helper(), adsi_load(), adsi_message(), advanced_options(), aelsub_exec(), aji_cli_create_collection(), aji_cli_create_leafnode(), aji_cli_delete_pubsub_node(), aji_cli_list_pubsub_nodes(), aji_cli_purge_pubsub_nodes(), alias_name_cb(), analog_exception(), analog_ss_thread(), aoc_amount_str(), append_var_and_value_to_filter(), ast_cc_monitor_count(), ast_cel_fabricate_channel_from_event(), ast_channel_get_full(), ast_connected_line_source_parse(), ast_dsp_set_call_progress_zone(), ast_event_str_to_ie_type(), ast_getformatname_multiple(), ast_jb_read_conf(), ast_module_helper(), ast_monitor_change_fname(), ast_monitor_start(), ast_parse_caller_presentation(), ast_party_name_charset_parse(), ast_redirecting_reason_parse(), ast_register_thread(), ast_rtp_lookup_mime_multiple2(), ast_setstate(), ast_str2tos(), ast_syslog_facility(), ast_syslog_priority(), ast_taskprocessor_get(), AST_TEST_DEFINE(), ast_var_name(), ast_waitfor_nandfds(), build_calendar(), build_peer(), build_user(), callerid_read(), change_monitor_action(), channel_iterator_search(), channel_spy(), check_user_full(), cli_tps_ping(), cli_tps_report(), complete_trans_path_choice(), config_ldap(), count_agents_cb(), do_pause_or_unpause(), dump_ies(), dump_prov_ies(), entry_cmp_fn(), fac2str(), fax_session_tab_complete(), find_calendar(), find_context(), find_macro(), find_peer(), find_pvt(), find_user(), findparkinglotname(), get_esc(), group_cmp_fn(), gtalk_ringing_ack(), handle_cli_core_show_translation(), handle_cli_osp_show(), handle_cli_status(), handle_redirect(), handle_register_message(), handle_showchan(), handle_tcptls_connection(), httpd_helper_thread(), load_module(), lua_get_variable(), lua_get_variable_value(), lua_set_variable(), lua_set_variable_value(), manager_mute_mixmonitor(), map_video_codec(), match_agent(), misdn_cfg_get_config_string(), misdn_cfg_get_name(), mwi_thread(), my_get_callerid(), oss_call(), oss_request(), parse_cookies(), party_id_write(), peek_read(), phone_request(), play_message_callerid(), process_echocancel(), process_opcode(), process_returncode(), proxy_from_config(), pvalAppCallSetAppName(), pvalCatchSetExtName(), pvalContextSetName(), pvalESwitchesAddSwitch(), pvalExtenSetName(), pvalLabelSetName(), pvalMacroCallSetMacroName(), pvalMacroSetName(), pvalSwitchesAddSwitch(), pvalVarDecSetVarname(), realtime_peer_get_sippeer_helper(), register_verify(), reload_module(), serialize_showchan(), set_hangup_source_and_cause(), show_config_description(), sip_acf_channel_read(), sip_prepare_socket(), sip_prune_realtime(), sip_queue_hangup_cause(), sla_add_trunk_to_station(), sla_find_station(), sla_find_trunk(), softhangup_exec(), start_monitor_action(), stop_monitor_action(), tps_taskprocessor_tab_complete(), unistim_new(), unload_module(), and update_call_counter().
|
static |