[asterisk-commits] file: trunk r87833 - /trunk/apps/app_chanspy.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Oct 31 12:25:17 CDT 2007


Author: file
Date: Wed Oct 31 12:25:16 2007
New Revision: 87833

URL: http://svn.digium.com/view/asterisk?view=rev&rev=87833
Log:
Add volume adjustment to spy audiohook in app_chanspy.

Modified:
    trunk/apps/app_chanspy.c

Modified: trunk/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_chanspy.c?view=diff&rev=87833&r1=87832&r2=87833
==============================================================================
--- trunk/apps/app_chanspy.c (original)
+++ trunk/apps/app_chanspy.c Wed Oct 31 12:25:16 2007
@@ -266,6 +266,15 @@
 		start_spying(spyee, chan, &csth.whisper_audiohook);
 	}
 
+	csth.volfactor = *volfactor;
+
+	if (csth.volfactor) {
+		csth.spy_audiohook.options.read_volume = csth.volfactor;
+		csth.spy_audiohook.options.write_volume = csth.volfactor;
+	}
+
+	csth.fd = fd;
+
 	if (ast_test_flag(flags, OPTION_PRIVATE))
 		silgen = ast_channel_start_silence_generator(chan);
 	else
@@ -341,6 +350,10 @@
 			if (*volfactor > 4)
 				*volfactor = -4;
 			ast_verb(3, "Setting spy volume on %s to %d\n", chan->name, *volfactor);
+
+			csth.volfactor = *volfactor;
+			csth.spy_audiohook.options.read_volume = csth.volfactor;
+			csth.spy_audiohook.options.write_volume = csth.volfactor;
 		}
 	}
 




More information about the asterisk-commits mailing list