main/json.c: Added app_name, app_data to channel type

It was difficult to check the channel's current application and
parameters using ARI for current channels. Added app_name, app_data
items to show the current application information.

ASTERISK-28343

Change-Id: Ia48972b3850e5099deab0faeaaf51223a1f2f38c
This commit is contained in:
sungtae kim
2019-03-22 00:09:14 +01:00
parent 4f0b8c3ed3
commit d5a318f148
8 changed files with 91 additions and 13 deletions

View File

@@ -992,6 +992,22 @@ struct ast_json *ast_json_timeval(const struct timeval tv, const char *zone);
*/
struct ast_json *ast_json_ipaddr(const struct ast_sockaddr *addr, enum ast_transport transport_type);
/*!
* \brief Construct a context/exten/priority/application/application_data as JSON.
*
* If a \c NULL is passed for \c context or \c exten or \c app_name or \c app_data,
* or -1 for \c priority, the fields is set to ast_json_null().
*
* \param context Context name.
* \param exten Extension.
* \param priority Dialplan priority.
* \param app_name Application name.
* \param app_data Application argument.
* \return JSON object with \c context, \c exten and \c priority \c app_name \c app_data fields
*/
struct ast_json *ast_json_dialplan_cep_app(
const char *context, const char *exten, int priority, const char *app_name, const char *app_data);
/*!
* \brief Construct a context/exten/priority as JSON.
*