]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
func_callerid: Warn about invalid redirecting reason.
authorNaveen Albert <asterisk@phreaknet.org>
Sat, 26 Nov 2022 00:03:57 +0000 (00:03 +0000)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Tue, 20 Dec 2022 14:46:23 +0000 (08:46 -0600)
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

funcs/func_callerid.c

index 64aeffcc4b892f954ff410ef2520fc3f852d303b..448f54696d34a2f1804fec0ace1d4651cbf23b72 100644 (file)
@@ -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);