Network Working Group                                     H. Schulzrinne
Request for Comments: 3326                           Columbia University
Category: Standards Track                                        D. Oran
                                                                   Cisco
                                                            G. Camarillo
                                                                Ericsson
                                                           December 2002
        
Network Working Group                                     H. Schulzrinne
Request for Comments: 3326                           Columbia University
Category: Standards Track                                        D. Oran
                                                                   Cisco
                                                            G. Camarillo
                                                                Ericsson
                                                           December 2002
        

The Reason Header Field for the Session Initiation Protocol (SIP)

会话启动协议(SIP)的原因标头字段

Status of this Memo

本备忘录的状况

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.

本文件规定了互联网社区的互联网标准跟踪协议,并要求进行讨论和提出改进建议。有关本协议的标准化状态和状态,请参考当前版本的“互联网官方协议标准”(STD 1)。本备忘录的分发不受限制。

Copyright Notice

版权公告

Copyright (C) The Internet Society (2002). All Rights Reserved.

版权所有(C)互联网协会(2002年)。版权所有。

Abstract

摘要

For creating services, it is often useful to know why a Session Initiation Protocol (SIP) request was issued. This document defines a header field, Reason, that provides this information. The Reason header field is also intended to be used to encapsulate a final status code in a provisional response. This functionality is needed to resolve the "Heterogeneous Error Response Forking Problem", or HERFP.

对于创建服务,了解发出会话启动协议(SIP)请求的原因通常很有用。此文档定义了提供此信息的标题字段Reason。原因标头字段还用于将最终状态代码封装在临时响应中。解决“异构错误响应分叉问题”(HERFP)需要此功能。

Table of Contents

目录

   1.   Introduction ...............................................  2
   1.1. Terminology ................................................  3
   2.   The Reason Request Header Field ............................  3
   3.   Examples ...................................................  4
   3.1. Call Completed Elsewhere ...................................  4
   3.2. Refusing an Offer that Comes in a Response .................  4
   3.3. Third Party Call Control ...................................  5
   3.4. ISUP interworking ..........................................  5
   4.   IANA Considerations ........................................  6
   5.   Security Considerations ....................................  6
   6.   Acknowledgments ............................................  7
   7.   Authors' Addresses .........................................  7
   8.   Normative References .......................................  7
   9.   Full Copyright Statement ...................................  8
        
   1.   Introduction ...............................................  2
   1.1. Terminology ................................................  3
   2.   The Reason Request Header Field ............................  3
   3.   Examples ...................................................  4
   3.1. Call Completed Elsewhere ...................................  4
   3.2. Refusing an Offer that Comes in a Response .................  4
   3.3. Third Party Call Control ...................................  5
   3.4. ISUP interworking ..........................................  5
   4.   IANA Considerations ........................................  6
   5.   Security Considerations ....................................  6
   6.   Acknowledgments ............................................  7
   7.   Authors' Addresses .........................................  7
   8.   Normative References .......................................  7
   9.   Full Copyright Statement ...................................  8
        
1. Introduction
1. 介绍

The same SIP [1] request can be issued for a variety of reasons. For example, a SIP CANCEL request can be issued if the call has completed on another branch or was abandoned before answer. While the protocol and system behavior is the same in both cases, namely, alerting will cease, the user interface may well differ. In the second case, the call may be logged as a missed call, while this would not be appropriate if the call was picked up elsewhere.

出于各种原因,可以发出相同的SIP[1]请求。例如,如果呼叫已在另一个分支上完成或在应答之前被放弃,则可以发出SIP取消请求。虽然协议和系统行为在这两种情况下是相同的,即警报将停止,但用户界面可能完全不同。在第二种情况下,该呼叫可能会被记录为未接呼叫,但如果该呼叫是在其他地方接听的,则不适合这样做。

Third party call controllers sometimes generate a SIP request upon reception of a SIP response from another dialog. Gateways generate SIP requests after receiving messages from a different protocol than SIP. In both cases the client may be interested in knowing what triggered the SIP request.

