func_callerid: Emit warning if invalid redirecting reason set.

Emit a warning if REDIRECTING(reason) is set to an invalid
reason, consistent with what happens when
REDIRECTING(orig-reason) is set to an invalid reason.

Resolves: #683
(cherry picked from commit 9ba6875a3f)
This commit is contained in:
Naveen Albert
2024-04-01 17:24:13 -04:00
committed by Asterisk Development Team
parent 01a5a93530
commit 7d272b285a

View File

@@ -1716,6 +1716,7 @@ static int redirecting_write(struct ast_channel *chan, const char *cmd, char *da
* reason, so we can just set the reason string to what was given and set the
* code to be unknown
*/
ast_log(LOG_WARNING, "Unknown redirecting reason '%s', defaulting to unknown\n", val);
redirecting.reason.code = AST_REDIRECTING_REASON_UNKNOWN;
redirecting.reason.str = val;
set_it(chan, &redirecting, NULL);