diff options
author | Matt Jordan <mjordan@digium.com> | 2016-10-20 07:27:21 -0500 |
---|---|---|
committer | Matt Jordan <mjordan@digium.com> | 2016-11-01 09:26:41 -0500 |
commit | 1a3e699316b672ade3890f6055429f132849c0ac (patch) | |
tree | 00b55891e6fa618a02f27bd49b1700645a03caac /res/stasis/app.h | |
parent | 201f21e0e567c53c51601d5903999f538ce84178 (diff) |
res/stasis: Add CLI commands for displaying/debugging ARI apps
This patch adds three new CLI commands:
- ari show apps: list the registered ARI applications
- ari show app: show detailed information about an ARI application
- ari set debug: dump events being sent to an ARI application
Note that while these CLI commands live in the res_stasis module, we use
the 'ari' family for these commands. This was done as most users of
Asterisk aren't aware of the semantic differences between ARI and
res_stasis, and some 'ari' CLI commands already exist.
ASTERISK-26488 #close
Change-Id: I51ad6ff0cabee0d69db06858c13f18b1c513c9f5
Diffstat (limited to 'res/stasis/app.h')
-rw-r--r-- | res/stasis/app.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/res/stasis/app.h b/res/stasis/app.h index 2c8db1ccd..6ed6a295b 100644 --- a/res/stasis/app.h +++ b/res/stasis/app.h @@ -127,8 +127,26 @@ void app_send(struct stasis_app *app, struct ast_json *message); struct app_forwards; +/*! + * \brief Create a JSON representation of a \c stasis_app + * + * \param app The application + * + * \return \c JSON blob on success + * \return \c NULL on error + */ struct ast_json *app_to_json(const struct stasis_app *app); +struct ast_cli_args; + +/*! + * \brief Dump properties of a \c stasis_app to the CLI + * + * \param app The application + * \param a The CLI arguments + */ +void app_to_cli(const struct stasis_app *app, struct ast_cli_args *a); + /*! * \brief Subscribes an application to a channel. * @@ -282,4 +300,12 @@ char *app_get_replace_channel_app(struct ast_channel *chan); */ int app_send_end_msg(struct stasis_app *app, struct ast_channel *chan); +/*! + * \brief Enable/disable debugging on an application + * + * \param app The app to debug + * \param debug If non-zero, enable debugging. If zero, disable. + */ +void app_set_debug(struct stasis_app *app, int debug); + #endif /* _ASTERISK_RES_STASIS_APP_H */ |