[Freeswitch-svn] [commit] r7934 - in freeswitch/trunk: libs/curl/lib libs/libresample libs/xmlrpc-c src src/mod/endpoints/mod_iax

Freeswitch SVN anthm at freeswitch.org
Wed Mar 19 13:56:28 EDT 2008


Author: anthm
Date: Wed Mar 19 13:56:27 2008
New Revision: 7934

Modified:
   freeswitch/trunk/libs/curl/lib/config.h.in
   freeswitch/trunk/libs/libresample/configure.in
   freeswitch/trunk/libs/xmlrpc-c/xmlrpc_amconfig.h.in
   freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c
   freeswitch/trunk/src/switch_ivr_bridge.c
   freeswitch/trunk/src/switch_rtp.c

Log:
deal with MODENDP-99

Modified: freeswitch/trunk/libs/curl/lib/config.h.in
==============================================================================
--- freeswitch/trunk/libs/curl/lib/config.h.in	(original)
+++ freeswitch/trunk/libs/curl/lib/config.h.in	Wed Mar 19 13:56:27 2008
@@ -621,16 +621,16 @@
 /* Define to the function return type for send. */
 #undef SEND_TYPE_RETV
 
-/* The size of `curl_off_t', as computed by sizeof. */
+/* The size of a `curl_off_t', as computed by sizeof. */
 #undef SIZEOF_CURL_OFF_T
 
-/* The size of `long', as computed by sizeof. */
+/* The size of a `long', as computed by sizeof. */
 #undef SIZEOF_LONG
 
-/* The size of `size_t', as computed by sizeof. */
+/* The size of a `size_t', as computed by sizeof. */
 #undef SIZEOF_SIZE_T
 
-/* The size of `time_t', as computed by sizeof. */
+/* The size of a `time_t', as computed by sizeof. */
 #undef SIZEOF_TIME_T
 
 /* Define to 1 if you have the ANSI C header files. */
@@ -685,7 +685,7 @@
 /* type to use in place of in_addr_t if not defined */
 #undef in_addr_t
 
-/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* Define to `unsigned' if <sys/types.h> does not define. */
 #undef size_t
 
 /* type to use in place of socklen_t if not defined */

Modified: freeswitch/trunk/libs/libresample/configure.in
==============================================================================
--- freeswitch/trunk/libs/libresample/configure.in	(original)
+++ freeswitch/trunk/libs/libresample/configure.in	Wed Mar 19 13:56:27 2008
@@ -45,6 +45,8 @@
 AM_CONDITIONAL([WANT_DEBUG],[test "${enable_debug}" = "yes"])
 
 
+echo host $host
+echo ax_cv_c_compiler_vendor ${ax_cv_c_compiler_vendor}
 case "$host" in
                 *-solaris2*)
                         if test "x${ax_cv_c_compiler_vendor}"  =  "xsun" ; then

Modified: freeswitch/trunk/libs/xmlrpc-c/xmlrpc_amconfig.h.in
==============================================================================
--- freeswitch/trunk/libs/xmlrpc-c/xmlrpc_amconfig.h.in	(original)
+++ freeswitch/trunk/libs/xmlrpc-c/xmlrpc_amconfig.h.in	Wed Mar 19 13:56:27 2008
@@ -81,5 +81,5 @@
 /* Version number of package */
 #undef VERSION
 
-/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* Define to `unsigned' if <sys/types.h> does not define. */
 #undef size_t

Modified: freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c	Wed Mar 19 13:56:27 2008
@@ -87,6 +87,8 @@
 	switch_codec_t write_codec;
 	switch_frame_t read_frame;
 	unsigned char databuf[SWITCH_RECOMMENDED_BUFFER_SIZE];
+	switch_frame_t cng_frame;
+	unsigned char cng_databuf[10];
 	switch_core_session_t *session;
 	struct iax_session *iax_session;
 	switch_caller_profile_t *caller_profile;
