⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc2543.txt

📁 sip_rfc2543 标准化文档
💻 TXT
📖 第 1 页 / 共 5 页
字号:
        | . |                            :                               :
        | . |                            :                               :
        | . |                            :                               :
        | . |                            :                               :
        | . | 6: INVITE hgs@lab.cs.columbia.edu                 (~~~~~~) : 
        | . ==================================================> (      ) :
        | ..................................................... (      ) :
        |     7: 200 OK                  :                      ( lab  ) : 
        |                                :                      (      ) :
        |     8: ACK                     :                      (      ) :
        ======================================================> (~~~~~~) :
                                         +...............................+ 
                                                                          
  ====> SIP request                                                        
  ....> SIP response                                                       
    
    ^
    |   non-SIP protocols                                                  
    |




   Figure 2: Example of SIP redirect server

Handley, et al.             Standards Track                    [Page 19]

RFC 2543            SIP: Session Initiation Protocol          March 1999


   When TCP is used, SIP can use one or more connections to attempt to
   contact a user or to modify parameters of an existing conference.
   Different SIP requests for the same SIP call MAY use different TCP
   connections or a single persistent connection, as appropriate.

   For concreteness, this document will only refer to Internet
   protocols.  However, SIP MAY also be used directly with protocols
   such as ATM AAL5, IPX, frame relay or X.25. The necessary naming
   conventions are beyond the scope of this document. User agents SHOULD
   implement both UDP and TCP transport. Proxy, registrar, and redirect
   servers MUST implement both UDP and TCP transport.

1.5.3 Text-Based

   SIP is text-based, using ISO 10646 in UTF-8 encoding throughout. This
   allows easy implementation in languages such as Java, Tcl and Perl,
   allows easy debugging, and most importantly, makes SIP flexible and
   extensible. As SIP is used for initiating multimedia conferences
   rather than delivering media data, it is believed that the additional
   overhead of using a text-based protocol is not significant.

2 SIP Uniform Resource Locators

   SIP URLs are used within SIP messages to indicate the originator
   (From), current destination (Request-URI) and final recipient (To) of
   a SIP request, and to specify redirection addresses (Contact). A SIP
   URL can also be embedded in web pages or other hyperlinks to indicate
   that a particular user or service can be called via SIP. When used as
   a hyperlink, the SIP URL indicates the use of the INVITE method.

   The SIP URL scheme is defined to allow setting SIP request-header
   fields and the SIP message-body.


        This corresponds to the use of mailto: URLs. It makes it
        possible, for example, to specify the subject, urgency or
        media types of calls initiated through a web page or as
        part of an email message.

   A SIP URL follows the guidelines of RFC 2396 [12] and has the syntax
   shown in Fig. 3. The syntax is described using Augmented Backus-Naur
   Form (See Section C). Note that reserved characters have to be
   escaped and that the "set of characters reserved within any given URI
   component is defined by that component. In general, a character is
   reserved if the semantics of the URI changes if the character is
   replaced with its escaped US-ASCII encoding" [12].





Handley, et al.             Standards Track                    [Page 20]

RFC 2543            SIP: Session Initiation Protocol          March 1999




  SIP-URL         = "sip:" [ userinfo "@" ] hostport
                    url-parameters [ headers ]
  userinfo        = user [ ":" password ]
  user            = *( unreserved | escaped
                  | "&" | "=" | "+" | "$" | "," )
  password        = *( unreserved | escaped
                  | "&" | "=" | "+" | "$" | "," )
  hostport        = host [ ":" port ]
  host            = hostname | IPv4address
  hostname        = *( domainlabel "." ) toplabel [ "." ]
  domainlabel     = alphanum | alphanum *( alphanum | "-" ) alphanum
  toplabel        = alpha | alpha *( alphanum | "-" ) alphanum
  IPv4address     = 1*digit "." 1*digit "." 1*digit "." 1*digit
  port            = *digit
  url-parameters  = *( ";" url-parameter )
  url-parameter   = transport-param | user-param | method-param
                  | ttl-param | maddr-param | other-param
  transport-param = "transport=" ( "udp" | "tcp" )
  ttl-param       = "ttl=" ttl
  ttl             = 1*3DIGIT       ; 0 to 255
  maddr-param     = "maddr=" host
  user-param      = "user=" ( "phone" | "ip" )
  method-param    = "method=" Method
  tag-param       = "tag=" UUID
  UUID            = 1*( hex | "-" )
  other-param     = ( token | ( token "=" ( token | quoted-string )))
  headers         = "?" header *( "&" header )
  header          = hname "=" hvalue
  hname           = 1*uric
  hvalue          = *uric
  uric            = reserved | unreserved | escaped
  reserved        = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" |
                    "$" | ","
  digits          = 1*DIGIT


   Figure 3: SIP URL syntax



   The URI character classes referenced above are described in Appendix
   C.

   The components of the SIP URI have the following meanings.





