34 const char *
app = obj;
82 "Application not found");
98 "Missing parameter eventSource");
104 "Missing parameter applicationName");
117 "Application not found");
121 "Event source does not exist");
125 "Invalid event source URI scheme");
129 "Error processing request");
143 "Missing parameter eventSource");
156 "Application not found");
160 "Event source was not subscribed to");
164 "Invalid event source URI scheme");
168 "Error processing request");
struct ast_json * stasis_app_object_to_json(struct stasis_app *app)
Return the JSON representation of a Stasis application.
enum stasis_app_subscribe_res stasis_app_unsubscribe(const char *app_name, const char **event_source_uris, int event_sources_count, struct ast_json **json)
Unsubscribes an application from a list of event sources.
struct stasis_app * stasis_app_get_by_name(const char *name)
Retrieve a handle to a Stasis application by its name.
int stasis_app_event_filter_set(struct stasis_app *app, struct ast_json *filter)
Set the application's event type filter.
struct ast_json * ast_json_ref(struct ast_json *value)
Increase refcount on value.
Asterisk main include file. File version handling, generic pbx functions.
int ao2_container_count(struct ao2_container *c)
Returns the number of elements in a container.
Registered applications container.
const char * application_name
void ast_json_unref(struct ast_json *value)
Decrease refcount on value. If refcount reaches zero, value is freed.
void ast_ari_applications_list(struct ast_variable *headers, struct ast_ari_applications_list_args *args, struct ast_ari_response *response)
List all applications.
#define ao2_callback(c, flags, cb_fn, arg)
Structure for variables, used for configurations and for channel variables.
Assume that the ao2_container is already locked.
void ast_ari_applications_unsubscribe(struct ast_variable *headers, struct ast_ari_applications_unsubscribe_args *args, struct ast_ari_response *response)
Unsubscribe an application from an event source.
static int append_json(void *obj, void *arg, int flags)
#define ast_strlen_zero(foo)
void ast_ari_applications_get(struct ast_variable *headers, struct ast_ari_applications_get_args *args, struct ast_ari_response *response)
Get details of an application.
void ast_ari_applications_subscribe(struct ast_variable *headers, struct ast_ari_applications_subscribe_args *args, struct ast_ari_response *response)
Subscribe an application to a event source.
enum stasis_app_subscribe_res stasis_app_subscribe(const char *app_name, const char **event_source_uris, int event_sources_count, struct ast_json **json)
Subscribes an application to a list of event sources.
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
const char ** event_source
size_t event_source_count
void ast_ari_response_ok(struct ast_ari_response *response, struct ast_json *message)
Fill in an OK (200) ast_ari_response.
#define ao2_ref(o, delta)
struct ast_json * ast_json_array_create(void)
Create a empty JSON array.
int ast_json_array_append(struct ast_json *array, struct ast_json *value)
Append to an array.
static int array(struct ast_channel *chan, const char *cmd, char *var, const char *value)
void ast_ari_response_error(struct ast_ari_response *response, int response_code, const char *response_text, const char *message_fmt,...)
Fill in an error ast_ari_response.
struct ao2_container * stasis_app_get_all(void)
Gets the names of all registered Stasis applications.
stasis_app_subscribe_res
Return code for stasis_app_[un]subscribe.
const char * application_name
size_t ast_json_array_size(const struct ast_json *array)
Get the size of a JSON array.
Abstract JSON element (object, array, string, int, ...).
Generated file - declares stubs to be implemented in res/ari/resource_applications.c.
Stasis Application API. See Stasis Application API for detailed documentation.
const char ** event_source
const char * application_name
size_t event_source_count
struct ast_json * stasis_app_to_json(const char *app_name)
Return the JSON representation of a Stasis application.
void ast_ari_applications_filter(struct ast_variable *headers, struct ast_ari_applications_filter_args *args, struct ast_ari_response *response)
Filter application events types.
const char * application_name