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
This commit is contained in:
Alexander Traud
2018-05-11 14:10:51 +02:00
parent 6773ea9e39
commit 919b0eb3f2

View File

@@ -1545,7 +1545,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;
}
}