res/ari/resource_channels.c: Added hangup reason code for channels

Currently, DELETE /ari/channels/<channelID> supports only few hangup reasons.
It's good enough for simple use, but when it needs to set the detail reason,
it comes challenges.
Added reason_code query parameter for that.

ASTERISK-28385

Change-Id: I1cf1d991ffd759d0591b347445a55f416ddc3ff2
This commit is contained in:
sungtae kim
2019-04-16 01:26:46 +02:00
committed by Kevin Harwell
parent ccbc83fed7
commit 613a335de5
4 changed files with 78 additions and 33 deletions

View File

@@ -207,7 +207,9 @@ void ast_ari_channels_originate_with_id(struct ast_variable *headers, struct ast
struct ast_ari_channels_hangup_args {
/*! Channel's id */
const char *channel_id;
/*! Reason for hanging up the channel */
/*! The reason code for hanging up the channel for detail use. Mutually exclusive with 'reason'. See detail hangup codes at here. https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause+Mappings */
const char *reason_code;
/*! Reason for hanging up the channel for simple use. Mutually exclusive with 'reason_code'. */
const char *reason;
};
/*!