From 390e6713cce81e6dcc8e94726d34e089aa3d883a Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 7 Mar 2014 02:59:09 +0500 Subject: [PATCH] part of last patch --- src/switch_rtp.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 801fa9a7b8..0fc076ff68 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -660,7 +660,10 @@ static handle_rfc2833_result_t handle_rfc2833(switch_rtp_t *rtp_session, switch_ rtp_session->dtmf_data.in_digit_ts = 0; rtp_session->dtmf_data.in_digit_sanity = 0; rtp_session->dtmf_data.in_digit_queued = 0; - *do_cng = 1; + + if (!switch_rtp_test_flag(rtp_session, SWITCH_RTP_FLAG_USE_TIMER)) { + *do_cng = 1; + } } else { if (!switch_rtp_ready(rtp_session)) { return RESULT_GOTO_END; @@ -705,7 +708,9 @@ static handle_rfc2833_result_t handle_rfc2833(switch_rtp_t *rtp_session, switch_ return RESULT_GOTO_RECVFROM; } } else { - *do_cng = 1; + if (switch_rtp_test_flag(rtp_session, SWITCH_RTP_FLAG_USE_TIMER)) { + *do_cng = 1; + } return RESULT_GOTO_TIMERCHECK; } } @@ -5080,6 +5085,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_ if (status != SWITCH_STATUS_FALSE) { read_pretriggered = 1; + break; } }