17.1.3 Matching Responses to Client Transactions 17.1.3 对客户端事务的匹配响应 When the transport layer in the client receives a response, it has to determine which client transaction will handle the response, so that the processing of Sections 17.1.1 and 17.1.2 can take place. The branch parameter in the top Via header field is used for this purpose. A response matches a client transaction under two conditions: 当客户端中的传输层接收到响应时,它必须确定哪个客户端事务将处理该响应,以便可以进行第17.1.1节和第17.1.2节的处理。顶部Via报头字段中的分支参数用于此目的。响应在两个条件下匹配客户端事务: 1. If the response has the same value of the branch parameter in the top Via header field as the branch parameter in the top Via header field of the request that created the transaction. 1.如果响应的顶部Via报头字段中的分支参数值与创建事务的请求的顶部Via报头字段中分支参数值相同。 2. If the method parameter in the CSeq header field matches the method of the request that created the transaction. The method is needed since a CANCEL request constitutes a different transaction, but shares the same value of the branch parameter. 2.如果CSeq报头字段中的方法参数与创建事务的请求的方法匹配。需要该方法,因为CANCEL请求构成不同的事务,但共享相同的分支参数值。 If a request is sent via multicast, it is possible that it will generate multiple responses from different servers. These responses will all have the same branch parameter in the topmost Via, but vary in the To tag. The first response received, based on the rules above, will be used, and others will be viewed as retransmissions. That is not an error; multicast SIP provides only a rudimentary "single-hop-discovery-like" service that is limited to processing a single response. See Section 18.1.1 for details.
如果通过多播发送请求,则可能会从不同的服务器生成多个响应。这些响应在最上面的Via中都具有相同的分支参数,但在To标记中有所不同。将使用基于上述规则接收到的第一个响应,并且其他响应将被视为重传。这不是一个错误;多播SIP仅提供基本的“单跳发现式”服务,该服务仅限于处理单个响应。详见第18.1.1节。