Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
RADIUS CDR Support. More...
#include "asterisk.h"
#include <RADIUS_HEADER_STR>
#include "asterisk/channel.h"
#include "asterisk/cdr.h"
#include "asterisk/module.h"
#include "asterisk/utils.h"
Go to the source code of this file.
Macros | |
#define | DATE_FORMAT "%Y-%m-%d %T %z" |
#define | VENDOR_CODE 22736 |
Enumerations | |
enum | { PW_AST_ACCT_CODE = 101 , PW_AST_SRC = 102 , PW_AST_DST = 103 , PW_AST_DST_CTX = 104 , PW_AST_CLID = 105 , PW_AST_CHAN = 106 , PW_AST_DST_CHAN = 107 , PW_AST_LAST_APP = 108 , PW_AST_LAST_DATA = 109 , PW_AST_START_TIME = 110 , PW_AST_ANSWER_TIME = 111 , PW_AST_END_TIME = 112 , PW_AST_DURATION = 113 , PW_AST_BILL_SEC = 114 , PW_AST_DISPOSITION = 115 , PW_AST_AMA_FLAGS = 116 , PW_AST_UNIQUE_ID = 117 , PW_AST_USER_FIELD = 118 } |
enum | { RADIUS_FLAG_USEGMTIME = (1 << 0) , RADIUS_FLAG_LOGUNIQUEID = (1 << 1) , RADIUS_FLAG_LOGUSERFIELD = (1 << 2) } |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static int | build_radius_record (VALUE_PAIR **tosend, struct ast_cdr *cdr) |
static int | load_module (void) |
static int | radius_log (struct ast_cdr *cdr) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER, .description = "RADIUS 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, .load_pri = AST_MODPRI_CDR_DRIVER, .requires = "cdr", } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static const char | cdr_config [] = "cdr.conf" |
static const char | desc [] = "RADIUS CDR Backend" |
static struct ast_flags | global_flags = { RADIUS_FLAG_USEGMTIME | RADIUS_FLAG_LOGUNIQUEID | RADIUS_FLAG_LOGUSERFIELD } |
static const char | name [] = "radius" |
static char | radiuscfg [PATH_MAX] = "/etc/radiusclient-ng/radiusclient.conf" |
static rc_handle * | rh = NULL |
#define DATE_FORMAT "%Y-%m-%d %T %z" |
ISO 8601 standard format
Definition at line 50 of file cdr_radius.c.
#define VENDOR_CODE 22736 |
Definition at line 52 of file cdr_radius.c.
anonymous enum |
Definition at line 54 of file cdr_radius.c.
anonymous enum |
Enumerator | |
---|---|
RADIUS_FLAG_USEGMTIME | Log dates and times in UTC |
RADIUS_FLAG_LOGUNIQUEID | Log Unique ID |
RADIUS_FLAG_LOGUSERFIELD | Log User Field |
Definition at line 75 of file cdr_radius.c.
|
static |
Definition at line 291 of file cdr_radius.c.
|
static |
Definition at line 291 of file cdr_radius.c.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 291 of file cdr_radius.c.
|
static |
Definition at line 98 of file cdr_radius.c.
References ast_cdr::accountcode, ast_cdr::amaflags, ast_cdr::answer, ast_cdr_disp2str(), ast_channel_amaflags2string(), ast_localtime(), ast_strdupa, ast_strftime(), ast_test_flag, ast_cdr::billsec, ast_cdr::channel, ast_cdr::clid, DATE_FORMAT, ast_cdr::dcontext, ast_cdr::disposition, ast_cdr::dst, ast_cdr::dstchannel, ast_cdr::duration, ast_cdr::end, global_flags, ast_cdr::lastapp, ast_cdr::lastdata, NULL, PW_AST_ACCT_CODE, PW_AST_AMA_FLAGS, PW_AST_ANSWER_TIME, PW_AST_BILL_SEC, PW_AST_CHAN, PW_AST_CLID, PW_AST_DISPOSITION, PW_AST_DST, PW_AST_DST_CHAN, PW_AST_DST_CTX, PW_AST_DURATION, PW_AST_END_TIME, PW_AST_LAST_APP, PW_AST_LAST_DATA, PW_AST_SRC, PW_AST_START_TIME, PW_AST_UNIQUE_ID, PW_AST_USER_FIELD, RADIUS_FLAG_LOGUNIQUEID, RADIUS_FLAG_LOGUSERFIELD, RADIUS_FLAG_USEGMTIME, rh, ast_cdr::src, ast_cdr::start, tmp(), ast_cdr::uniqueid, ast_cdr::userfield, and VENDOR_CODE.
Referenced by radius_log().
|
static |
Definition at line 246 of file cdr_radius.c.
References ast_cdr_register(), ast_config_destroy(), ast_config_load, ast_copy_string(), ast_log, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, ast_set2_flag, ast_true(), ast_variable_retrieve(), cdr_config, CONFIG_STATUS_FILEINVALID, desc, global_flags, LOG_NOTICE, name, NULL, RADIUS_FLAG_LOGUNIQUEID, RADIUS_FLAG_LOGUSERFIELD, RADIUS_FLAG_USEGMTIME, radius_log(), radiuscfg, rh, and tmp().
|
static |
Definition at line 210 of file cdr_radius.c.
References ast_debug, ast_log, build_radius_record(), LOG_ERROR, NULL, result, and rh.
Referenced by load_module().
|
static |
Definition at line 233 of file cdr_radius.c.
References ast_cdr_unregister(), name, NULL, and rh.
|
static |
Definition at line 291 of file cdr_radius.c.
|
static |
Definition at line 291 of file cdr_radius.c.
|
static |
Definition at line 86 of file cdr_radius.c.
Referenced by load_module(), and module_config_alloc().
|
static |
Definition at line 84 of file cdr_radius.c.
Referenced by acf_retrieve_docs(), ast_cdr_modifier_register(), ast_cdr_register(), ast_netsock_set_qos(), ast_rtp_instance_set_qos(), ast_rtp_qos_set(), ast_set_qos(), ast_tcptls_client_create(), ast_tcptls_client_start_timeout(), ast_tcptls_server_root(), ast_tcptls_server_start(), ast_tcptls_server_stop(), au_rewrite(), au_seek(), au_tell(), cdr_generic_register(), check_header(), connect_to_host(), dump_cause(), handle_cli_ulimit(), iax_firmware_append(), idle_sched_init_pj_thread(), init_acf_query(), keepalive_transport_thread(), load_module(), ogg_vorbis_open(), ogg_vorbis_read(), ogg_vorbis_seek(), ogg_vorbis_tell(), print_file(), read_some(), setnonblocking(), sip_thread_start(), str2desc(), update_header(), write_amap(), write_buf(), write_header(), and xmpp_client_set_presence().
|
static |
Definition at line 94 of file cdr_radius.c.
Referenced by build_radius_record(), and load_module().
|
static |
Definition at line 85 of file cdr_radius.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 91 of file cdr_radius.c.
Referenced by load_module().
|
static |
Definition at line 96 of file cdr_radius.c.
Referenced by build_radius_record(), handle_registrations(), load_module(), radius_log(), and unload_module().