Handley, et al.             Standards Track                    [Page 21]

RFC 2543            SIP: Session Initiation Protocol          March 1999




telephone-subscriber  = global-phone-number | local-phone-number
   global-phone-number   = "+" 1*phonedigit [isdn-subaddress]
                             [post-dial]
   local-phone-number    = 1*(phonedigit | dtmf-digit | 
                             pause-character) [isdn-subaddress] 
                             [post-dial]
   isdn-subaddress       = ";isub=" 1*phonedigit
   post-dial             = ";postd=" 1*(phonedigit | dtmf-digit
                         |  pause-character)
   phonedigit            = DIGIT | visual-separator
   visual-separator      = "-" | "."
   pause-character       = one-second-pause | wait-for-dial-tone
   one-second-pause      = "p"
   wait-for-dial-tone    = "w"
   dtmf-digit            = "*" | "#" | "A" | "B" | "C" | "D"

   Figure 4: SIP URL syntax; telephone subscriber

   user: If the host is an Internet telephony gateway, the user field
        MAY also encode a telephone number using the notation of
        telephone-subscriber (Fig. 4). The telephone number is a special
        case of a user name and cannot be distinguished by a BNF. Thus,
        a URL parameter, user, is added to distinguish telephone numbers
        from user names. The phone identifier is to be used when
        connecting to a telephony gateway. Even without this parameter,
        recipients of SIP URLs MAY interpret the pre-@ part as a phone
        number if local restrictions on the name space for user name
        allow it.

   password: The SIP scheme MAY use the format "user:password" in the
        userinfo field. The use of passwords in the userinfo is NOT
        RECOMMENDED, because the passing of authentication information
        in clear text (such as URIs) has proven to be a security risk in
        almost every case where it has been used.

   host: The mailto: URL and RFC 822 email addresses require that
        numeric host addresses ("host numbers") are enclosed in square
        brackets (presumably, since host names might be numeric), while
        host numbers without brackets are used for all other URLs. The
        SIP URL requires the latter form, without brackets.

   The issue of IPv6 literal addresses in URLs is being looked at
   elsewhere in the IETF. SIP implementers are advised to keep up to
   date on that activity.




Handley, et al.             Standards Track                    [Page 22]

RFC 2543            SIP: Session Initiation Protocol          March 1999


   port: The port number to send a request to. If not present, the
        procedures outlined in Section 1.4.2 are used to determine the
        port number to send a request to.

   URL parameters: SIP URLs can define specific parameters of the
        request. URL parameters are added after the host component and
        are separated by semi-colons. The transport parameter determines
        the the transport mechanism (UDP or TCP). UDP is to be assumed
        when no explicit transport parameter is included. The maddr
        parameter provides the server address to be contacted for this
        user, overriding the address supplied in the host field.  This
        address is typically a multicast address, but could also be the
        address of a backup server. The ttl parameter determines the
        time-to-live value of the UDP multicast packet and MUST only be
        used if maddr is a multicast address and the transport protocol
        is UDP. The user parameter was described above. For example, to
        specify to call j.doe@big.com using multicast to 239.255.255.1
        with a ttl of 15, the following URL would be used:


     sip:j.doe@big.com;maddr=239.255.255.1;ttl=15



   The transport, maddr, and ttl parameters MUST NOT be used in the From
   and To header fields and the Request-URI; they are ignored if
   present.

   Headers: Headers of the SIP request can be defined with the "?"
        mechanism within a SIP URL. The special hname "body" indicates
        that the associated hvalue is the message-body of the SIP INVITE
        request. Headers MUST NOT be used in the From and To header
        fields and the Request-URI; they are ignored if present.  hname
        and hvalue are encodings of a SIP header name and value,
        respectively. All URL reserved characters in the header names
        and values MUST be escaped.

   Method: The method of the SIP request can be specified with the
        method parameter.  This parameter MUST NOT be used in the From
        and To header fields and the Request-URI; they are ignored if
        present.

   Table 2 summarizes where the components of the SIP URL can be used
   and what default values they assume if not present.


   Examples of SIP URLs are:




Handley, et al.             Standards Track                    [Page 23]

RFC 2543            SIP: Session Initiation Protocol          March 1999



                     default    Req.-URI  To  From  Contact  external
      user           --         x         x   x     x        x
      password       --         x         x         x        x
      host           mandatory  x         x   x     x        x
      port           5060       x         x   x     x        x

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -