mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 19:28:53 +00:00
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
This commit is contained in:
@@ -886,6 +886,8 @@ void ast_ari_channels_hangup(struct ast_variable *headers,
|
|||||||
cause = AST_CAUSE_CONGESTION;
|
cause = AST_CAUSE_CONGESTION;
|
||||||
} else if (!strcmp(args->reason, "no_answer")) {
|
} else if (!strcmp(args->reason, "no_answer")) {
|
||||||
cause = AST_CAUSE_NOANSWER;
|
cause = AST_CAUSE_NOANSWER;
|
||||||
|
} else if(!strcmp(args->reason, "answered_elsewhere")) {
|
||||||
|
cause = AST_CAUSE_ANSWERED_ELSEWHERE;
|
||||||
} else {
|
} else {
|
||||||
ast_ari_response_error(
|
ast_ari_response_error(
|
||||||
response, 400, "Invalid Reason",
|
response, 400, "Invalid Reason",
|
||||||
|
@@ -400,7 +400,8 @@
|
|||||||
"normal",
|
"normal",
|
||||||
"busy",
|
"busy",
|
||||||
"congestion",
|
"congestion",
|
||||||
"no_answer"
|
"no_answer",
|
||||||
|
"answered_elsewhere"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user