[Home]

Summary:ASTERISK-26419: audiohooks: Remove redundant codec translations when using audiohooks
Reporter:Michael Walton (mike@farsouthnet.com)Labels:
Date Opened:2016-09-28 12:43:45Date Closed:2017-03-03 06:18:33.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/Channels Core/General
Versions:11.23.1 13.11.2 14.0.1 Frequency of
Occurrence
Related
Issues:
causesASTERISK-26973 bridge: Crash when freeing frame and snooping
Environment:AllAttachments:
Description:Channel.c currently calls audiohooks and passes channel voice data in its native format. In most cases, the native format is later transcoded to linear for bridging or other dialplan functions. When using audiohooks, e.g. for recording or conference, the required codec translation from native to linear and vice versa is instantiated separately for each hook, alongside the translation required for bridging. This can result in 2 or 3 simultaneous codec translations for a single bridged call, which is very inefficient in terms of CPU usage.

By moving the audiohook location in the read and write functions in channel.c, we can share the expensive codec translation amongst all users of the frame data.
Comments:By: Asterisk Team (asteriskteam) 2016-09-28 12:43:45.967-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: Joshua C. Colp (jcolp) 2016-10-04 12:04:59.111-0500

Same here.

By: Michael Walton (mike@farsouthnet.com) 2016-10-09 15:41:35.945-0500

I have added the patch on Gerrit: [https://gerrit.asterisk.org/4024]

By: Friendly Automation (friendly-automation) 2017-06-07 08:00:20.139-0500

Change 5757 merged by Jenkins2:
channel: ast_write frame wrongly freed after call to audiohooks

[https://gerrit.asterisk.org/5757|https://gerrit.asterisk.org/5757]

By: Friendly Automation (friendly-automation) 2017-06-07 08:08:44.588-0500

Change 5759 merged by Jenkins2:
channel: ast_write frame wrongly freed after call to audiohooks

[https://gerrit.asterisk.org/5759|https://gerrit.asterisk.org/5759]

By: Friendly Automation (friendly-automation) 2017-06-07 08:13:14.408-0500

Change 5758 merged by Joshua Colp:
channel: ast_write frame wrongly freed after call to audiohooks

[https://gerrit.asterisk.org/5758|https://gerrit.asterisk.org/5758]