[Asterisk-code-review] pbx_builtins: Corrects SayNumber warning (asterisk[18])

Joshua Colp asteriskteam at digium.com
Tue Jun 15 09:05:46 CDT 2021


Joshua Colp has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/16084 )

Change subject: pbx_builtins: Corrects SayNumber warning
......................................................................

pbx_builtins: Corrects SayNumber warning

Previously, SayNumber always emitted a warning if the caller hung up
during execution. Usually this isn't correct, so check if the channel
hung up and, if so, don't emit a warning.

ASTERISK-29475

Change-Id: Ieea4a67301c6ea83bbc7690c1d4808d79a704594
---
M main/pbx_builtins.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Joshua Colp: Looks good to me, approved; Approved for Submit
  George Joseph: Looks good to me, approved



diff --git a/main/pbx_builtins.c b/main/pbx_builtins.c
index 7f76b97..e370338 100644
--- a/main/pbx_builtins.c
+++ b/main/pbx_builtins.c
@@ -1299,7 +1299,7 @@
 
 	res = ast_say_number(chan, number_val, interrupt ? AST_DIGIT_ANY : "", ast_channel_language(chan), options);
 
-	if (res < 0) {
+	if (res < 0 && !ast_check_hangup_locked(chan)) {
 		ast_log(LOG_WARNING, "We were unable to say the number %s, is it too large?\n", tmp);
 	}
 

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

Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: Ieea4a67301c6ea83bbc7690c1d4808d79a704594
Gerrit-Change-Number: 16084
Gerrit-PatchSet: 3
Gerrit-Owner: N A <mail at interlinked.x10host.com>
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/20210615/12f30073/attachment-0001.html>


More information about the asterisk-code-review mailing list