[Freeswitch-svn] [commit] r2330 - in freeswitch/trunk: libs/libdingaling/src src/mod/endpoints/mod_dingaling

Freeswitch SVN anthm at freeswitch.org
Fri Aug 18 17:02:40 EDT 2006


Author: anthm
Date: Fri Aug 18 17:02:40 2006
New Revision: 2330

Modified:
   freeswitch/trunk/libs/libdingaling/src/libdingaling.c
   freeswitch/trunk/libs/libdingaling/src/libdingaling.h
   freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c

Log:
google part 1000

Modified: freeswitch/trunk/libs/libdingaling/src/libdingaling.c
==============================================================================
--- freeswitch/trunk/libs/libdingaling/src/libdingaling.c	(original)
+++ freeswitch/trunk/libs/libdingaling/src/libdingaling.c	Fri Aug 18 17:02:40 2006
@@ -326,6 +326,8 @@
 					}
 					tag = iks_next_tag(tag);
 				}
+			} else if (!strcasecmp(type, "transport-accept")) {
+				signal = LDL_SIGNAL_TRANSPORT_ACCEPT;
 			} else if (!strcasecmp(type, "transport-info")) {
 				char *tid = iks_find_attrib(xml, "id");
 				signal = LDL_SIGNAL_CANDIDATES;

Modified: freeswitch/trunk/libs/libdingaling/src/libdingaling.h
==============================================================================
--- freeswitch/trunk/libs/libdingaling/src/libdingaling.h	(original)
+++ freeswitch/trunk/libs/libdingaling/src/libdingaling.h	Fri Aug 18 17:02:40 2006
@@ -123,7 +123,8 @@
 	LDL_SIGNAL_ERROR,
 	LDL_SIGNAL_LOGIN_SUCCESS,
 	LDL_SIGNAL_LOGIN_FAILURE,
-	LDL_SIGNAL_CONNECTED
+	LDL_SIGNAL_CONNECTED,
+	LDL_SIGNAL_TRANSPORT_ACCEPT
 } ldl_signal_t;
 
 typedef enum {

Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c	Fri Aug 18 17:02:40 2006
@@ -66,7 +66,8 @@
 	TFLAG_AUTO = (1 << 17),
 	TFLAG_DTMF = (1 << 18),
 	TFLAG_TIMER = ( 1 << 19),
-	TFLAG_TERM = ( 1 << 20)
+	TFLAG_TERM = ( 1 << 20),
+	TFLAG_TRANSPORT_ACCEPT = (1 << 21),
 } TFLAGS;
 
 typedef enum {
@@ -542,6 +543,7 @@
 	while(! (switch_test_flag(tech_pvt, TFLAG_CODEC_READY) && 
 			 switch_test_flag(tech_pvt, TFLAG_RTP_READY) && 
 			 switch_test_flag(tech_pvt, TFLAG_ANSWER) && 
+			 switch_test_flag(tech_pvt, TFLAG_TRANSPORT_ACCEPT) &&
 			 switch_test_flag(tech_pvt, TFLAG_TRANSPORT))) {
 		now = switch_time_now();
 		elapsed = (unsigned int)((now - started) / 1000);
@@ -1608,6 +1610,7 @@
 				tech_pvt->local_port = switch_rtp_request_port();
 				switch_set_flag_locked(tech_pvt, TFLAG_ANSWER);
 				tech_pvt->recip = switch_core_session_strdup(session, from);
+				switch_set_flag_locked(tech_pvt, TFLAG_TRANSPORT_ACCEPT);
 			} else {
 				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hey where is my memory pool?\n");
 				terminate_session(&session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
@@ -1648,7 +1651,9 @@
 
 		}
 		break;
-
+	case LDL_SIGNAL_TRANSPORT_ACCEPT:
+		switch_set_flag_locked(tech_pvt, TFLAG_TRANSPORT_ACCEPT);
+		printf("\n**************************************\n");
 		break;
 	case LDL_SIGNAL_INITIATE:
 		if (signal) {



More information about the Freeswitch-svn mailing list