Merge "SIP diversion: Fix REDIRECTING(reason) value inconsistencies."

This commit is contained in:
Joshua Colp
2016-03-03 07:40:40 -06:00
committed by Gerrit Code Review
4 changed files with 205 additions and 95 deletions

View File

@@ -1209,7 +1209,16 @@ static const struct ast_value_translation redirecting_reason_types[] = {
{ AST_REDIRECTING_REASON_OUT_OF_ORDER, "out_of_order", "Called DTE Out-Of-Order" },
{ AST_REDIRECTING_REASON_AWAY, "away", "Callee is Away" },
{ AST_REDIRECTING_REASON_CALL_FWD_DTE, "cf_dte", "Call Forwarding By The Called DTE" },
{ AST_REDIRECTING_REASON_SEND_TO_VM, "send_to_vm", "Call is being redirected to user's voicemail"},
{ AST_REDIRECTING_REASON_SEND_TO_VM, "send_to_vm", "Call is being redirected to user's voicemail" },
/* Convenience SIP aliases. Alias descriptions are not used. */
{ AST_REDIRECTING_REASON_USER_BUSY, "user-busy" },
{ AST_REDIRECTING_REASON_NO_ANSWER, "no-answer" },
{ AST_REDIRECTING_REASON_UNCONDITIONAL, "unconditional" },
{ AST_REDIRECTING_REASON_TIME_OF_DAY, "time-of-day" },
{ AST_REDIRECTING_REASON_DO_NOT_DISTURB, "do-not-disturb" },
{ AST_REDIRECTING_REASON_FOLLOW_ME, "follow-me" },
{ AST_REDIRECTING_REASON_OUT_OF_ORDER, "out-of-service" },
/* *INDENT-ON* */
};
@@ -1232,7 +1241,7 @@ const char *ast_redirecting_reason_describe(int data)
for (index = 0; index < ARRAY_LEN(redirecting_reason_types); ++index) {
if (redirecting_reason_types[index].value == data) {
return redirecting_reason_types[index].description;
return redirecting_reason_types[index].description ?: "Redirecting reason alias-bug";
}
}