mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
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:
17
main/json.c
17
main/json.c
@@ -629,12 +629,21 @@ struct ast_json *ast_json_name_number(const char *name, const char *number)
|
||||
"number", AST_JSON_UTF8_VALIDATE(number));
|
||||
}
|
||||
|
||||
struct ast_json *ast_json_dialplan_cep_app(
|
||||
const char *context, const char *exten, int priority, const char *app_name, const char *app_data)
|
||||
{
|
||||
return ast_json_pack("{s: s?, s: s?, s: o, s: s?, s: s?}",
|
||||
"context", context,
|
||||
"exten", exten,
|
||||
"priority", priority != -1 ? ast_json_integer_create(priority) : ast_json_null(),
|
||||
"app_name", app_name,
|
||||
"app_data", app_data
|
||||
);
|
||||
}
|
||||
|
||||
struct ast_json *ast_json_dialplan_cep(const char *context, const char *exten, int priority)
|
||||
{
|
||||
return ast_json_pack("{s: o, s: o, s: o}",
|
||||
"context", context ? ast_json_string_create(context) : ast_json_null(),
|
||||
"exten", exten ? ast_json_string_create(exten) : ast_json_null(),
|
||||
"priority", priority != -1 ? ast_json_integer_create(priority) : ast_json_null());
|
||||
return ast_json_dialplan_cep_app(context, exten, priority, "", "");
|
||||
}
|
||||
|
||||
struct ast_json *ast_json_timeval(const struct timeval tv, const char *zone)
|
||||
|
Reference in New Issue
Block a user