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