[Home]

Summary:ASTERISK-27850: [patch] rtp_engine: Allow Media Formats with add_static_payload(-1) on egress again.
Reporter:Alexander Traud (traud)Labels:patch pjsip
Date Opened:2018-05-11 06:46:19Date Closed:2018-05-18 16:35:26
Priority:MajorRegression?
Status:Closed/CompleteComponents:Core/RTP
Versions:15.4.0 Frequency of
Occurrence
Related
Issues:
Environment:SiLK downloaded via menuselect and/or Codec 2 enabled via libcodec2-dev(el)Attachments:( 0) rtp_payload.patch
Description:In SIP/SDP, the amount of RTP payload IDs is rather short, especially when a lot of media formats are allowed/enabled by the underlying SIP channel. Previously, Asterisk worked with a static list. However in Asterisk 14, with the addition of SiLK and Codec 2, the IDs got near to depleted. Therefore, those formats are added only when their transcoding modules are loaded. This happens via {{ast_rtp_engine_load_format(...)}} which calls {{add_static_payload(-1, ...)}}. Therefore internally, the SDP payload ID for those formats is -1.

Then, ASTERISK-26515 added the ability to re-use empty IDs in the current payload. For example, when iLBC is not allowed, ID 97 can be re-used. However, because of a typo, this does not work and the -1 is not re-assigned. This issue affects only installations with {{rtp_use_dynamic=yes}} in the configuration file {{asterisk.conf}}, which is the default since Asterisk 15. Therefore, one workaround is to go for {{rtp_use_dynamic=no}}.

For chan_sip, the backtrace is:
add_codec_to_sdp
→ ast_rtp_codecs_payload_code
→ → rtp_codecs_assign_payload_code_rx

For chan_pjsip, the backtrace is:
create_outgoing_sdp_stream
→ ast_rtp_codecs_payload_code
→ → rtp_codecs_assign_payload_code_rx
and even emits a warning: {{Unable to get rtp codec payload code for ...}}.

The patch was tested with SiLK, Codec 2, 3GPP EVS, AMR, AMR-WB, and GSM-EFR enabled:
* rtp_pt_dynamic=35, rtp_use_dynamic=yes (default of Asterisk 15)
* rtp_pt_dynamic=35, rtp_use_dynamic=no
* rtp_pt_dynamic=96, rtp_use_dynamic=no (default of Asterisk 13)
Now, all those test cases behave as expected.

This issue was found [downstream...|https://github.com/traud/asterisk-amr/issues/12]
Comments:By: Asterisk Team (asteriskteam) 2018-05-11 06:46:20.501-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: Friendly Automation (friendly-automation) 2018-05-18 16:35:27.131-0500

Change 8969 merged by Jenkins2:
rtp_engine: Allow Media Formats with add_static_payload(-1) on egress again.

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

By: Friendly Automation (friendly-automation) 2018-05-18 16:43:27.880-0500

Change 8968 merged by Kevin Harwell:
rtp_engine: Allow Media Formats with add_static_payload(-1) on egress again.

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