From 72817707104f1d564c75be5ecd9aa0ce01f38589 Mon Sep 17 00:00:00 2001 From: Jean Aunis Date: Fri, 1 Apr 2016 14:50:30 +0200 Subject: [PATCH] app_chanspy: reduce audio loss on the spying channel. ChanSpy was creating its audiohook with the flags AST_AUDIOHOOK_TRIGGER_SYNC and AST_AUDIOHOOK_SMALL_QUEUE, which caused audio frames to be lost when queues grow too large or when read and write queues go out of sync. Now these flags are set conditionally: - AST_AUDIOHOOK_TRIGGER_SYNC is not set if the option "o" is set - a new option "l" is created: if set, AST_AUDIOHOOK_SMALL_QUEUE will not be set on the audiohook ASTERISK-25866 Change-Id: I9c7652f41d9fa72c8691e4e70ec4fd16b047a4dd --- CHANGES | 7 +++++++ apps/app_chanspy.c | 32 ++++++++++++++++++++++++-------- main/audiohook.c | 5 +++++ 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/CHANGES b/CHANGES index e7f0656f57..56e6315701 100644 --- a/CHANGES +++ b/CHANGES @@ -31,6 +31,13 @@ BridgeAdd * A new application in Asterisk, this will join the calling channel to an existing bridge containing the named channel prefix. +ChanSpy +------------------ + * Added the 'l' option, which forces ChanSpy's audiohook to use a long queue + to store the audio frames. This option is useful if audio loss is + experienced when using ChanSpy, but may introduce some delay in the audio + feed on the listening channel. + ConfBridge ------------------ * Added the ability to pass options to MixMonitor when recording is used with diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index 5dbb0b8603..400eed11a2 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -117,6 +117,10 @@ ASTERISK_REGISTER_FILE() either a single group or a colon-delimited list of groups, such as sales:support:accounting. + +