aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_chanspy.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-05-28 14:58:06 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-05-28 14:58:06 +0000
commit6553d7e59eb4189e78cdf2b0110124d6cfd3d29f (patch)
treef9c5b534b283ad8be16b58d087df0d367856bcdf /apps/app_chanspy.c
parent167f60f98e0d52a448225a5234fe58eaf1e4edd5 (diff)
Merged revisions 197537 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r197537 | mmichelson | 2009-05-28 09:49:13 -0500 (Thu, 28 May 2009) | 21 lines Add flags to chanspy audiohook so that audio stays in sync. There are two flags being added to the chanspy audiohook here. One is the pre-existing AST_AUDIOHOOK_TRIGGER_SYNC flag. With this set, we ensure that the read and write slinfactories on the audiohook do not skew beyond a certain tolerance. In addition, there is a new audiohook flag added here, AST_AUDIOHOOK_SMALL_QUEUE. With this flag set, we do not allow for a slinfactory to build up a substantial amount of audio before flushing it. For this particular issue, this means that the person spying on the call will hear the conversations in real time with very little delay in the audio. (closes issue #13745) Reported by: geoffs Patches: 13745.patch uploaded by mmichelson (license 60) Tested by: snblitz ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@197543 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_chanspy.c')
-rw-r--r--apps/app_chanspy.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c
index 580038326..c3d0f901e 100644
--- a/apps/app_chanspy.c
+++ b/apps/app_chanspy.c
@@ -455,6 +455,7 @@ static int start_spying(struct ast_autochan *autochan, const char *spychan_name,
ast_log(LOG_NOTICE, "Attaching %s to %s\n", spychan_name, autochan->chan->name);
+ ast_set_flag(audiohook, AST_AUDIOHOOK_TRIGGER_SYNC | AST_AUDIOHOOK_SMALL_QUEUE);
res = ast_audiohook_attach(autochan->chan, audiohook);
if (!res && ast_test_flag(autochan->chan, AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(autochan->chan))) {