Invite + decreasing sequence number => 500 Error?
Consider the following SIP conversation:
C3 PBX to Asterisk
- Case 1.
Sequence Numer always increasing:
=> Invite
< = 401 Unauthenticated
=> Invite+auth with sequence number > previous Invite.
< = 100 Trying etc. Works OK.
< = 401 Unauthenticated
=> Invite+auth with sequence number > previous Invite.
< = 100 Trying etc. Works OK.
- Case 2.
Sequence Number decreasing.
=> Invite
< = 401 Unauthenticated
=> Invite+auth with sequence number < previous Invite.
< = 500 ERROR
< = 401 Unauthenticated
=> Invite+auth with sequence number < previous Invite.
< = 500 ERROR
It’s not a bug – decrementing the CSeq header field value is directly in violation of RFC 3261. From section 22.2: When a UAC resubmits a request with its credentials after receiving a 401 (Unauthorized) or 407 (Proxy Authentication Required) response, it MUST increment the CSeq header field value as it would normally when sending an updated request.
This only applies to the same dialog. The question here is if it is the same dialog. If it is, then the server indeed has a bug. Check the Call-ID and the from tag of both requests.