From 2af27476343cb3d08bcf6d04fa252ea7836e4d5f Mon Sep 17 00:00:00 2001
From: Mark Spencer <markster@digium.com>
Date: Sat, 19 Mar 2005 23:40:19 +0000
Subject: [PATCH] icseq increments only on requests, not responses (bug #3798)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 channels/chan_sip.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 6029b79945..8c80bd65c0 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -8597,12 +8597,6 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
 			ignore=1;
 		}
 	
-		if (seqno >= p->icseq)
-			/* Next should follow monotonically (but not necessarily 
-			   incrementally -- thanks again to the genius authors of SIP --
-			   increasing */
-			p->icseq = seqno;
-
 		extract_uri(p, req);
 		while(*e && (*e < 33)) 
 			e++;
@@ -8631,6 +8625,12 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
 		ignore=1;
 	}
 		
+	if (seqno >= p->icseq)
+		/* Next should follow monotonically (but not necessarily 
+		   incrementally -- thanks again to the genius authors of SIP --
+		   increasing */
+		p->icseq = seqno;
+
 	/* Find their tag if we haven't got it */
 	if (ast_strlen_zero(p->theirtag)) {
 		from = get_header(req, "From");
-- 
GitLab