18.2.2 Sending Responses 18.2.2 发送响应 The server transport uses the value of the top Via header field in order to determine where to send a response. It MUST follow the following process: 服务端传输使用顶部Via报头字段的值来确定发送响应的位置。必须遵循以下流程: o If the "sent-protocol" is a reliable transport protocol such as TCP or SCTP, or TLS over those, the response MUST be sent using the existing connection to the source of the original request that created the transaction, if that connection is still open. This requires the server transport to maintain an association between server transactions and transport connections. If that connection is no longer open, the server SHOULD open a connection to the IP address in the "received" parameter, if present, using the port in the "sent-by" value, or the default port for that transport, if no port is specified. If that connection attempt fails, the server SHOULD use the procedures in [4] for servers in order to determine the IP address and port to open the connection and send the response to. o如果“发送的协议”是可靠的传输协议,如TCP或SCTP,或TLS,则必须使用与创建事务的原始请求源的现有连接发送响应,如果该连接仍然打开。这需要服务端传输维护服务端事务和传输连接之间的关联。如果该连接不再打开,则服务端应使用“sent-by”值中的端口打开到“已接收”参数中IP地址的连接(如果存在),如果未指定端口,则使用该传输的默认端口。如果连接尝试失败,则服务端应使用[4]中针对服务端的过程,以确定打开连接并向其发送响应的IP地址和端口。 o Otherwise, if the Via header field value contains a "maddr" parameter, the response MUST be forwarded to the address listed there, using the port indicated in "sent-by", or port 5060 if none is present. If the address is a multicast address, the response SHOULD be sent using the TTL indicated in the "ttl" parameter, or with a TTL of 1 if that parameter is not present. o否则,如果Via报头字段值包含“maddr”参数,则必须使用“sended-by”中指示的端口或端口5060(如果不存在)将响应转发到此处列出的地址。如果地址是多播地址,则应使用“TTL”参数中指示的TTL发送响应,如果该参数不存在,则使用TTL 1发送响应。 o Otherwise (for unreliable unicast transports), if the top Via has a "received" parameter, the response MUST be sent to the address in the "received" parameter, using the port indicated in the "sent-by" value, or using port 5060 if none is specified explicitly. If this fails, for example, elicits an ICMP "port unreachable" response, the procedures of Section 5 of [4] SHOULD be used to determine where to send the response.
o否则(对于不可靠的单播传输),如果顶部Via具有“received”参数,则必须使用“sended-by”值中指示的端口将响应发送到“receiveed”参数中的地址,如果未明确指定,则使用端口5060。例如,如果失败,引发ICMP“端口不可达”响应,则应使用[4]第5节的程序来确定将响应发送到何处。
o Otherwise, if it is not receiver-tagged, the response MUST be sent to the address indicated by the "sent-by" value, using the procedures in Section 5 of [4].
o否则,如果未标记接收者,则必须使用[4]第5节中的程序将响应发送到“sent-by”值所指示的地址。
基于Via报头字段的服务器响应路由策略
本文详细描述了服务器如何根据Via报头字段的值决定响应的发送方式,包括使用可靠的连接、多播和单播地址,以及在不同情况下的默认端口选择和错误处理机制。
671

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



