47 info->name = __func__;
49 info->summary =
"Test stasis app invocation.";
50 info->description =
"Test stasis app invocation.";
57 ast_test_validate(
test, -1 == res);
106 info->name = __func__;
108 info->summary =
"Test stasis app invocation.";
109 info->description =
"Test stasis app invocation.";
124 ast_test_validate(
test, 0 == res);
144 info->name = __func__;
146 info->summary =
"Test stasis app invocation.";
147 info->description =
"Test stasis app invocation.";
161 "type",
"ApplicationReplaced",
168 ast_test_validate(
test, 0 == res);
169 ast_test_validate(
test, 1 == app_data1->invocations);
174 ast_test_validate(
test, 1 == app_data2->invocations);
200 .requires =
"res_stasis",
struct ast_json * ast_json_ref(struct ast_json *value)
Increase refcount on value.
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.
AST_TEST_DEFINE(app_invoke_dne)
char * ast_eid_to_str(char *s, int maxlen, struct ast_eid *eid)
Convert an EID to a string.
void ast_json_unref(struct ast_json *value)
Decrease refcount on value. If refcount reaches zero, value is freed.
int ast_json_object_del(struct ast_json *object, const char *key)
Delete a field from a JSON object.
static void app_data_dtor(void *obj)
struct ast_json * messages
#define AST_TEST_REGISTER(cb)
static int unload_module(void)
struct ast_json * ast_json_null(void)
Get the JSON null value.
static const char * test_category
void stasis_app_unregister(const char *app_name)
Unregister a Stasis application.
#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_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 void test_handler(void *data, const char *app_name, struct ast_json *message)
static int load_module(void)
#define AST_TEST_UNREGISTER(cb)
const char * app_name(struct ast_app *app)
#define ao2_alloc(data_size, destructor_fn)
int stasis_app_register(const char *app_name, stasis_app_cb handler, void *data)
Register a new Stasis application.
static struct app_data * app_data_create(void)
int stasis_app_send(const char *app_name, struct ast_json *message)
Send a message to the given Stasis application.
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS|AST_MODFLAG_LOAD_ORDER, "HTTP Phone Provisioning",.support_level=AST_MODULE_SUPPORT_EXTENDED,.load=load_module,.unload=unload_module,.reload=reload,.load_pri=AST_MODPRI_CHANNEL_DEPEND,.requires="http",)
struct ast_eid ast_eid_default
Global EID.
struct ast_json * ast_json_object_get(struct ast_json *object, const char *key)
Get a field from a JSON object.
int ast_json_equal(const struct ast_json *lhs, const struct ast_json *rhs)
Compare two JSON objects.
Abstract JSON element (object, array, string, int, ...).
Stasis Application API. See Stasis Application API for detailed documentation.
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
struct ast_json * ast_json_array_get(const struct ast_json *array, size_t index)
Get an element from an array.
struct ast_json * ast_json_copy(const struct ast_json *value)
Copy a JSON value, but not its children.