[Freeswitch-svn] [commit] r13059 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/nua

FreeSWITCH SVN mikej at freeswitch.org
Thu Apr 16 07:59:59 PDT 2009


Author: mikej
Date: Thu Apr 16 09:59:59 2009
New Revision: 13059

Log:
Tue Mar 24 07:39:57 CDT 2009  Mikhail Zabaluev <mikhail.zabaluev at nokia.com>
  * nua/check_register.c: fixed up value setting for NAT-imitating received parameters



Modified:
   freeswitch/trunk/libs/sofia-sip/.update
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/check_register.c

Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update	(original)
+++ freeswitch/trunk/libs/sofia-sip/.update	Thu Apr 16 09:59:59 2009
@@ -1 +1 @@
-Tue Mar 24 10:52:57 CDT 2009
+Thu Apr 16 09:59:45 CDT 2009

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/check_register.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/check_register.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/check_register.c	Thu Apr 16 09:59:59 2009
@@ -200,10 +200,11 @@
 
 /* ---------------------------------------------------------------------- */
 
-static char const *receive_natted = "received=4.255.255.9";
+static char const receive_natted[] = "received=4.255.255.9";
+static char const receive_natted2[] = "received=4.255.255.10";
 
 /* Return Via that looks very natted */
-static sip_via_t *natted_via(struct message *m)
+static sip_via_t *natted_via(struct message *m, const char *receive_natted)
 {
   su_home_t *h;
   sip_via_t *via;
@@ -245,7 +246,7 @@
   s2_sip_respond_to(m, NULL,
 		SIP_200_OK,
 		SIPTAG_CONTACT(s2->registration->contact),
-		SIPTAG_VIA(natted_via(m)),
+		SIPTAG_VIA(natted_via(m, receive_natted)),
 		TAG_END());
   s2_sip_free_message(m);
 
@@ -260,7 +261,7 @@
   s2_sip_respond_to(m, NULL,
 		SIP_200_OK,
 		SIPTAG_CONTACT(s2->registration->contact),
-		SIPTAG_VIA(natted_via(m)),
+		SIPTAG_VIA(natted_via(m, receive_natted)),
 		TAG_END());
   s2_sip_free_message(m);
 
@@ -290,7 +291,7 @@
   s2_sip_respond_to(m, NULL,
 		SIP_401_UNAUTHORIZED,
 		SIPTAG_WWW_AUTHENTICATE_STR(s2_auth_digest_str),
-		SIPTAG_VIA(natted_via(m)),
+		SIPTAG_VIA(natted_via(m, receive_natted)),
 		TAG_END());
   s2_sip_free_message(m);
 
@@ -310,7 +311,7 @@
   s2_sip_respond_to(m, NULL,
 		SIP_200_OK,
 		SIPTAG_CONTACT(s2->registration->contact),
-		SIPTAG_VIA(natted_via(m)),
+		SIPTAG_VIA(natted_via(m, receive_natted)),
 		TAG_END());
   s2_sip_free_message(m);
 
@@ -354,7 +355,7 @@
   fail_if(!m);
   s2_sip_respond_to(m, NULL,
 		SIP_407_PROXY_AUTH_REQUIRED,
-		SIPTAG_VIA(natted_via(m)),
+		SIPTAG_VIA(natted_via(m, receive_natted)),
 		SIPTAG_PROXY_AUTHENTICATE_STR(s2_auth_digest_str),
 		TAG_END());
   s2_sip_free_message(m);
@@ -364,7 +365,7 @@
   fail_if(!m); fail_if(!m->sip->sip_proxy_authorization);
   s2_sip_respond_to(m, NULL,
 		SIP_200_OK,
-		SIPTAG_VIA(natted_via(m)),
+		SIPTAG_VIA(natted_via(m, receive_natted)),
 		TAG_END());
   s2_sip_free_message(m);
 
@@ -375,7 +376,7 @@
   m = s2_sip_wait_for_request(SIP_METHOD_OPTIONS);
   s2_sip_respond_to(m, NULL,
 		SIP_200_OK,
-		SIPTAG_VIA(natted_via(m)),
+		SIPTAG_VIA(natted_via(m, receive_natted)),
 		TAG_END());
   s2_sip_free_message(m);
 
@@ -388,7 +389,7 @@
   m = s2_sip_wait_for_request(SIP_METHOD_OPTIONS);
   s2_sip_respond_to(m, NULL,
 		SIP_200_OK,
-		SIPTAG_VIA(natted_via(m)),
+		SIPTAG_VIA(natted_via(m, receive_natted2)),
 		TAG_END());
   s2_sip_free_message(m);
 
@@ -402,7 +403,7 @@
   s2_sip_respond_to(m, NULL,
 		SIP_200_OK,
 		SIPTAG_CONTACT(s2->registration->contact),
-		SIPTAG_VIA(natted_via(m)),
+		SIPTAG_VIA(natted_via(m, receive_natted2)),
 		TAG_END());
   s2_sip_free_message(m);
 
@@ -428,7 +429,7 @@
   mark_point();
 
   make_auth_natted_register(nh,
-			    NUTAG_OUTBOUND("no-options-keepalive"),
+			    NUTAG_OUTBOUND("no-options-keepalive, no-validate"),
 			    TAG_END());
   s2->registration->nh = nh;
 
@@ -444,7 +445,7 @@
   s2_sip_respond_to(m, NULL,
 		SIP_200_OK,
 		SIPTAG_CONTACT(s2->registration->contact),
-		SIPTAG_VIA(natted_via(m)),
+		SIPTAG_VIA(natted_via(m, receive_natted2)),
 		TAG_END());
   s2_sip_free_message(m);
 
@@ -458,7 +459,7 @@
   s2_sip_respond_to(m, NULL,
 		SIP_200_OK,
 		SIPTAG_CONTACT(s2->registration->contact),
-		SIPTAG_VIA(natted_via(m)),
+		SIPTAG_VIA(natted_via(m, receive_natted2)),
 		TAG_END());
   s2_sip_free_message(m);
 
@@ -490,7 +491,7 @@
 
   s2_sip_respond_to(m, NULL,
 		400, "Bad Contact",
-		SIPTAG_VIA(natted_via(m)),
+		SIPTAG_VIA(natted_via(m, receive_natted)),
 		TAG_END());
   s2_sip_free_message(m);
 
@@ -503,7 +504,7 @@
   s2_sip_respond_to(m, NULL,
 		SIP_200_OK,
 		SIPTAG_CONTACT(s2->registration->contact),
-		SIPTAG_VIA(natted_via(m)),
+		SIPTAG_VIA(natted_via(m, receive_natted)),
 		TAG_END());
   s2_sip_free_message(m);
 
@@ -540,7 +541,7 @@
   s2_sip_respond_to(m, NULL,
 		SIP_200_OK,
 		SIPTAG_CONTACT(s2->registration->contact),
-		SIPTAG_VIA(natted_via(m)),
+		SIPTAG_VIA(natted_via(m, receive_natted)),
 		TAG_END());
   s2_sip_free_message(m);
 
@@ -555,7 +556,7 @@
   s2_sip_respond_to(m, NULL,
 		SIP_200_OK,
 		SIPTAG_CONTACT(s2->registration->contact),
-		SIPTAG_VIA(natted_via(m)),
+		SIPTAG_VIA(natted_via(m, receive_natted)),
 		TAG_END());
   s2_sip_free_message(m);
 
@@ -617,7 +618,7 @@
   s2_sip_respond_to(m, NULL,
 		SIP_200_OK,
 		SIPTAG_CONTACT(s2->registration->contact),
-		SIPTAG_VIA(natted_via(m)),
+		SIPTAG_VIA(natted_via(m, receive_natted)),
 		TAG_END());
   s2_sip_free_message(m);
 
@@ -633,7 +634,7 @@
   s2_sip_respond_to(m, NULL,
 		SIP_200_OK,
 		SIPTAG_CONTACT(s2->registration->contact),
-		SIPTAG_VIA(natted_via(m)),
+		SIPTAG_VIA(natted_via(m, receive_natted)),
 		TAG_END());
   s2_sip_free_message(m);
 
@@ -680,7 +681,7 @@
   s2_sip_respond_to(m, NULL,
 		SIP_401_UNAUTHORIZED,
 		SIPTAG_WWW_AUTHENTICATE_STR(s2_auth_digest_str),
-		SIPTAG_VIA(natted_via(m)),
+		SIPTAG_VIA(natted_via(m, receive_natted)),
 		TAG_END());
   s2_sip_free_message(m);
   fail_unless_event(nua_r_register, 401);
@@ -698,7 +699,7 @@
   s2_sip_respond_to(m, NULL,
 		SIP_200_OK,
 		SIPTAG_CONTACT(s2->registration->contact),
-		SIPTAG_VIA(natted_via(m)),
+		SIPTAG_VIA(natted_via(m, receive_natted)),
 		TAG_END());
   s2_sip_free_message(m);
 
@@ -713,7 +714,7 @@
   s2_sip_respond_to(m, NULL,
 		SIP_200_OK,
 		SIPTAG_CONTACT(s2->registration->contact),
-		SIPTAG_VIA(natted_via(m)),
+		SIPTAG_VIA(natted_via(m, receive_natted)),
 		TAG_END());
   s2_sip_free_message(m);
 



More information about the Freeswitch-svn mailing list