70 static char *
app =
"UserEvent";
83 ast_log(
LOG_WARNING,
"UserEvent requires an argument (eventname,optional event body)\n");
92 "eventname",
args.eventname);
97 for (x = 0; x <
args.argc - 1; x++) {
101 key =
strsep(&value,
":");
#define ast_channel_lock(chan)
Main Channel structure associated with a channel.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
static int load_module(void)
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.
static int unload_module(void)
int ast_unregister_application(const char *app)
Unregister an application.
int ast_json_object_set(struct ast_json *object, const char *key, struct ast_json *value)
Set a field in a JSON object.
#define ast_strlen_zero(foo)
Asterisk JSON abstraction layer.
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
struct ast_json * ast_json_string_create(const char *value)
Construct a JSON string from value.
char * ast_strip(char *s)
Strip leading/trailing whitespace from a string.
#define ast_strdupa(s)
duplicate a string in memory from the stack
Core PBX routines and definitions.
The AMI - Asterisk Manager Interface - is a TCP protocol created to manage Asterisk with third-party ...
#define ast_channel_unlock(chan)
static void parse(struct mgcp_request *req)
static int userevent_exec(struct ast_channel *chan, const char *data)
struct stasis_message_type * ast_multi_user_event_type(void)
Message type for custom user defined events with multi object blobs.
void ast_multi_object_blob_single_channel_publish(struct ast_channel *chan, struct stasis_message_type *type, struct ast_json *blob)
Create and publish a stasis message blob on a channel with it's snapshot.
char * strsep(char **str, const char *delims)
Abstract JSON element (object, array, string, int, ...).
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
#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.
#define AST_APP_ARG(name)
Define an application argument.