[Asterisk-code-review] res/res ari: Add additional hangup reasons (asterisk[master])
Friendly Automation
asteriskteam at digium.com
Wed Dec 19 05:12:16 CST 2018
Friendly Automation has submitted this change and it was merged. ( https://gerrit.asterisk.org/10753 )
Change subject: res/res_ari: Add additional hangup reasons
......................................................................
res/res_ari: Add additional hangup reasons
The ARI DELETE /channels command takes a "reason" parameter
Previously, there were only five reasons implemented
This patch adds more reasons to choose from for more
complex setups
ASTERISK-28198 #close
Change-Id: I85996f1076c9946d65c778413f040a845a90fecc
---
M res/ari/resource_channels.c
M rest-api/api-docs/channels.json
2 files changed, 24 insertions(+), 0 deletions(-)
Approvals:
Benjamin Keith Ford: Looks good to me, but someone else must approve
Matthew Fredrickson: Looks good to me, but someone else must approve
Joshua C. Colp: Looks good to me, approved
Friendly Automation: Approved for Submit
diff --git a/res/ari/resource_channels.c b/res/ari/resource_channels.c
index 311358e..08f97f1 100644
--- a/res/ari/resource_channels.c
+++ b/res/ari/resource_channels.c
@@ -871,6 +871,22 @@
cause = AST_CAUSE_CONGESTION;
} else if (!strcmp(args->reason, "no_answer")) {
cause = AST_CAUSE_NOANSWER;
+ } else if (!strcmp(args->reason, "timeout")) {
+ cause = AST_CAUSE_NO_USER_RESPONSE;
+ } else if (!strcmp(args->reason, "rejected")) {
+ cause = AST_CAUSE_CALL_REJECTED;
+ } else if (!strcmp(args->reason, "unallocated")) {
+ cause = AST_CAUSE_UNALLOCATED;
+ } else if (!strcmp(args->reason, "normal_unspecified")) {
+ cause = AST_CAUSE_NORMAL_UNSPECIFIED;
+ } else if (!strcmp(args->reason, "number_incomplete")) {
+ cause = AST_CAUSE_INVALID_NUMBER_FORMAT;
+ } else if (!strcmp(args->reason, "codec_mismatch")) {
+ cause = AST_CAUSE_BEARERCAPABILITY_NOTAVAIL;
+ } else if (!strcmp(args->reason, "interworking")) {
+ cause = AST_CAUSE_INTERWORKING;
+ } else if (!strcmp(args->reason, "failure")) {
+ cause = AST_CAUSE_FAILURE;
} else if(!strcmp(args->reason, "answered_elsewhere")) {
cause = AST_CAUSE_ANSWERED_ELSEWHERE;
} else {
diff --git a/rest-api/api-docs/channels.json b/rest-api/api-docs/channels.json
index ec8bae2..08db224 100644
--- a/rest-api/api-docs/channels.json
+++ b/rest-api/api-docs/channels.json
@@ -421,6 +421,14 @@
"busy",
"congestion",
"no_answer",
+ "timeout",
+ "rejected",
+ "unallocated",
+ "normal_unspecified",
+ "number_incomplete",
+ "codec_mismatch",
+ "interworking",
+ "failure",
"answered_elsewhere"
]
}
--
To view, visit https://gerrit.asterisk.org/10753
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I85996f1076c9946d65c778413f040a845a90fecc
Gerrit-Change-Number: 10753
Gerrit-PatchSet: 2
Gerrit-Owner: Sebastian Damm <damm at sipgate.de>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation (1000185)
Gerrit-Reviewer: Joshua C. Colp <jcolp at digium.com>
Gerrit-Reviewer: Matthew Fredrickson <creslin at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181219/35c2b025/attachment.html>
More information about the asterisk-code-review
mailing list