提交 7c32c0de authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-9739 #resolve [switch_rtp mistakes "ffffffff" for a new DTMF and Queue's a NULL digit]

上级 b23f4bba
......@@ -579,6 +579,9 @@ static handle_rfc2833_result_t handle_rfc2833(switch_rtp_t *rtp_session, switch_
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_ERROR, "Failed DTMF sanity check.\n");
}
if (!bytes) return RESULT_CONTINUE;
/* RFC2833 ... like all RFC RE: VoIP, guaranteed to drive you to insanity!
We know the real rules here, but if we enforce them, it's an interop nightmare so,
we put up with as much as we can so we don't have to deal with being punished for
......@@ -5074,7 +5077,8 @@ static switch_size_t do_flush(switch_rtp_t *rtp_session, int force, switch_size_
reset_jitter_seq(rtp_session);
if (!force) {
if (rtp_session->flags[SWITCH_RTP_FLAG_PROXY_MEDIA] ||
if ((rtp_session->jb && !rtp_session->pause_jb && jb_valid(rtp_session)) ||
rtp_session->flags[SWITCH_RTP_FLAG_PROXY_MEDIA] ||
rtp_session->flags[SWITCH_RTP_FLAG_UDPTL] ||
rtp_session->flags[SWITCH_RTP_FLAG_DTMF_ON]
) {
......@@ -5124,7 +5128,8 @@ static switch_size_t do_flush(switch_rtp_t *rtp_session, int force, switch_size_
int do_cng = 0;
/* Make sure to handle RFC2833 packets, even if we're flushing the packets */
if (bytes > rtp_header_len && rtp_session->last_rtp_hdr.pt == rtp_session->recv_te) {
if (bytes > rtp_header_len && rtp_session->recv_msg.header.version == 2 && rtp_session->recv_msg.header.pt == rtp_session->recv_te) {
rtp_session->last_rtp_hdr = rtp_session->recv_msg.header;
handle_rfc2833(rtp_session, bytes, &do_cng);
#ifdef DEBUG_2833
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "*** RTP packet handled in flush loop %d ***\n", do_cng);
......@@ -5366,7 +5371,8 @@ static switch_status_t read_rtp_packet(switch_rtp_t *rtp_session, switch_size_t
if (!accept_packet && !(rtp_session->rtp_bugs & RTP_BUG_ACCEPT_ANY_PAYLOAD) && !(rtp_session->rtp_bugs & RTP_BUG_ACCEPT_ANY_PACKETS)) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG1,
"Invalid Packet PT:%d ignored\n", rtp_session->last_rtp_hdr.pt);
"Invalid Packet SEQ: %d TS: %d PT:%d ignored\n",
ntohs(rtp_session->recv_msg.header.seq), ntohl(rtp_session->last_rtp_hdr.ts), rtp_session->last_rtp_hdr.pt);
*bytes = 0;
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论