[asterisk-commits] oej: trunk r102091 - in /trunk: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Feb 3 04:47:06 CST 2008


Author: oej
Date: Sun Feb  3 04:47:05 2008
New Revision: 102091

URL: http://svn.digium.com/view/asterisk?view=rev&rev=102091
Log:
Merged revisions 102090 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r102090 | oej | 2008-02-03 11:37:32 +0100 (Sön, 03 Feb 2008) | 8 lines

Handle ACK and CANCEL in an invite transaction - even if we get INFO transactions during the actual call setup.

(closes issue #10567)
Reported by: jacksch
Tested by: oej
Patch by: oej inspired by suggestions from neutrino88 in the bug tracker


........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=102091&r1=102090&r2=102091
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Sun Feb  3 04:47:05 2008
@@ -17644,11 +17644,15 @@
 	p->method = req->method;	/* Find out which SIP method they are using */
 	ast_debug(4, "**** Received %s (%d) - Command in SIP %s\n", sip_methods[p->method].text, sip_methods[p->method].id, cmd); 
 
-	if (p->icseq && (p->icseq > seqno)) {
-		ast_debug(1, "Ignoring too old SIP packet packet %d (expecting >= %d)\n", seqno, p->icseq);
-		if (req->method != SIP_ACK)
-			transmit_response(p, "503 Server error", req);	/* We must respond according to RFC 3261 sec 12.2 */
-		return -1;
+	if (p->icseq && (p->icseq > seqno) ) {
+		if (p->pendinginvite && seqno == p->pendinginvite && (req->method == SIP_ACK || req->method == SIP_CANCEL)) {
+			ast_debug(2, "Got CANCEL or ACK on INVITE with transactions in between.\n");
+		}  else {
+			ast_debug(1, "Ignoring too old SIP packet packet %d (expecting >= %d)\n", seqno, p->icseq);
+			if (req->method != SIP_ACK)
+				transmit_response(p, "503 Server error", req);	/* We must respond according to RFC 3261 sec 12.2 */
+			return -1;
+		}
 	} else if (p->icseq &&
 		   p->icseq == seqno &&
 		   req->method != SIP_ACK &&




More information about the asterisk-commits mailing list