[Asterisk-cvs] asterisk/channels chan_sip.c,1.465,1.466

markster at lists.digium.com markster at lists.digium.com
Sat Jul 31 00:18:02 CDT 2004


Update of /usr/cvsroot/asterisk/channels
In directory localhost.localdomain:/tmp/cvs-serv3735/channels

Modified Files:
	chan_sip.c 
Log Message:
Send proper contact in 200 OK to REGISTER


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.465
retrieving revision 1.466
diff -u -d -r1.465 -r1.466
--- chan_sip.c	31 Jul 2004 02:31:24 -0000	1.465
+++ chan_sip.c	31 Jul 2004 04:04:05 -0000	1.466
@@ -4258,6 +4258,8 @@
 			ast_verbose(VERBOSE_PREFIX_3 "Unregistered SIP '%s'\n", p->name);
 		return 0;
 	}
+	/* For the 200 OK, we should use the received contact */
+	snprintf(pvt->our_contact, sizeof(pvt->our_contact) - 1, "<%s>", c);
 	/* Make sure it's a SIP URL */
 	if (strncasecmp(c, "sip:", 4)) {
 		ast_log(LOG_NOTICE, "'%s' is not a valid SIP contact (missing sip:) trying to use anyway\n", c);




More information about the svn-commits mailing list