[svn-commits] kpfleming: trunk r38466 - /trunk/apps/app_chanspy.c
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Fri Jul 28 16:47:06 MST 2006
Author: kpfleming
Date: Fri Jul 28 18:47:05 2006
New Revision: 38466
URL: http://svn.digium.com/view/asterisk?rev=38466&view=rev
Log:
play a beep tone into the spied-on channel if we are about to whisper to them
Modified:
trunk/apps/app_chanspy.c
Modified: trunk/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_chanspy.c?rev=38466&r1=38465&r2=38466&view=diff
==============================================================================
--- trunk/apps/app_chanspy.c (original)
+++ trunk/apps/app_chanspy.c Fri Jul 28 18:47:05 2006
@@ -291,13 +291,26 @@
return 0;
}
+ if (ast_test_flag(flags, OPTION_WHISPER)) {
+ struct ast_filestream *beepstream;
+
+ ast_channel_whisper_start(csth.spy.chan);
+ if ((beepstream = ast_openstream_full(chan, "beep", chan->language, 1))) {
+ struct ast_frame *f;
+
+ while ((f = ast_readframe(beepstream))) {
+ ast_channel_whisper_feed(csth.spy.chan, f);
+ ast_frfree(f);
+ }
+
+ ast_closestream(beepstream);
+ }
+ }
+
if (ast_test_flag(flags, OPTION_PRIVATE))
silgen = ast_channel_start_silence_generator(chan);
else
ast_activate_generator(chan, &spygen, &csth);
-
- if (ast_test_flag(flags, OPTION_WHISPER))
- ast_channel_whisper_start(csth.spy.chan);
/* We can no longer rely on 'spyee' being an actual channel;
it can be hung up and freed out from under us. However, the
More information about the svn-commits
mailing list