[Asterisk-code-review] rtp: Don't negotiate dynamic codecs using payload. (asterisk[master])

Joshua Colp asteriskteam at digium.com
Tue Jun 12 04:51:48 CDT 2018


Joshua Colp has uploaded this change for review. ( https://gerrit.asterisk.org/9177


Change subject: rtp: Don't negotiate dynamic codecs using payload.
......................................................................

rtp: Don't negotiate dynamic codecs using payload.

In Asterisk there are some dynamic codecs that have
a fixed payload number. This number was being improperly
used to negotiate the codec, instead of using the name
and sample rate. This could result in the wrong payload
number being negotiated for a codec.

This change makes it so that only static payloads
will be negotiated using their payload number.

ASTERISK-27848

Change-Id: Ia865830170fd3f808cdb33104f3d4c4ffdc77570
---
M main/rtp_engine.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/77/9177/1

diff --git a/main/rtp_engine.c b/main/rtp_engine.c
index c11027a..3d50774 100644
--- a/main/rtp_engine.c
+++ b/main/rtp_engine.c
@@ -1287,7 +1287,7 @@
 {
 	struct ast_rtp_payload_type *new_type;
 
-	if (payload < 0 || payload >= AST_RTP_MAX_PT) {
+	if (payload < 0 || payload >= AST_RTP_MAX_PT || payload > AST_RTP_PT_LAST_STATIC) {
 		return;
 	}
 

-- 
To view, visit https://gerrit.asterisk.org/9177
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia865830170fd3f808cdb33104f3d4c4ffdc77570
Gerrit-Change-Number: 9177
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180612/09c22da8/attachment.html>


More information about the asterisk-code-review mailing list