diff options
author | Jeff Peeler <jpeeler@digium.com> | 2009-10-15 15:57:14 +0000 |
---|---|---|
committer | Jeff Peeler <jpeeler@digium.com> | 2009-10-15 15:57:14 +0000 |
commit | a39f3a7521bebed699c91346d4e72d26388042ab (patch) | |
tree | 4d696dff3fd1f7735b7cdb03dad2b760da41f309 /apps | |
parent | fb1433f43f39e73f08004276aa41b0d403a3bb8a (diff) |
Readd removed ability to allow listening to one side of the call in app_chanspy
(Option o)
(closes issue #15675)
Reported by: john8675309
Patches:
issue15675patchtrunk.txt uploaded by dbrooks (license 790)
Tested by: jgutierrez on users list:
http://lists.digium.com/pipermail/asterisk-users/2009-October/239155.html
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@224178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_chanspy.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index 553cfb4ff..c781f37a6 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -435,7 +435,12 @@ static int spy_generate(struct ast_channel *chan, void *data, int len, int sampl return -1; } - f = ast_audiohook_read_frame(&csth->spy_audiohook, samples, AST_AUDIOHOOK_DIRECTION_BOTH, AST_FORMAT_SLINEAR); + if (ast_test_flag(chan, OPTION_READONLY)) { + /* Option 'o' was set, so don't mix channel audio */ + f = ast_audiohook_read_frame(&csth->spy_audiohook, samples, AST_AUDIOHOOK_DIRECTION_READ, AST_FORMAT_SLINEAR); + } else { + f = ast_audiohook_read_frame(&csth->spy_audiohook, samples, AST_AUDIOHOOK_DIRECTION_BOTH, AST_FORMAT_SLINEAR); + } ast_audiohook_unlock(&csth->spy_audiohook); |