[Home]

Summary:ASTERISK-25247: choppy audio when spying on a g722 channel, chan_sip or chan_pjsip
Reporter:hristo (hristo)Labels:
Date Opened:2015-07-13 06:41:03Date Closed:2015-07-22 13:20:35
Priority:BlockerRegression?Yes
Status:Closed/CompleteComponents:Applications/app_chanspy
Versions:SVN 11.18.0 13.4.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:( 0) g722-spy-choppy-audio.au
( 1) g722-spy-choppy-audio.log
( 2) g722-spy-choppy-audio.pcap
Description:I get choppy audio when spying on a channel, which uses G722. The problem is very easy to replicate with the default asterisk configuration:

- Add {{allow=g722}} to the {{\[general\]}} section in {{sip.conf}}
- Add {{exten => 100,1,ChanSpy()}} in the {{\[demo\]}} context in {{extensions.conf}}
- Configure a phone with G722 only and dial "2" to listen to the demo instructions.
- From another phone dial "100" to spy on the first channel. The spying channel hears the extension announcement just fine. Then the choppy audio starts as soon as the spying channel gets bridged to the first call.

A PCAP capture confirms the audio problems on the spying channel. Initially Asterisk sends one packet of audio every 20 ms (this is the extension announcement prior to spying) then is starts sending one packet every 40-60 ms (starts at packet 1163 in the attached PCAP). It is almost as if it skips every other audio frame. The packet sequence numbers and timestamps however are all correct.

The problem is only present if the spied channel uses G722. The codec of the spying channel doesn't matter. I have tested with different timing modules as well (res_timing_timerfd.so, res_timing_pthread.so and res_timing_dahdi.so), but it doesn't make any difference.

This happens on normal calls too. I am only using the demo instructions announcement here for simplicity.

The problem is not present on asterisk 1.8.x. I am unable to test with any of the newer versions though.

Attaching 3 files:
- g722-spy-choppy-audio.pcap:
-- 172.19.4.238 - Asterisk
-- 192.168.28.135 - Call 1 (G722)
-- 192.168.28.113 - Spy channel
- g722-spy-choppy-audio.log - asterisk debug log
- g722-spy-choppy-audio.au - audio extracted from the pcap capture file that demonstrates the problem.
Comments:By: Asterisk Team (asteriskteam) 2015-07-13 06:41:05.395-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) 2015-07-15 15:02:44.711-0500

Reproduced in Asterisk GIT-13-1aafadf, with chan_sip and chan_pjsip.

By: Rusty Newton (rnewton) 2015-07-22 09:01:06.926-0500

[~jcolp] has a review up https://gerrit.asterisk.org/#/c/946/