第三方呼叫控制器有时在接收到来自另一个对话框的SIP响应时生成SIP请求。网关在接收到来自不同于SIP协议的消息后生成SIP请求。在这两种情况下,客户机可能想知道是什么触发了SIP请求。

SIP responses already offer a means of informing the user of why a request failed. The simple mechanism in this document accomplishes something roughly similar for requests.

SIP响应已经提供了一种通知用户请求失败原因的方法。本文档中的简单机制实现了与请求大致相似的功能。

An INVITE can sometimes be rejected not because the session initiation was declined, but because some aspect of the request was not acceptable. If the INVITE forked and resulted in a rejection, the error response may never be forwarded to the client unless all the other branches also reject the request. This problem is known as the "Heterogeneous Error Response Forking Problem", or HERFP. It is foreseen that a solution to this problem may involve encapsulating the final error response in a provisional response. The Reason header field is a candidate to be used for such encapsulation.

有时可以拒绝邀请,这不是因为会话启动被拒绝,而是因为请求的某些方面不可接受。如果INVITE分叉并导致拒绝,则错误响应可能永远不会转发给客户端,除非所有其他分支也拒绝该请求。这个问题称为“异构错误响应分叉问题”,或HERFP。可以预见,该问题的解决方案可能涉及将最终错误响应封装在临时响应中。原因标头字段是用于此类封装的候选字段。

Initially, the Reason header field defined here appears to be most useful for BYE and CANCEL requests, but it can appear in any request within a dialog, in any CANCEL request and in any response whose status code explicitly allows the presence of this header field.

最初,此处定义的原因标头字段似乎对BYE和CANCEL请求最有用,但它可以出现在对话框中的任何请求、任何CANCEL请求以及状态代码明确允许存在此标头字段的任何响应中。

Note that the Reason header field is usually not needed in responses because the status code and the reason phrase already provide sufficient information.

请注意,响应中通常不需要“原因标题”字段,因为状态代码和原因短语已经提供了足够的信息。

Clients and servers are free to ignore this header field. It has no impact on protocol processing.

客户端和服务器可以自由忽略此标头字段。它对协议处理没有影响。

1.1 Terminology
1.1 术语

In this document, the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" are to be interpreted as described in BCP 14, RFC 2119 [2] and indicate requirement levels for compliant SIP implementations.

在本文件中,关键词“必须”、“不得”、“要求”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”将按照BCP 14、RFC 2119[2]中的描述进行解释,并表示符合SIP实施的要求级别。

2. The Reason Header Field
2. 原因标头字段

The Reason header field MAY appear in any request within a dialog, in any CANCEL request and in any response whose status code explicitly allows the presence of this header field. The syntax of the header field follows the standard SIP parameter syntax.

原因标头字段可能出现在对话框中的任何请求、任何取消请求以及状态代码明确允许存在此标头字段的任何响应中。标头字段的语法遵循标准SIP参数语法。

 Reason            =  "Reason" HCOLON reason-value *(COMMA reason-value)
 reason-value      =  protocol *(SEMI reason-params)
 protocol          =  "SIP" / "Q.850" / token
 reason-params     =  protocol-cause / reason-text
                      / reason-extension
 protocol-cause    =  "cause" EQUAL cause
 cause             =  1*DIGIT
 reason-text       =  "text" EQUAL quoted-string
 reason-extension  =  generic-param
        
 Reason            =  "Reason" HCOLON reason-value *(COMMA reason-value)
 reason-value      =  protocol *(SEMI reason-params)
 protocol          =  "SIP" / "Q.850" / token
 reason-params     =  protocol-cause / reason-text
                      / reason-extension
 protocol-cause    =  "cause" EQUAL cause
 cause             =  1*DIGIT
 reason-text       =  "text" EQUAL quoted-string
 reason-extension  =  generic-param
        

The following values for the protocol field have been defined:

已定义协议字段的以下值:

SIP: The cause parameter contains a SIP status code.

SIP:原因参数包含SIP状态代码。

