[Asterisk-code-review] res/res ari: Add additional hangup reasons (asterisk[15])
Sebastian Damm
asteriskteam at digium.com
Thu Dec 6 11:27:05 CST 2018
Sebastian Damm has uploaded this change for review. ( https://gerrit.asterisk.org/10751
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
1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/51/10751/1
diff --git a/res/ari/resource_channels.c b/res/ari/resource_channels.c
index 6b4f26c..053410f 100644
--- a/res/ari/resource_channels.c
+++ b/res/ari/resource_channels.c
@@ -888,6 +888,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 {
--
To view, visit https://gerrit.asterisk.org/10751
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: newchange
Gerrit-Change-Id: I85996f1076c9946d65c778413f040a845a90fecc
Gerrit-Change-Number: 10751
Gerrit-PatchSet: 1
Gerrit-Owner: Sebastian Damm <damm at sipgate.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181206/d8be6a8c/attachment-0001.html>
More information about the asterisk-code-review
mailing list