RFC3261: SIP:20.10 Contact

本文详细解释了Contact报头字段在SIP和HTTP中的作用,涉及参数“q”和“expires”的定义,展示了如何解析显示名称、URI和参数,以及与Location头字段的区别,以示例说明其用法。
摘要由CSDN通过智能技术生成
20.10 Contact

   A Contact header field value provides a URI whose meaning depends on the type of request or response it is in.

Contact报头字段值提供一个URI,其含义取决于请求或响应的类型。

   A Contact header field value can contain a display name, a URI with URI parameters, and header parameters.

Contact报头字段值可以包含显示名称、带有URI参数的URI和报头参数。

   This document defines the Contact parameters "q" and "expires". These parameters are only used when the Contact is present in a REGISTER request or response, or in a 3xx response.  Additional parameters may be defined in other specifications.

本文档定义了Contact参数“q”和“expires”。仅当Contact出现在REGISTER请求或响应中,或出现在3xx响应中时,才使用这些参数。其他参数可以在其他规范中定义。

   When the header field value contains a display name, the URI including all URI parameters is enclosed in "<" and ">".  If no "<" and ">" are present, all parameters after the URI are header parameters, not URI parameters.  The display name can be tokens, or a quoted string, if a larger character set is desired.

当报头字段值包含显示名称时,包含所有URI参数的URI都包含在“<”和“>”中。如果不存在“<”和“>”,则URI之后的所有参数都是报头参数,而不是URI参数。如果需要更大的字符集,则显示名称可以是标记,也可以是带引号的字符串。

   Even if the "display-name" is empty, the "name-addr" form MUST be used if the "addr-spec" contains a comma, semicolon, or question mark.  There may or may not be LWS between the display-name and the "<".

即使“display-name”为空,如果“addr-spec”包含逗号、分号或问号,也必须使用“name-addr”形式。显示名称和“<”之间可能有也可能没有LWS。

   These rules for parsing a display name, URI and URI parameters, and header parameters also apply for the header fields To and From.

这些用于解析显示名称、URI和URI参数以及报头参数的规则也适用于报头字段To和From。

      The Contact header field has a role similar to the Location header field in HTTP.  However, the HTTP header field only allows one address, unquoted.  Since URIs can contain commas and semicolons as reserved characters, they can be mistaken for header or parameter delimiters, respectively.

Contact报头字段的作用类似于HTTP中的Location报头字段。但是,HTTP报头字段只允许一个未加引号的地址。由于URI可以包含逗号和分号作为保留字符,因此它们可能分别被误认为是报头或参数分隔符。

   The compact form of the Contact header field is m (for "moved").

Contact报头字段的紧凑形式为m(表示“移动”)。

   Examples:

示例:

      Contact: "Mr. Watson" <sip:watson@worcester.bell-telephone.com>;q=0.7; expires=3600, "Mr. Watson" <mailto:watson@bell-telephone.com> ;q=0.1m: <sips:bob@192.0.2.4>;expires=60
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值