158 if (payload->
reset) {
208 payload->reenable = 1;
212 payload->keep_variables = 1;
228 payload->disable = 1;
Main Channel structure associated with a channel.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
Asterisk main include file. File version handling, generic pbx functions.
static int resetcdr_exec(struct ast_channel *chan, const char *data)
#define ast_test_flag(p, flag)
static struct stasis_message_router * router
int stasis_message_router_add(struct stasis_message_router *router, struct stasis_message_type *message_type, stasis_subscription_cb callback, void *data)
Add a route to a message router.
#define STASIS_MESSAGE_TYPE_INIT(name)
Boiler-plate messaging macro for initializing message types.
static void appcdr_callback(void *data, struct stasis_subscription *sub, struct stasis_message *message)
Stasis Message Bus API. See Stasis Message Bus API for detailed documentation.
void stasis_message_router_publish_sync(struct stasis_message_router *router, struct stasis_message *message)
Publish a message to a message router's subscription synchronously.
STASIS_MESSAGE_TYPE_DEFN_LOCAL(appcdr_message_type)
#define STASIS_MESSAGE_TYPE_CLEANUP(name)
Boiler-plate messaging macro for cleaning up message types.
struct stasis_message_type * stasis_message_type(const struct stasis_message *msg)
Get the message type for a stasis_message.
const char * channel_name
int ast_unregister_application(const char *app)
Unregister an application.
#define ast_strlen_zero(foo)
#define AST_APP_OPTIONS(holder, options...)
Declares an array of options for an application.
static int unload_module(void)
unsigned int keep_variables
struct stasis_message_router * ast_cdr_message_router(void)
Return the message router for the CDR engine.
General Asterisk PBX channel definitions.
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
int ast_cdr_reset(const char *channel_name, int keep_variables)
Reset the detail record.
#define ast_strdupa(s)
duplicate a string in memory from the stack
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.
static const char nocdr_app[]
static const char resetcdr_app[]
int ast_cdr_set_property(const char *channel_name, enum ast_cdr_options option)
Set a property on a CDR for a channel.
static const struct ast_app_option resetcdr_opts[128]
void * stasis_message_data(const struct stasis_message *msg)
Get the data contained in a message.
struct stasis_message * stasis_message_create(struct stasis_message_type *type, void *data)
Create a new message.
void stasis_message_router_remove(struct stasis_message_router *router, struct stasis_message_type *message_type)
Remove a route from a message router.
#define ao2_alloc(data_size, destructor_fn)
Module has failed to load, may be in an inconsistent state.
Structure used to handle boolean flags.
static int nocdr_exec(struct ast_channel *chan, const char *data)
static int publish_app_cdr_message(struct ast_channel *chan, struct app_cdr_message_payload *payload)
const char * ast_channel_name(const struct ast_channel *chan)
struct stasis_forward * sub
int ast_cdr_clear_property(const char *channel_name, enum ast_cdr_options option)
Clear a property on a CDR for a channel.
#define AST_APP_OPTION(option, flagno)
Declares an application option that does not accept an argument.
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
#define ast_register_application_xml(app, execute)
Register an application using XML documentation.
static int load_module(void)