mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-04 03:20:33 +00:00
Tweak after bridge callback reason to string strings.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1653,7 +1653,7 @@ enum ast_after_bridge_cb_reason {
|
|||||||
AST_AFTER_BRIDGE_CB_REASON_REPLACED,
|
AST_AFTER_BRIDGE_CB_REASON_REPLACED,
|
||||||
/*! The callback was removed because of a masquerade. (fixup) */
|
/*! The callback was removed because of a masquerade. (fixup) */
|
||||||
AST_AFTER_BRIDGE_CB_REASON_MASQUERADE,
|
AST_AFTER_BRIDGE_CB_REASON_MASQUERADE,
|
||||||
/*! The channel departed bridge. */
|
/*! The channel was departed from the bridge. */
|
||||||
AST_AFTER_BRIDGE_CB_REASON_DEPART,
|
AST_AFTER_BRIDGE_CB_REASON_DEPART,
|
||||||
/*! Was explicitly removed by external code. */
|
/*! Was explicitly removed by external code. */
|
||||||
AST_AFTER_BRIDGE_CB_REASON_REMOVED,
|
AST_AFTER_BRIDGE_CB_REASON_REMOVED,
|
||||||
|
@@ -3309,16 +3309,18 @@ int ast_after_bridge_callback_set(struct ast_channel *chan, ast_after_bridge_cb
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char *reason_strings[] = {
|
const char *reason_strings[] = {
|
||||||
[AST_AFTER_BRIDGE_CB_REASON_DESTROY] = "Bridge Destroyed",
|
[AST_AFTER_BRIDGE_CB_REASON_DESTROY] = "Channel destroyed (hungup)",
|
||||||
[AST_AFTER_BRIDGE_CB_REASON_REPLACED] = "Channel replaced",
|
[AST_AFTER_BRIDGE_CB_REASON_REPLACED] = "Callback was replaced",
|
||||||
[AST_AFTER_BRIDGE_CB_REASON_MASQUERADE] = "Channel masqueraded",
|
[AST_AFTER_BRIDGE_CB_REASON_MASQUERADE] = "Channel masqueraded",
|
||||||
[AST_AFTER_BRIDGE_CB_REASON_DEPART] = "Channel departed",
|
[AST_AFTER_BRIDGE_CB_REASON_DEPART] = "Channel was departed from bridge",
|
||||||
[AST_AFTER_BRIDGE_CB_REASON_REMOVED] = "Channel removed",
|
[AST_AFTER_BRIDGE_CB_REASON_REMOVED] = "Callback was removed",
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *ast_after_bridge_cb_reason_string(enum ast_after_bridge_cb_reason reason)
|
const char *ast_after_bridge_cb_reason_string(enum ast_after_bridge_cb_reason reason)
|
||||||
{
|
{
|
||||||
if (reason < AST_AFTER_BRIDGE_CB_REASON_DESTROY || reason > AST_AFTER_BRIDGE_CB_REASON_REMOVED) {
|
if (reason < AST_AFTER_BRIDGE_CB_REASON_DESTROY
|
||||||
|
|| AST_AFTER_BRIDGE_CB_REASON_REMOVED < reason
|
||||||
|
|| !reason_strings[reason]) {
|
||||||
return "Unknown";
|
return "Unknown";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user