[Asterisk-code-review] func_callerid: Warn about invalid redirecting reason. (asterisk[master])

Friendly Automation asteriskteam at digium.com
Tue Dec 20 08:46:13 CST 2022


Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/19602 )

Change subject: func_callerid: Warn about invalid redirecting reason.
......................................................................

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
---
M funcs/func_callerid.c
1 file changed, 18 insertions(+), 0 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit




diff --git a/funcs/func_callerid.c b/funcs/func_callerid.c
index 64aeffc..448f546 100644
--- a/funcs/func_callerid.c
+++ b/funcs/func_callerid.c
@@ -1611,6 +1611,7 @@
 			 * 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);

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/19602
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ic341f5d5f7303b6f1115549be64db58a85944f5a
Gerrit-Change-Number: 19602
Gerrit-PatchSet: 3
Gerrit-Owner: N A <asterisk at phreaknet.org>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20221220/464c3628/attachment.html>


More information about the asterisk-code-review mailing list