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

Jean Aunis jean.aunis at prescom.fr
Fri Apr 1 01:36:00 CDT 2016


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 ?

Best regards,

Jean Aunis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20160401/017c5112/attachment.html>


More information about the asterisk-dev mailing list