57 static char *app =
"CELGenUserEvent";
59 static int celgenuserevent_exec(
struct ast_channel *chan,
const char *data)
69 if (ast_strlen_zero(data)) {
78 "extra",
"extra",
S_OR(args.extra,
""));
86 static int unload_module(
void)
92 static int load_module(
void)
102 AST_MODULE_INFO(
ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT,
"Generate an User-Defined CEL event",
103 .support_level = AST_MODULE_SUPPORT_CORE,
105 .unload = unload_module,
Main Channel structure associated with a channel.
Asterisk main include file. File version handling, generic pbx functions.
struct ast_json * ast_json_pack(char const *format,...)
Helper for creating complex JSON values.
void ast_json_unref(struct ast_json *value)
Decrease refcount on value. If refcount reaches zero, value is freed.
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
int ast_unregister_application(const char *app)
Unregister an application.
General Asterisk PBX channel definitions.
#define ast_strdupa(s)
duplicate a string in memory from the stack
Module has failed to load, may be in an inconsistent state.
#define S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one...
Abstract JSON element (object, array, string, int, ...).
a user-defined event, the event name field should be set
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
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.
void ast_cel_publish_event(struct ast_channel *chan, enum ast_cel_event_type event_type, struct ast_json *blob)
Publish a CEL event.
#define AST_APP_ARG(name)
Define an application argument.