RFC3261: SIP:16.10 取消处理

16.10 CANCEL Processing
16.10 取消处理

   A stateful proxy MAY generate a CANCEL to any other request it has generated at any time (subject to receiving a provisional response to that request as described in section 9.1).  A proxy MUST cancel any pending client transactions associated with a response context when it receives a matching CANCEL request.

?有状态代理可以在任何时候对其生成的任何其他请求生成CANCEL(根据第9.1节中所述接收对该请求的临时响应)。当代理收到匹配的CANCEL请求时,必须取消与响应上下文相关的任何未决客户端事务。

   A stateful proxy MAY generate CANCEL requests for pending INVITE client transactions based on the period specified in the INVITE's Expires header field elapsing.  However, this is generally unnecessary since the endpoints involved will take care of signaling the end of the transaction.

有状态代理可以根据INVITE的Expires报头字段中指定的经过时间,为未决的INVITE客户端事务生成CANCEL请求。然而,这通常是不必要的,因为所涉及的端点将负责发出事务结束的信号。

   While a CANCEL request is handled in a stateful proxy by its own server transaction, a new response context is not created for it. Instead, the proxy layer searches its existing response contexts for the server transaction handling the request associated with this CANCEL.  If a matching response context is found, the element MUST immediately return a 200 (OK) response to the CANCEL request.  In this case, the element is acting as a user agent server as defined in Section 8.2.  Furthermore, the element MUST generate CANCEL requests for all pending client transactions in the context as described in Section 16.7 step 10.

?当CANCEL请求在有状态代理中由其自己的服务器事务处理时,不会为其创建新的响应上下文。相反,代理层在其现有响应上下文中搜索处理与该CANCEL相关联的请求的服务器事务。如果找到匹配的响应上下文,则元素必须立即返回对CANCEL请求的200(OK)响应。在这种情况下,元素充当第8.2节中定义的用户代理服务器。此外,如第16.7节步骤10所述,该元素必须为上下文中的所有未决客户端事务生成CANCEL请求。

   If a response context is not found, the element does not have any knowledge of the request to apply the CANCEL to.  It MUST statelessly forward the CANCEL request (it may have statelessly forwarded the associated request previously).

如果找不到响应上下文,则该元素不知道要应用CANCEL的请求。它必须无状态地转发CANCEL请求(它以前可能已无状态地发送了相关请求)。