]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_dial.c: Only send DTMF on first progress event.
authorSean Bright <sean.bright@gmail.com>
Sat, 6 Mar 2021 22:57:02 +0000 (17:57 -0500)
committerJoshua Colp <jcolp@sangoma.com>
Wed, 10 Mar 2021 10:23:11 +0000 (04:23 -0600)
ASTERISK-29329 #close

Change-Id: Ic58e7a17f1ff3f785a5b21dced88682581149601

apps/app_dial.c

index e384b6da97f9136ba607e6efbf022fc342dc1d8d..d611083d9a66f0e4c4a6d865528bb397bbc2c55b 100644 (file)
@@ -1559,12 +1559,14 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
                                                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;