8.1.1.7 Via The Via header field indicates the transport used for the transaction and identifies the location where the response is to be sent. A Via header field value is added only after the transport that will be used to reach the next hop has been selected (which may involve the usage of the procedures in [4]). Via报头字段指示用于事务的传输,并标识发送响应的位置。只有在选择了将用于到达下一跳的传输之后,才会添加Via头字段值(这可能涉及使用[4]中的过程)。 When the UAC creates a request, it MUST insert a Via into that request. The protocol name and protocol version in the header field MUST be SIP and 2.0, respectively. The Via header field value MUST contain a branch parameter. This parameter is used to identify the transaction created by that request. This parameter is used by both the client and the server. 当UAC创建一个请求时,它必须在该请求中插入一个Via。报头字段中的协议名称和协议版本必须分别为SIP和2.0。Via标头字段值必须包含分支参数。此参数用于标识该请求创建的事务。客户端和服务器都使用此参数。 The branch parameter value MUST be unique across space and time for all requests sent by the UA. The exceptions to this rule are CANCEL and ACK for non-2xx responses. As discussed below, a CANCEL request will have the same value of the branch parameter as the request it cancels. As discussed in Section 17.1.1.3, an ACK for a non-2xx response will also have the same branch ID as the INVITE whose response it acknowledges. 对于UA发送的所有请求,分支参数值在空间和时间上必须是唯一的。对于非2xx响应,此规则的例外情况为CANCEL和ACK。如下所述,CANCEL请求将具有与其取消的请求相同的分支参数值。如第17.1.1.3节所述,非2xx响应的ACK也将具有与其确认响应的INVITE相同的分支ID。 The uniqueness property of the branch ID parameter, to facilitate its use as a transaction ID, was not part of RFC 2543. 为了便于将分支ID参数用作事务ID,分支ID参数的唯一性属性不是RFC 2543的一部分。 The branch ID inserted by an element compliant with this specification MUST always begin with the characters "z9hG4bK". These 7 characters are used as a magic cookie (7 is deemed sufficient to ensure that an older RFC 2543 implementation would not pick such a value), so that servers receiving the request can determine that the branch ID was constructed in the fashion described by this specification (that is, globally unique). Beyond this requirement, the precise format of the branch token is implementation-defined. 符合本规范的元素插入的分支ID必须始终以字符“z9hG4bK”开头。这7个字符被用作魔术cookie(7被认为足以确保旧的RFC 2543实现不会选择这样的值),使得接收请求的服务器可以确定分支ID是以本规范所描述的方式构建的(即,全局唯一)。除了这个要求之外,分支令牌的精确格式是由实现定义的。 The Via header maddr, ttl, and sent-by components will be set when the request is processed by the transport layer (Section 18). 当传输层处理请求时,将设置组件发送的Via标头maddr、ttl和(第18节)。 Via processing for proxies is described in Section 16.6 Item 8 and Section 16.7 Item 3.
第16.6节第8项和第16.7节第3项对代理的处理进行了说明。
本文详细解释了SIP协议中的Via头字段,包括其在事务标识、传输路径跟踪和分支参数的独特性中的作用。特别提到了branch参数的使用、全局唯一性以及代理处理的相关内容。

3712

被折叠的 条评论
为什么被折叠?



