Asterisk - The Open Source Telephony Project
18.5.0
|
Call Detail Record related dialplan functions. More...
#include "asterisk.h"
#include "asterisk/module.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/utils.h"
#include "asterisk/app.h"
#include "asterisk/cdr.h"
#include "asterisk/stasis.h"
#include "asterisk/stasis_message_router.h"
Go to the source code of this file.
Data Structures | |
struct | cdr_func_data |
struct | cdr_func_payload |
Enumerations | |
enum | cdr_option_flags { OPT_UNPARSED = (1 << 1), OPT_FLOAT = (1 << 2) } |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static int | cdr_prop_write (struct ast_channel *chan, const char *cmd, char *parse, const char *value) |
static void | cdr_prop_write_callback (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static int | cdr_read (struct ast_channel *chan, const char *cmd, char *parse, char *buf, size_t len) |
static void | cdr_read_callback (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static struct timeval | cdr_retrieve_time (struct ast_channel *chan, const char *time_name) |
static int | cdr_write (struct ast_channel *chan, const char *cmd, char *arguments, const char *value) |
static void | cdr_write_callback (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static int | load_module (void) |
STASIS_MESSAGE_TYPE_DEFN_LOCAL (cdr_read_message_type) | |
STASIS_MESSAGE_TYPE_DEFN_LOCAL (cdr_write_message_type) | |
STASIS_MESSAGE_TYPE_DEFN_LOCAL (cdr_prop_write_message_type) | |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT , .description = "Call Detail Record (CDR) dialplan functions" , .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_CORE, .load = load_module, .unload = unload_module, .requires = "cdr", } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static const struct ast_app_option | cdr_func_options [128] = { [ 'f' ] = { .flag = OPT_FLOAT }, [ 'u' ] = { .flag = OPT_UNPARSED }, } |
static struct ast_custom_function | cdr_function |
static struct ast_custom_function | cdr_prop_function |
Call Detail Record related dialplan functions.
Definition in file func_cdr.c.
enum cdr_option_flags |
Enumerator | |
---|---|
OPT_UNPARSED | |
OPT_FLOAT |
Definition at line 195 of file func_cdr.c.
|
static |
Definition at line 712 of file func_cdr.c.
|
static |
Definition at line 712 of file func_cdr.c.
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 712 of file func_cdr.c.
|
static |
Definition at line 604 of file func_cdr.c.
References ao2_alloc, ao2_cleanup, ast_cdr_message_router(), ast_channel_name(), ast_log, AST_LOG_WARNING, cdr_func_payload::chan, cdr_func_payload::cmd, LOG_WARNING, NULL, parse(), RAII_VAR, router, stasis_message_create(), stasis_message_router_publish_sync(), and cdr_func_payload::value.
|
static |
Definition at line 400 of file func_cdr.c.
References args, cdr_func_payload::arguments, AST_APP_ARG, ast_cdr_clear_property(), AST_CDR_FLAG_DISABLE_ALL, AST_CDR_FLAG_PARTY_A, ast_cdr_set_property(), ast_channel_name(), AST_DECLARE_APP_ARGS, ast_log, AST_LOG_WARNING, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero, ast_true(), cdr_func_payload::chan, cdr_func_payload::cmd, options, parse(), stasis_message_data(), stasis_message_type(), and cdr_func_payload::value.
Referenced by load_module().
|
static |
Definition at line 448 of file func_cdr.c.
References ao2_alloc, ao2_cleanup, ast_cdr_message_router(), ast_channel_name(), ast_log, AST_LOG_WARNING, ast_strlen_zero, buf, cdr_func_data::buf, cdr_read_callback(), cdr_func_payload::chan, cdr_func_payload::cmd, cdr_func_data::len, len(), LOG_WARNING, NULL, parse(), RAII_VAR, router, stasis_message_create(), and stasis_message_router_publish_sync().
|
static |
Definition at line 248 of file func_cdr.c.
References amaflags, args, cdr_func_payload::arguments, AST_APP_ARG, ast_app_parse_options(), ast_assert, ast_cdr_disp2str(), ast_cdr_format_var(), ast_cdr_getvar(), ast_channel_amaflags2string(), ast_channel_cdr(), ast_channel_name(), ast_copy_string(), AST_DECLARE_APP_ARGS, ast_localtime(), ast_log, AST_LOG_WARNING, ast_set_flag, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strftime(), ast_strlen_zero, ast_test_flag, ast_tvdiff_us(), ast_tvnow(), ast_tvzero(), cdr_func_data::buf, cdr_func_options, cdr_retrieve_time(), cdr_func_payload::chan, cdr_func_payload::cmd, cdr_func_payload::data, sip_to_pjsip::info(), cdr_func_data::len, NULL, OPT_FLOAT, OPT_UNPARSED, options, stasis_message_data(), stasis_message_type(), and cdr_func_payload::value.
Referenced by cdr_read(), and load_module().
|
static |
Definition at line 222 of file func_cdr.c.
References ast_cdr_format_var(), ast_cdr_getvar(), ast_channel_cdr(), ast_channel_name(), ast_log, AST_LOG_WARNING, ast_strlen_zero, NULL, and cdr_func_payload::value.
Referenced by cdr_read_callback().
|
static |
Definition at line 506 of file func_cdr.c.
References amaflags, ao2_alloc, ao2_ref, args, cdr_func_payload::arguments, AST_AMA_NONE, AST_APP_ARG, ast_cdr_message_router(), ast_channel_amaflags_set(), ast_channel_lock, ast_channel_name(), ast_channel_string2amaflag(), ast_channel_unlock, AST_DECLARE_APP_ARGS, ast_log, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero, cdr_func_payload::chan, cdr_func_payload::cmd, LOG_WARNING, NULL, options, parse(), router, stasis_message_create(), stasis_message_router_publish_sync(), and cdr_func_payload::value.
|
static |
Definition at line 357 of file func_cdr.c.
References args, cdr_func_payload::arguments, AST_APP_ARG, ast_app_parse_options(), ast_assert, ast_cdr_setuserfield(), ast_cdr_setvar(), ast_channel_name(), AST_DECLARE_APP_ARGS, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero, cdr_func_options, cdr_func_payload::chan, NULL, options, parse(), stasis_message_data(), stasis_message_type(), and cdr_func_payload::value.
Referenced by load_module().
|
static |
Definition at line 679 of file func_cdr.c.
References ao2_cleanup, ast_cdr_message_router(), ast_custom_function_register, AST_MODFLAG_DEFAULT, AST_MODULE_INFO(), AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, AST_MODULE_SUPPORT_CORE, ASTERISK_GPL_KEY, cdr_prop_write_callback(), cdr_read_callback(), cdr_write_callback(), NULL, RAII_VAR, router, stasis_message_router_add(), STASIS_MESSAGE_TYPE_INIT, and unload_module().
STASIS_MESSAGE_TYPE_DEFN_LOCAL | ( | cdr_read_message_type | ) |
STASIS_MESSAGE_TYPE_DEFN_LOCAL | ( | cdr_write_message_type | ) |
STASIS_MESSAGE_TYPE_DEFN_LOCAL | ( | cdr_prop_write_message_type | ) |
|
static |
Definition at line 660 of file func_cdr.c.
References ao2_cleanup, ast_cdr_message_router(), ast_custom_function_unregister(), RAII_VAR, router, stasis_message_router_remove(), and STASIS_MESSAGE_TYPE_CLEANUP.
Referenced by load_module().
|
static |
Definition at line 712 of file func_cdr.c.
|
static |
Definition at line 712 of file func_cdr.c.
|
static |
Definition at line 203 of file func_cdr.c.
Referenced by cdr_read_callback(), and cdr_write_callback().
|
static |
Definition at line 648 of file func_cdr.c.
|
static |
Definition at line 654 of file func_cdr.c.