Q.850: The cause parameter contains an ITU-T Q.850 cause value in decimal representation.

Q.850:原因参数包含一个十进制表示的ITU-T Q.850原因值。

Examples are:

例如:

      Reason: SIP ;cause=200 ;text="Call completed elsewhere"
      Reason: Q.850 ;cause=16 ;text="Terminated"
      Reason: SIP ;cause=600 ;text="Busy Everywhere"
      Reason: SIP ;cause=580 ;text="Precondition Failure"
        
      Reason: SIP ;cause=200 ;text="Call completed elsewhere"
      Reason: Q.850 ;cause=16 ;text="Terminated"
      Reason: SIP ;cause=600 ;text="Busy Everywhere"
      Reason: SIP ;cause=580 ;text="Precondition Failure"
        

Proxies generating a CANCEL request upon reception of a CANCEL from the previous hop that contains a Reason header field SHOULD copy it into the new CANCEL request.

从包含原因标头字段的前一跳接收到取消时生成取消请求的代理应将其复制到新的取消请求中。

In normal SIP operation, a SIP status code in a response provides the client with information about the request that triggered the response, the session parameters, or the user. For example, a 405 (Method not allowed) response indicates that the request contained an unsupported method. A 488 (Not Acceptable Here) indicates that the session parameters are unacceptable and a 486 (Busy Here) provides information about the status of the user.

在正常的SIP操作中,响应中的SIP状态代码向客户端提供有关触发响应的请求、会话参数或用户的信息。例如,405(不允许方法)响应指示请求包含不支持的方法。488(此处不可接受)表示会话参数不可接受,486(此处繁忙)提供有关用户状态的信息。

Any SIP status code MAY appear in the Reason header field of a request. However, status codes that provide information about the user and about session parameters are typically useful for implementing services whereas status codes intended to report errors about a request are typically useful for debugging purposes.

任何SIP状态代码都可能出现在请求的原因标头字段中。但是,提供有关用户和会话参数的信息的状态代码通常用于实现服务,而用于报告请求错误的状态代码通常用于调试目的。

A SIP message MAY contain more than one Reason value (i.e., multiple Reason lines), but all of them MUST have different protocol values (e.g., one SIP and another Q.850). An implementation is free to ignore Reason values that it does not understand.

SIP消息可能包含多个原因值(即,多个原因行),但所有原因行必须具有不同的协议值(例如,一个SIP和另一个Q.850)。实现可以自由忽略它不理解的原因值。

3. Examples
3. 例子

This section contains a number of examples that illustrate the use of the Reason header field.

本节包含许多示例,说明了原因标题字段的使用。

3.1 Call Completed Elsewhere
3.1 呼叫在别处完成

A proxy forks an INVITE request and one of the branches returns a 200 (OK). The forking proxy includes this status code in a Reason header field in the CANCEL request that it sends to the rest of the branches.

代理分叉INVITE请求,其中一个分支返回200(OK)。分叉代理将此状态代码包含在向其余分支发送的取消请求的原因标头字段中。

3.2 Refusing an Offer that Comes in a Response
3.2 拒绝回应中的提议

A client sends an empty INVITE and receives an unacceptable offer in a 200 (OK) response. The client sends an ACK with a correctly formatted answer and immediately sends a BYE to terminate the

客户端发送一个空的邀请,并在200(确定)响应中收到一个不可接受的提议。客户端发送一个带有正确格式答案的ACK,并立即发送BYE以终止会话

session. The client includes a 488 (Not Acceptable Here) status code in a Reason header field.

一场客户端在原因标头字段中包含488(此处不可接受)状态代码。

3.3 Third Party Call Control
3.3 第三方呼叫控制

The third party call controller of figure 1 tries to establish a session between A and B. However, user B is busy. The controller sends a BYE with the status code 486 (Busy Here) in a Reason header field.

