Revision
15277
Author
brian
Date
2009-10-29 16:58:37 -0500 (Thu, 29 Oct 2009)

Log Message

 overcome ack via in nat 

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (15276 => 15277)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-10-29 18:36:18 UTC (rev 15276)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-10-29 21:58:37 UTC (rev 15277)
@@ -1093,6 +1093,7 @@
 				   NUTAG_APPL_METHOD("BYE"),
 #endif
 				   NUTAG_AUTOANSWER(0),
+				   NUTAG_AUTOACK(0),
 				   NUTAG_AUTOALERT(0),
 				   NUTAG_ENABLEMESSENGER(1),
 				   TAG_IF((profile->mflags & MFLAG_REGISTER), NUTAG_ALLOW("REGISTER")),
@@ -1129,6 +1130,7 @@
 					   NUTAG_APPL_METHOD("OPTIONS"),
 					   NUTAG_APPL_METHOD("REFER"),
 					   NUTAG_AUTOANSWER(0),
+					   NUTAG_AUTOACK(0),
 					   NUTAG_AUTOALERT(0),
 					   TAG_IF((profile->mflags & MFLAG_REGISTER), NUTAG_ALLOW("REGISTER")),
 					   TAG_IF((profile->mflags & MFLAG_REFER), NUTAG_ALLOW("REFER")),
@@ -3467,7 +3469,6 @@
 			}
 		}
 
-
 	}
 
 	if (!session && (status == 180 || status == 183 || status == 200)) {
@@ -3578,7 +3579,8 @@
 			goto done;
 		}
 
-		if ((switch_channel_test_flag(channel, CF_EARLY_MEDIA) || switch_channel_test_flag(channel, CF_ANSWERED)) && status == 180) {
+		if ((switch_channel_test_flag(channel, CF_EARLY_MEDIA) || switch_channel_test_flag(channel, CF_ANSWERED)) && 
+			(status == 180 || status == 183)) {
 			/* Must you send 180 after 183 w/sdp ? sheesh */
 			switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Channel %s skipping state [%s][%d]\n",
 							  switch_channel_get_name(channel), nua_callstate_name(ss_state), status);
@@ -3695,7 +3697,9 @@
 		}
 		break;
 	case nua_callstate_completing:
-		nua_ack(nh, TAG_END());
+		nua_ack(tech_pvt->nh,
+				TAG_IF(!zstr(tech_pvt->user_via), SIPTAG_VIA_STR(tech_pvt->user_via)),
+				TAG_END());
 		break;
 	case nua_callstate_received:
 		if (!sofia_test_flag(tech_pvt, TFLAG_SDP)) {