[Home]

Summary:ASTERISK-01099: CSeq sip header field
Reporter:ameoba32 (ameoba32)Labels:
Date Opened:2004-02-25 08:55:30.000-0600Date Closed:2011-06-07 14:01:03
Priority:BlockerRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Asterisk is expecting CSeq header field is increased by 1 in next packet exchange.
I have SIP device that is sending next SIP packet with CSeq increased by 2, so asterisk is ignoring further packets and nothing works!

when i remove "return -1" in chan_sip.c near "out of order" error message, evrything works perfect.

in rfc i mentioned that CSeq header must be greater, but not mandatory by 1.

is this bug or feature ?
Comments:By: Olle Johansson (oej) 2004-02-25 09:14:32.000-0600

That's an interesting question, I'll dig further.

By: checimovic (checimovic) 2004-02-25 14:27:20.000-0600

From RFC 3261, 12.2.1.1:

Requests within a dialog MUST contain strictly monotonically increasing and contiguous CSeq sequence numbers (increasing-by-one) in each direction (excepting ACK and CANCEL of course, whose numbers equal the requests being acknowledged or cancelled).  Therefore, if the local sequence number is not empty, the value of the local sequence number MUST be incremented by one, and this value MUST be placed into the CSeq header field.


So it looks like Asterisk's behaviour is correct, at least within the same dialogue. Is the behaviour you are seeing related to the start of a new dialogue?

By: Mark Spencer (markster) 2004-02-25 14:30:51.000-0600

According to section 12.2.1.1 of RFC 3261:
<pre>
  The Call-ID of the request MUST be set to the Call-ID of the dialog.
  Requests within a dialog MUST contain strictly monotonically
  increasing and contiguous CSeq sequence numbers (increasing-by-one)
  in each direction (excepting ACK and CANCEL of course, whose numbers
  equal the requests being acknowledged or cancelled).  Therefore, if
  the local sequence number is not empty, the value of the local
  sequence number MUST be incremented by one, and this value MUST be
  placed into the CSeq header field.  If the local sequence number is
  empty, an initial value MUST be chosen using the guidelines of
  Section 8.1.1.5.  The method field in the CSeq header field value
  MUST match the method of the request.
</pre>