[asterisk-bugs] [JIRA] (ASTERISK-27850) [patch] rtp_engine: Allow Media Formats with add_static_payload(-1) on egress again.

Alexander Traud (JIRA) noreply at issues.asterisk.org
Fri May 11 06:46:56 CDT 2018


Alexander Traud created ASTERISK-27850:
------------------------------------------

             Summary: [patch] rtp_engine: Allow Media Formats with add_static_payload(-1) on egress again.
                 Key: ASTERISK-27850
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27850
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Core/RTP
    Affects Versions: 15.4.0
         Environment: SiLK downloaded via menuselect and/or
Codec 2 enabled via libcodec2-dev(el)
            Reporter: Alexander Traud
         Attachments: rtp_payload.patch

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]



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list