Skip to content
Snippets Groups Projects
Commit d13f7d94 authored by Joshua Colp's avatar Joshua Colp
Browse files

Add volume adjustment to spy audiohook in app_chanspy.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 2c2b644c
Branches
Tags
No related merge requests found
...@@ -266,6 +266,15 @@ static int channel_spy(struct ast_channel *chan, struct ast_channel *spyee, int ...@@ -266,6 +266,15 @@ static int channel_spy(struct ast_channel *chan, struct ast_channel *spyee, int
start_spying(spyee, chan, &csth.whisper_audiohook); 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)) if (ast_test_flag(flags, OPTION_PRIVATE))
silgen = ast_channel_start_silence_generator(chan); silgen = ast_channel_start_silence_generator(chan);
else else
...@@ -341,6 +350,10 @@ static int channel_spy(struct ast_channel *chan, struct ast_channel *spyee, int ...@@ -341,6 +350,10 @@ static int channel_spy(struct ast_channel *chan, struct ast_channel *spyee, int
if (*volfactor > 4) if (*volfactor > 4)
*volfactor = -4; *volfactor = -4;
ast_verb(3, "Setting spy volume on %s to %d\n", chan->name, *volfactor); 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;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment