summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorAlexander Traud <pabstraud@compuserve.com>2017-04-10 12:13:39 +0200
committerAlexander Traud <pabstraud@compuserve.com>2017-04-13 11:05:25 +0200
commit72c5f3b0ba40e352fa26eeeead6e72eabd5e7730 (patch)
tree391b7a632d64ff75a1bd72e3de9e9d084a6aad64 /channels/chan_sip.c
parent62386dd1df85d0a9dc8b854836ad77e67bb1d56f (diff)
res_pjsip_sdp_rtp: 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 compact_headers=yes via the file pjsip.conf. ASTERISK-26932 #close Change-Id: Iaa556ab4c8325cd34c334387ab2847fab07b1689
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 5419a1dd8..792df5c38 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -13097,7 +13097,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 if ((35 <= rtp_code) || !(sip_cfg.compactheaders)) {
+ } else if ((AST_RTP_PT_LAST_STATIC < rtp_code) || !(sip_cfg.compactheaders)) {
ast_str_append(a_buf, 0, "a=rtpmap:%d %s/%u\r\n", rtp_code, mime, rate);
}