图1中的第三方呼叫控制器试图在a和B之间建立会话。但是,用户B很忙。控制器在原因标头字段中发送状态代码为486(此处为忙碌)的BYE。

      A                Controller            B
      |   INV  no SDP     |                  |
      |<------------------|                  |
      |                   |                  |
      |    200 SDP A1     |                  |
      |-----------------> |                  |
      |                   |                  |
      |   ACK  SDP held   |                  |
      |<------------------|                  |
      |                   |                  |
      |                   |   INV no SDP     |
      |                   |----------------->|
      |                   |                  |
      |                   |  486 Busy Here   |
      |                   |<-----------------|
      |                   |                  |
      |                   |       ACK        |
      |                   |----------------->|
      |     BYE (486)     |                  |
      |<------------------|                  |
      |                   |                  |
      |     200 OK        |                  |
      |-----------------> |                  |
      |                   |                  |
        
      A                Controller            B
      |   INV  no SDP     |                  |
      |<------------------|                  |
      |                   |                  |
      |    200 SDP A1     |                  |
      |-----------------> |                  |
      |                   |                  |
      |   ACK  SDP held   |                  |
      |<------------------|                  |
      |                   |                  |
      |                   |   INV no SDP     |
      |                   |----------------->|
      |                   |                  |
      |                   |  486 Busy Here   |
      |                   |<-----------------|
      |                   |                  |
      |                   |       ACK        |
      |                   |----------------->|
      |     BYE (486)     |                  |
      |<------------------|                  |
      |                   |                  |
      |     200 OK        |                  |
      |-----------------> |                  |
      |                   |                  |
        

Figure 1: Third Party Call Control

图1:第三方呼叫控制

3.4 ISUP interworking
3.4 我开始互通了

The PSTN gateway of figure 2 generates an INVITE that has to be CANCELed when a REL (release) message is received from the ISUP side. The CANCEL request contains the Q.850 cause value (16 Normal Call Clearing) of the REL message.

图2的PSTN网关生成一个INVITE,当从ISUP端收到REL(release)消息时,该INVITE必须取消。取消请求包含REL消息的Q.850原因值(16正常呼叫清除)。

      A                Gateway               B
      |       IAM         |                  |
      |-----------------> |                  |
      |                   |     INVITE       |
      |                   |----------------->|
      |                   |                  |
      |                   |   100 Trying     |
      |                   |<-----------------|
      |     REL (16)      |                  |
      |-----------------> |                  |
      |                   | CANCEL (Q.850 16)|
      |                   |----------------->|
      |                   |      200 OK      |
      |                   |<-----------------|
        
      A                Gateway               B
      |       IAM         |                  |
      |-----------------> |                  |
      |                   |     INVITE       |
      |                   |----------------->|
      |                   |                  |
      |                   |   100 Trying     |
      |                   |<-----------------|
      |     REL (16)      |                  |
      |-----------------> |                  |
      |                   | CANCEL (Q.850 16)|
      |                   |----------------->|
      |                   |      200 OK      |
      |                   |<-----------------|
        

Figure 2: ISUP Interworking

图2:ISUP互通

4. IANA Considerations
4. IANA考虑

This document defines a new SIP header field, "Reason", according to Section 27 of RFC 3261.

根据RFC 3261第27节,本文件定义了一个新的SIP头字段“原因”。

Protocol values (and their associated protocol cause) to be used with this header field are registered by the IANA into a new sub-registry under http://www.iana.org/assignments/sip-parameters, labeled "Reason Protocols". Reason protocols MUST refer to either an ITU-T Recommendation number, an IETF protocol name or the recognized protocol identifier from another standardization organization. Protocol cause describes the source of the 'cause' field in the Reason header field.

IANA将与此标头字段一起使用的协议值(及其关联的协议原因)注册到下的新子注册表中http://www.iana.org/assignments/sip-parameters,标记为“原因协议”。原因协议必须参考ITU-T建议编号、IETF协议名称或其他标准化组织认可的协议标识符。协议原因描述原因标题字段中“原因”字段的来源。

The only entries in the registry for the time being are:

