[Home]

Summary:ASTERISK-25160: [patch] Opus Codec: SIP/SDP line fmtp missing when called internally
Reporter:Alexander Traud (traud)Labels:
Date Opened:2015-06-15 05:14:13Date Closed:2015-11-17 14:37:31.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:Channels/chan_sip/CodecHandling
Versions:13.6.0 Frequency of
Occurrence
Related
Issues:
cannot be resolved before completion ofASTERISK-25535 [patch] format creation on module load instead of cache
Environment:Attachments:( 0) A_generate_sdp_fmtp_always.patch
( 1) B_register_interface_with_cached.patch
Description:Sometimes, Asterisk does not send a line {{x=fmtp:y}} while negotiating the formats via SIP/SDP. This affects all formats with an attribute module like H.263, H.264, and Opus {{res/res_format_attr_opus.c}}.

This happens, because {{ast_format_generate_sdp_fmtp}} is called with a format without an attribute module (variable {{interface}} is NULL). This happens, because such a format was created before its attribute module got registered. This happens for

I) cached formats: main » ast_codec_builtin_init » CODEC_REGISTER_AND_CACHE » ast_format_create | ast_format_cache_set » set_cached_format

II) local capabilities: main » ast_local_init » ast_format_cap_append_by_type » ast_format_create

Steps to reproduce:
# {{make install samples}}
# edit the configuration file {{sip.conf}} to allow {{opus}}
# dial echo-test extension (600)

*Question to the Asterisk team:*
Why are format-attribute modules loaded so late, after channels are loaded?
Comments:By: Alexander Traud (traud) 2015-06-15 05:53:27.153-0500

This is marked as a minor bug, because I do not know a scenario when this bug is noticed by an end-user. The mentioned formats are pass-through only, yet and do not work for local extensions. Even when used with the transcoding module for the [Opus Codec |https://github.com/seanbright/opus], this does not affect end-users, because {{fmtp}} is ignored with that module. However, this is an issue in my transcoding modules for [iLBC 20|https://github.com/traud/asterisk-ilbc], [SILK|https://github.com/traud/asterisk-silk], and [AMR(-WB)|https://github.com/traud/asterisk-amr]. Those modules require a working {{fmtp}} even for local extensions.

Patch A does not solve the actual cause but avoids this situation. I do not like this approach, because not just "generate" but "joint" and "compare" could be affected by this bug as well. Nevertheless, joint/compare did not misbehave for me, yet.

Patch B solves the actual cause. At least for cached formats (type I). I was not able to create a scenario with a format from type II. Therefore, patch B does not include that part. Instead, this is the topic of ASTERISK-25535.

By: Rusty Newton (rnewton) 2015-06-17 08:57:58.159-0500

Once you've followed the Code Review process [1] and submitted your code to Gerrit [2] be sure to edit this JIRA issue and add the Gerrit review URL in the appropriate field.

Thanks!

[1] https://wiki.asterisk.org/wiki/display/AST/Code+Review
[2] https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage





By: Rusty Newton (rnewton) 2015-06-17 08:58:49.230-0500

I recommend submitting at least patch B to Gerrit to get peer review of it and push it through the process.

By: Alexander Traud (traud) 2015-07-10 07:39:08.775-0500

The original patch B created a fuzz when being applied. Fixed.

By: Alexander Traud (traud) 2015-11-11 07:11:46.497-0600

Previously, this issue had as topic {{rtpmap}}. This was wrong. Not the {{rtpmap}} but {{fmtp}} is missing.