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

N A asteriskteam at digium.com
Thu Jun 10 09:36:21 CDT 2021


N A has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/16063 )


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(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/63/16063/1

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/+/16063
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ieea4a67301c6ea83bbc7690c1d4808d79a704594
Gerrit-Change-Number: 16063
Gerrit-PatchSet: 1
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210610/ea40fee7/attachment-0001.html>


More information about the asterisk-code-review mailing list