[Asterisk-code-review] func_callerid: Warn about invalid	redirecting reason. (asterisk[20])
    N A 
    asteriskteam at digium.com
       
    Fri Nov 25 18:15:52 CST 2022
    
    
  
N A has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/19582 )
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(-)
  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/82/19582/1
diff --git a/funcs/func_callerid.c b/funcs/func_callerid.c
index 64aeffc..54f9d32 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_ERROR, "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/+/19582
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 20
Gerrit-Change-Id: Ic341f5d5f7303b6f1115549be64db58a85944f5a
Gerrit-Change-Number: 19582
Gerrit-PatchSet: 1
Gerrit-Owner: N A <asterisk at phreaknet.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20221126/a970d42e/attachment.html>
    
    
More information about the asterisk-code-review
mailing list