[Asterisk-cvs] asterisk/channels chan_sip.c,1.596,1.597

markster at lists.digium.com markster at lists.digium.com
Wed Dec 22 20:20:04 CST 2004


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

Modified Files:
	chan_sip.c 
Log Message:
Fix sip hold bug (#3113)


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.596
retrieving revision 1.597
diff -u -d -r1.596 -r1.597
--- chan_sip.c	20 Dec 2004 09:35:11 -0000	1.596
+++ chan_sip.c	23 Dec 2004 01:15:46 -0000	1.597
@@ -3072,6 +3072,7 @@
 }
 
 
+/*--- respprep: Prepare SIP response packet ---*/
 static int respprep(struct sip_request *resp, struct sip_pvt *p, char *msg, struct sip_request *req)
 {
 	char newto[256] = "", *ot;
@@ -3079,7 +3080,8 @@
 	memset(resp, 0, sizeof(*resp));
 	init_resp(resp, msg, req);
 	copy_via_headers(p, resp, req, "Via");
-	if (msg[0] == '2') copy_all_header(resp, req, "Record-Route");
+	if (msg[0] == '2')
+		copy_all_header(resp, req, "Record-Route");
 	copy_header(resp, req, "From");
 	ot = get_header(req, "To");
 	if (!strstr(ot, "tag=")) {
@@ -3527,7 +3529,7 @@
 		dst->line[x] += offset;
 }
 
-/*--- transmit_response_with_sdp: Used for 200 OK ---*/
+/*--- transmit_response_with_sdp: Used for 200 OK and 183 early media ---*/
 static int transmit_response_with_sdp(struct sip_pvt *p, char *msg, struct sip_request *req, int retrans)
 {
 	struct sip_request resp;
@@ -4483,9 +4485,8 @@
 
 	/* Save full contact to call pvt for later bye or re-invite */
 	strncpy(pvt->fullcontact, c, sizeof(pvt->fullcontact) - 1);	
-	snprintf(pvt->our_contact, sizeof(pvt->our_contact) - 1, "<%s>", c);
-
 
+	/* Save URI for later ACKs, BYE or RE-invites */
 	strncpy(pvt->okcontacturi, c, sizeof(pvt->okcontacturi) - 1);
 	
 	/* Make sure it's a SIP URL */




More information about the svn-commits mailing list