[asterisk-commits] resource channels.c: add hangup reason "answered elsewhere". (asterisk[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 7 02:05:47 CDT 2016


Anonymous Coward #1000019 has submitted this change and it was merged.

Change subject: resource_channels.c: add hangup reason "answered_elsewhere".
......................................................................


resource_channels.c: add hangup reason "answered_elsewhere".

In ARI, the channels API allows to hangup a channel with a hangup reason.
This commit adds a new reason "answered_elsewhere".
When using a SIP channel, this will eventually allow Asterisk to add a proper
"Reason" header to a CANCEL message.

ASTERISK-26321

Change-Id: Ia97675bd4acd6a7f58eb467953dfb94559f6583d
---
M res/ari/resource_channels.c
M rest-api/api-docs/channels.json
2 files changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Mark Michelson: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/res/ari/resource_channels.c b/res/ari/resource_channels.c
index 35b7572..8d32921 100644
--- a/res/ari/resource_channels.c
+++ b/res/ari/resource_channels.c
@@ -886,6 +886,8 @@
 		cause = AST_CAUSE_CONGESTION;
 	} else if (!strcmp(args->reason, "no_answer")) {
 		cause = AST_CAUSE_NOANSWER;
+	} else if(!strcmp(args->reason, "answered_elsewhere")) {
+		cause = AST_CAUSE_ANSWERED_ELSEWHERE;
 	} 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 75feeb1..ee18bfe 100644
--- a/rest-api/api-docs/channels.json
+++ b/rest-api/api-docs/channels.json
@@ -400,7 +400,8 @@
 									"normal",
 									"busy",
 									"congestion",
-									"no_answer"
+									"no_answer",
+									"answered_elsewhere"
 								]
 							}
 						}

-- 
To view, visit https://gerrit.asterisk.org/3767
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia97675bd4acd6a7f58eb467953dfb94559f6583d
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Jean Aunis - Prescom <jean.aunis at prescom.fr>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-commits mailing list