[asterisk-commits] main/app.c: Transmit Silence on ControlPlayback pause (asterisk[13])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Nov 21 04:46:43 CST 2016
Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/4396 )
Change subject: main/app.c: Transmit Silence on ControlPlayback pause
......................................................................
main/app.c: Transmit Silence on ControlPlayback pause
ASTERISK-26562 #close
Change-Id: Ie6cb0ffc2b8c775639ce7784fe96f4ea00cfa2f8
---
M main/app.c
1 file changed, 10 insertions(+), 0 deletions(-)
Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, approved
diff --git a/main/app.c b/main/app.c
index a89e5b0..58aa3a0 100644
--- a/main/app.c
+++ b/main/app.c
@@ -1073,6 +1073,7 @@
int res;
long pause_restart_point = 0;
long offset = 0;
+ struct ast_silence_generator *silgen = NULL;
if (!file) {
return -1;
@@ -1161,6 +1162,10 @@
if ((suspend && strchr(suspend, res)) || res == AST_CONTROL_STREAM_SUSPEND) {
pause_restart_point = ast_tellstream(ast_channel_stream(chan));
+
+ if (ast_opt_transmit_silence) {
+ silgen = ast_channel_start_silence_generator(chan);
+ }
ast_test_suite_event_notify("PLAYBACK","Channel: %s\r\n"
"Control: %s\r\n",
ast_channel_name(chan),
@@ -1174,6 +1179,11 @@
break;
}
}
+ if (silgen) {
+ ast_channel_stop_silence_generator(chan, silgen);
+ silgen = NULL;
+ }
+
if ((suspend && (res == *suspend)) || res == AST_CONTROL_STREAM_SUSPEND) {
res = 0;
ast_test_suite_event_notify("PLAYBACK","Channel: %s\r\n"
--
To view, visit https://gerrit.asterisk.org/4396
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie6cb0ffc2b8c775639ce7784fe96f4ea00cfa2f8
Gerrit-PatchSet: 5
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Mikheili Dautashvili <mishadaut at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
More information about the asterisk-commits
mailing list