RFC3261: SIP:7.1请求

本文详细解释了SIP请求的构成,包括请求行(方法名、URI和协议版本)、方法(如REGISTER、INVITE等)、请求URI的要求以及SIP版本的使用规则,强调了版本号作为文本字符串的处理方式。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

7.1 Requests
7.1请求

   SIP requests are distinguished by having a Request-Line for a start-line.  A Request-Line contains a method name, a Request-URI, and the protocol version separated by a single space (SP) character.

通过将请求行作为起始行来区分SIP请求。请求行包含一个方法名称、一个请求URI和协议版本,用一个空格(SP)字符分隔。

   The Request-Line ends with CRLF.  No CR or LF are allowed except in the end-of-line CRLF sequence.  No linear whitespace (LWS) is allowed in any of the elements.

请求行以CRLF结束。除了行CRLF序列的末尾之外,不允许使用CR或LF。在任何元素中都不允许使用线性空白(LWS)。

         Request-Line  =  Method SP Request-URI SP SIP-Version CRLF
        请求行=方法+空格+请求URI+空格+SIP版本+CRLF

      Method: This specification defines six methods: REGISTER for registering contact information, INVITE, ACK, and CANCEL for setting up sessions, BYE for terminating sessions, and OPTIONS for querying servers about their capabilities.  SIP extensions, documented in standards track RFCs, may define additional methods.

方法:本规范定义了六种方法:REGISTER用于注册联系信息,INVITE、ACK和CANCEL用于设置会话,BYE用于终止会话,OPTIONS用于查询服务器的功能。标准跟踪RFC中记录的SIP扩展可以定义其他方法。

      Request-URI: The Request-URI is a SIP or SIPS URI as described in Section 19.1 or a general URI (RFC 2396 [5]).  It indicates the user or service to which this request is being addressed.The Request-URI MUST NOT contain unescaped spaces or control characters and MUST NOT be enclosed in "<>".

​请求URI:请求URI是第19.1节中描述的SIP或SIPS URI或通用URI(RFC 2396[5])。它指示该请求所针对的用户或服务。请求URI不得包含未加转义的空格或控制字符,并且不得包含在“<>”中。

           SIP elements MAY support Request-URIs with schemes other than "sip" and "sips", for example the "tel" URI scheme of RFC 2806[9].  SIP elements MAY translate non-SIP URIs using any mechanism at their disposal, resulting in SIP URI, SIPS URI, or some other scheme.

​SIP元素可以支持具有除“SIP”和“sips”之外的方案的请求URI,例如RFC 2806[9]的“tel”URI方案。SIP元素可以使用其所掌握的任何机制来翻译非SIP URI,从而产生SIP URI、SIPS URI或一些其他方案。

      SIP-Version: Both request and response messages include the version of SIP in use, and follow [H3.1] (with HTTP replaced by SIP, and HTTP/1.1 replaced by SIP/2.0) regarding version ordering, compliance requirements, and upgrading of version numbers.  To be compliant with this specification, applications sending SIP messages MUST include a SIP-Version of "SIP/2.0".  The SIP-Version string is case-insensitive,but implementations MUST send upper-case.

SIP版本:请求和响应消息都包括正在使用的SIP版本,并遵循[H3.1](HTTP被SIP取代,HTTP/1.1被SIP/2.0取代)关于版本排序、合规性要求和版本号升级。为了符合此规范,发送SIP消息的应用程序必须包括“SIP/2.0”的SIP版本。SIP版本字符串不区分大小写,但实现必须发送大写字母。

           Unlike HTTP/1.1, SIP treats the version number as a literal string.  In practice, this should make no difference.

与HTTP/1.1不同,SIP将版本号视为文字字符串。在实践中,这应该没有什么区别。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值