mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-13 07:45:26 +00:00
fix dtmf issue with jb on
This commit is contained in:
parent
a971e7de70
commit
90e58696fe
@ -174,6 +174,7 @@ struct switch_rtp {
|
||||
void *private_data;
|
||||
uint32_t ts;
|
||||
uint32_t last_write_ts;
|
||||
uint32_t last_read_ts;
|
||||
uint32_t last_write_samplecount;
|
||||
uint32_t next_write_samplecount;
|
||||
switch_time_t last_write_timestamp;
|
||||
@ -2183,21 +2184,23 @@ static switch_status_t read_rtp_packet(switch_rtp_t *rtp_session, switch_size_t
|
||||
rtp_session->stats.inbound.packet_count++;
|
||||
}
|
||||
|
||||
if (*bytes != 0 && !rtp_session->jb) {
|
||||
if ((rtp_session->recv_te && rtp_session->recv_msg.header.pt == rtp_session->recv_te) ||
|
||||
*bytes < rtp_header_len ||
|
||||
switch_test_flag(rtp_session, SWITCH_RTP_FLAG_PROXY_MEDIA) || switch_test_flag(rtp_session, SWITCH_RTP_FLAG_UDPTL)) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if ((rtp_session->recv_te && rtp_session->recv_msg.header.pt == rtp_session->recv_te) ||
|
||||
(*bytes < rtp_header_len && *bytes > 0) ||
|
||||
switch_test_flag(rtp_session, SWITCH_RTP_FLAG_PROXY_MEDIA) || switch_test_flag(rtp_session, SWITCH_RTP_FLAG_UDPTL)) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
rtp_session->last_read_ts = ntohl(rtp_session->recv_msg.header.ts);
|
||||
|
||||
if (rtp_session->jb && rtp_session->recv_msg.header.version == 2 && *bytes) {
|
||||
if (rtp_session->recv_msg.header.m && rtp_session->recv_msg.header.pt != rtp_session->recv_te &&
|
||||
!switch_test_flag(rtp_session, SWITCH_RTP_FLAG_VIDEO) && !(rtp_session->rtp_bugs & RTP_BUG_IGNORE_MARK_BIT)) {
|
||||
stfu_n_reset(rtp_session->jb);
|
||||
}
|
||||
|
||||
stfu_n_eat(rtp_session->jb, ntohl(rtp_session->recv_msg.header.ts),
|
||||
stfu_n_eat(rtp_session->jb, rtp_session->last_read_ts,
|
||||
rtp_session->recv_msg.header.pt,
|
||||
rtp_session->recv_msg.body, *bytes - rtp_header_len, rtp_session->timer.samplecount);
|
||||
*bytes = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user