[Asterisk-code-review] app_dial.c: Only send DTMF on first progress event. (asterisk[master])

Sean Bright asteriskteam at digium.com
Sun Mar 7 09:54:20 CST 2021


Sean Bright has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/15576 )


Change subject: app_dial.c: Only send DTMF on first progress event.
......................................................................

app_dial.c: Only send DTMF on first progress event.

ASTERISK-29329 #close

Change-Id: Ic58e7a17f1ff3f785a5b21dced88682581149601
---
M apps/app_dial.c
1 file changed, 8 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/76/15576/1

diff --git a/apps/app_dial.c b/apps/app_dial.c
index e384b6d..d611083 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1559,12 +1559,14 @@
 						ast_channel_stage_snapshot_done(in);
 						ast_channel_unlock(in);
 						sent_progress = 1;
-					}
-					if (!ast_strlen_zero(dtmf_progress)) {
-						ast_verb(3,
-							"Sending DTMF '%s' to the called party as result of receiving a PROGRESS message.\n",
-							dtmf_progress);
-						ast_dtmf_stream(c, in, dtmf_progress, 250, 0);
+
+						if (!ast_strlen_zero(dtmf_progress)) {
+							ast_verb(3,
+								"Sending DTMF '%s' to the called party as result of "
+								"receiving a PROGRESS message.\n",
+								dtmf_progress);
+							ast_dtmf_stream(c, in, dtmf_progress, 250, 0);
+						}
 					}
 					ast_channel_publish_dial(in, c, NULL, "PROGRESS");
 					break;

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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ic58e7a17f1ff3f785a5b21dced88682581149601
Gerrit-Change-Number: 15576
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210307/00490ebe/attachment.html>


More information about the asterisk-code-review mailing list