[Freeswitch-svn] [commit] r5364 - in freeswitch/trunk/src: . mod/endpoints/mod_sofia

Freeswitch SVN anthm at freeswitch.org
Thu Jun 14 17:03:18 EDT 2007


Author: anthm
Date: Thu Jun 14 17:03:17 2007
New Revision: 5364

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
   freeswitch/trunk/src/switch_rtp.c

Log:
set control for vad from vars

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	Thu Jun 14 17:03:17 2007
@@ -913,6 +913,20 @@
 		uint8_t vad_out = switch_test_flag(tech_pvt, TFLAG_VAD_OUT) ? 1 : 0;
 		uint8_t inb = switch_test_flag(tech_pvt, TFLAG_OUTBOUND) ? 0 : 1;
 
+		if ((val = switch_channel_get_variable(tech_pvt->channel, "rtp_enable_vad_in")) && switch_true(val)) {
+			vad_in = 1;
+		}
+		if ((val = switch_channel_get_variable(tech_pvt->channel, "rtp_enable_vad_out")) && switch_true(val)) {
+			vad_out = 1;
+		}
+
+		if ((val = switch_channel_get_variable(tech_pvt->channel, "rtp_disable_vad_in")) && switch_true(val)) {
+			vad_in = 0;
+		}
+		if ((val = switch_channel_get_variable(tech_pvt->channel, "rtp_disable_vad_out")) && switch_true(val)) {
+			vad_out = 0;
+		}
+
 		tech_pvt->ssrc = switch_rtp_get_ssrc(tech_pvt->rtp_session);
 		switch_set_flag_locked(tech_pvt, TFLAG_RTP);
 		switch_set_flag_locked(tech_pvt, TFLAG_IO);

Modified: freeswitch/trunk/src/switch_rtp.c
==============================================================================
--- freeswitch/trunk/src/switch_rtp.c	(original)
+++ freeswitch/trunk/src/switch_rtp.c	Thu Jun 14 17:03:17 2007
@@ -1435,6 +1435,10 @@
 			rtp_session->last_write_samplecount = rtp_session->timer.samplecount;
 		}
 		switch_socket_sendto(rtp_session->sock, rtp_session->remote_addr, 0, (void *) send_msg, &bytes);
+	} else if (!fwd) {
+		/* nevermind save this seq inc for next time */
+		rtp_session->seq--;
+		rtp_session->send_msg.header.seq = htons(rtp_session->seq);
 	}
 
 	if (rtp_session->ice_user) {



More information about the Freeswitch-svn mailing list