[svn-commits] oej: branch 1.4 r102090 - /branches/1.4/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Feb 3 04:37:33 CST 2008


Author: oej
Date: Sun Feb  3 04:37:32 2008
New Revision: 102090

URL: http://svn.digium.com/view/asterisk?view=rev&rev=102090
Log:
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:
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=102090&r1=102089&r2=102090
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Sun Feb  3 04:37:32 2008
@@ -15178,12 +15178,17 @@
 	if (option_debug > 3)
 		ast_log(LOG_DEBUG, "**** 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)) {
-		if (option_debug)
-			ast_log(LOG_DEBUG, "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)) {
+			if (option_debug > 2)
+				ast_log(LOG_DEBUG, "Got CANCEL or ACK on INVITE with transactions in between.\n");
+		}  else {
+			if (option_debug)
+				ast_log(LOG_DEBUG, "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 svn-commits mailing list