36 #include "asterisk/module.h"
198 char *buf,
size_t len)
240 snprintf(buf, len,
"%lf", hrtime);
242 snprintf(buf, len,
"%lf", 0.0);
253 snprintf(buf, len,
"%lf", hrtime);
297 if (!strcasecmp(
args.variable,
"accountcode"))
299 else if (!strcasecmp(
args.variable,
"peeraccount"))
301 else if (!strcasecmp(
args.variable,
"userfield"))
303 else if (!strcasecmp(
args.variable,
"amaflags"))
int ast_cdr_setamaflags(struct ast_channel *chan, const char *amaflags)
Set AMA flags for channel.
static struct ast_app_option cdr_func_options[128]
int ast_cdr_setvar(struct ast_cdr *cdr, const char *name, const char *value, int recur)
#define ast_channel_lock(chan)
Main Channel structure associated with a channel.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
Asterisk main include file. File version handling, generic pbx functions.
#define AST_APP_OPTIONS(holder, options...)
Declares an array of options for an application.
#define ast_test_flag(p, flag)
static int unload_module(void)
int ast_app_parse_options(const struct ast_app_option *options, struct ast_flags *flags, char **args, char *optstr)
Parses a string containing application options and sets flags/arguments.
int ast_cdr_setaccount(struct ast_channel *chan, const char *account)
Set account code, will generate AMI event.
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
int ast_tvzero(const struct timeval t)
Returns true if the argument is 0,0.
struct timeval ast_tvnow(void)
Returns current timeval. Meant to replace calls to gettimeofday().
int ast_custom_function_unregister(struct ast_custom_function *acf)
Unregister a custom function.
int ast_cdr_setuserfield(struct ast_channel *chan, const char *userfield)
Set CDR user field for channel (stored in CDR)
void ast_cdr_getvar(struct ast_cdr *cdr, const char *name, char **ret, char *workspace, int workspacelen, int recur, int raw)
General Asterisk PBX channel definitions.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
Data structure associated with a custom dialplan function.
Core PBX routines and definitions.
Responsible for call detail data.
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
#define ast_channel_unlock(chan)
static void parse(struct mgcp_request *req)
int ast_cdr_setpeeraccount(struct ast_channel *chan, const char *account)
Set the peer account.
Structure used to handle boolean flags.
static int cdr_write(struct ast_channel *chan, const char *cmd, char *parse, const char *value)
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
static int cdr_read(struct ast_channel *chan, const char *cmd, char *parse, char *buf, size_t len)
int64_t ast_tvdiff_us(struct timeval end, struct timeval start)
Computes the difference (in microseconds) between two struct timeval instances.
#define AST_APP_ARG(name)
Define an application argument.
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
#define ASTERISK_GPL_KEY
The text the key() function should return.
#define ast_custom_function_register(acf)
Register a custom function.
#define ASTERISK_FILE_VERSION(file, version)
Register/unregister a source code file with the core.
#define AST_APP_OPTION(option, flagno)
Declares an application option that does not accept an argument.
static int load_module(void)
static struct ast_custom_function cdr_function