RFC3261: SIP:10.2构造REGISTER请求

10.2 Constructing the REGISTER Request
10.2构造REGISTER请求

   REGISTER requests add, remove, and query bindings.  A REGISTER request can add a new binding between an address-of-record and one or more contact addresses.  Registration on behalf of a particular address-of-record can be performed by a suitably authorized third party.  A client can also remove previous bindings or query to determine which bindings are currently in place for an address-of-record.

REGISTER请求添加、删除和查询绑定。REGISTER请求可以在记录的地址和一个或多个联系人地址之间添加新的绑定。可以由适当授权的第三方代表特定记录地址进行注册。客户端还可以删除以前的绑定或查询,以确定记录地址的当前绑定。

   Except as noted, the construction of the REGISTER request and the behavior of clients sending a REGISTER request is identical to the general UAC behavior described in Section 8.1 and Section 17.1.

​除非另有说明,REGISTER请求的构造和发送REGISTER请求的客户端的行为与第8.1节和第17.1节中描述的通用UAC行为相同。

   A REGISTER request does not establish a dialog.  A UAC MAY include a Route header field in a REGISTER request based on a pre-existing route set as described in Section 8.1.  The Record-Route header field has no meaning in REGISTER requests or responses, and MUST be ignored if present.  In particular, the UAC MUST NOT create a new route set based on the presence or absence of a Record-Route header field in any response to a REGISTER request.

​REGISTER请求不会建立对话。UAC可以根据第8.1节中描述的预先存在的路由集,在REGISTER请求中包括路由报头字段。记录路由报头字段在REGISTER请求或响应中没有任何意义,如果存在,则必须忽略。特别是,UAC不得基于对REGISTER请求的任何响应中是否存在记录路由报头字段来创建新的路由集。

   The following header fields, except Contact, MUST be included in a REGISTER request.  A Contact header field MAY be included:

REGISTER请求中必须包括以下报头字段(Contact除外)。可以包括Contact报头字段:

      Request-URI: The Request-URI names the domain of the location service for which the registration is meant (for example,"sip:chicago.com").  The "userinfo" and "@" components of the SIP URI MUST NOT be present.

请求URI:请求URI命名要注册的定位服务的域(例如,“sip:chicago.com”)。SIP URI的“userinfo”和“@”组件不得存在。

      To: The To header field contains the address of record whose registration is to be created, queried, or modified.  The To header field and the Request-URI field typically differ, as the former contains a user name.  This address-of-record MUST be a SIP URI or SIPS URI.

To:To报头字段包含要创建、查询或修改其注册的记录的地址。To头字段和RequestURI字段通常不同,因为前者包含用户名。此记录地址必须是SIP URI或SIPS URI。

      From: The From header field contains the address-of-record of the person responsible for the registration.  The value is the same as the To header field unless the request is a third-party registration.

From:From报头字段包含负责注册的人员的记录地址。除非请求是第三方注册,否则该值与To报头字段相同。

      Call-ID: All registrations from a UAC SHOULD use the same Call-ID header field value for registrations sent to a particular registrar.

呼叫ID:来自UAC的所有注册都应该使用相同的呼叫ID报头字段值,用于发送到特定注册器的注册。

           If the same client were to use different Call-ID values, a registrar could not detect whether a delayed REGISTER request might have arrived out of order.

如果同一客户端使用不同的呼叫ID值,则注册器无法检测延迟的REGISTER请求是否已无序到达。

      CSeq: The CSeq value guarantees proper ordering of REGISTER requests.  A UA MUST increment the CSeq value by one for each REGISTER request with the same Call-ID.

CSeq:CSeq值保证REGISTER请求的正确顺序。UA必须为具有相同Call-ID的每个REGISTER请求将CSeq值增加一。

      Contact: REGISTER requests MAY contain a Contact header field with zero or more values containing address bindings.

联系人:REGISTER请求可能包含一个Contact报头字段,其中包含零个或多个包含地址绑定的值。

   UAs MUST NOT send a new registration (that is, containing new Contact header field values, as opposed to a retransmission) until they have received a final response from the registrar for the previous one or the previous REGISTER request has timed out.

UA在收到注册器对前一个注册的最终响应或前一个REGISTER请求超时之前,不得发送新的注册(即,包含新的Contact报头字段值,而不是重传)。

                                                 bob
                                               +----+
                                               | UA |
                                               |    |
                                               +----+
                                                  |
                                                  |3)INVITE
                                                  |   carol@chicago.com
         chicago.com        +--------+            V
         +---------+ 2)Store|Location|4)Query +-----+
         |Registrar|=======>| Service|<=======|Proxy|sip.chicago.com
         +---------+        +--------+=======>+-----+
               A                      5)Resp      |
               |                                  |
               |                                  |
     1)REGISTER|                                  |
               |                                  |
            +----+                                |
            | UA |<-------------------------------+
   cube2214a|    |                            6)INVITE
            +----+                    carol@cube2214a.chicago.com
             carol

                      Figure 2: REGISTER example
                        图2:REGISTER示例

      The following Contact header parameters have a special meaning in REGISTER requests:

以下Contact报头参数在REGISTER请求中具有特殊含义:

      action: The "action" parameter from RFC 2543 has been deprecated. UACs SHOULD NOT use the "action" parameter.

​action:RFC 2543中的“action”参数已被弃用。UAC不应使用“action”参数。

      expires: The "expires" parameter indicates how long the UA would like the binding to be valid.  The value is a number indicating seconds.  If this parameter is not provided, the value of the Expires header field is used instead. Implementations MAY treat values larger than 2**32-1(4294967295 seconds or 136 years) as equivalent to 2**32-1. Malformed values SHOULD be treated as equivalent to 3600.

expires:“expires”参数指示UA希望绑定有效的时间。该值是一个表示秒数的数字。如果未提供此参数,则使用Expires报头字段的值。实际可能会将大于2**32-1(4294967295秒或136年)的值视为等效于2**32-1。格式不正确的值应视为等效于3600。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值