summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2015-02-09 03:10:59 +0000
committerMatthew Jordan <mjordan@digium.com>2015-02-09 03:10:59 +0000
commit32e42e50cc3316fee9343fed3323a8f771bffb53 (patch)
tree096c364ac5026a8f454ef7e2221d364d99ce6dab
parent03445a147e8e38486f49e0a117b640e32236009d (diff)
res/ari/resource_channels: Add missing 'no_answer' reason to DELETE /channels
One of the canonical reasons for hanging up a channel is because the far end failed to answer - or because someone else answered, and we want to get rid of this channel. This patch adds the missing value to the 'reason' query parameter for the DELETE /channels operation. Review: https://reviewboard.asterisk.org/r/4400 ASTERISK-24745 #close Reported by: Ben Merrills patches: add_no_answer_ari_hangup_cause.diff uploaded by Ben Merrills (License 6678) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--res/ari/resource_channels.c2
-rw-r--r--rest-api/api-docs/channels.json3
2 files changed, 4 insertions, 1 deletions
diff --git a/res/ari/resource_channels.c b/res/ari/resource_channels.c
index d1d54a2f0..24aabe588 100644
--- a/res/ari/resource_channels.c
+++ b/res/ari/resource_channels.c
@@ -704,6 +704,8 @@ void ast_ari_channels_hangup(struct ast_variable *headers,
cause = AST_CAUSE_BUSY;
} else if (!strcmp(args->reason, "congestion")) {
cause = AST_CAUSE_CONGESTION;
+ } else if (!strcmp(args->reason, "no_answer")) {
+ cause = AST_CAUSE_NOANSWER;
} else {
ast_ari_response_error(
response, 400, "Invalid Reason",
diff --git a/rest-api/api-docs/channels.json b/rest-api/api-docs/channels.json
index 887191373..6baebe354 100644
--- a/rest-api/api-docs/channels.json
+++ b/rest-api/api-docs/channels.json
@@ -313,7 +313,8 @@
"values": [
"normal",
"busy",
- "congestion"
+ "congestion",
+ "no_answer"
]
}
}