RFC3261: SIP:8.3重定向服务器

8.3 Redirect Servers
8.3重定向服务器

   In some architectures it may be desirable to reduce the processing load on proxy servers that are responsible for routing requests, and improve signaling path robustness, by relying on redirection.

在一些体系结构中,可能希望通过依赖重定向来减少负责路由请求的代理服务器上的处理负载,并提高信令路径的鲁棒性。

   Redirection allows servers to push routing information for a request back in a response to the client, thereby taking themselves out of the loop of further messaging for this transaction while still aiding in locating the target of the request.  When the originator of the request receives the redirection, it will send a new request based on the URI(s) it has received.  By propagating URIs from the core of the network to its edges, redirection allows for considerable network scalability.

重定向允许服务器将请求的路由信息推送回客户端作为响应,从而使自己脱离该事务的进一步消息传递循环,同时仍有助于定位请求的目标。当请求的发起方收到重定向时,它将根据收到的URI发送一个新的请求。通过将URI从网络的核心传播到其边缘,重定向允许相当大的网络可扩展性。

   A redirect server is logically constituted of a server transaction layer and a transaction user that has access to a location service of some kind (see Section 10 for more on registrars and location services).  This location service is effectively a database containing mappings between a single URI and a set of one or more alternative locations at which the target of that URI can be found.

​重定向服务器在逻辑上由服务器事务层和可以访问某种定位服务的事务用户组成(有关注册器和定位服务的更多信息,请参阅第10节)。这个位置服务实际上是一个数据库,包含单个URI和一组一个或多个替代位置之间的映射,在这些位置可以找到该URI的目标。

   A redirect server does not issue any SIP requests of its own.  After receiving a request other than CANCEL, the server either refuses the request or gathers the list of alternative locations from the location service and returns a final response of class 3xx.  For well-formed CANCEL requests, it SHOULD return a 2xx response.  This response ends the SIP transaction.  The redirect server maintains transaction state for an entire SIP transaction.  It is the responsibility of clients to detect forwarding loops between redirect servers.

重定向服务器本身不会发出任何SIP请求。在接收到除CANCEL以外的请求后,服务器拒绝该请求或从定位服务收集替代位置的列表,并返回类3xx的最终响应。对于格式正确的CANCEL请求,它应该返回2xx响应。此响应结束SIP事务。重定向服务器维护整个SIP事务的事务状态。客户端有责任检测重定向服务器之间的转发循环。

   When a redirect server returns a 3xx response to a request, it populates the list of (one or more) alternative locations into the Contact header field.  An "expires" parameter to the Contact header field values may also be supplied to indicate the lifetime of the Contact data.

当重定向服务器对请求返回3xx响应时,它会将(一个或多个)备选位置的列表填充到Contact报头字段中。还可以提供联系人报头字段值的“过期”参数,以指示联系人数据的生存期。

   The Contact header field contains URIs giving the new locations or user names to try, or may simply specify additional transport parameters.  A 301 (Moved Permanently) or 302 (Moved Temporarily) response may also give the same location and username that was targeted by the initial request but specify additional transport parameters such as a different server or multicast address to try, or a change of SIP transport from UDP to TCP or vice versa.

Contact报头字段包含URI,提供要尝试的新位置或用户名,或者可以简单地指定其他传输参数。301(永久移动)或302(临时移动)响应也可以给出初始请求所针对的相同位置和用户名,但指定额外的传输参数,例如要尝试的不同服务器或多播地址,或者SIP传输从UDP到TCP的改变,反之亦然。

   However, redirect servers MUST NOT redirect a request to a URI equal to the one in the Request-URI; instead, provided that the URI does not point to itself, the server MAY proxy the request to the destination URI, or MAY reject it with a 404.

但是,重定向服务器不得将请求重定向到与请求URI中的URI相等的URI;相反,假设URI不指向自己,服务器可以将请求代理到目的地URI,或者可以用404拒绝它。

      If a client is using an outbound proxy, and that proxy actually redirects requests, a potential arises for infinite redirection loops.

如果客户端正在使用出站代理,而该代理实际上重定向了请求,则可能会出现无限的重定向循环。

   Note that a Contact header field value MAY also refer to a different resource than the one originally called.  For example, a SIP call connected to PSTN gateway may need to deliver a special informational announcement such as "The number you have dialed has been changed."

请注意,Contact报头字段值也可能引用与最初调用的资源不同的资源。例如,连接到PSTN网关的SIP呼叫可能需要发送一个特殊的信息通知,如“您拨打的号码已更改”

   A Contact response header field can contain any suitable URI indicating where the called party can be reached, not limited to SIP URIs.  For example, it could contain URIs for phones, fax, or irc (if they were defined) or a mailto:  (RFC 2368 [32]) URL.  Section 26.4.4 discusses implications and limitations of redirecting a SIPS URI to a non-SIPS URI.

​Contact响应报头字段可以包含指示可以到达被叫方的任何合适的URI,而不限于SIP URI。例如,它可以包含电话、传真或irc的URI(如果已定义)或mailto:(RFC 2368[32])URL。第26.4.4节讨论了将SIPS URI重定向到非SIPS URI的含义和限制。

   The "expires" parameter of a Contact header field value indicates how long the URI is valid.  The value of the parameter is a number indicating seconds.  If this parameter is not provided, the value of the Expires header field determines how long the URI is valid. Malformed values SHOULD be treated as equivalent to 3600.

Contact报头字段值的“expires”参数指示URI的有效期。参数的值是一个表示秒数的数字。如果未提供此参数,Expires报头字段的值将决定URI的有效期。格式不正确的值应视为等效于3600。

     This provides a modest level of backwards compatibility with RFC 2543, which allowed absolute times in this header field.  If an absolute time is received, it will be treated as malformed, and then default to 3600.

​这提供了与RFC 2543的适度向后兼容性,RFC 2543允许在该报头字段中使用绝对时间。如果接收到绝对时间,它将被视为格式错误,然后默认为3600。

   Redirect servers MUST ignore features that are not understood (including unrecognized header fields, any unknown option tags in Require, or even method names) and proceed with the redirection of the request in question.

重定向服务器必须忽略无法理解的功能(包括无法识别的报头字段、Require中的任何未知选项标记,甚至方法名称),然后继续重定向有问题的请求。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值