[asterisk-bugs] [JIRA] (ASTERISK-26562) Transmit Silence on ControlPlayback pause
Mikheili Dautashvili (JIRA)
noreply at issues.asterisk.org
Mon Nov 7 05:50:10 CST 2016
Mikheili Dautashvili created ASTERISK-26562:
-----------------------------------------------
Summary: Transmit Silence on ControlPlayback pause
Key: ASTERISK-26562
URL: https://issues.asterisk.org/jira/browse/ASTERISK-26562
Project: Asterisk
Issue Type: Improvement
Security Level: None
Components: Applications/app_controlplayback
Affects Versions: 13.12.1
Environment: Debian jessie/sid
Reporter: Mikheili Dautashvili
It's a good idea if Asterisk would be able to transmit silence when pausing ControlPlayback application.
Currently it stops transmiting RTP stream, though transmit_silence = yes is enabled in asterisk.conf
Tested only for 13.12.1 version.
Bellow is a patch that fix this issue.
{code}
--- app.c.orig 2016-11-07 06:14:26.017973000 -0500
+++ app.c 2016-11-07 06:06:13.889973000 -0500
@@ -1074,6 +1074,8 @@
long pause_restart_point = 0;
long offset = 0;
+ struct ast_silence_generator *silgen = NULL;
+
if (!file) {
return -1;
}
@@ -1161,6 +1163,9 @@
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),
@@ -1171,6 +1176,9 @@
continue;
} else if (res == -1 || (suspend && strchr(suspend, res)) || (stop && strchr(stop, res))
|| res == AST_CONTROL_STREAM_SUSPEND || res == AST_CONTROL_STREAM_STOP) {
+ if (silgen) {
+ ast_channel_stop_silence_generator(chan, silgen);
+ }
break;
}
}
{code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list