diff options
author | Alexander Traud <pabstraud@compuserve.com> | 2016-06-08 09:11:40 +0200 |
---|---|---|
committer | Alexander Traud <pabstraud@compuserve.com> | 2016-06-08 09:13:01 +0200 |
commit | 784c18128b4b96c9993e7cfff93a70b75096762c (patch) | |
tree | 383c3f6291d2a816a2ce2a9b1c04c842925d1307 | |
parent | 33787459c3400ccf8c52361e0c15a8b450d2285d (diff) |
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
-rw-r--r-- | channels/chan_sip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 19f8aa308..d44bf8a83 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -12996,7 +12996,7 @@ static void add_codec_to_sdp(const struct sip_pvt *p, /* 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); } |