[Freeswitch-svn] [commit] r4474 - in freeswitch/trunk/src: . mod/endpoints/mod_sofia
Freeswitch SVN
anthm at freeswitch.org
Wed Mar 7 18:48:02 EST 2007
Author: anthm
Date: Wed Mar 7 18:48:02 2007
New Revision: 4474
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
freeswitch/trunk/src/switch_rtp.c
Log:
update contd
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Wed Mar 7 18:48:02 2007
@@ -2460,6 +2460,10 @@
if (!cng_pt && !strcasecmp(map->rm_encoding, "CN")) {
cng_pt = tech_pvt->cng_pt = (switch_payload_t)map->rm_pt;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Set comfort noise payload to %u\n", cng_pt);
+ if (tech_pvt->rtp_session) {
+ switch_rtp_set_cng_pt(tech_pvt->rtp_session, tech_pvt->cng_pt);
+ switch_rtp_set_flag(tech_pvt->rtp_session, SWITCH_RTP_FLAG_AUTO_CNG);
+ }
}
if (match) {
Modified: freeswitch/trunk/src/switch_rtp.c
==============================================================================
--- freeswitch/trunk/src/switch_rtp.c (original)
+++ freeswitch/trunk/src/switch_rtp.c Wed Mar 7 18:48:02 2007
@@ -820,11 +820,10 @@
check = (uint8_t)(switch_core_timer_check(&rtp_session->timer) == SWITCH_STATUS_SUCCESS);
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_AUTO_CNG) &&
- rtp_session->timer.samplecount >= (rtp_session->last_write_ts + (rtp_session->packet_size * 5))) {
+ rtp_session->timer.samplecount >= (rtp_session->last_write_ts + (rtp_session->packet_size * 50))) {
uint8_t data[2] = {0};
switch_frame_flag_t flags = SFF_NONE;
data[0] = 127;
- printf("WTF %u %u\n", rtp_session->timer.samplecount, (rtp_session->last_write_ts + (rtp_session->packet_size * 5)));
rtp_session->last_write_ts = rtp_session->timer.samplecount;
rtp_session->seq = ntohs(rtp_session->seq) + 1;
rtp_session->seq = htons(rtp_session->seq);
More information about the Freeswitch-svn
mailing list