[Home]

Summary:ASTERISK-25545: [patch] translation module gets cached not joint format
Reporter:Alexander Traud (traud)Labels:
Date Opened:2015-11-11 06:35:57.000-0600Date Closed:2015-11-24 08:22:53.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:Formats/General
Versions:13.6.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) translate_joint_format.patch
Description:A translation module {{codecs/codec_\*}} has access to a format via
* {{pvt->f.subclass.format}} in {{linto*_new(.)}},
* {{pvt->f.subclass.format}} in {{linto*_frameout(.)}}, and
* {{f->subclass.format}} in {{\*tolin_framein(.)}}.

One would expect this is the joint format, which was negotiated via SDP and created by {{ast_format_joint(.)}}. However currently, this is not the joint but the cached format. The cached format is shared between all connections (even all channels) and does not include the result of the SDP negotiation.

Consequently, if a format includes a translation module {{codecs/codec_\*}} and a format-attribute module {{res/res_format_attr_\*}}, both modules are disconnected currently. The translation module is not able to follow the negotiated (joint) format of the format-attribute module.

This blocks the following formats to work with Asterisk:
* [G.729 Annex B|http://tools.ietf.org/html/rfc4856.html#section-2.1.9]: therefore limited to G.729 Annex A,
* [iLBC 20|https://tools.ietf.org/html/rfc3952#section-5]: therefore limited to iLBC 30,
* [SILK Codec|https://github.com/gaozehua/SILKCodec/blob/master/SILK_SDK_SRC_FIX/doc/SILK_RTP_PayloadFormat.pdf]: attribute {{maxaveragebitrate}},
* [Opus Codec|https://tools.ietf.org/html/rfc7587#section-7.1]: several attributes, including {{maxaveragebitrate}},
* [AMR and AMR-WB|https://tools.ietf.org/html/rfc4867#section-8.3]: several attributes, including {{octet-align}}.

Attached is a patch – technically, one single line of code – which fixes this. With that patch, a translation module receives the joint format created by its format-attribute module. This feature [got lost|https://reviewboard.asterisk.org/r/3775/] with the format changes between Asterisk 12 to Asterisk 13. Therefore, Asterisk 11 is not affected by this. Although none of the mentioned formats are supported as translation module within Asterisk 13, please, consider this change for inclusion.
Comments:By: Rusty Newton (rnewton) 2015-11-11 15:16:47.026-0600

Alex, thanks for filing issues with excellent descriptions and formatting! Of course, thanks for the code contributions as well!