[Asterisk-cvs] asterisk/channels chan_sip.c,1.396,1.397

markster at lists.digium.com markster at lists.digium.com
Wed May 26 14:32:09 CDT 2004


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

Modified Files:
	chan_sip.c 
Log Message:
Cancel self destruct on provisional responses too (bug #1722)


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.396
retrieving revision 1.397
diff -u -d -r1.396 -r1.397
--- chan_sip.c	25 May 2004 05:36:49 -0000	1.396
+++ chan_sip.c	26 May 2004 18:46:36 -0000	1.397
@@ -5925,9 +5925,13 @@
 		}
 		switch(resp) {
 		case 100:
+			if (!strcasecmp(msg, "INVITE")) {
+				sip_cancel_destroy(p);
+			}
 			break;
 		case 183:	
 			if (!strcasecmp(msg, "INVITE")) {
+				sip_cancel_destroy(p);
 				if (!ast_strlen_zero(get_header(req, "Content-Type")))
 					process_sdp(p, req);
 				if (p->owner) {
@@ -5937,10 +5941,13 @@
 			}
 			break;
 		case 180:
-			if (p->owner) {
-				ast_queue_control(p->owner, AST_CONTROL_RINGING);
-				if (p->owner->_state != AST_STATE_UP)
-					ast_setstate(p->owner, AST_STATE_RINGING);
+			if (!strcasecmp(msg, "INVITE")) {
+				sip_cancel_destroy(p);
+				if (p->owner) {
+					ast_queue_control(p->owner, AST_CONTROL_RINGING);
+					if (p->owner->_state != AST_STATE_UP)
+						ast_setstate(p->owner, AST_STATE_RINGING);
+				}
 			}
 			break;
 		case 200:




More information about the svn-commits mailing list