home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_j_p / draft-ietf-mmusic-sip-01.txt < prev    next >
Text File  |  1996-12-17  |  59KB  |  1,684 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8. Internet Engineering Task Force                      MMUSIC WG
  9. INTERNET-DRAFT                M. Handley, H. Schulzrinne, E. Schooler
  10. draft-ietf-mmusic-sip-01.txt                   ISI,Columbia,Caltech
  11.                                    2nd Dec 1996
  12.                              Expires: 2nd June 1997
  13.  
  14.  
  15.             SIP: Session Initiation Protocol
  16.  
  17.  
  18.  
  19.  
  20. Abstract
  21.  
  22. Many styles of multimedia conferencing are likely  to  co-exist     on  the
  23. Internet,  and    many  of them share the need to invite users to partici-
  24. pate.  The Session  Initiation    Protocol  (SIP)     is  a    simple    protocol
  25. designed  to  enable the invitation of users to participate in such mul-
  26. timedia sessions.  It is not tied to  any  specific  conference     control
  27. scheme,     providing support for either loosely or tightly controlled ses-
  28. sions.    In particular, it aims to enable user mobility by  relaying  and
  29. redirecting invitations to a user's current location.
  30.  
  31. This document is a product of the Multiparty Multimedia Session     Control
  32. (MMUSIC) working group of the Internet Engineering Task Force.    Comments
  33. are solicited and should be addressed to  the  working    group's     mailing
  34. list at confctrl@isi.edu and/or the authors.
  35.  
  36.  
  37. Status of this Memo
  38.  
  39. This document is an Internet-Draft.  Internet-Drafts are  working  docu-
  40. ments  of the Internet Engineering Task Force (IETF), its areas, and its
  41. working groups.     Note that other  groups  may  also  distribute     working
  42. documents as Internet-Drafts.
  43.  
  44. Internet-Drafts are draft documents valid for a maximum     of  six  months
  45. and  may  be  updated,    replaced, or obsoleted by other documents at any
  46. time.  It is inappropriate to use Internet-Drafts as reference    material
  47. or to cite them other than as ``work in progress.''
  48.  
  49. To learn the current status of    any  Internet-Draft,  please  check  the
  50. ``1id-abstracts.txt''  listing    contained  in the Internet-Drafts Shadow
  51. Directories   on   ftp.is.co.za      (Africa),   nic.nordu.net    (Europe),
  52. munnari.oz.au    (Pacific  Rim),     ds.internic.net  (US  East  Coast),  or
  53. ftp.isi.edu (US West Coast).
  54.  
  55.  
  56.  
  57.  
  58. Handley/Schulzrinne/Schooler                        [Page 1]
  59.  
  60. INTERNET-DRAFT                            2nd Dec 1996
  61.  
  62.  
  63. Distribution of this document is unlimited.
  64.  
  65.  
  66. 1.  Authors' Note
  67.  
  68. This document is the result of a merger of the Session Invitation Proto-
  69. col  (draft-ietf-mmusic-sip-00.txt) and the Simple Conference Invitation
  70. Protocol (draft-ietf-mmusic-scip-00.txt), and of an attempt to make  SIP
  71. more  generic  and  to    fit  into  a  more flexible infrastructure which
  72. includes companion protocols including SDP, HTTP and RTSP.
  73.  
  74.  
  75. 2.  Introduction
  76.  
  77. There are two basic ways to locate and to participate  in  a  multimedia
  78. session:
  79.  
  80.  
  81. +    The session is advertised, users see the advertisement,  then  join
  82.      the session address to participate.
  83.  
  84. +    Users are invited to participate in a session, which may or may not
  85.      already be advertised.
  86.  
  87. The  Session  Description  Protocol  (SDP)  together  with  the     Session
  88. Announcement Protocol (SAP), provide a mechanism for the former [1] [2].
  89. This document presents the Session Initiation Protocol (SIP), to perform
  90. the latter.  SIP also can use SDP to specify what is meant by a session.
  91.  
  92.  
  93.             Figure omitted in ASCII version
  94.  
  95.  
  96.                 Figure 1
  97.  
  98.  
  99. We make the design decision that how a user  discovers    that  a     session
  100. exists    is orthogonal to a session's conference control model.    Figure 1
  101. shows a potential place for SIP in the    lifecycle  of  both  lightweight
  102. sessions  and  in more tightly-coupled conferencing.  Note that the Ses-
  103. sion Initiation Protocol and the Session Announcement  Protocol     may  be
  104. invoked or re-invoked at later stages in a session's lifecycle.
  105.  
  106. The Session Initiation Protocol is also intended to be    used  to  invite
  107. servers     into  sessions.  Examples might be where a recording server can
  108. be invited to participate in a live multimedia session    to  record  that
  109. session,  or  a     video-on-demand  server  can be invited to play a video
  110. stream into a live multimedia conference.  In such cases we  would  like
  111.  
  112.  
  113.  
  114. Handley/Schulzrinne/Schooler                        [Page 2]
  115.  
  116. INTERNET-DRAFT                            2nd Dec 1996
  117.  
  118.  
  119. SIP  to     lead  gracefully into the control protocol to control recording
  120. and playback on such servers.
  121.  
  122. We also make the design decision that inviting a user to participate  in
  123. a session is independent of quality of service (QoS) guarantees for that
  124. session.  Such QoS guarantees (if they are required) may be dependent on
  125. the  full membership of the session, and this may or may not be known to
  126. the agent performing session invitation.
  127.  
  128.  
  129. 2.1.  Terminology
  130.  
  131. This document uses the same words as RFC 1123 for defining the    signifi-
  132. cance of each particular requirement.  These words are:
  133.  
  134.  
  135. must:
  136.      This word or the adjective ``required'' means that the item  is  an
  137.      absolute requirement of the specification.
  138.  
  139.  
  140. should:
  141.      This word or the adjective ``recommended''     means    that  there  may
  142.      exist  valid  reasons  in    particular  circumstances to ignore this
  143.      item, but the full implications should be understood and  the  case
  144.      carefully weighed before choosing a different course.
  145.  
  146.  
  147. may:
  148.      This word or the adjective ``optional'' means  that  this    item  is
  149.      truly  optional.  One implementation may choose to include the item
  150.      because a particular application requires it or because it enhances
  151.      the  product, for example, another implementation may omit the same
  152.      item.
  153.  
  154. An implementation is not compliant if it fails to satisfy one or more of
  155. the  must  requirements for the protocols it implements.  An implementa-
  156. tion that satisfies all the must and all the should requirements for the
  157. protocols it implements is said to be ``unconditionally compliant''; one
  158. that satisfies all the must requirements  but  not  all     of  the  should
  159. requirements  for the protocols it implements is said to be ``condition-
  160. ally compliant''.
  161.  
  162.  
  163. 2.2.  Glossary
  164.  
  165. This specification uses a number of terms to refer to the  roles  played
  166. by  participants  in  SIP  communications.   The  definitions of client,
  167.  
  168.  
  169.  
  170. Handley/Schulzrinne/Schooler                        [Page 3]
  171.  
  172. INTERNET-DRAFT                            2nd Dec 1996
  173.  
  174.  
  175. server and proxy are similar to those used by HTTP.
  176.  
  177.  
  178. Client:
  179.      An application program that establishes connections for the purpose
  180.      of sending requests.  Clients may or may not interact directly with
  181.      a human user.
  182.  
  183.  
  184. Initiator:
  185.      The party initiating a conference invitation.  Note that  the  cal-
  186.      ling  party  does    not  have  to  be the same as the one creating a
  187.      conference.
  188.  
  189.  
  190. Invitation:
  191.      A request sent to attempt to contact a user (or service) to request
  192.      that they participate in a session.
  193.  
  194.  
  195. Invitee, Invited User:
  196.      The person or service that the calling party is trying to invite to
  197.      a conference.
  198.  
  199.  
  200. Location server:
  201.      A program that is contacted by a client and which    returns     one  or
  202.      more  possible locations for the user or service without contacting
  203.      that user or service directly.
  204.  
  205.  
  206. Location service:
  207.      A service used by a location server to obtain information    about  a
  208.      user's possible location.
  209.  
  210.  
  211. Proxy, Proxy server:
  212.      An intermediary program which acts as both a server  and  a  client
  213.      for  the  purpose    of  making  requests on behalf of other clients.
  214.      Requests are serviced internally or by passing them, with    possible
  215.      translation,  on to other servers.     A proxy must interpret, and, if
  216.      necessary, rewrite a request message before forwarding it.
  217.  
  218.  
  219. Server:
  220.      An application program that accepts connections in order to service
  221.      requests  by  sending  back  responses.  A server may be the called
  222.      user agent, a proxy server, or a location server.
  223.  
  224.  
  225.  
  226. Handley/Schulzrinne/Schooler                        [Page 4]
  227.  
  228. INTERNET-DRAFT                            2nd Dec 1996
  229.  
  230.  
  231. User Agent, Called User Agent:
  232.      The server application which contacts the invitee to inform them of
  233.      the invitation, and to return a reply.
  234.  
  235. Any given program may be capable of  acting  both  as  a  client  and  a
  236. server.      A  typical  multimedia  conference  controller  would act as a
  237. client to initiate calls or invite others to conferences and as a server
  238. to accept invitations.
  239.  
  240.  
  241. 3.  General Requirements
  242.  
  243. SIP is a Session Initiation Protocol.  It is not  a  conference     control
  244. protocol.  SIP can be used to perform a search for a user or service and
  245. to request that that user or service participate in a session.
  246.  
  247. Once SIP has been used to initiate a multimedia session     SIP's    task  is
  248. finished.   There  is  no  concept of a SIP session (as opposed to a SIP
  249. search for a user or service).    If whatever conference control mechanism
  250. is used in the session needs to add or remove a media stream, SIP may be
  251. used to perform this task, but again, once the information has been suc-
  252. cessfully conveyed to the participants, SIP is the no longer involved.
  253.  
  254. SIP must be able to utilise both UDP and TCP as transport protocols.
  255.  
  256. From a performance point of view, UDP is preferable  as     it  allows  the
  257. application  to more carefully control the timing of messages, it allows
  258. parallel searches without requiring connection state for each  outstand-
  259. ing request, and allows the use of multicast.
  260.  
  261. From a pragmatic point of view, TCP allows easier passage through exist-
  262. ing  firewalls, and with appropriate protocol design, allows common SIP,
  263. HTTP and RTSP servers.
  264.  
  265. When TCP is used, SIP can use either one or more than one connection  to
  266. attempt     to  contact  a user or to modify parameters of an existing ses-
  267. sion.  The concept of a session is not implicitly bound to a TCP connec-
  268. tion,  so  the    initial SIP request and a subsequent SIP request may use
  269. different TCP connections or a single persistent connection as appropri-
  270. ate.
  271.  
  272. SIP is text based.  This allows easy implementation in languages such as
  273. TCL  and  Perl,     allows     easy debugging, and most importantly, makes SIP
  274. flexible and extensible.  As SIP is only used for session initiation, it
  275. is  believed that the additional overhead of using a text-based protocol
  276. is not significant.
  277.  
  278. Unlike control protocols, there is minimal shared-state in SIP    -  in  a
  279.  
  280.  
  281.  
  282. Handley/Schulzrinne/Schooler                        [Page 5]
  283.  
  284. INTERNET-DRAFT                            2nd Dec 1996
  285.  
  286.  
  287. minimal     implementation     the initiator maintains all the state about the
  288. current attempt to locate and contact a user or     service  -  servers  or
  289. proxies     can  be  stateless  (although    they don't have to be).     All the
  290. state needed to get a response back from a server to  the  initiator  is
  291. carried     in  the  SIP  request    itself - this is also necessary for loop
  292. prevention.
  293.  
  294. Authors Note: Whilst redesigning SIP, we have attempted to  ensure  that
  295. it  can     has  a     clear interaction with the currently evolving Real-Time
  296. Stream Control Protocol.  Whether RTSP will adopt an approach that makes
  297. this meaningful remains to be seen.
  298.  
  299.  
  300. 4.  Addressing
  301.  
  302. SIP is a protocol that exchanges messages between peer    user  agents  or
  303. proxies     for  user  agents.   We assume the user agent is an application
  304. that acts on behalf of the user it  represents    (thus  it  is  sometimes
  305. described  as  a  client  of the user) and that is co-resident with that
  306. user.  A proxy for a user agent serves    as  a  forwarding  mechanism  or
  307. bridge    to the actual location of the user agent.  We also refer to such
  308. proxies as conference address servers.
  309.  
  310. In the computer realm, the equivalent of  a  personal  telephone  number
  311. combines   the     user's      login     id  (mjh)  with  a  machine  host  name
  312. (metro.isi.edu) or address (128.16.64.78).  A  user's  location-specific
  313. address     can  be obtained out-of-band, can be learned via existing media
  314. agents, such as vat (e.g., Mbone Audio channel), can be included in some
  315. mailers'  message headers, or can be recorded during previous invitation
  316. interactions.
  317.  
  318. However, users also publish several well-known addresses that are  rela-
  319. tively    location-independent,  such as email or web home-page addresses.
  320. Rather than require that users provide their specific  network    locales,
  321. we  can     take advantage of email and web addresses as being (relatively)
  322. memorable, and also leverage off the Domain Name Service (DNS)    to  pro-
  323. vide  a     first    stage  location     mechanism.   Note that an email address
  324. (M.Handley@cs.ucl.ac.uk) is usually different from the combination of  a
  325. specific  machine  name     and login name ( mjh@mercury.lcs.mit.edu).  SIP
  326. should allow both forms of  addressing    to  be    used,  with  the  former
  327. requiring a conference address server to locate the user.
  328.  
  329. One perceived problem of email addressing is  that  it    is  possible  to
  330. guess  peoples'     addresses and thus the system of unlisted (in the tele-
  331. phone directory) numbers is more of a  problem.      However,  this  really
  332. only  provides    security  through obscurity, and real security is better
  333. provided through authentication and call screening.
  334.  
  335.  
  336.  
  337.  
  338. Handley/Schulzrinne/Schooler                        [Page 6]
  339.  
  340. INTERNET-DRAFT                            2nd Dec 1996
  341.  
  342.  
  343. 5.  Call Setup
  344.  
  345. Call setup is a multi-phase procedure.    In the first phase, the request-
  346. ing  client  tries  to ascertain the address where it should contact the
  347. remote user agent or user agent proxy.    The local client checks     if  the
  348. user address is location-specific.  If so, then that is the address used
  349. for the remote user agent.  If not, the requesting client looks     up  the
  350. domain    part  of the user address in the DNS.  This provides one or more
  351. records giving IP addresses.  If a new service (SRV) resource record [4]
  352. is returned giving a conference address server, then that is the address
  353. to contact next.  If no relevant resource record is returned, but  an  A
  354. record    is  returned, then that is the address to contact next.     If nei-
  355. ther a resource record or an A record is returned, but an MX  record  is
  356. returned, then the mail host is the address to contact next.
  357.  
  358. Presuming an address for the invitee is found from the DNS,  the  second
  359. and  subsequent     phases basically implement a request-response protocol.
  360. A session description (typically using SDP format) is sent to  the  con-
  361. tact address with an invitation for the user to join the session.
  362.  
  363. This request may be sent over a     TCP  connection  or  as  a  single  UDP
  364. datagram (the format of both is the same and is described later), and is
  365. sent to a well-known port.
  366.  
  367. If a user agent or conference server is listening on the relevant  port,
  368. it  can     send  one  of    the  responses    below.    If no server or agent is
  369. listening, an ICMP port-unreachable response  will  be    triggered  which
  370. should    cause  the  TCP     connection  setup  to    fail or cause a UDP send
  371. failure on retransmissions.
  372.  
  373.  
  374. 5.1.  Locating a User
  375.  
  376. It is expected that a user is situated    at  one     of  several  frequented
  377. locations.  These locations can be dynamically registered with a confer-
  378. ence address server for a site (for a local area  network  or  organiza-
  379. tion),    and  incoming connections can be routed simultaneously to all of
  380. these locations if so desired.    It is  entirely     up  to     the  conference
  381. address server whether the server issues proxy requests for the request-
  382. ing user, or if the server instructs the client to redirect the request.
  383.  
  384. In general a reply MUST be sent by the same mechanism that  the     request
  385. was  sent  by.     Hence, if a request was unicast, then the reply MUST be
  386. unicast back to the requester; if the request was multicast,  the  reply
  387. MUST  be  multicast  to the same group to which the request was sent; if
  388. the request was sent by TCP, the reply MUST be sent by TCP.
  389.  
  390. In all cases where a request is forwarded onwards,  each  host    relaying
  391.  
  392.  
  393.  
  394. Handley/Schulzrinne/Schooler                        [Page 7]
  395.  
  396. INTERNET-DRAFT                            2nd Dec 1996
  397.  
  398.  
  399. the  message  SHOULD  add  its own address to the path of the message so
  400. that the replies can take the same  path  back,     thus  ensuring     correct
  401. operation  through  compliant  firewalls and loop-free requests.  On the
  402. reply path, these routing headers MUST be removed as the reply    retraces
  403. the path, so that routing internal to sites is hidden.    When a multicast
  404. request is made, first the host making the request, then  the  multicast
  405. address itself are added to the path.
  406.  
  407.  
  408.  
  409. 6.  Message Formats
  410.  
  411. All messages are text-based.   When  sent  over     TCP  or  UDP,    multiple
  412. requests can be carried in a single TCP connection or UDP datagram.  UDP
  413. Datagrams should not normally exceed the path  MTU  in    size  if  it  is
  414. known, or 1 KByte if the MTU is unknown.
  415.  
  416.  
  417. 6.1.  Session Invitations
  418.  
  419. An example of a session invitation is shown below.  It is divided into a
  420. request and a number of header fields.    The request is of the form:
  421.  
  422. <method> <request-id> SIP/2.0
  423.  
  424. The method may be either INVITE or CAPABILITY.    The request  ID     may  be
  425. any  URL encoded string that can be guaranteed to be globally unique for
  426. the duration of the request.  Using the initiator's IP-address,     process
  427. id, and instance (if more than one request is being made simultaneously)
  428. satisfies this requirement.
  429.  
  430.  
  431. 6.1.1.    Methods
  432.  
  433. The following methods are defined:
  434.  
  435. INVITEThe user or service is being invited to participate  in  the  ses-
  436.      sion.   The session description given must be completely acceptable
  437.      for a ``200 OK'' response to be given.  This method  MUST    be  sup-
  438.      ported by a SIP server.
  439.  
  440. CAPABILITY
  441.      The user or service is being queried as  to  its  capabilities.   A
  442.      server  that believes it can contact the user (such as a user agent
  443.      where the user is logged in  and  has  been  recently  active)  MAY
  444.      respond  to  this    request     with a capability set.     Support of this
  445.      method is OPTIONAL.
  446.  
  447.  
  448.  
  449.  
  450. Handley/Schulzrinne/Schooler                        [Page 8]
  451.  
  452. INTERNET-DRAFT                            2nd Dec 1996
  453.  
  454.  
  455. Methods that are not supported by a proxy server SHOULD     be  treated  by
  456. that  proxy  as     if  they  were     an  INVITE  method, and relayed through
  457. unchanged or cause a redirection as appropriate.
  458.  
  459. Methods that are not supported by a user agent should cause a ``501  Not
  460. Implemented'' response to be returned.
  461.  
  462.  
  463. 6.1.2.    Header Fields
  464.  
  465. SIP header fields are similar to MIME header fields in both  syntax  and
  466. semantics.   In     general  the  ordering     of  the header fields is not of
  467. importance (with the exception of Path fields, see  below)  but     proxies
  468. MUST  NOT reorder or otherwise modify header fields other than by adding
  469. a new Path field. This allows an authentication field to be added  after
  470. the  Path  fields  that will not be invalidated by proxies.  Field names
  471. are not case-sensitive, although their values may be.
  472.  
  473. Content-Length, Content-Type, To, From, Path header fields  are     compul-
  474. sory.    Other  fields  may  be added as required.  Header fields MUST be
  475. separated by a single linefeed character.  The header MUST be  separated
  476. from the payload by an emply line (two linefeed characters).
  477.  
  478. A compact form of these codes is also defined in  section  6.3    for  use
  479. over UDP when the request has to fit into a single packet and size is an
  480. issue.
  481.  
  482.  
  483. +    The ``Path:'' field indicates the path taken by the request so far.
  484.      This  prevents  request  looping  and ensures replies take the same
  485.      path as the requests, which assists in firewall traversal and other
  486.      unusual  routing  situations.   Initiators     MUST add their own Path
  487.      field to each request.  This Path field MUST be the first field  in
  488.      the  request.   Subsequent     proxies SHOULD each add their own addi-
  489.      tional Path field which MUST be  added  before  any  existing  Path
  490.      fields.   When  a reply passes through a proxy on the reverse path,
  491.      that proxies Path field MUST be removed from the reply.
  492.  
  493.      The format for a Path field is:
  494.  
  495.      Path:<net-type> <address-type> <protocol> <address> <sequence> [<ttl>]
  496.  
  497.      Net type is typically IN (Internet) and address-type  is  typically
  498.      IP4  or IP6 for IP version 4 and IP version 6 respectively.  Proto-
  499.      col may be UDP or TCP.  Sequence is a request sequence number which
  500.      typically    starts    at 1 and is incremented each time the request is
  501.      re-sent by this host.  TTL is included if the address is  a  multi-
  502.      cast address.
  503.  
  504.  
  505.  
  506. Handley/Schulzrinne/Schooler                        [Page 9]
  507.  
  508. INTERNET-DRAFT                            2nd Dec 1996
  509.  
  510.  
  511. +    Authentication fields provide a digital signature of the  remaining
  512.      fields  for authentication purposes.  They are not yet defined, but
  513.      when they are defined they MUST be added to the  header  after  the
  514.      Path fields and before the rest of the fields.
  515.  
  516.  
  517. +    The request header MUST contain both a ``From:'' field , indicating
  518.      the  invitation  initiator,  and  a  ``To:'' field , specifying the
  519.      invited user.  Both of these  fields  MUST     be  machine-usable,  as
  520.      defined my mailbox in RFC 822 (as updated by RFC 1123). Only a sin-
  521.      gle initiator and a single invited user are allowed to be specified
  522.      in a single SIP request.
  523.  
  524.  
  525. +    The session description payload gives details of  the  session  the
  526.      user  is  being  invited to join.    It's format MUST be given by the
  527.      ``Content-type:'' header field, and the  payload  length  in  bytes
  528.      MUST  be given by the ``Content-length'' header field.  If the pay-
  529.      load has undergone any encoding (such  as    compression)  then  this
  530.      MUST be indicated by the ``Content-encoding:'' header field, other-
  531.      wise `` Content-encoding:'' MUST be omitted.
  532.  
  533. The example below is a request message en route from initiator to  invi-
  534. tee:
  535.  
  536. INVITE 128.16.64.19/65729 SIP/2.0
  537. Path:IN IP4 UDP 239.128.16.254 1 16
  538. Path:IN IP4 UDP 131.215.131.131 1
  539. Path:IN IP4 UDP 128.16.64.19 1
  540. From:mjh@isi.edu
  541. To:schooler@cs.caltech.edu
  542. Content-type:meta/sdp
  543. Content-Length:187
  544.  
  545. v=0
  546. o=user1 53655765 2353687637 IN IP4 128.3.4.5
  547. s=Mbone Audio
  548. i=Discussion of Mbone Engineering Issues
  549. e=mbone@somewhere.com
  550. c=IN IP4 224.2.0.1/127
  551. t=0 0
  552. m=audio 3456 RTP/AVP 0
  553.  
  554.  
  555. The first line above states that this is a SIP version 2.0 request.
  556.  
  557. The path fields (Path:...) give the hosts along the path from invitation
  558. initiator  (the     first element of the list) towards the invitee.  In the
  559.  
  560.  
  561.  
  562. Handley/Schulzrinne/Schooler                           [Page 10]
  563.  
  564. INTERNET-DRAFT                            2nd Dec 1996
  565.  
  566.  
  567. example above, the message was last multicast  to  the    administratively
  568. scoped     group     239.128.16.254      with     a  ttl     of  16     from  the  host
  569. 131.215.131.131.
  570.  
  571. The request header above  states  that    the  request  was  initiated  by
  572. mjh@isi.edu  (specifically it was initiated from 128.16.64.19, as can be
  573. seen  from  the     path    field)     and   the   user   being   invited   is
  574. schooler@cs.caltech.edu.
  575.  
  576. In this case, the session  description    (as  stated  in     the  ``Content-
  577. type:''     field)     is  a Session Description Protocol (SDP) description as
  578. defined in the companion draft [1].
  579.  
  580. The header is terminated by an empty line (two linefeed characters)  and
  581. is followed by the session description payload.
  582.  
  583. If required, the session description can be encrypted using  public  key
  584. cryptography,  and then can also carry private session keys for the ses-
  585. sion.  If this is the case, four random bytes are added to the beginning
  586. of  the     session  description  before  encryption  and are removed after
  587. decryption but before parsing.
  588.  
  589.  
  590. 6.2.  Responses
  591.  
  592.  
  593. 6.2.1.    Response Codes
  594.  
  595. The response codes are consistent with, and  extend,  HTTP/1.1    response
  596. codes.     Not all HTTP/1.1 response codes are appropriate, and only those
  597. that are appropriate are given here.   Response     codes    not  defined  by
  598. HTTP/1.1  are  marked  with  an     asterisk, and have codes x50 upwards to
  599. avoid clashes with future HTTP response codes, or 6xx which are not used
  600. by  HTTP.  The default behaviour for unknown response codes is given for
  601. each category of codes.
  602.  
  603.  
  604. Informational 1xx
  605.  
  606. Informational responses indicate that the server or proxy  contacted  is
  607. performing  some  further  action  and    does  not  yet have a definitive
  608. response.  The client SHOULD  wait  for     a  further  response  from  the
  609. server,     and  the  server  SHOULD  send     such a response without further
  610. prompting.  If UDP transport is being used, the client    SHOULD    periodi-
  611. cally re-send the request in case the final response is lost.  Typically
  612. a server should send a ``1xx'' response if it expects to take more  than
  613. one second to obtain a final reply.
  614.  
  615.  
  616.  
  617.  
  618. Handley/Schulzrinne/Schooler                           [Page 11]
  619.  
  620. INTERNET-DRAFT                            2nd Dec 1996
  621.  
  622.  
  623. 100 Trying
  624.      Some further action is being taken (e.g., the request is being for-
  625.      warded) but the user has not yet been located.
  626.  
  627. 150* Ringing
  628.      The user agent or conference server has located a possible location
  629.      where the user has been recently and is trying to alert them.
  630.  
  631.  
  632. Successful 2xx
  633.  
  634. The request was successful and MUST terminate a search.
  635.  
  636.  
  637. 200 OKThe request was successful in contacting the user,  and  the  user
  638.      has agreed to participate.
  639.  
  640.  
  641. Redirection 3xx
  642.  
  643. 3xx responses give information about the user's new location,  or  about
  644. alternative  services that may be able to satisfy the call.  They SHOULD
  645. terminate an existing search, and MAY cause the initiator to begin a new
  646. search if appropriate.
  647.  
  648.  
  649. 301 Moved Permanently
  650.      The requesting client should retry on the new address given by  the
  651.      Location:    field  because    the  user  has permanently moved and the
  652.      address this reponse is in reply to is no longer a current     address
  653.      for  the user.  A 301 response MUST NOT suggest any of the hosts in
  654.      the request's Path as the user's new location.
  655.  
  656.  
  657. 302 Moved Temporarily
  658.      The requesting client should retry on the new address(es) given  by
  659.      the  Location:  field.  A    302 response MUST NOT suggest any of the
  660.      hosts in the request's Path as the user's new location.
  661.  
  662.  
  663. 350* Alternative Service
  664.      The call was not successful, but alternative services are possible.
  665.      The alternative services are described in the body of the reply.
  666.  
  667.  
  668. Request Failure 4xx
  669.  
  670. 4xx responses are definite failure responses  that  MUST  terminate  the
  671.  
  672.  
  673.  
  674. Handley/Schulzrinne/Schooler                           [Page 12]
  675.  
  676. INTERNET-DRAFT                            2nd Dec 1996
  677.  
  678.  
  679. existing  search  for  a  user    or  service.  They SHOULD NOT be retried
  680. immediately without modification.
  681.  
  682.  
  683. 400 Bad Request
  684.      The request could not be understood due to malformed syntax.
  685.  
  686.  
  687. 401 Unauthorized
  688.      The request requires user authentication.
  689.  
  690.  
  691. 402 Payment Required
  692.      Reserved for future use.
  693.  
  694.  
  695. 403 Forbidden
  696.      The server understood the request, but is refusing to  fulfill  it.
  697.      Authorisation  will  not  help,  and  the    request     should     not  be
  698.      repeated.
  699.  
  700.  
  701. 404 Not Found
  702.      The server has definitive information that the user does not  exist
  703.      at the domain specified.
  704.  
  705.  
  706. 406 Not Acceptable
  707.      The user's agent was contacted successfully but some aspects of the
  708.      session  profile  (the  requested    media,    bandwidth, or addressing
  709.      style) were not acceptable.
  710.  
  711.  
  712. 450* Decline
  713.      The user's machine was successfully contacted but the  user  expli-
  714.      citly does not wish to participate.
  715.  
  716.  
  717. 451* Busy
  718.      The user's machine was successfully contacted but the user is busy,
  719.      or     the  user does not wish to participate (the ambiguity is inten-
  720.      tional).
  721.  
  722.  
  723. Server Failure 5xx
  724.  
  725. 5xx responses are failure responses  given  when  a  server  itself  has
  726. erred.     They  are  not     definitive failures, and SHOULD NOT terminate a
  727.  
  728.  
  729.  
  730. Handley/Schulzrinne/Schooler                           [Page 13]
  731.  
  732. INTERNET-DRAFT                            2nd Dec 1996
  733.  
  734.  
  735. search if other possible locations remain untried.
  736.  
  737.  
  738. 500 Server Internal Error
  739.      The server encountered an unexpected condition  that  prevented  it
  740.      from fulfilling the request.
  741.  
  742. 501 Not implemented
  743.      The server does not support the functionality required  to     fulfill
  744.      the request.  This is the appropriate response when the server does
  745.      not recognise the request method and is not capable  of  supporting
  746.      it for any user.
  747.  
  748. 503 Service Unavailable
  749.      The server is currently unable to handle the request due to a  tem-
  750.      porary  overloading  or maintenance of the server.     The implication
  751.      is that this is a temporary  condition  which  will  be  alleviated
  752.      after some delay.
  753.  
  754.  
  755. Search Responses 6xx
  756.  
  757. 6xx responses are failure responses given whilst trying     to  locate  the
  758. specified user or service.  They are not definitive failures, and SHOULD
  759. NOT terminate the search if other possible locations remain untried.
  760.  
  761.  
  762. 600* Search Failure
  763.      The user agent or proxy server understood the user's  address,  but
  764.      the  request was unsuccessful in contacting the user. A proxy might
  765.      return this error towards the initiator if an attempt to contact  a
  766.      server failed for an unknown reason.
  767.  
  768.  
  769. 601* Not known here
  770.      The call was unsuccessful because the user or service was not known
  771.      at     the  address  called.     This  is not a definitive failure - the
  772.      address may be valid at another server.
  773.  
  774.  
  775. 602* Not currently here
  776.      The call was unsuccessful because although the the user or     service
  777.      was  known     at  the  address  called,  the     user  or service is not
  778.      currently located at  this     address.   This  is  not  a  definitive
  779.      failure - the user may be contactable at another server.
  780.  
  781.  
  782. 603* Alternative Address
  783.  
  784.  
  785.  
  786. Handley/Schulzrinne/Schooler                           [Page 14]
  787.  
  788. INTERNET-DRAFT                            2nd Dec 1996
  789.  
  790.  
  791.      The call was unsuccessful because the user or service is not avail-
  792.      able  at  this location, but one or more alternative non-definitive
  793.      locations are suggested to try in addition to any that may     already
  794.      be     being    tried.    A 603 response MUST NOT suggest any of the hosts
  795.      in the request's Path as an alternative location.
  796.  
  797.  
  798. 6.2.2.    Normal Replies
  799.  
  800. An example reply is given below.  The first line of the reply states the
  801. SIP  version  number,  that  it     is  a ``200 OK'' reply, which means the
  802. request was successful.     The path fields are taken from the request, and
  803. entries are removed hop by hop as the reply retraces the request's path.
  804. A new authentication field is added  by     the  invited  user's  agent  if
  805. required.  The    session     ID is taken directly from the original request,
  806. along with the request header.    The original sense of ``From:'' field is
  807. preserved (i.e it's the session originator).
  808.  
  809. In addition, a ``Contact-host:'' field is added giving    details     of  the
  810. host  the  user was located on, or alternatively the relevant proxy con-
  811. tact point which should be reachable  from  the     invitation  initiator's
  812. host.
  813.  
  814.  
  815. SIP/2.0 200 128.16.64.19/65729
  816. Path:IN IP4 UDP 239.128.16.254 1 16
  817. Path:IN IP4 UDP 131.215.131.131 1
  818. Path:IN IP4 UDP 128.16.64.19 1
  819. From:mjh@isi.edu
  820. To:schooler@cs.caltech.edu
  821. Contact-host:IN IP4 131.215.131.147
  822. Content-length:0
  823.  
  824.  
  825. This same format is used for replies  for  other  categories  of  reply,
  826. except that some of then may require payloads to be carried.
  827.  
  828. If the invited user's agent requires confirmation of receipt of a  ``200
  829. OK''  reply,  it  may  optionally  add an additional ``Confirm:required'
  830. field to the body of the message specifying that an acknowledgementy  is
  831. required.  This is only permitted with category 2xx replies.  An example
  832. is:
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842. Handley/Schulzrinne/Schooler                           [Page 15]
  843.  
  844. INTERNET-DRAFT                            2nd Dec 1996
  845.  
  846.  
  847.  
  848. SIP/2.0 200 128.16.64.19/65729
  849. Path:IN IP4 UDP 239.128.16.254 1 16
  850. Path:IN IP4 UDP 131.215.131.131 1
  851. Path:IN IP4 UDP 128.16.64.19 1
  852. From:mjh@isi.edu
  853. To:schooler@cs.caltech.edu
  854. Contact-host:IN IP4 131.215.131.147
  855. Confirm:required
  856. Content-length:0
  857.  
  858.  
  859. In response to such a request, the invitation  initiators  agent  should
  860. retransmit  its     request with an additional ``Confirm:'' field, with the
  861. value ``true'' or ``false'' stating whether the session still exists  or
  862. no longer exists respectively (see section 7.1 for details).  An example
  863. of an confirmation request is:
  864.  
  865.  
  866. INVITE 128.16.64.19/65729 SIP/2.0
  867. Path:IN IP4 UDP 239.128.16.254 1 16
  868. Path:IN IP4 UDP 131.215.131.131 1
  869. Path:IN IP4 UDP 128.16.64.19 1
  870. From:mjh@isi.edu
  871. To:schooler@cs.caltech.edu
  872. Confirm:true
  873. Content-type:meta/sdp
  874. Content-Length:187
  875.  
  876. v=0
  877. o=user1 2353655765 2353687637 IN IP4 128.3.4.5
  878. s=Mbone Audio
  879. i=Discussion of Mbone Engineering Issues
  880. e=mbone@somewhere.com
  881. c=IN IP4 224.2.0.1/127
  882. t=0 0
  883. m=audio 3456 RTP/AVP 0
  884.  
  885.  
  886. Such confirmations are still useful when TCP transport is used    as  they
  887. provide     application level confirmation rather than transport level con-
  888. firmation.  If they are not used, it  is  possible  that  a  ``200  OK''
  889. response may be received after the application making the call has timed
  890. out the call and exited.
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898. Handley/Schulzrinne/Schooler                           [Page 16]
  899.  
  900. INTERNET-DRAFT                            2nd Dec 1996
  901.  
  902.  
  903. 6.2.3.    Redirects
  904.  
  905. ``603 alternative address'' replies and 301 and 302 moved replies should
  906. specify another location using the Location: field.
  907.  
  908. An example of a ``603 alternative address'' reply is:
  909.  
  910. SIP/2.0 603 128.16.64.19/65729
  911. Path:IN IP4 UDP 131.215.131.131 1
  912. Path:IN IP4 UDP 128.16.64.19 1
  913. From:mjh@isi.edu
  914. To:schooler@cs.caltech.edu
  915. Location:IP IP4 239.128.16.254 16
  916. Content-length:0
  917.  
  918. In this example, the proxy (131.215.131.131) is being advised to contact
  919. the  multicast    group 239.128.16.254 with a ttl of 16.    In normal situa-
  920. tions a server would not suggest a redirect to a local    multicast  group
  921. unless    (as  in the above situation) it knows that the previous proxy or
  922. client is within the scope of the local group.
  923.  
  924. For unicast 603 redirects, a proxy  MAY     query    the  suggested    location
  925. itself    or send MAY the redirect on back towards the client.  For multi-
  926. cast 603 redirects, a proxy SHOULD query the  multicast     address  itself
  927. rather    than  sending  the redirect back towards the client as multicast
  928. may be scoped and this allows  a  proxy     within     the  appropriate  scope
  929. regions to make the query.
  930.  
  931. For 301 or 302 redirects, a proxy  SHOULD  send     the  redirect    on  back
  932. towards     the client and terminate any other searchs it is performing for
  933. the same request.  Multicast 301 or 302 redirects MUST NOT be generated.
  934.  
  935.  
  936. Alternative Services
  937.  
  938. An example of an ``350 Alternative Service'' reply is:
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954. Handley/Schulzrinne/Schooler                           [Page 17]
  955.  
  956. INTERNET-DRAFT                            2nd Dec 1996
  957.  
  958.  
  959.  
  960. SIP/2.0 350 128.16.64.19/32492/2
  961. Path:IN IP4 UDP 131.215.131.131 1
  962. Path:IN IP4 UDP 128.16.64.19 1
  963. From:mjh@isi.edu
  964. To:schooler@cs.caltech.edu
  965. Contact-host:IN IP4 131.215.131.131
  966. Content-type:meta/sdp
  967. Content-length: 146
  968.  
  969. v=0
  970. o=mm-server 2523535 0 IN IP4 131.215.131.131
  971. s=Answering Machine
  972. i=Leave an audio message
  973. c=IN IP4 128.16.64.19
  974. t=0 0
  975. m=audio 12345 RTP/AVP 0
  976.  
  977. In this case, the answering server provides a session  description  that
  978. describes  an ``answering machine''. If the invitation initiator decides
  979. to take advantage of this service, it should send an invitation     request
  980. to  the contact host (131.215.131.131) with the session description pro-
  981. vided.    This request should contain a different session id from the  one
  982. in the original request. An example would be:
  983.  
  984. INVITE 128.16.64.19/32492/3 SIP/2.0
  985. Path:IN IP4 UDP 128.16.64.19 1
  986. From:mjh@isi.edu
  987. To:schooler@cs.caltech.edu
  988. Content-type:meta/sdp
  989. Content-length: 146
  990.  
  991. v=0
  992. o=mm-server 2523535 0 IN IP4 128.16.5.31
  993. s=Answering Machine
  994. i=Leave an audio message
  995. c=IN IP4 128.16.64.19
  996. t=0 0
  997. m=audio 12345 RTP PCMU
  998.  
  999.  
  1000. Invitation initiators can choose to treat a ``350 Alternative  Service''
  1001. reply as a failure if they wish to do so.
  1002.  
  1003.  
  1004. 6.2.4.    Negotiation
  1005.  
  1006. A  ``406  Not  Acceptable''  reply  means  that     the  user   wishes   to
  1007.  
  1008.  
  1009.  
  1010. Handley/Schulzrinne/Schooler                           [Page 18]
  1011.  
  1012. INTERNET-DRAFT                            2nd Dec 1996
  1013.  
  1014.  
  1015. communicate,  but  cannot support the session described adequately.  The
  1016. ``406 Not Acceptable'' reply contains a list of reasons why the     session
  1017. described cannot be supported.    These reasons can be one or more of:
  1018.  
  1019.  
  1020. 406.1 Insufficient Bandwidth - the bandwidth specified    in  the     session
  1021.       description  or  defined    by  the     media    exceeds that known to be
  1022.       available.
  1023.  
  1024. 406.2 Incompatible Protocol - one or more  protocols  described     in  the
  1025.       request is not available.
  1026.  
  1027. 406.3 Incompatible Format - one or more media formats described     in  the
  1028.       request is not available.
  1029.  
  1030. 406.4 Multicast not available - the site where the user is located  does
  1031.       not support multicast.
  1032.  
  1033. 406.5 Unicast not available - the site where the user  is  located  does
  1034.       not  support unicast communication (usually due to the presence of
  1035.       a firewall).
  1036.  
  1037. Other reasons are likely to be added later.  It is hoped  that    negotia-
  1038. tion will not frequently be needed, and when a new user is being invited
  1039. to join a pre-existing lightweight session, negotiation may not be  pos-
  1040. sible.    If is up to the invitation initiator to decide whether or not to
  1041. act on a ``406 Not Acceptable'' reply.
  1042.  
  1043. A complex example of a ``406 Not Acceptable'' reply is:
  1044.  
  1045. SIP/2.0 406 128.16.64.19/32492/5
  1046. Path:IN IP4 UDP 131.215.131.131 1
  1047. Path:IN IP4 UDP 128.16.64.19 1
  1048. From:mjh@isi.edu
  1049. To:schooler@cs.caltech.edu
  1050. Contact-host:IN IP4 131.215.131.131
  1051. Reason:406.1
  1052. Reason:406.3
  1053. Reason:406.4
  1054. Content-type: meta/sdp
  1055. Content-length:
  1056.  
  1057. v=0
  1058. s=Lets talk
  1059. b=CT:128
  1060. c=IN IP4 131.215.131.131
  1061. m=audio 3456 RTP/AVP 7 0 13
  1062. m=video 2232 RTP/AVP 31
  1063.  
  1064.  
  1065.  
  1066. Handley/Schulzrinne/Schooler                           [Page 19]
  1067.  
  1068. INTERNET-DRAFT                            2nd Dec 1996
  1069.  
  1070.  
  1071. In this example, the original request specified 256Kbps total bandwidth,
  1072. and  the  reply     states     that  only  128Kbps is available.  The original
  1073. request specified GSM audio, H.261 video, and WB whiteboard.  The  audio
  1074. coding    and whiteboard are not available, but the reply states that DVI,
  1075. PCM or LPC audio could be supported in order of preference.   The  reply
  1076. also  states  that multicast is not available.    In such a case, it might
  1077. be appropriate to set up a transcoding gateway and re-invite the user.
  1078.  
  1079. Invitation initiators MAY choose to treat ``406 Not Acceptable'' replies
  1080. as a failure if they wish to do so.
  1081.  
  1082.  
  1083. 6.3.  Compact Form
  1084.  
  1085. When SIP is carried over UDP with authentication and a    complex     session
  1086. description,  it  may be possible that the size of a request or reply is
  1087. larger than the MTU (or default 1Kbyte limit if the MTU is  not     known).
  1088. To  reduce  this  problem, a more compact form of SIP is also defined by
  1089. using alternative names for common header fields.  These short forms are
  1090. NOT  abbrieviations - they are field names.  No other abbrieviations are
  1091. allowed.
  1092.  
  1093.  
  1094.     p:same as Path:
  1095.  
  1096.     f:same as From:
  1097.  
  1098.     t:same as To:
  1099.  
  1100.     c:same as Content-type:
  1101.  
  1102.     l:same as Content-length:
  1103.  
  1104.     e:same as Content-encoding:
  1105.  
  1106.     a:same as Confirm: (derived from acknowledge)
  1107.  
  1108.     h:same as Contact-host:
  1109.  
  1110.     m:same as Location: (derived from moved)
  1111.  
  1112.     r:same as Reason:
  1113.  
  1114.  
  1115. Thus the header in section ?? could also be written:
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122. Handley/Schulzrinne/Schooler                           [Page 20]
  1123.  
  1124. INTERNET-DRAFT                            2nd Dec 1996
  1125.  
  1126.  
  1127.  
  1128. INVITE 128.16.64.19/65729 SIP/2.0
  1129. p:IN IP4 UDP 239.128.16.254 1 16
  1130. p:IN IP4 UDP 131.215.131.131 1
  1131. p:IN IP4 UDP 128.16.64.19 1
  1132. f:mjh@isi.edu
  1133. t:schooler@cs.caltech.edu
  1134. c:meta/sdp
  1135. l:187
  1136.  
  1137. v=0
  1138. o=user1 53655765 2353687637 IN IP4 128.3.4.5
  1139. s=Mbone Audio
  1140. i=Discussion of Mbone Engineering Issues
  1141. e=mbone@somewhere.com
  1142. c=IN IP4 224.2.0.1/127
  1143. t=0 0
  1144. m=audio 3456 RTP/AVP 0
  1145.  
  1146.  
  1147. Mixing short fieldnames and long fieldnames is allowed, but  not  recom-
  1148. mended.      Servers  MUST     accept     both  short  and  long     fieldnames  for
  1149. requests.  Proxies MUST NOT translate a request between short  and  long
  1150. forms if authentication fields are present.
  1151.  
  1152.  
  1153. 7.  SIP Transport
  1154.  
  1155. SIP is defined so it can use either UDP or TCP as a transport protocol.
  1156.  
  1157. UDP has advantages over TCP from a performance point of view, as the SIP
  1158. application  can  keep control of the precise timing of retransmissions,
  1159. and can also make simultaneous call attempts to many potential locations
  1160. of many users without needing to keep TCP connection state for each con-
  1161. nection.
  1162.  
  1163. TCP has the advantage that clients are simpler to implement  because  no
  1164. retransmission    timing code needs to be written and also that it is pos-
  1165. sible to have a single server serving SIP  and    HTTP  with  very  little
  1166. extra code.
  1167.  
  1168. With UDP, all the additional reliability code is in the client.      It  is
  1169. recommended that servers SHOULD implement both TCP and UDP functionality
  1170. as the additional server code required is very small.
  1171.  
  1172. Clients MAY implement either TCP or UDP transport or both  as  they  see
  1173. fit.
  1174.  
  1175.  
  1176.  
  1177.  
  1178. Handley/Schulzrinne/Schooler                           [Page 21]
  1179.  
  1180. INTERNET-DRAFT                            2nd Dec 1996
  1181.  
  1182.  
  1183. 7.1.  Reliability using UDP transport
  1184.  
  1185. The Session Invitation Protocol is straightforward in  operation.   Only
  1186. the initiating client needs to keep any state regarding the current con-
  1187. nection     attempt.   SIP     assumes  no  additional  reliability  from  IP.
  1188. Requests  or replies may be lost.  A SIP client SHOULD simply retransmit
  1189. a SIP request until it receives a reply, or until it  has  reached  some
  1190. maximum     number of timeouts and retransmissions.  If the reply is merely
  1191. a 1xx Informational progress report, the initiating client SHOULD  still
  1192. continue retransmitting the request, albeit less frequently.
  1193.  
  1194. When the remote user agent or server sends a final 2xx or  4xx    response
  1195. (not  a     1xx  report),    it  cannot  be    sure the client has received the
  1196. response, and thus SHOULD cache the results  until  a  connection  setup
  1197. timeout     has  occurred    to  avoid having to contact the user again.  The
  1198. server MAY also choose to cache 3xx or 6xx  responses  if  the    cost  of
  1199. obtaining the response outweighs the cost of caching it.
  1200.  
  1201. It is possible that a user can be invited  successfully,  but  that  the
  1202. reply  that the user was succeffully contacted may not reach the invita-
  1203. tion initiator.     If the session still exists but the initiator gives  up
  1204. on  including the user, the contacted user has sufficient information to
  1205. be able to join the session.  However, if the session no  longer  exists
  1206. because     the  invitation  initiator ``hung up'' before the reply arrived
  1207. and the session was to be two-way, the    conferencing  system  should  be
  1208. prepared to deal with this circumstance.
  1209.  
  1210. One solution is for the initiator to  acknowledge  the    invitee's  ``200
  1211. OK''  reply.  Although not required, in the case of a successful invita-
  1212. tion the invited user's agent can make a  confirmation    request     in  its
  1213. ``200  OK''  reply.   In  this case the initiator's agent sends a single
  1214. request with a reply ``Confirm:true'' if the request was still valid  or
  1215. a  reply ``Confirm:false'' if it was not so that a premature hang-up can
  1216. be detected without a long timeout.  Such a confirmation request may  be
  1217. retransmitted  by  the invited user's agent if it so desired.  Confirma-
  1218. tion requests can only be made with ``200 OK''    replies,  and  only  the
  1219. invitation initiator's agent may issue the actual confirmation.
  1220.  
  1221. Only a ``200 OK'' reply warrants such a confirmation handshake,     because
  1222. it  is    the only situation where user-relevant state may be instantiated
  1223. anywhere other than at the initiator's client.    In all other  cases,  it
  1224. is not necessary that state is maintained.  In particular, when a server
  1225. makes multiple proxy requests, ``5xx Server  Error''  and  ``6xx  Search
  1226. Response''  replies do not immediately get passed back to the invitation
  1227. initiator, and so no end-to-end acknowledgment of a  failed  request  is
  1228. possible.
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234. Handley/Schulzrinne/Schooler                           [Page 22]
  1235.  
  1236. INTERNET-DRAFT                            2nd Dec 1996
  1237.  
  1238.  
  1239. 7.2.  Reliability using TCP transport
  1240.  
  1241. TCP is a reliable transport protocol, and so we do not    need  to  define
  1242. additional  reliability     mechanisms.   However    we must define rules for
  1243. connection closedown under normal operation.
  1244.  
  1245. The normal mode of operation is for the client (or  proxy  acting  as  a
  1246. client)     to make a TCP connection to the well-known port of a host hous-
  1247. ing a SIP server.  The client then sends the SIP request to  the  server
  1248. over  this connection and waits for one or more replies.  The client MAY
  1249. close the connection at any time.
  1250.  
  1251. The server MAY send one or more 1xx Informational responses before send-
  1252. ing  a single 2xx, 3xx, 4xx, 5xx or 6xx reply.    The server MUST NOT send
  1253. more than one reply, with the exception of 1xx    responses.   The  server
  1254. SHOULD    NOT  close  the     TCP  connection  until     it  has  sent its final
  1255. response, at which point it MAY close the TCP connection  if  it  wishes
  1256. to.   However,    normally  it is the client's responsibility to close the
  1257. connection.
  1258.  
  1259. If the server leaves the connection open, and if the client  so     desires
  1260. it  may     re-use     the connection for further SIP requests or for requests
  1261. from the same family of protocols (such as HTTP or stream  control  com-
  1262. mands).
  1263.  
  1264. The same application-level confirmation rules apply for TCP as for UDP.
  1265.  
  1266.  
  1267.  
  1268. 8.  Searching
  1269.  
  1270. A basic assumption of SIP is that a location server at the  user's  home
  1271. site  either knows where the user resides, knows how to locate the user,
  1272. or at the very least knows another location server that     possibly  might
  1273. have  a     better idea.  How these servers get this information is outside
  1274. the scope of SIP itself, but it is expected that  many    different  user-
  1275. location  services will exist for some time.  SIP is designed so that it
  1276. does not care which location service SIP servers actually employ.
  1277.  
  1278.  
  1279. 8.1.  Proxy servers: Relaying and Redirection
  1280.  
  1281. If a proxy server receives a request for a user whose location    it  does
  1282. not  know,  and     for whom it has no better idea where the user might be,
  1283. then the server should return a ``601 Not Currently  Here''  reply  mes-
  1284. sage.
  1285.  
  1286. If the server does have an idea how to contact the user, it  can  either
  1287.  
  1288.  
  1289.  
  1290. Handley/Schulzrinne/Schooler                           [Page 23]
  1291.  
  1292. INTERNET-DRAFT                            2nd Dec 1996
  1293.  
  1294.  
  1295. forward     (relay) the request itself, or can redirect the invitation ini-
  1296. tiator to another client that is more likely to know by sending     a  603,
  1297. 301  or     302  response    as appropriate.     It can also gateway the request
  1298. into some other form if some other invitation protocol is in  use  in  a
  1299. region    containing  the     invited  user, though in doing so the server is
  1300. likely to give up being stateless.
  1301.  
  1302. Whether to relay the request or to redirect the request     is  up     to  the
  1303. server    itself.      For  example,     if the server is on a firewall machine,
  1304. then it will probably have to relay the request to  servers  inside  the
  1305. firewall.   Additionally,  if  a local multicast group is to be used for
  1306. user location, then the server is likely to relay the request.    However,
  1307. if the user is currently away from home, relaying the request makes lit-
  1308. tle sense, and the server is more likely (though not compelled) to  send
  1309. a  redirect  reply.  SIP is policy-free on this issue. In general, local
  1310. searches are likely to be better performed by relaying whereas wide-area
  1311. searches are likely to be better performed by redirection.
  1312.  
  1313. When SIP uses UDP transport,  clients  and  servers  can  make    multiple
  1314. simultaneous  requests    to  locate  a particular user at low cost.  This
  1315. greatly speeds up any search for the user, and in most cases  will  only
  1316. result    in one successful response.  Although several simultaneous paths
  1317. may reach the same host, successful  responses    arriving  from    multiple
  1318. paths  will  not  confuse the client as they should all contain the same
  1319. successful host address.  However, this does imply that paths with  many
  1320. levels    of  relaying should be strongly discouraged as if the request is
  1321. fanned out at each hop and relayed many times, request implosions  could
  1322. result.     Thus  servers    that are not the first hop servers in a chain of
  1323. servers SHOULD NOT make multiple parallel requests, but     should     send  a
  1324. redirection  response  with multiple alternatives.  Thus a firewall host
  1325. can still perform a parallel search but can control the     fanout     of  the
  1326. search.
  1327.  
  1328.  
  1329. 8.2.  Parallel Searches: Initiator Behaviour
  1330.  
  1331. The session inititor may make a parallel search for a  user.   This  can
  1332. occur  when  DNS  resolution results in multiple addresses, or when con-
  1333. tacting a  remote  server  results  in    a  ``603  Alternative  Address''
  1334. response  containing  multiple    addresses  to  try.   All  such parallel
  1335. searches for the same SIP request MUST contain the same SIP  Id,  though
  1336. the  sequence  number (given in the ``Path:'' field) SHOULD be different
  1337. for each of the parallel searches.
  1338.  
  1339. Whilst performing a parallel search, different responses may result from
  1340. different servers, and it is important for the initiating client to han-
  1341. dle these responses correctly.    In general, the following rules apply:
  1342.  
  1343.  
  1344.  
  1345.  
  1346. Handley/Schulzrinne/Schooler                           [Page 24]
  1347.  
  1348. INTERNET-DRAFT                            2nd Dec 1996
  1349.  
  1350.  
  1351. +    If a 2xx response is received, the invitation was    successful,  the
  1352.      user  should  be  informed     and all pending requests should be ter-
  1353.      minated and/or ignored.
  1354.  
  1355. +    If a 4xx response    is  received  the  invitation  has  definitively
  1356.      failed,  the  user     should     be  informed,    and all pending requests
  1357.      should be terminated and/or ignored.
  1358.  
  1359. +    If a 3xx response is received, the search should be terminated  and
  1360.      all pending requests should be terminated and/or ignored.    However,
  1361.      further action MAY be taken depending on the actual  reply     without
  1362.      informing    the user or alternatively the invitation MAY be regarded
  1363.      as having failed in which case the user MUST be informed.
  1364.  
  1365. +    If a 5xx  or  6xx    response  is  received,     the  particular  server
  1366.      responding     is removed from the parallel search and the search con-
  1367.      tinues.  If a ``603 Alternative Address'' response is received, the
  1368.      search  may  be  expanded    to  include  those servers listed in the
  1369.      response that have not already responded.    The user SHOULD     NOT  be
  1370.      informed  unless  there  are no other servers left to try, in which
  1371.      case the user MUST be informed.
  1372.  
  1373. +    If a 1xx response is received, the search continues.  The user  MAY
  1374.      be informed as deemed appropriate.
  1375.  
  1376.  
  1377. 8.3.  Parallel Searches: Proxy Behaviour
  1378.  
  1379. In the    same  way  that     an  Initiating     Client     can  discover    multiple
  1380. addresses  to  try,  a proxy server can also discover multiple addresses
  1381. that it may try.  For a proxy server to be stateless, it must  not  make
  1382. multiple  SIP requests because it would then be possible to return a 5xx
  1383. or 6xx response to the Initiating Client and afterwards obtain a defini-
  1384. tive answer.  To be able to make multiple parallel SIP requests, it must
  1385. keep state as to the replies it has already received and MUST NOT return
  1386. any  reply  other than 1xx informational replies until it has received a
  1387. definitive reply or has no further addresses to try.
  1388.  
  1389. Thus faced with DNS resolution giving multiple addresses, a proxy server
  1390. that  wishes to be stateless should only send a SIP request to the first
  1391. address.  Similarly a stateless proxy should not  attempt  to  send  SIP
  1392. request     to  multiple  addresses  given in a ``603 Alternative Address''
  1393. response that is returned it it, but should forward such a response back
  1394. towards the initiator.
  1395.  
  1396. Proxies that wish to  keep  state  should  follow  the    following  rules
  1397. regarding responses obtained during a parallel search:
  1398.  
  1399.  
  1400.  
  1401.  
  1402. Handley/Schulzrinne/Schooler                           [Page 25]
  1403.  
  1404. INTERNET-DRAFT                            2nd Dec 1996
  1405.  
  1406.  
  1407. +    If a 2xx response is received, the invitation was    successful,  the
  1408.      2xx  response  should  be forwarded back towards the initiator, and
  1409.      all pending requests should be terminated and/or ignored.
  1410.  
  1411. +    If a 4xx response    is  received  the  invitation  has  definitively
  1412.      failed,  the 4xx response should be forwarded back towards the ini-
  1413.      tiator, and  all  pending    requests  should  be  terminated  and/or
  1414.      ignored.
  1415.  
  1416. +    If a 3xx response is received the invitation  is  regarded     by  the
  1417.      proxy  as    having failed, the 3xx response should be forwarded back
  1418.      towards the initiator, the search    should    be  terminated    and  all
  1419.      pending requests should be terminated and/or ignored.
  1420.  
  1421. +    If a 5xx  or  6xx    response  is  received,     the  particular  server
  1422.      responding     is removed from the parallel search and the search con-
  1423.      tinues.  If a ``603 Alternative Address'' response is received, the
  1424.      search  may  be  expanded    to  include  those servers listed in the
  1425.      response that have not already responded.    No response other than a
  1426.      periodic  ``100 Trying'' resonse should be send towards the initia-
  1427.      tor unless there are no other servers left to try, in which case  a
  1428.      response SHOULD be sent as described below.
  1429.  
  1430. +    If a 1xx response is  received,  the  search  continues.    The  1xx
  1431.      response MAY be forwarded towards the initiator as appropriate.
  1432.  
  1433. If a proxy had exhausted its search and still not obtained a  definitive
  1434. response (it received only 1xx, 5xx, and 6xx responses) the proxy should
  1435. cache these responses and return the first response from  the  following
  1436. ordered list:
  1437.  
  1438.  
  1439.     1.- 503 Service Unavailable
  1440.  
  1441.     2.- 500 Server Internal Error
  1442.  
  1443.     3.- 501 Not Implemented
  1444.  
  1445.     4.- any other 5xx error not yet defined
  1446.  
  1447.     5.- 600 Search Failure
  1448.  
  1449.     6.- 602 Not Currently Here
  1450.  
  1451.     7.- 601 Not Known Here
  1452.  
  1453.     8.- any other 6xx error response not yet defined
  1454.  
  1455.  
  1456.  
  1457.  
  1458. Handley/Schulzrinne/Schooler                           [Page 26]
  1459.  
  1460. INTERNET-DRAFT                            2nd Dec 1996
  1461.  
  1462.  
  1463. If a proxy has exhausted  its  search  and  the     only  response     it  has
  1464. received  has  been  ``603  Alternative Address'', then the proxy should
  1465. send a ``600 Search Failure'' response if any connection  attempt  timed
  1466. out  or     failed,  or it should send ``602 Not Currently Here'' if two or
  1467. more ``603 Alternative Address'' responses only     provide  references  to
  1468. each other.
  1469.  
  1470.  
  1471. 8.4.  Change of Transport at a Proxy
  1472.  
  1473. Editors note: this section is still incomplete.     Several  options  exist
  1474. for  where the responsibilty should lie for retransmissions from proxies
  1475. between TCP and UDP transport.    This  section  generally  assumes  local
  1476. retransmission,     but  end-to-end transmission through a chain of proxies
  1477. is also possible
  1478.  
  1479. It is possible that a proxy server will receiver a request using TCP and
  1480. relay  it  onwards using UDP or vice-versa.  SIP does not assume end-to-
  1481. end reliability even when the initiating client is using TCP, but a  SIP
  1482. client    sending     a request over TCP MAY assume that the request has been
  1483. received by the server it sent the request to.     Retransmission     of  the
  1484. request is then not the responsibility of the client.  However, a called
  1485. user agent SHOULD NOT assume  that  a  2xx  success  response  has  been
  1486. received by the invitation initiator, even if all the path fields in the
  1487. request indicated TCP transport because it cannot be certain  all  those
  1488. TCP  connections  still     exist.      If  the  called  user     agent    requires
  1489. knowledge that the response did reach the invitation initiator,     it  MAY
  1490. add  a    ``Confirm:required''  field  to     the  reply  as     it would if the
  1491. response was sent using UDP.
  1492.  
  1493. In the following, the term ``TCP->UDP proxy'' is used to  mean    a  proxy
  1494. that received a request using TCP and relayed it using UDP.  Similarly a
  1495. ``TCP->UDP proxy'' receives a reply using UDP and should relay it  using
  1496. TCP.
  1497.  
  1498.  
  1499.  
  1500. 8.4.1.    Retransmission from a TCP->UDP Proxy
  1501.  
  1502. A proxy receiving a request  with  TCP    transport  and    forwarding  that
  1503. request using UDP becomes responsible for restransmission of the request
  1504. as required and for timing out the request if no answer is forthcoming.
  1505.  
  1506.  
  1507. 8.4.2.    Retransmissions arriving at a UDP->TCP Proxy
  1508.  
  1509. A proxy receiving a request using  UDP    transport  and    forwarding  that
  1510. request     using    TCP transport may have have SIP request state associated
  1511.  
  1512.  
  1513.  
  1514. Handley/Schulzrinne/Schooler                           [Page 27]
  1515.  
  1516. INTERNET-DRAFT                            2nd Dec 1996
  1517.  
  1518.  
  1519. with that TCP connection or SIP response state accociated with it.
  1520.  
  1521. If such a proxy receives a retransmission of the UDP request  whilst  in
  1522. the  state  or    awaiting a response (i.e, has  request state), it SHOULD
  1523. NOT forward the duplicate request into the  TCP     connection  unless  the
  1524. request     has been modified, but instead SHOULD respond with a ``100 Try-
  1525. ing'' response sent back towards the initiator.
  1526.  
  1527. Note: this behaviour is different from a UDP->UDP proxy which MUST  for-
  1528. ward the retransmitted request and MAY additionally respond with a ``100
  1529. Trying'' response sent back towards the initiator.
  1530.  
  1531. If such a proxy receives a retransmission of the UDP request in response
  1532. state  (i.e,  it  has already sent a definitive response) then the proxy
  1533. MAY retransmit that response if it has cached it.  Alternatively  if  it
  1534. has  not  cached  the  response,  it MAY re-send the request towards the
  1535. called user agent, either via an existing TCP connection if there is one
  1536. or  via a new TCP connection if there is not, to obtain a retransmission
  1537. of the response.  In the latter case, the proxy MAY additionally respond
  1538. with a ``100 Trying'' response sent back towards the initiator.
  1539.  
  1540. Note: this behaviour is the same as a UDP->UDP proxy in     the  same  cir-
  1541. cumstances.
  1542.  
  1543.  
  1544. 8.4.3.    Confirmation arriving at a TCP->UDP Proxy
  1545.  
  1546. One possible event that may occur is that  whilst  performing  a  search
  1547. using UDP, a response may arrive that should be relayed back towards the
  1548. initiator using TCP, but the TCP connection has been terminated     by  the
  1549. initiator.   In     this  case  the  proxy     MUST  NOT  attempt to relay the
  1550. response (by opening a TCP connection) and  should  terminate  any  out-
  1551. standing search.  In this circumstance only, if the response was a ``200
  1552. OK'' response with a ``Confirm:required'' field, the proxy  MAY     re-send
  1553. the  request to the Contact Host with a ``Confirm:false'' field to speed
  1554. hang-up discovery at the called user agent.
  1555.  
  1556.  
  1557. 8.4.4.    Confirmation sent from a UDP->TCP Proxy
  1558.  
  1559. Normally a response that arrives at a proxy using  TCP    that  should  be
  1560. sent  back  towards  the  initiator  using  UDP should be sent once, and
  1561. should only be re-sent if the request is  re-sent  from     the  UDP  proxy
  1562. closer to the initiator.  However, this does not allow for reliable con-
  1563. firmation.
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570. Handley/Schulzrinne/Schooler                           [Page 28]
  1571.  
  1572. INTERNET-DRAFT                            2nd Dec 1996
  1573.  
  1574.  
  1575. 9.  Security Considerations
  1576.  
  1577. TBD
  1578.  
  1579.  
  1580. Acknowledgments
  1581.  
  1582. We wish to thank the members of the IETF MMUSIC WG  for     their    comments
  1583. and suggestions.
  1584.  
  1585.  
  1586. Authors' Addresses
  1587.  
  1588. Mark Handley
  1589. USC Information Sciences Institute
  1590. c/o MIT Laboratory for Computer Science
  1591. 545 Technology Square
  1592. Cambridge, MA 02139, USA
  1593. electronic mail: mjh@isi.edu
  1594.  
  1595. Henning Schulzrinne
  1596. Dept of Computer Science
  1597. Columbia University
  1598. 1214 Amsterdam Avenue
  1599. New York, MY 10027, USA
  1600. electronic mail: schulzrinne@cs.columbia.edu
  1601.  
  1602. Eve Schooler
  1603. Computer Science Department 256-80
  1604. California Institute of Technology
  1605. Pasadena, CA 91125. USA.
  1606. electronic mail: schooler@cs.caltech.edu
  1607.  
  1608.  
  1609.  
  1610. References
  1611.  
  1612. [1]  M. Handley,  V.  Jacobson    ``SDP:    Session     Description  Protocol''
  1613.      Internet Draft  draft-ietf-mmusic-sdp-03.txt, Work in Progress, Nov
  1614.      1996.
  1615.  
  1616. [2]  M. Handley, ``SAP: Session Announcement Protocol''     Internet  Draft
  1617.      draft-ietf-mmusic-sap-01.txt, Work in Progress, Nov 1996.
  1618.  
  1619. [3]  Schooler, E.M., ``Case Study: Multimedia Conference  Control  in  a
  1620.      Packet-switched  Teleconferencing System'' Journal of Internetwork-
  1621.      ing: Research and Experience, Vol.4, No.2,     pp.99-120,  June  1993;
  1622.      also  available as an ISI technical report ISI/RS-93-359, Aug 1993.
  1623.  
  1624.  
  1625.  
  1626. Handley/Schulzrinne/Schooler                           [Page 29]
  1627.  
  1628. INTERNET-DRAFT                            2nd Dec 1996
  1629.  
  1630.  
  1631.      ftp://ftp.isi.edu/pub/hpcc-papers/mmc/joi.ps
  1632.  
  1633. [4]  A. Gulbrandsen, P. Vixie, ``A DNS RR for specifying the location of
  1634.      services''     Internet  Draft  draft-gulbrandsen-dns-rr-srvcs-02.txt,
  1635.      Work in Progress, Jan 1996.
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.  
  1658.  
  1659.  
  1660.  
  1661.  
  1662.  
  1663.  
  1664.  
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682. Handley/Schulzrinne/Schooler                           [Page 30]
  1683.  
  1684.