Skip to content

Commit 48116ab

Browse files
committed
app_wrappers: Indicate progress before playing any tones on failure.
If the line rings, we don't need to do anything special, but we indicate progress explicitly on the other path, since some devices may need this if no "Progress" was encountered prior to this application.
1 parent da3e23c commit 48116ab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/app_wrappers.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ static int dial_exec(struct ast_channel *chan, const char *data)
104104
}
105105

106106
if (ts) {
107-
int res = ast_playtones_start(chan, 0, ts->data, 0);
107+
int res;
108+
ast_indicate(chan, AST_CONTROL_PROGRESS); /* In case no progress has been sent yet, send it now so audio passes reliably */
109+
res = ast_playtones_start(chan, 0, ts->data, 0);
108110
ts = ast_tone_zone_sound_unref(ts);
109111
if (res) {
110112
ast_log(LOG_WARNING, "Unable to start tones on channel %s\n", ast_channel_name(chan));

0 commit comments

Comments
 (0)