[Asterisk-code-review] chan sip: No rtpmap for static RTP payload IDs in SDP. (asterisk[master])

Alexander Traud asteriskteam at digium.com
Wed Jun 8 02:17:16 CDT 2016


Alexander Traud has uploaded a new change for review.

  https://gerrit.asterisk.org/2965

Change subject: chan_sip: No rtpmap for static RTP payload IDs in SDP.
......................................................................

chan_sip: No rtpmap for static RTP payload IDs in SDP.

This saves around 100 bytes when G.711, G.722, G.729, and GSM are advertised in
SDP. This reduces the chance to hit the MTU bearer of 1300 bytes for SIP over
UDP, if many codecs are allowed in Asterisk. This new feature is enabled
together with the optional feature compactheaders=yes via the file sip.conf.

ASTERISK-25578 #close

Change-Id: I16491b1937862de26f84fa0ffe679a6bab925044
---
M channels/chan_sip.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/65/2965/1

diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 19f8aa3..d44bf8a 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -12996,7 +12996,7 @@
 	/* Opus mandates 2 channels in rtpmap */
 	if (ast_format_cmp(format, ast_format_opus) == AST_FORMAT_CMP_EQUAL) {
 		ast_str_append(a_buf, 0, "a=rtpmap:%d %s/%u/2\r\n", rtp_code, mime, rate);
-	} else {
+	} else if ((35 <= rtp_code) || !(sip_cfg.compactheaders)) {
 		ast_str_append(a_buf, 0, "a=rtpmap:%d %s/%u\r\n", rtp_code, mime, rate);
 	}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I16491b1937862de26f84fa0ffe679a6bab925044
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Alexander Traud <pabstraud at compuserve.com>



More information about the asterisk-code-review mailing list