[asterisk-dev] Avoid audio loss in ChanSpy (ref: ASTERISK-25866)

Tomec Martin tomec at ipex.cz
Fri Apr 1 08:11:03 CDT 2016


-----Original Message-----
From: asterisk-dev-bounces at lists.digium.com [mailto:asterisk-dev-bounces at lists.digium.com] On Behalf Of Joshua Colp
Sent: Friday, April 01, 2016 2:01 PM
To: Asterisk Developers Mailing List
Subject: Re: [asterisk-dev] Avoid audio loss in ChanSpy (ref: ASTERISK-25866)
	
	Jean Aunis wrote:
	> Hello,
	>
	> As described in the issue ASTERISK-25866
	> <https://issues.asterisk.org/jira/browse/ASTERISK-25866>, it appears
	> that ChanSpy is randomly loosing audio frames, because it sets the flags
	> AST_AUDIOHOOK_TRIGGER_SYNC and AST_AUDIOHOOK_SMALL_QUEUE when creating
	> the audiohook: these option cause the audiohook's queue to be flushed of
	> "old" frames at very short intervals.
	>
	> I have submitted a patch on gerrit which does two things :
	> 1- do not set the flag AST_AUDIOHOOK_TRIGGER_SYNC if ChanSpy has been
	> called with the option "o": in this case we only listen to the audio
	> coming from this channel so this flag is useless
	> 2- create a new option "l" which prevents the flag
	> AST_AUDIOHOOK_SMALL_QUEUE from being set. I find it better than just
	> removing the flag in all cases, because this may introduce some delay in
	> the audio, which may not be acceptable for many ChanSpy users.
	>
	> What do you think of the idea ?
	
	I think this is fine, provided there is still some high ceiling value. 
	Allowing a queue to potentially grow out of control would be bad.
	
	I think if we were able to switch things to using a timer instead we 
	could actually get rid of this synchronization. It exists because it has 
	to bring together two directions and then provide the media.
	

Hello,
it seems to be related with issue ASTERISK-25734. 
If I understand it correctly, AST_AUDIOHOOK_SYNC_TOLERANCE and 
AST_AUDIOHOOK_SMALL_QUEUE_TOLERANCE are both set to 100ms. So I dont know 
if unsetting AST_AUDIOHOOK_SMALL_QUEUE can help. 
Does it make sense to increase AST_AUDIOHOOK_SYNC_TOLERANCE (e.g. to 500ms)?

Kind Regards
Martin Tomec



More information about the asterisk-dev mailing list