aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_chanspy.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-26 20:11:44 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-26 20:11:44 +0000
commitbb65c259b49272966c1bf4b9a911e2a486d2a565 (patch)
tree2cffaaf05b8f928ad1e0e145671db59b398d8a6f /apps/app_chanspy.c
parent69afb37ae6d05cbee5cfe34850e442c7318091f6 (diff)
Merged revisions 43695 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r43695 | file | 2006-09-26 16:09:41 -0400 (Tue, 26 Sep 2006) | 2 lines Slight overhaul of the whisper support. 1. We need to duplicate the frame from ast_translate 2. We need to ensure we always have signed linear coming in for signed linear combining. 3. We need to ensure we are always feeding signed linear out. 4. Properly store and restore write format when beeping on the channel we are whispering on. 5. Properly discontinue the stream on the channel for the beep. (issue #8019 reported by timkelly1980) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43696 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_chanspy.c')
-rw-r--r--apps/app_chanspy.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c
index 01adbacbe..e001b4b33 100644
--- a/apps/app_chanspy.c
+++ b/apps/app_chanspy.c
@@ -277,8 +277,10 @@ static int channel_spy(struct ast_channel *chan, struct ast_channel *spyee, int
if (ast_test_flag(flags, OPTION_WHISPER)) {
struct ast_filestream *beepstream;
+ int old_write_format = 0;
ast_channel_whisper_start(csth.spy.chan);
+ old_write_format = chan->writeformat;
if ((beepstream = ast_openstream_full(chan, "beep", chan->language, 1))) {
struct ast_frame *f;
@@ -288,7 +290,10 @@ static int channel_spy(struct ast_channel *chan, struct ast_channel *spyee, int
}
ast_closestream(beepstream);
+ chan->stream = NULL;
}
+ if (old_write_format)
+ ast_set_write_format(chan, old_write_format);
}
if (ast_test_flag(flags, OPTION_PRIVATE))