aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-31 17:25:16 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-31 17:25:16 +0000
commit99a3354d8fb683c6a766684d054f8c2eaf56a302 (patch)
tree7c179946ea7f1bffe68d15cfa95d381954c058ef /apps
parent92b46d414c83530b3cb2c1048ec60f52a9ac5250 (diff)
Add volume adjustment to spy audiohook in app_chanspy.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87833 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_chanspy.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c
index bb1510bd2..9aed512cf 100644
--- a/apps/app_chanspy.c
+++ b/apps/app_chanspy.c
@@ -266,6 +266,15 @@ static int channel_spy(struct ast_channel *chan, struct ast_channel *spyee, int
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 @@ static int channel_spy(struct ast_channel *chan, struct ast_channel *spyee, int
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;
}
}