From: Alexander Traud Date: Fri, 11 May 2018 12:10:51 +0000 (+0200) Subject: rtp_engine: Allow Media Formats with add_static_payload(-1) on egress again. X-Git-Tag: 15.5.0-rc1~63^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a36d45bdcb27d3c03005567b2885b7ec471aefa5;p=thirdparty%2Fasterisk.git rtp_engine: Allow Media Formats with add_static_payload(-1) on egress again. This issue affected only installations with rtp_use_dynamic=yes in asterisk.conf which is the default since Asterisk 15. Codec 2 and SiLK were built-in examples of media formats which were affected. ASTERISK-27850 Reported by: Dinis Brazão, Selene Feigl Change-Id: I08c1e76433a67e4350141d38cacf3a1cb5086496 --- diff --git a/main/rtp_engine.c b/main/rtp_engine.c index 5242e811df..c550251007 100644 --- a/main/rtp_engine.c +++ b/main/rtp_engine.c @@ -1539,7 +1539,7 @@ static int rtp_codecs_assign_payload_code_rx(struct ast_rtp_codecs *codecs, int if (!explicit) { payload = find_static_payload_type(asterisk_format, format, code); - if (payload < 0 && (!asterisk_format || ast_option_rtpusedynamic)) { + if (payload < 0 && (!asterisk_format || !ast_option_rtpusedynamic)) { return payload; } }