From 8740176dc3d22f66b1afdfcdc3ac993048fd7ecd Mon Sep 17 00:00:00 2001
From: Olle Johansson <oej@edvina.net>
Date: Thu, 15 Nov 2007 12:21:57 +0000
Subject: [PATCH] Always relying on the responses when crossing NAT's are not a
 good solution, it breaks communication. Rizzo - you need to implement a
 configuration option for this code. It's good, but maybe should be off by
 default.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 channels/chan_sip.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 7bcc5486ab..34d4a4a5c0 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -13810,7 +13810,13 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
 		gettag(req, "To", tag, sizeof(tag));
 		ast_string_field_set(p, theirtag, tag);
 	}
-	check_via_response(p, req);
+	/* This needs to be configurable on a channel/peer/user level,
+	   not mandatory for all communication. Sadly enough, NAT implementations
+	   are not so stable so we can always rely on these headers. 
+		Temporarily disabled, while waiting for fix.
+	   Fix assigned to Rizzo :-)
+	*/
+	/* check_via_response(p, req); */
 	if (p->relatedpeer && p->method == SIP_OPTIONS) {
 		/* We don't really care what the response is, just that it replied back. 
 		   Well, as long as it's not a 100 response...  since we might
-- 
GitLab