目前注册表中的唯一条目为:

   Protocol Value   Protocol Cause            Reference
   --------------   ---------------           -----------
   SIP              Status code               RFC 3261
   Q.850            Cause value in decimal    ITU-T Q.850
                    representation
        
   Protocol Value   Protocol Cause            Reference
   --------------   ---------------           -----------
   SIP              Status code               RFC 3261
   Q.850            Cause value in decimal    ITU-T Q.850
                    representation
        
5. Security Considerations
5. 安全考虑

Spoofing or removing the Reason header field from a response in a HERFP scenario can make it impossible for a client to update properly its previous request, making therefore session establishment impossible. Thus, it is RECOMMENDED that this header field is protected by a suitable integrity mechanism.

在HERFP场景中,欺骗或从响应中删除原因标头字段会使客户端无法正确更新其以前的请求,从而无法建立会话。因此,建议使用适当的完整性机制来保护此标头字段。

properly its previous request, making therefore session establishment impossible. Thus, it is RECOMMENDED that this header field is protected by a suitable integrity mechanism.

正确地执行其先前的请求,因此无法建立会话。因此,建议使用适当的完整性机制来保护此标头字段。

6. Acknowledgments
6. 致谢

Jonathan Rosenberg, Rohan Mahy and Vijay K. Gurbani provided helpful comments and suggestions.

Jonathan Rosenberg、Rohan Mahy和Vijay K.Gurbani提供了有益的评论和建议。

8. Normative References
8. 规范性引用文件

[1] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M. and E. Schooler, "SIP: Session Initiation Protocol", RFC 3261, June 2002.

[1] Rosenberg,J.,Schulzrinne,H.,Camarillo,G.,Johnston,A.,Peterson,J.,Sparks,R.,Handley,M.和E.Schooler,“SIP:会话启动协议”,RFC 3261,2002年6月。

[2] Bradner, S., "Key words for use in RFCs to indicate requirement levels," BCP 14, RFC 2119, March 1997.

[2] Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。

7. Authors' Addresses
7. 作者地址

Henning Schulzrinne Dept. of Computer Science Columbia University 1214 Amsterdam Avenue New York, NY 10027 USA

美国纽约州纽约市阿姆斯特丹大道1214号哥伦比亚大学计算机科学系

   EMail:  schulzrinne@cs.columbia.edu
        
   EMail:  schulzrinne@cs.columbia.edu
        

David R. Oran Cisco Systems, Inc. Acton, MA USA

David R.Oran Cisco Systems,Inc.美国马萨诸塞州阿克顿

   EMail:  oran@cisco.com
        
   EMail:  oran@cisco.com
        

Gonzalo Camarillo Ericsson Advanced Signalling Research Lab. FIN-02420 Jorvas Finland

Gonzalo Camarillo Ericsson高级信号研究实验室FIN-02420 Jorvas芬兰

   EMail:  Gonzalo.Camarillo@ericsson.com
        
   EMail:  Gonzalo.Camarillo@ericsson.com
        
9. Full Copyright Statement
9. 完整版权声明

Copyright (C) The Internet Society (2002). All Rights Reserved.

版权所有(C)互联网协会(2002年)。版权所有。

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

本文件及其译本可复制并提供给他人,对其进行评论或解释或协助其实施的衍生作品可全部或部分编制、复制、出版和分发,不受任何限制,前提是上述版权声明和本段包含在所有此类副本和衍生作品中。但是,不得以任何方式修改本文件本身,例如删除版权通知或对互联网协会或其他互联网组织的引用,除非出于制定互联网标准的需要,在这种情况下,必须遵循互联网标准过程中定义的版权程序,或根据需要将其翻译成英语以外的其他语言。

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

上述授予的有限许可是永久性的,互联网协会或其继承人或受让人不会撤销。

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

本文件和其中包含的信息是按“原样”提供的,互联网协会和互联网工程任务组否认所有明示或暗示的保证,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。

Acknowledgement

确认

Funding for the RFC Editor function is currently provided by the Internet Society.

RFC编辑功能的资金目前由互联网协会提供。