Skip to content

Commit

Permalink
compression: Do not strip "a=rtpmap" lines with types 96-97
Browse files Browse the repository at this point in the history
According to the IANA RTP payload types register, the dynamic payload
types (custom-defined, for which the "a=rtpmap" lines are mandatory and
cannot be stripped) begin at 96, not at 98.

Reported by JP Hindin
  • Loading branch information
liviuchircu committed Aug 1, 2019
1 parent 57cf12d commit f4015c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/compression/compression.c
Expand Up @@ -587,7 +587,7 @@ static mc_whitelist_p mc_dup_whitelist(mc_whitelist_p src)
* 2) Header names with compact forms will be transformed to
* compact form
* 3) Headers which not in whitelist will be removed
* 4) Unnecessary sdp body codec attributes lower than 98 removed
* 4) Unnecessary sdp body codec attributes lower than 96 removed
*/
static int mc_compact(struct sip_msg* msg, mc_whitelist_p wh_list)
{
Expand Down Expand Up @@ -751,7 +751,7 @@ static int mc_compact_cb(char** buf_p, mc_whitelist_p wh_list, int type, int* ol
(buf_cpy++, rtpmap_len++);
}

if (rtpmap_val < 98) {
if (rtpmap_val < 96) {
msg_total_len += frg->end - frg->begin + 1;
frg->next = pkg_malloc(sizeof(body_frag_t));
if (!frg->next)
Expand Down
2 changes: 1 addition & 1 deletion modules/compression/doc/compression_admin.xml
Expand Up @@ -229,7 +229,7 @@ xlog("compression registered\n");
and are not in the whitelist will be removed, headers of same type will be merged
together, separated by ',', header names which have a short form
will be reduced to that short form and SDP rtpmap attribute headers which contain
a value lower than 98 will be removed, because they are not mandatory. Lumps are not
a value lower than 96 will be removed, because they are not mandatory. Lumps are not
affected by this function, because it is applied after all messages changes are
processed.
done.
Expand Down

0 comments on commit f4015c8

Please sign in to comment.