Skip to content

ACK CSeq Not Updated After 407 Re-Authentication  #966

@sabrineLayouni

Description

@sabrineLayouni

Environment

  • JsSIP version: 3.12
  • Browser: Chrome (latest)

Summary

Current Behavior:

| |
|-------- INVITE (CSeq: 100) ----------------->|
|<------- 100 Trying --------------------------|
|<------- 407 Proxy Auth Required -------------|
|-------- ACK (CSeq: 100) -------------------->| ✓ Correct
| |
|-------- INVITE (CSeq: 101) + Auth --------->| ✓ Correct (incremented)
|<------- 200 OK ------------------------------|
|-------- ACK (CSeq: 100) -------------------->| ✗ BUG: Should be 101

Expected Behavior:

| |
|-------- INVITE (CSeq: 100) ----------------->|
|<------- 100 Trying --------------------------|
|<------- 407 Proxy Auth Required -------------|
|-------- ACK (CSeq: 100) -------------------->| ✓ Matches original INVITE
| |
|-------- INVITE (CSeq: 101) + Auth --------->| ✓ Incremented for retry
|<------- 200 OK ------------------------------|
|-------- ACK (CSeq: 101) -------------------->| ✓ Matches retried INVITE

Impact

After several iterations:

  1. Server may reject the session (too many requests)
  2. Or session timer expires server-side
  3. Call drops unexpectedly

Root Cause (i think)

In sendACK() function, the ACK uses this.request.cseq which references the original INVITE's CSeq, not the re-authenticated INVITE's CSeq.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions