From: Anthony Minessale Date: Fri, 7 Dec 2012 21:11:44 +0000 (-0600) Subject: don't send cn packet until you have sent some actual audio X-Git-Tag: v1.3.10~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8aecffef50eaedcdba89bbf640f4283d49b36344;p=thirdparty%2Ffreeswitch.git don't send cn packet until you have sent some actual audio --- diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 951edb70b7..f1640989e6 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -972,7 +972,7 @@ static int check_srtp_and_ice(switch_rtp_t *rtp_session) int ret = 0; - if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_AUTO_CNG) && + if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_AUTO_CNG) && rtp_session->send_msg.header.ts && rtp_session->timer.samplecount >= (rtp_session->last_write_samplecount + (rtp_session->samples_per_interval * 50))) { uint8_t data[10] = { 0 }; switch_frame_flag_t frame_flags = SFF_NONE;