From: Naveen Albert Date: Sat, 26 Nov 2022 00:03:57 +0000 (+0000) Subject: func_callerid: Warn about invalid redirecting reason. X-Git-Tag: 18.17.0-rc1~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=914c8e28c1bb99b8217f93b51ce8f59870350fb6;p=thirdparty%2Fasterisk.git func_callerid: Warn about invalid redirecting reason. Currently, if a user attempts to set a Caller ID related function to an invalid value, a warning is emitted, except for when setting the redirecting reason. We now emit a warning if we were unable to successfully parse the user-provided reason. ASTERISK-30332 #close Change-Id: Ic341f5d5f7303b6f1115549be64db58a85944f5a --- diff --git a/funcs/func_callerid.c b/funcs/func_callerid.c index 64aeffcc4b..448f54696d 100644 --- a/funcs/func_callerid.c +++ b/funcs/func_callerid.c @@ -1611,6 +1611,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.orig_reason.code = AST_REDIRECTING_REASON_UNKNOWN; redirecting.orig_reason.str = val; set_it(chan, &redirecting, NULL);