mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
Add the ability to continue and originate using priority labels.
With this patch, the following two ARI commands POST /channels POST /channels/{id}/continue Accept a new parameter, label, that can be used to continue to or originate to a priority label in the dialplan. Because this is adding a new parameter to ARI commands, the API version of ARI has been bumped from 1.6.0 to 1.7.0. This patch comes courtesy of Nir Simionovich from Greenfield Tech. Thanks! ASTERISK-24412 #close Reported by Nir Simionovich Review: https://reviewboard.asterisk.org/r/4285 ........ Merged revisions 430337 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -124,6 +124,10 @@ int ast_ari_channels_originate_parse_body(
|
||||
if (field) {
|
||||
args->priority = ast_json_integer_get(field);
|
||||
}
|
||||
field = ast_json_object_get(body, "label");
|
||||
if (field) {
|
||||
args->label = ast_json_string_get(field);
|
||||
}
|
||||
field = ast_json_object_get(body, "app");
|
||||
if (field) {
|
||||
args->app = ast_json_string_get(field);
|
||||
@@ -188,6 +192,9 @@ static void ast_ari_channels_originate_cb(
|
||||
if (strcmp(i->name, "priority") == 0) {
|
||||
args.priority = atol(i->value);
|
||||
} else
|
||||
if (strcmp(i->name, "label") == 0) {
|
||||
args.label = (i->value);
|
||||
} else
|
||||
if (strcmp(i->name, "app") == 0) {
|
||||
args.app = (i->value);
|
||||
} else
|
||||
@@ -341,6 +348,10 @@ int ast_ari_channels_originate_with_id_parse_body(
|
||||
if (field) {
|
||||
args->priority = ast_json_integer_get(field);
|
||||
}
|
||||
field = ast_json_object_get(body, "label");
|
||||
if (field) {
|
||||
args->label = ast_json_string_get(field);
|
||||
}
|
||||
field = ast_json_object_get(body, "app");
|
||||
if (field) {
|
||||
args->app = ast_json_string_get(field);
|
||||
@@ -401,6 +412,9 @@ static void ast_ari_channels_originate_with_id_cb(
|
||||
if (strcmp(i->name, "priority") == 0) {
|
||||
args.priority = atol(i->value);
|
||||
} else
|
||||
if (strcmp(i->name, "label") == 0) {
|
||||
args.label = (i->value);
|
||||
} else
|
||||
if (strcmp(i->name, "app") == 0) {
|
||||
args.app = (i->value);
|
||||
} else
|
||||
@@ -592,6 +606,10 @@ int ast_ari_channels_continue_in_dialplan_parse_body(
|
||||
if (field) {
|
||||
args->priority = ast_json_integer_get(field);
|
||||
}
|
||||
field = ast_json_object_get(body, "label");
|
||||
if (field) {
|
||||
args->label = ast_json_string_get(field);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -625,6 +643,9 @@ static void ast_ari_channels_continue_in_dialplan_cb(
|
||||
if (strcmp(i->name, "priority") == 0) {
|
||||
args.priority = atoi(i->value);
|
||||
} else
|
||||
if (strcmp(i->name, "label") == 0) {
|
||||
args.label = (i->value);
|
||||
} else
|
||||
{}
|
||||
}
|
||||
for (i = path_vars; i; i = i->next) {
|
||||
|
Reference in New Issue
Block a user