diff options
author | mogorman <mogorman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-14 00:32:30 +0000 |
---|---|---|
committer | mogorman <mogorman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-14 00:32:30 +0000 |
commit | 61820f0d594aca5a06552086ffbcbcaa66db8ddf (patch) | |
tree | d303f4edafaacbe64038bf0a496d804bfbce0e52 /channel.c | |
parent | 2de7198c70efb87d9dcc8955e381e8056d0e39d9 (diff) |
added feature for pausing and unpausing the
monitor app from manager and in the call through
features.conf bug 5395 for the patch
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8070 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rw-r--r-- | channel.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -1899,8 +1899,10 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio) } else chan->insmpl += f->samples; #endif - if (ast_writestream(chan->monitor->read_stream, f) < 0) - ast_log(LOG_WARNING, "Failed to write data to channel monitor read stream\n"); + if (chan->monitor->state == AST_MONITOR_RUNNING) { + if (ast_writestream(chan->monitor->read_stream, f) < 0) + ast_log(LOG_WARNING, "Failed to write data to channel monitor read stream\n"); + } } if (chan->readtrans) { f = ast_translate(chan->readtrans, f, 1); @@ -2260,8 +2262,10 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr) } else chan->outsmpl += f->samples; #endif - if (ast_writestream(chan->monitor->write_stream, f) < 0) - ast_log(LOG_WARNING, "Failed to write data to channel monitor write stream\n"); + if (chan->monitor->state == AST_MONITOR_RUNNING) { + if (ast_writestream(chan->monitor->write_stream, f) < 0) + ast_log(LOG_WARNING, "Failed to write data to channel monitor write stream\n"); + } } res = chan->tech->write(chan, f); |