diff options
author | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-10-15 15:57:49 +0000 |
---|---|---|
committer | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-10-15 15:57:49 +0000 |
commit | 403e5f6e5888e73a2bb563b09b9240dc567afe37 (patch) | |
tree | 58f1367734d4fe22eeec1695e8558d9a82b83c75 /apps | |
parent | 77cb19640842d569889dcbc54d579365f319d033 (diff) |
Merged revisions 224178 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r224178 | jpeeler | 2009-10-15 10:57:14 -0500 (Thu, 15 Oct 2009) | 11 lines
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: http://svn.digium.com/svn/asterisk/branches/1.6.0@224179 f38db490-d61c-443f-a65b-d21fe96a405b
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 dd69a8d3b..baac4e720 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -201,7 +201,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); |