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

Freeswitch SVN anthm at freeswitch.org
Mon Jan 14 16:51:32 EST 2008


Author: anthm
Date: Mon Jan 14 16:51:31 2008
New Revision: 7223

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

Log:
put a 5 packet pause between digits so you can hear the spaces

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	Mon Jan 14 16:51:31 2008
@@ -546,7 +546,7 @@
 	tech_pvt = (private_object_t *) switch_core_session_get_private(session);
 	switch_assert(tech_pvt != NULL);
 
-	if (!(tech_pvt->profile->pflags & PFLAG_RUNNING)) {
+	if (0 && !(tech_pvt->profile->pflags & PFLAG_RUNNING)) {
 		switch_channel_hangup(tech_pvt->channel, SWITCH_CAUSE_NORMAL_CLEARING);
 		return SWITCH_STATUS_FALSE;
 	}

Modified: freeswitch/trunk/src/switch_rtp.c
==============================================================================
--- freeswitch/trunk/src/switch_rtp.c	(original)
+++ freeswitch/trunk/src/switch_rtp.c	Mon Jan 14 16:51:31 2008
@@ -139,6 +139,7 @@
 	uint32_t ts;
 	uint32_t last_write_ts;
 	uint32_t last_write_samplecount;
+	uint32_t next_write_samplecount;
 	uint32_t flags;
 	switch_memory_pool_t *pool;
 	switch_sockaddr_t *from_addr;
@@ -843,6 +844,7 @@
 			if (rtp_session->timer.interval) {
 				switch_core_timer_check(&rtp_session->timer);
 				rtp_session->last_write_samplecount = rtp_session->timer.samplecount;
+				rtp_session->next_write_samplecount = rtp_session->timer.samplecount + samples * 5;
 			}
 			rtp_session->dtmf_data.out_digit_dur = 0;
 		}
@@ -851,6 +853,13 @@
 	if (!rtp_session->dtmf_data.out_digit_dur && rtp_session->dtmf_data.dtmf_queue && switch_queue_size(rtp_session->dtmf_data.dtmf_queue)) {
 		void *pop;
 
+		if (rtp_session->timer.interval) {
+			switch_core_timer_check(&rtp_session->timer);
+			if (rtp_session->timer.samplecount < rtp_session->next_write_samplecount) {
+				return;
+			}
+		}
+		
 		if (switch_queue_trypop(rtp_session->dtmf_data.dtmf_queue, &pop) == SWITCH_STATUS_SUCCESS) {
 			switch_dtmf_t *rdigit = pop;
 			int64_t offset;



More information about the Freeswitch-svn mailing list