[Home]

Summary:ASTERISK-29526: G729 audio gets corrupted by Asterisk due to smoother
Reporter:under (under)Labels:patch
Date Opened:2021-07-22 11:19:21Date Closed:2021-08-02 14:10:18
Priority:MajorRegression?Yes
Status:Closed/CompleteComponents:Core/CodecInterface
Versions:16.19.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:( 0) 29526.diff
( 1) rtp.log
Description:If Asterisk gets G.729 6-byte VAD frames inbound, then at outbound Asterisk sends this G.729 stream with non-continuous timestamps (see rtp.log attached).
This makes the audio stream not-playable at the receiver side.
Linphone isn't able to play such an audio - lots of disruptions are heard.
Also I had complains of bad audio from users which use other types of  phones.

After debugging, I found this is a regression connected with RTP Smoother (main/smoother.c).

Smoother has a special code to handle G.729 VAD frames (search for  AST_SMOOTHER_FLAG_G729 in smoother.c).

However, this flag is never set in Asterisk-12 and newer.
Previously it has been set (see Asterisk-11).
Comments:By: Asterisk Team (asteriskteam) 2021-07-22 11:19:24.479-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. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

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].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: under (under) 2021-07-22 11:23:40.125-0500

See lines 2586 and 2589 for example of huge timestamp increase of 2 adjacent frames: from 113624 to 841291496.

By: under (under) 2021-07-22 11:28:23.654-0500

This 1-liner fixes the issue for me

By: Friendly Automation (friendly-automation) 2021-08-02 14:10:20.006-0500

Change 16220 merged by Friendly Automation:
codec_builtin.c: G729 audio gets corrupted by Asterisk due to smoother

[https://gerrit.asterisk.org/c/asterisk/+/16220|https://gerrit.asterisk.org/c/asterisk/+/16220]

By: Friendly Automation (friendly-automation) 2021-08-02 14:16:31.258-0500

Change 16181 merged by Friendly Automation:
codec_builtin.c: G729 audio gets corrupted by Asterisk due to smoother

[https://gerrit.asterisk.org/c/asterisk/+/16181|https://gerrit.asterisk.org/c/asterisk/+/16181]

By: Friendly Automation (friendly-automation) 2021-08-03 07:14:35.681-0500

Change 16242 merged by George Joseph:
codec_builtin.c: G729 audio gets corrupted by Asterisk due to smoother

[https://gerrit.asterisk.org/c/asterisk/+/16242|https://gerrit.asterisk.org/c/asterisk/+/16242]

By: Friendly Automation (friendly-automation) 2021-08-03 07:15:12.385-0500

Change 16241 merged by George Joseph:
codec_builtin.c: G729 audio gets corrupted by Asterisk due to smoother

[https://gerrit.asterisk.org/c/asterisk/+/16241|https://gerrit.asterisk.org/c/asterisk/+/16241]