@@ -441,6 +443,10 @@
 {
 	tech_pvt->read_frame.data = tech_pvt->databuf;
 	tech_pvt->read_frame.buflen = sizeof(tech_pvt->databuf);
+	tech_pvt->cng_frame.data = tech_pvt->cng_databuf;
+	tech_pvt->cng_frame.buflen = sizeof(tech_pvt->cng_databuf);
+	switch_set_flag((&tech_pvt->cng_frame), SFF_CNG);
+	tech_pvt->cng_frame.datalen = 2;
 	switch_mutex_init(&tech_pvt->mutex, SWITCH_MUTEX_NESTED, switch_core_session_get_pool(session));
 	switch_mutex_init(&tech_pvt->flag_mutex, SWITCH_MUTEX_NESTED, switch_core_session_get_pool(session));
 	switch_core_session_set_private(session, tech_pvt);
@@ -604,6 +610,12 @@
 			return SWITCH_STATUS_FALSE;
 		}
 
+		if (switch_test_flag(tech_pvt, TFLAG_IO) && switch_test_flag(tech_pvt, TFLAG_DTMF)) {
+			switch_clear_flag_locked(tech_pvt, TFLAG_DTMF);
+			*frame = &tech_pvt->cng_frame;
+			return SWITCH_STATUS_SUCCESS;
+		}
+
 		if (switch_test_flag(tech_pvt, TFLAG_IO) && switch_test_flag(tech_pvt, TFLAG_VOICE)) {
 			switch_clear_flag_locked(tech_pvt, TFLAG_VOICE);
 			if (!tech_pvt->read_frame.datalen) {
@@ -1107,7 +1119,10 @@
 					if (globals.debug) {
 						switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%c DTMF %s\n", dtmf.digit, switch_channel_get_name(channel));
 					}
+					switch_mutex_lock(tech_pvt->flag_mutex);
 					switch_channel_queue_dtmf(channel, &dtmf);
+					switch_set_flag(tech_pvt, TFLAG_DTMF);
+					switch_mutex_unlock(tech_pvt->flag_mutex);
 				}
 
 				break;

Modified: freeswitch/trunk/src/switch_ivr_bridge.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_bridge.c	(original)
+++ freeswitch/trunk/src/switch_ivr_bridge.c	Wed Mar 19 13:56:27 2008
@@ -178,7 +178,7 @@
 			switch_dtmf_t dtmf = { 0, 0 };
 			if (switch_channel_dequeue_dtmf(chan_a, &dtmf) == SWITCH_STATUS_SUCCESS) {
 				int send_dtmf = 1;
-				
+
 				if (input_callback) {
 					switch_status_t cb_status = input_callback(session_a, (void *)&dtmf, SWITCH_INPUT_TYPE_DTMF, user_data, 0);
 					

Modified: freeswitch/trunk/src/switch_rtp.c
==============================================================================
--- freeswitch/trunk/src/switch_rtp.c	(original)
+++ freeswitch/trunk/src/switch_rtp.c	Wed Mar 19 13:56:27 2008
@@ -1098,7 +1098,7 @@
 {
 	switch_size_t bytes = 0;
 	switch_status_t status;
-	uint8_t check = 1;
+	uint8_t check = 0;
 	stfu_frame_t *jb_frame;
 	int ret = -1;
 	
@@ -1125,6 +1125,7 @@
 		
 		if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_BREAK)) {
 			switch_clear_flag_locked(rtp_session, SWITCH_RTP_FLAG_BREAK);
+			do_2833(rtp_session);
 			bytes = 0;
 			do_cng = 1;
 			goto cng;
@@ -1154,8 +1155,8 @@
 		} else if (bytes) {
 			check++;
 		}
-
-		if (check) {
+		
+		if (check || bytes) {
 			do_2833(rtp_session);
 		}
 



More information about the Freeswitch-svn mailing list