Opened 18 years ago

Closed 17 years ago

#302 closed defect (fixed)

Behavior in cancelling INVITE session when no provisional response has been received (thanks Esbjörn Dominique)

Reported by: bennylp Owned by: bennylp
Priority: normal Milestone: release-0.7.0
Component: pjsip Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description (last modified by bennylp)

RFC 3261 Section 9.1 says that CANCEL MUST NOT be sent if the INVITE transaction has not received any provisional response. So pjsip behaves correctly by not sending CANCEL here.

On the other hand, the section also says that the dialog must wait until either a response is received, or 64*T1 elapsed. When a provisional response is received, CANCEL should be sent, and when there is no response after 64*T1, the session can be destroyed.

This is the part where pjsip is not compliant.

Currently the invite session will just terminate the session immediately (CANCEL is not sent), so if any response is ever received, this will cause erroneous behavior.

Change History (1)

comment:1 Changed 17 years ago by bennylp

  • Description modified (diff)
  • Resolution set to fixed
  • Status changed from new to closed
  • Summary changed from Behavior in cancelling INVITE session when no provisional response has been received to Behavior in cancelling INVITE session when no provisional response has been received (thanks Esbjörn Dominique)

Fixed in r1319

The behavior now is, when cancel is requested and the INVITE transaction has not received any provisional response:

  1. INVITE transaction ceases retransmission.
  2. When provisional response is received after this, CANCEL will be sent, and the session will terminate after remote sends 487 to the INVITE transaction.
  3. When no response (to INVITE transaction) is ever received, the INVITE transaction will time out after 64*T1 from the original transmission, and the callback is called.
  4. When 200 (to INVITE transaction) is received, the session will be established and no CANCEL will be sent.
Note: See TracTickets for help on using tickets.