[Home]

Summary:ASTERISK-25866: ChanSpy: allow usage of a long queue to store audio frames, to avoid audio loss
Reporter:Jean Aunis - Prescom (PrescomJA)Labels:
Date Opened:2016-03-25 08:14:47Date Closed:2016-09-23 14:37:13
Priority:MinorRegression?
Status:Closed/CompleteComponents:Applications/app_chanspy
Versions:13.7.2 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:We noticed several times that ChanSpy is randomly losing audio frames, which are not transmitted to the spying party. This is not due to a network issue, as we could prove that Asterisk did not even send these lost frames to the spying peer.

I figured out that these missing frames were actually flushed by the audiohook, because ChanSpy creates its audiohook with the flags AST_AUDIOHOOK_TRIGGER_SYNC and AST_AUDIOHOOK_SMALL_QUEUE.

I suggest two modifications:
# do not set the flag AST_AUDIOHOOK_TRIGGER_SYNC if ChanSpy is called with the option "o", i.e. if we just listen to the incoming audio
# add an option "l" (for Long queue) to ChanSpy: if "l" is set, we do not set the flag AST_AUDIOHOOK_SMALL_QUEUE

As far as I understand, the philosophy of ChanSpy is to spy a channel with a minimum of delay in the audio, at the cost of audio quality. That is why I suggest to add an option instead of just removing the flag.

I made and tested this modification on my own, if you find it valuable I would push it to Gerrit for code review.
Comments:By: Asterisk Team (asteriskteam) 2016-03-25 08:14:48.055-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Rusty Newton (rnewton) 2016-03-25 18:10:31.131-0500

Sounds useful! I recommend going ahead and pushing it onto Gerrit, at the same time make a post on the asterisk dev mailing list to see if others find that it makes sense as well.

New features in 13 also require tests, so that is something that may be required after others take a look at the impact of the feature and changes.

By: Jean Aunis - Prescom (PrescomJA) 2016-03-30 02:10:02.468-0500

Thank you for your feedback, I am going to do that.