[Freeswitch-svn] [commit] r9919 - in freeswitch/trunk/src/mod: applications/mod_dptools endpoints/mod_sofia

Freeswitch SVN anthm at freeswitch.org
Thu Oct 9 19:11:35 EDT 2008


Author: anthm
Date: Thu Oct  9 19:11:35 2008
New Revision: 9919

Modified:
   freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
   freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c

Log:
cancel proxy or no-media mode if you purposely answer or pre_answer

Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c	Thu Oct  9 19:11:35 2008
@@ -603,7 +603,10 @@
 
 SWITCH_STANDARD_APP(answer_function)
 {
-	switch_channel_answer(switch_core_session_get_channel(session));
+	switch_channel_t *channel = switch_core_session_get_channel(session);
+	switch_channel_clear_flag(channel, CF_PROXY_MEDIA);
+	switch_channel_clear_flag(channel, CF_PROXY_MODE);
+	switch_channel_answer(channel);
 }
 
 SWITCH_STANDARD_APP(presence_function)
@@ -628,7 +631,10 @@
 
 SWITCH_STANDARD_APP(pre_answer_function)
 {
-	switch_channel_pre_answer(switch_core_session_get_channel(session));
+	switch_channel_t *channel = switch_core_session_get_channel(session);
+	switch_channel_clear_flag(channel, CF_PROXY_MEDIA);
+	switch_channel_clear_flag(channel, CF_PROXY_MODE);
+	switch_channel_pre_answer(channel);
 }
 
 SWITCH_STANDARD_APP(redirect_function)

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	Thu Oct  9 19:11:35 2008
@@ -1108,7 +1108,7 @@
 						}
 					}
 				} else {
-					if (switch_test_flag(tech_pvt, TFLAG_LATE_NEGOTIATION)) {
+					if (switch_test_flag(tech_pvt, TFLAG_LATE_NEGOTIATION) || !tech_pvt->iananame) {
 						switch_clear_flag_locked(tech_pvt, TFLAG_LATE_NEGOTIATION);
 						if (!switch_channel_test_flag(tech_pvt->channel, CF_OUTBOUND)) {
 							const char *r_sdp = switch_channel_get_variable(channel, SWITCH_R_SDP_VARIABLE);



More information about the Freeswitch-svn mailing list