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

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


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


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/76/9176/1

diff --git a/main/rtp_engine.c b/main/rtp_engine.c
index 44f5104..5a7ec82 100644
--- a/main/rtp_engine.c
+++ b/main/rtp_engine.c
@@ -1281,7 +1281,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/9176
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia865830170fd3f808cdb33104f3d4c4ffdc77570
Gerrit-Change-Number: 9176
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/cbf21cdd/attachment.html>


More information about the asterisk-code-review mailing list