RFC3261: SIP:11.1 OPTIONS请求的构建

11.1 Construction of OPTIONS Request
11.1 OPTIONS请求的构建

   An OPTIONS request is constructed using the standard rules for a SIP request as discussed in Section 8.1.1.

​OPTIONS请求是使用第8.1.1节中讨论的SIP请求的标准规则构建的。

   A Contact header field MAY be present in an OPTIONS.

OPTIONS中可能存在Contact报头字段。

   An Accept header field SHOULD be included to indicate the type of message body the UAC wishes to receive in the response.  Typically, this is set to a format that is used to describe the media capabilities of a UA, such as SDP (application/sdp).

应包括Accept报头字段,以指示UAC希望在响应中接收的消息体类型。通常,这被设置为用于描述UA的媒体能力的格式,例如SDP(application/SDP)。

   The response to an OPTIONS request is assumed to be scoped to the Request-URI in the original request.  However, only when an OPTIONS is sent as part of an established dialog is it guaranteed that future requests will be received by the server that generated the OPTIONS response.

假设对OPTIONS请求的响应的范围为原始请求中的请求URI。但是,只有当OPTIONS作为已建立对话的一部分发送时,才能保证生成OPTIONS响应的服务器将接收到未来的请求。

   Example OPTIONS request:
OPTIONS请求示例:

      OPTIONS sip:carol@chicago.com SIP/2.0
      Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKhjhs8ass877
      Max-Forwards: 70
      To: <sip:carol@chicago.com>
      From: Alice <sip:alice@atlanta.com>;tag=1928301774
      Call-ID: a84b4c76e66710
      CSeq: 63104 OPTIONS
      Contact: <sip:alice@pc33.atlanta.com>
      Accept: application/sdp
      Content-Length: 0