datatracker.ietf.org
Sign in
Version 5.4.0, 2014-04-22
Report a bug

Example Call Flows of Race Conditions in the Session Initiation Protocol (SIP)
RFC 5407

Network Working Group                                          M. Hasebe
Request for Comments: 5407                                    J. Koshiko
BCP: 147                                            NTT-east Corporation
Category: Best Current Practice                                Y. Suzuki
                                                         NTT Corporation
                                                            T. Yoshikawa
                                                    NTT-east Corporation
                                                              P. Kyzivat
                                                     Cisco Systems, Inc.
                                                           December 2008

              Example Call Flows of Race Conditions in the
                   Session Initiation Protocol (SIP)

Status of This Memo

   This document specifies an Internet Best Current Practices for the
   Internet Community, and requests discussion and suggestions for
   improvements.  Distribution of this memo is unlimited.

Copyright Notice

   Copyright (c) 2008 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents (http://trustee.ietf.org/
   license-info) in effect on the date of publication of this document.
   Please review these documents carefully, as they describe your rights
   and restrictions with respect to this document.

Abstract

   This document gives example call flows of race conditions in the
   Session Initiation Protocol (SIP).  Race conditions are inherently
   confusing and difficult to thwart; this document shows the best
   practices to handle them.  The elements in these call flows include
   SIP User Agents and SIP Proxy Servers.  Call flow diagrams and
   message details are given.

Hasebe, et al.           Best Current Practice                  [Page 1]
RFC 5407         Example Call Flows of Race Conditions     December 2008

Table of Contents

   1.  Overview . . . . . . . . . . . . . . . . . . . . . . . . . . .  3
     1.1.  General Assumptions  . . . . . . . . . . . . . . . . . . .  3
     1.2.  Legend for Message Flows . . . . . . . . . . . . . . . . .  3
     1.3.  SIP Protocol Assumptions . . . . . . . . . . . . . . . . .  4
   2.  The Dialog State Machine for INVITE Dialog Usage . . . . . . .  5
   3.  Race Conditions  . . . . . . . . . . . . . . . . . . . . . . . 10
     3.1.  Receiving Message in the Moratorium State  . . . . . . . . 11
       3.1.1.  Callee Receives Initial INVITE Retransmission
               (Preparative State) While in the Moratorium State  . . 11
       3.1.2.  Callee Receives CANCEL (Early State) While in the
               Moratorium State . . . . . . . . . . . . . . . . . . . 13
       3.1.3.  Callee Receives BYE (Early State) While in the
               Moratorium State . . . . . . . . . . . . . . . . . . . 15
       3.1.4.  Callee Receives re-INVITE (Established State)
               While in the Moratorium State (Case 1) . . . . . . . . 17
       3.1.5.  Callee Receives re-INVITE (Established State)
               While in the Moratorium State (Case 2) . . . . . . . . 22
       3.1.6.  Callee Receives BYE (Established State) While in
               the Moratorium State . . . . . . . . . . . . . . . . . 26
     3.2.  Receiving Message in the Mortal State  . . . . . . . . . . 28
       3.2.1.  UA Receives BYE (Established State) While in the
               Mortal State . . . . . . . . . . . . . . . . . . . . . 28
       3.2.2.  UA Receives re-INVITE (Established State) While in
               the Mortal State . . . . . . . . . . . . . . . . . . . 30
       3.2.3.  UA Receives 200 OK for re-INVITE (Established
               State) While in the Mortal State . . . . . . . . . . . 32
       3.2.4.  Callee Receives ACK (Moratorium State) While in
               the Mortal State . . . . . . . . . . . . . . . . . . . 35
     3.3.  Other Race Conditions  . . . . . . . . . . . . . . . . . . 36
       3.3.1.  Re-INVITE Crossover  . . . . . . . . . . . . . . . . . 36
       3.3.2.  UPDATE and re-INVITE Crossover . . . . . . . . . . . . 40
       3.3.3.  Receiving REFER (Established State) While in the
               Mortal State . . . . . . . . . . . . . . . . . . . . . 45
   4.  Security Considerations  . . . . . . . . . . . . . . . . . . . 46
   5.  Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 46
   6.  References . . . . . . . . . . . . . . . . . . . . . . . . . . 47
     6.1.  Normative References . . . . . . . . . . . . . . . . . . . 47
     6.2.  Informative References . . . . . . . . . . . . . . . . . . 47
   Appendix A.  BYE in the Early Dialog . . . . . . . . . . . . . . . 48
   Appendix B.  BYE Request Overlapping with re-INVITE  . . . . . . . 49

[include full document text]