Skip to content

Commit

Permalink
rtpproxy: ignore unknown payload type media streams
Browse files Browse the repository at this point in the history
Thanks go to @wangduanduan for reporting and providing troubleshoot info
  • Loading branch information
razvancrainea committed Aug 3, 2020
1 parent d99262e commit dba53d8
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions modules/rtpproxy/rtpproxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1810,8 +1810,9 @@ extract_mediainfo(str *body, str *mediaport, str *payload_types)
payload_types->s = cp;
return 0;
}
LM_INFO("unsupported ptype [%.*s]\n", ptype.len, ptype.s);
/* Unproxyable protocol type. Generally it isn't error. */
return -1;
return 1;
}

static int alter_rtcp(struct sip_msg *msg,str * body1, str *newip, int newpf ,str* newport,
Expand Down Expand Up @@ -3795,9 +3796,14 @@ int force_rtp_proxy_body(struct sip_msg* msg, struct force_rtpp_args *args,
}
tmpstr1.s = m1p;
tmpstr1.len = m2p - m1p;
if (extract_mediainfo(&tmpstr1, &oldport, &payload_types) == -1) {
LM_ERR("can't extract media port from the message\n");
goto error;
switch (extract_mediainfo(&tmpstr1, &oldport, &payload_types)) {
case -1:
LM_ERR("can't extract media port from the message\n");
goto error;
case 0:
break;
case 1:
continue;
}
++medianum;

Expand Down

0 comments on commit dba53d8

Please sign in to comment.