[Asterisk-cvs] asterisk/channels chan_sip.c,1.883,1.884

markster markster
Wed Oct 12 01:05:10 CDT 2005


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv3710/channels

Modified Files:
	chan_sip.c 
Log Message:
Handle yet some SIP contact issue nuances and exceptions (bug #5289 with mods and rant)


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.883
retrieving revision 1.884
diff -u -d -r1.883 -r1.884
--- chan_sip.c	12 Oct 2005 04:35:10 -0000	1.883
+++ chan_sip.c	12 Oct 2005 04:59:58 -0000	1.884
@@ -5279,7 +5279,7 @@
 			append_history(p, "RegistryInit", tmp);
 		}
 		/* Find address to hostname */
-		if (create_addr(p,r->hostname)) {
+		if (create_addr(p, r->hostname)) {
 			/* we have what we hope is a temporary network error,
 			 * probably DNS.  We need to reschedule a registration try */
 			sip_destroy(p);
@@ -10764,12 +10764,14 @@
 			ignore=1;
 		}
 	
-		extract_uri(p, req);
 		e = ast_skip_blanks(e);
 		if (sscanf(e, "%d %n", &respid, &len) != 1) {
 			ast_log(LOG_WARNING, "Invalid response: '%s'\n", e);
 		} else {
-			handle_response(p, respid, e + len, req,ignore, seqno);
+			/* More SIP ridiculousness, we have to ignore bogus contacts in 100 etc responses */
+			if ((respid == 200) || ((respid >= 300) && (respid <= 399)))
+				extract_uri(p, req);
+			handle_response(p, respid, e + len, req, ignore, seqno);
 		}
 		return 0;
 	}




More information about the svn-commits mailing list