home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_n_r / draft-rosenberg-itg-00.txt < prev    next >
Text File  |  1996-11-26  |  64KB  |  1,285 lines

  1. Internet Engineering Task Force      Audio-Visual Transport WG
  2. INTERNET-DRAFT                                    J. Rosenberg
  3.                                      Lucent, Bell Laboratories
  4.                                                 H. Schulzrinne
  5.                                            Columbia University
  6.                                              November 26, 1996
  7.                                          Expires: May 26, 1997
  8.  
  9.  
  10.  
  11.  
  12.        
  13.      Issues and Options for an Aggregation Service within RTP
  14.                      draft-rosenberg-itg-00.txt
  15.  
  16. Status of this Memo
  17.  
  18. This  document is an Internet-Draft. Internet-Drafts  are  working
  19. documents  of  the  Internet Engineering Task  Force  (IETF),  its
  20. areas,  and its working groups.  Note that other groups  may  also
  21. distribute working documents as Internet Drafts.
  22.  
  23. Internet-Drafts  are draft documents valid for a  maximum  of  six
  24. months  and  may  be  updated, replaced,  or  obsoleted  by  other
  25. documents at any time.  It is inappropriate to use Internet-Drafts
  26. as  reference  material or to cite them other  than  as  "work  in
  27. progress."
  28.  
  29. To  learn  the current status of any Internet-Draft, please  check
  30. the  "1id-abstracts.txt" listing contained in the  Internet-Drafts
  31. Shadow   Directories   on  ftp.is.co.za  (Africa),   nic.nordu.net
  32. (Europe),  munnari.oz.au (Pacific Rim), ds.internic.net  (US  East
  33. Coast), or ftp.isi.edu (US West Coast).
  34.  
  35. Distribution of this document is unlimited.
  36.  
  37.                              Abstract
  38.  
  39.     This  memorandum discusses the issues and options involved
  40.     in  the design of a new transport protocol for multiplexed
  41.     voice within a single packet. The intended application  is
  42.     the interconnection of devices which provide "trunking" or
  43.     long  distance  telephone service over the Internet.  Such
  44.     devices have many voice connections simultaneously between
  45.     them.  Multiplexing them into the same connection improves
  46.     on  the  efficiency, enables the use of low bitrate  voice
  47.     codecs,  and  improves  scalability.  Options  and  issues
  48.     concerning   timestamping,  payload  type  identification,
  49.     length   indication,   and  channel   identification   are
  50.     discussed. Several possible header formats are identified,
  51.     and their efficiencies are compared.
  52.  
  53. This  document  is a product of the Audio-Video Transport  working
  54. group  within  the Internet Engineering Task Force.  Comments  are
  55. solicited  and should be addressed to the working group's  mailing
  56. list at rem-conf@es.net and/or to the author(s).
  57.  
  58. J. Rosenberg, H. Schulzrinne   Expires 5/26/97               Pg. 1
  59.  
  60. INTERNET-DRAFT                                       Nov. 26, 1997
  61.  
  62. 1.   Introduction
  63.  
  64. With  the  tremendous changes in the telecommunications  industry,
  65. and  the recent growth of the Internet, there is a new opportunity
  66. for  offering  long distance telephony over the Internet.  Such  a
  67. service  can  be offered by allowing users to dial a local  access
  68. number,  connecting them to a device called an Internet  Telephony
  69. Gateway  (ITG).  This device prompts the user  for  a  destination
  70. telephone number, and then routes the call over the Internet to  a
  71. similar  device  at the local exchange of the destination.  There,
  72. the call is completed when the destination ITG dials the end user.
  73. The scenario is depicted in Figure 1.
  74.  
  75.  -------           --------                 ----------
  76. | Phone | --------| NY ITG |---------------| Internet |
  77.  -------           --------                |          | 
  78.                                            |          |
  79.                                            |          |
  80.  -------           --------                |          |
  81. | Phone | --------| LA ITG |---------------|          |
  82.  -------           --------                 ----------
  83.  
  84.                                  
  85.                Figure 1: Internet Telephony Gateway
  86. In  this  application,  the Internet is used  only  for  the  long
  87. distance  portion of the telephone call. Access to the service  is
  88. still  via the traditional POTS. Current implementations  of  this
  89. service  are using H.323 to set up and tear down a new  connection
  90. each  time a user establishes or terminates a call. However, H.323
  91. is  the  wrong  protocol for many reasons. First, it  is  far  too
  92. complex,  providing for capabilities and features which cannot  be
  93. used  because  both endpoints are analog telephones.  Secondly,  a
  94. significant  increase in efficiency (in excess  of  30%),  can  be
  95. readily  achieved if all of the voice calls between  two  ITG  are
  96. multiplexed  into  a single packet, instead of  using  a  separate
  97. connection (and thus separate packets) for each. Such multiplexing
  98. reduces  overhead  by increasing the effective payload  without  a
  99. corresponding  penalty in packetization delay. In  fact,  as  more
  100. users  are multiplexed, the payload from a particular user can  be
  101. reduced  in  size, or the bitrate reduced, without  an  efficiency
  102. penalty.  Furthermore, multiplexing improves scalability.  As  the
  103. number  of users increases, the number of packets which arrive  at
  104. the  destination  does not increase. This means that  computations
  105. which  are per-packet (such as RTCP statistics collecting,  jitter
  106. accumulation,  header processing, etc.) do not increase.  The  end
  107. result is that multiplexing can simultaneously improve efficiency,
  108. reduce  delay, and improve scalability. There are some minor  side
  109.  
  110. J. Rosenberg, H. Schulzrinne   Expires 5/26/97               Pg. 2
  111.  
  112. INTERNET-DRAFT                                       Nov. 26, 1997
  113.  
  114. benefits  in  addition to these major three. For example,  in  the
  115. aggregated  scenario,  when a particular  user  enters  a  silence
  116. period, and stops sending data, the flow of packets will not  stop
  117. unless  all  of the other users are already in silence (generally,
  118. an  unlikely  event). This means that packets continually  arrive,
  119. and  that  delay  estimates obtained from  those  packets  can  be
  120. continuously  generated. Algorithms for dynamically  adapting  the
  121. playout  buffer at the receiver are based on these delay estimates
  122. [1],  and can now be reworked to utilize the continuous stream  of
  123. delays,  as  opposed  to  relying on the  delays  received  during
  124. talkspurts only. The result is likely to be an improvement in both
  125. end to end delay and loss performance.
  126.  
  127. In  order to perform such multiplexing, a new Internet protocol is
  128. required. This protocol must provide for the transport of multiple
  129. real  time  streams within a single IP packet. Since the  intended
  130. application  is  real-time, the requirements for timing  recovery,
  131. sequencing,  and  payload identification are nearly  identical  to
  132. normal  single  user voice. Since RTP was designed to  meet  these
  133. requirements  [2], it makes sense to build this  new  multiplexing
  134. protocol on top of RTP. In fact, RTP allows for different profiles
  135. to  be  defined  for a particular application. The  goal  of  this
  136. document  is to define a variety of options for that new  profile,
  137. and to compare them.
  138.  
  139. It  is  important to note that this application is similar in  its
  140. requirements  to [3], which seeks to multiplex multiple  encodings
  141. for a particular user into the same IP packet.
  142.  
  143.  
  144. 2.   Terminology
  145.  
  146. User: One of the individuals who has data within the IP packet.
  147. Connection: The point to point RTP session between two ITG's.
  148. Channel: A "virtual connection" which is established by allowing a
  149. user  to  send  data within a packet. There are many channels  per
  150. connection - this represents the multiplexing.
  151. Channel Identifier: A number which identifies a channel.
  152. Block: The section of the payload of a packet which contains  data
  153. for a particular user.
  154.  
  155. 3.   Requirements:
  156.  
  157. The  transport protocol must provide, at a minimum, the  following
  158. functionality:
  159.  
  160. 1.    Delineation.  Data  from different  users  must  be  clearly
  161.   delineated.
  162. 2.   Identification. The channel to which the data belongs must be
  163. identified.
  164. 3.   Variable lengths: The protocol should support variable length
  165.   blocks  from  a  particular user. This allows for variable  rate
  166.   codecs.
  167. 4.    Low  overhead: Since the protocol is designed for  low  rate
  168.   voice,  it  should  have low overhead. This issue  is  extremely
  169.   important. New coders are emerging which can support  near  toll
  170.   quality at 8 kbps, and acceptable quality at rates even as low as
  171.   4 kbps. It is desirable to support such codecs, as they can reduce
  172.  
  173. J. Rosenberg, H. Schulzrinne   Expires 5/26/97               Pg. 3
  174.  
  175. INTERNET-DRAFT                                       Nov. 26, 1997
  176.  
  177.   the  cost of providing an ITG service. Furthermore, advances  in
  178.   coding technology indicate that it is desirable to send very low
  179.   bitrate information (1 kbps or less) during silence periods,  so
  180.   that  background  noise can be reproduced well  (as  opposed  to
  181. sending  nothing). Support of such rates requires a protocol  with
  182.   low overhead.
  183. 5.    Marker: A general purpose marker bit should be available for
  184.   all users within the connection.
  185. 6.   Payload Identification. The codec in use for each user should
  186.   be indicated somehow. It is a requirement to allow for the coding
  187.   type to change during the lifetime of  a channel.
  188.  
  189.  
  190. 4.   Issues
  191. The following section identifies a number of issues which have  an
  192. impact on the design of the protocol. It also identifies a variety
  193. of options for providing the specific services of the protocol.
  194.  
  195. 4.1  How to bind telephone numbers to channel identifiers
  196.  
  197. There  are  four  options for this problem. First,  the  telephone
  198. number  can  be  included  in  the per-user  header.  Second,  the
  199. telephone  number  can be signaled reliably  by  a  companion  TCP
  200. connection  before data begins. Thirdly, the phone number  can  be
  201. sent  periodically in RTCP in a soft-state fashion. Fourthly,  the
  202. information  can  be sent periodically over a reliable  TCP  based
  203. control  channel.  The first approach avoids  any  synchronization
  204. problems,  but has high overhead. The second approach  is  a  more
  205. traditional  approach, but relies on hard state at the destination
  206. ITG.  The third approach allows for a refresh of state, but causes
  207. longer  setup  delays  in  the face of  packet  loss.  The  fourth
  208. approach  guarantees  reliable delivery of signaling  information,
  209. but also generates refreshes to allow for recovery from end-system
  210. failures.
  211.  
  212. The  most reasonable approach seems to be the second - the use  of
  213. TCP  (or  any  other  reliable  protocol)  for  sending  signaling
  214. information.   This   approach  guarantees   that   the   critical
  215. information  is  received correctly, and in a  timely  manner.  It
  216. avoids bandwidth inefficient refresh as well.
  217.  
  218.  
  219. 4.2  Payload type identification
  220.  
  221. There  are a number of ways to identify the coding of the payload.
  222. The  first  is  through static types, identified by  bits  in  the
  223. header  (like RTP is now). The second approach dynamically adjusts
  224. the  coding  type based on external messages which bind  a  coding
  225. type to a channel identifier. Such external messages can be either
  226. UDP  or  TCP  based. A related issue is synchronization  of  these
  227. changes.  Either the timestamps or sequence numbers can  be  used.
  228. One  approach to performing the synchronization is as follows: The
  229. source  sends a message reliably to the receiver, indicating  that
  230. it  will  change  codings at timestamp N, where N is  some  future
  231. timestamp  (or  SN). The N should be chosen far  enough  into  the
  232. future  to  guarantee that the receiver will get the  TCP  message
  233. before  time N. The farther away N is, the more robust the  system
  234. becomes,  but the source also loses its ability to adapt  quickly.
  235. There  are  also  several  options for  simple  in-band  signaling
  236. methods which can assist in error recovery. This is based  on  the
  237. assumption  that it is better for the receiver to  know  that  the
  238.  
  239. J. Rosenberg, H. Schulzrinne   Expires 5/26/97               Pg. 4
  240.  
  241. INTERNET-DRAFT                                       Nov. 26, 1997
  242.  
  243. encoding  has changed (even though it doesn't know to what),  than
  244. to know nothing. This avoids playing garbage out. A one or two bit
  245. "coding sequence number" can be used in the header. Such a  number
  246. starts  at zero. At the timestamp where the encoding changes,  the
  247. SN  increments,  and stays incremented until the next  change.  In
  248. this  fashion, we are guaranteed that the source will  never  play
  249. out  data  using the wrong coding type. Probably just one  or  two
  250. bits of this SN is necessary.
  251.  
  252. Yet  another  approach to changing payload types is  via  "pseudo-
  253. dynamic"  payloads.  Before  transmission  of  data  commences,  a
  254. reliable  exchange  occurs which downloads  a  table  of  possible
  255. encodings  of the payload type, based on the capabilities  of  the
  256. source.  The  table then remains active for the  lifetime  of  the
  257. connection. This technique can reduce the number of bits  required
  258. for  the  payload type, since a particular gateway  is  likely  to
  259. support  just  a  few codecs. However, it is still  a  hard  state
  260. approach,  but  it  would  only fail in the  face  of  end  system
  261. failure, not network failure.
  262.  
  263. Our  conclusion is that it is desirable to have the PTI  field  in
  264. the  payload.  This  makes it possible  to  do  more  robust  rate
  265. control,   which  becomes  a  significant  issue   when   multiple
  266. connections are multiplexed together (and therefore the  aggregate
  267. bitrate  increases).  It also makes sense to  signal  a  table  of
  268. encodings for the payload type at the beginning of the connection.
  269. Any  particular  pair of ITG will generally  only  support  a  few
  270. codecs. Therefore, dynamically setting the codings of the PTI  bit
  271. makes  a  more compact representation possible without restricting
  272. the set of codecs which may be used.
  273.  
  274.  
  275. 4.3  Timestamps
  276. Timing is a very complex issue for the multiplexing protocol.  The
  277. first  question related to it is whether the protocol will support
  278. mixing  of  media  derived from separate clocks (i.e.,  voice  and
  279. video). Although doing this seems attractive, it is complex and in
  280. opposition  to  the philosophy under which RTP was developed.  RTP
  281. explicitly states that separate media should be placed in separate
  282. RTP  streams.  This allows for different QoS to be  requested  for
  283. each  media, and for clocks to be defined based on the media type.
  284. Furthermore,  this  profile is geared towards the  aggregation  of
  285. voice  traffic generated from the POTS across the Internet.  As  a
  286. result, the only source of data is from a single, 125us clock.
  287.  
  288. The   next  basic  question  is  whether  timestamps  are   needed
  289. "globally", i.e., just one per packet independent of the number of
  290. users, or "locally", whereby each user within a packet needs their
  291. own  timestamp. A separate question is the representation of these
  292. timestamps   in  an  efficient  manner.  When  considering   these
  293. questions, the criteria to keep in mind are:
  294.  
  295. 1.   Can silence periods be recovered correctly
  296. 2.   Can resynchronization occur in the face of packet loss
  297. 3.   What is the impact on playout buffering and jitter
  298. computation
  299.  
  300. The answer to this question depends on the desired capabilities of
  301.  
  302. J. Rosenberg, H. Schulzrinne   Expires 5/26/97               Pg. 5
  303.  
  304. INTERNET-DRAFT                                       Nov. 26, 1997
  305.  
  306. the  protocol.  In the most general case, it is possible  to  have
  307. different frame sizes for each user (for example, 20ms, 10ms,  and
  308. 15ms)  within  the  same packet. These frames can  be  arbitrarily
  309. aligned  in time with respect to each other (i.e., the 20ms  frame
  310. starts  5.3 ms after the beginning of another user's 10 ms frame).
  311. The  user can send packets off at any point, containing data  from
  312. those  users  whose frames have been generated before  the  packet
  313. departure time. A somewhat more restrictive capability is to allow
  314. for different frame sizes and time alignments, but to require that
  315. any packet contains all the same frame sizes, all aligned in time.
  316. The  most restrictive case is to require separate RTP sessions for
  317. users  with different frame sizes. This requires a channel  to  be
  318. torn  down  and  re-setup when it changes  codec.  The  desire  to
  319. perform  flow  control on a channel-by-channel  basis  makes  this
  320. approach unacceptable, and it is not considered further.
  321.  
  322.  
  323. 4.3.1     General Case
  324.  
  325. First  consider the general case. Packets can contain frames  from
  326. some or all of the users, and those frames are not the same length
  327. nor  time  aligned in any way. An example of such  a  scenario  is
  328. depicted in Figure 2. In the figure, there are three sources,  and
  329. the  ti  correspond to the times of packet emissions. When packets
  330. are lost, the variability in the amount and time alignment of data
  331. in  each  packet makes it impossible to reconstruct how much  time
  332. had  elapsed based solely on sequence numbers (such reconstruction
  333. IS  possible in the single user case). Furthermore, the amount  of
  334. time  elapsed  can  easily vary from user to user,  and  therefore
  335. local timestamps are needed.
  336.  
  337. The general case introduces further complications which have to do
  338. with  jitter and delay computation. Such computations  are  needed
  339. for  RTCP  reporting  and possibly for the estimation  of  network
  340. delays, used in dynamic playout buffers. In the single user  case,
  341. the jitter is computed between each packet as:
  342.  
  343.                   D(i,j) = (Rj - Ri) - (Sj - Si)
  344.  
  345.  
  346. Where  the  Ri  correspond to the reception times at the  receiver
  347. measured  in  RTP time, and the Si are the RTP timestamps  in  the
  348. data packets. The delay is computed as the difference between  the
  349. arrival time at the receiver and generation time, as indicated  by
  350. the RTP timestamp.
  351.  
  352. In the multiple user case, these definitions no longer make sense,
  353. as  there  is  no single RTP timestamp any longer.  Each  arriving
  354. packet will have a single arriving time (Ri), but multiple sending
  355. times  (Si,j)  for  each block j in the ith packet.  There  are  a
  356. number  of alternatives for delay and jitter computation  in  this
  357. case:  compute  such  information  for  all  users,  compute  such
  358. information  for  a single user, or generate a  single  delay  and
  359. jitter  estimate,  but  have it be based on information  from  all
  360. users. There are pros and cons to each approach.
  361.  
  362. First  of  all, it is possible for different blocks to  experience
  363. different  delays (and jitters) even though they  are  within  the
  364.  
  365. J. Rosenberg, H. Schulzrinne   Expires 5/26/97               Pg. 6
  366.  
  367. INTERNET-DRAFT                                       Nov. 26, 1997
  368.  
  369. same  packet.  This  is because the general  scenario  allows  for
  370. significant  variability, whereby blocks may either vary  in  size
  371. from  packet  to packet and within a packet, or not be transmitted
  372. immediately after their completion (the latter happens to source B
  373. in  Figure  2). Thus, it is arguable they it may be  desirable  to
  374. perform adaptive playout buffering separately for each user, which
  375. would require the storage and computation of delays for each user.
  376.  
  377. The second alternative is to compute the delays for a single user,
  378. and use that information to size all of the other playout buffers.
  379. This  may be sub-optimal in terms of delay and loss, depending  on
  380. what fraction of the total delay and jitter are introduced by  the
  381. packetization  itself.  There  is a second  disadvantage  to  this
  382. approach,  however.  When that particular user  enters  a  silence
  383. period,  delay and jitter information is no longer being received,
  384. and so estimates of network delay stop adapting. This implies that
  385. delay  estimates  will  be old for certain  periods  of  time.  An
  386. alternative  is  to change the user from which  delay  and  jitter
  387. estimates are being collected.
  388.  
  389. The  third alternative is to compute delay estimates based on some
  390. measure   derived  from  all  of  the  users.  There  are  several
  391. reasonable  approaches. For example, the  delay  estimate  can  be
  392. computed as:
  393.  
  394.                      Delay = max{j, Ri - Si,j}
  395.  
  396. which  would yield a conservative estimate of the delay  for  some
  397. users.  This  approach requires storage of only a  single  set  of
  398. delay  information,  although computation  still  grows  with  the
  399. number of users in a packet.
  400.  
  401.  
  402.  --------------------------------------------------
  403. ||               ||               ||               ||
  404.  -----------------------------------------------------
  405. ||       ||       ||       ||       ||       ||       ||
  406.  -----------------------------------------------------
  407. ||         ||         ||         ||         ||         ||
  408.  -----------------------------------------------------
  409.                                  
  410.            t1     t2  t3   t4    t5 t6       t7        t8
  411.  
  412.                 Figure 2: Global Timestamp Problem
  413.  
  414.  
  415. Sending  local timestamps also requires extra bits  in  the  block
  416. headers.  It  is possible, however, to use offsets for  the  local
  417. timestamps. A global timestamp can be used in the RTP header  (the
  418. field  already exists), and each user has a modifier  to  indicate
  419. position in time relative to that timestamp.
  420.  
  421. A  related  question  is how big to make the  offset  field.  This
  422. offset  is bounded by the difference in time between the  earliest
  423. and  latest  samples  within a packet.  Clearly,  this  itself  is
  424. bounded  by  the  packetization delay  at  the  source.  For  this
  425. application,  if  we  assume  a  125us  sample  clock,  and  bound
  426. packetization delays to 100ms, the offset field is bounded by  800
  427. ticks, requiring 10 bits.
  428.  
  429. J. Rosenberg, H. Schulzrinne   Expires 5/26/97               Pg. 7
  430.  
  431. INTERNET-DRAFT                                       Nov. 26, 1997
  432.  
  433.  
  434.  
  435. 4.3.2     More Restrictive Case
  436.  
  437. As  a  more restrictive case, we allow blocks to be present  in  a
  438. packet  if  their frame sizes are identical and aligned  in  time.
  439. Note  that this does not imply identical codecs or identical block
  440. sizes in terms of bytes; many voice codecs operate with a 20ms  or
  441. 50ms frame size. This case would allow all frame sizes of the same
  442. size and time alignment, independent of the codec, into a packet.
  443.  
  444. This  simplifies the timing issue tremendously. Now, the  scenario
  445. is  much  more  like  the  single user application.  The  sequence
  446. numbers and the frame size completely determine the timing when at
  447. least  one  user is active. But, when all users enter  silence,  a
  448. global timestamp is needed to indicate the duration of the silence
  449. period.  The  global  timestamp is sufficient to  reconstruct  the
  450. timing  in  the face of losses. Therefore, in this  case,  only  a
  451. global timestamp is required.
  452.  
  453. It  is  desirable  to support a variety of different  frame  sizes
  454. within such an aggregated connection, however. The way to do  this
  455. in  this  case  is  to simply mandate that different  packets  can
  456. contain  different frame sizes; the only restriction is  within  a
  457. packet.  This is not as simple as it may seem at first. Once  this
  458. is  done, the relationship between sequence numbers and timing  is
  459. lost.  Consider  an example. There are two frame sizes,  10ms  and
  460. 30ms.  Packet N contains 10ms frames, as does packet N+1 and  N+2,
  461. however,  N+3 contains 30ms frames. Thus, although the  difference
  462. in  sequence  number between the first and fourth  is  three,  the
  463. relative  timing is not 10ms*3 or 30ms*3. Due to  this  fact,  the
  464. measurement  of  jitter  is  complicated  (for  the  same  reasons
  465. described in Section 4.3.1), as it should not be done between  two
  466. packets  with  different  frame  sizes.  It  also  makes  recovery
  467. techniques based on sequence number more complex. To resolve  this
  468. problem,  we  use  a  natural  concept  in  RTP,  which   is   the
  469. synchronization source (SSRC). The approach is to have a  separate
  470. SSRC  for  each  frame  size in use. Then,  sequence  numbers  are
  471. interpreted  for each SSRC separately. This resolves  the  problem
  472. with  the  relationship between timing and sequence numbering.  It
  473. also  makes jitter and delay computations simpler - they  are  now
  474. done  for each SSRC separately. Furthermore, multiple jitter  (and
  475. delay, loss, etc.) values are reported to the source, one for each
  476. frame  size.  This  is also desirable, since the  different  frame
  477. sizes  will cause different packetization delays and packet sizes,
  478. which  may cause those packets to see different delays and  losses
  479. in the network than other packets.
  480.  
  481. This  case has both advantages and drawbacks when compared to  the
  482. general  case. As an advantage, timing is greatly simplified,  and
  483. the  approach  falls much in line with the original intentions  of
  484. RTP.  However, it causes losses in efficiency for systems  with  a
  485. variety of different frame sizes in operation simultaneously. Such
  486. a  situation arises naturally when flow control is applied to each
  487. source  individually, as opposed to altering the  rate  and  codec
  488. type for all of the active sources.
  489.  
  490.  
  491. J. Rosenberg, H. Schulzrinne   Expires 5/26/97               Pg. 8
  492.  
  493. INTERNET-DRAFT                                       Nov. 26, 1997
  494.  
  495. 4.4  Channel ID
  496.  
  497. The question of channel identification may seem at first trivial -
  498. simply  use a 32 bit number, much like the SSRC, and be done  with
  499. it.  However, 32 bits adds significant overhead. Reduction of  the
  500. number  of bits for the channel ID becomes a complex issue. Unlike
  501. the  single user case, the connection may remain active  for  long
  502. periods of time (days or months). The result is that channel  ID's
  503. will  need to be reused during the lifetime of the connection.  It
  504. is  critical  to ensure that data from different channels  is  not
  505. confused  because  of  this. Large channel  ID  spacing  helps  to
  506. resolve this issue (although it can not eliminate it), so an added
  507. side effect of reducing the number of channel ID's possible is  an
  508. increase in the likelihood of such confusion.
  509.  
  510. The  first question to be addressed is how many simultaneous users
  511. can one expect to find in a single packet.
  512.  
  513.  
  514. 4.4.1     Number of Users
  515.  
  516. There are several ways to come up with some minimums and maximums.
  517.  
  518. Delay-bound
  519.  
  520. Clearly,  as  we  add  more users, the store  and  forward  delays
  521. increase since the packet size gets larger. Therefore, if we bound
  522. the  per-hop delay, and provide a lower bound on the codec bitrate
  523. and packetization delay, an upper bound on the number of users can
  524. be  obtained. Consider a 2.4 kbps codec, with a 20ms  frame  size.
  525. This  is  a  reasonable minimum combination. Next,  consider  50ms
  526. store  and  forward delays. For a T1, this limits  the  number  of
  527. users  within a packet to 965. For a T3, it is 30 times  this,  or
  528. nearly 29,000. If silence suppression is used, the number of users
  529. within  a  packet is roughly half the number of active  users  (on
  530. average),  thus requiring twice as many channel identifiers  (1930
  531. and  58,000). This bound doesn't seem to tight. Intuitively,  even
  532. 965 seems too large.
  533.  
  534. Efficiency bound
  535.  
  536. The  entire purpose of multiplexing is to improve upon efficiency.
  537. Therefore, we should be able to support at least as many users  as
  538. is necessary to get good efficiency. Consider the typical case,  a
  539. 16  kbps  codec, with a 20ms packetization delay. This results  in
  540. 320  bits  of  data per user. If we assume IP/UDP/RTP  (20+8+12=40
  541. bytes  =  320 bits), plus an additional word (32 bits) of overhead
  542. per user, the efficiency vs. N becomes:
  543.  
  544.                  E = (320N / ((320 + 32)N + 320))
  545.  
  546. This  reaches an asymptote of 90%. It is desirable to be within  a
  547. few percent of this, say 88%. Solving for N, this requires 7 users
  548. in  a  packet, so that we must support at least 14 active channels
  549. (again,  due  to  stat mux). The lower bound,  therefore,  on  the
  550. number of users is around 14.
  551.  
  552. J. Rosenberg, H. Schulzrinne   Expires 5/26/97               Pg. 9
  553.  
  554. INTERNET-DRAFT                                       Nov. 26, 1997
  555.  
  556. MTU Bound
  557.  
  558. In  many  cases, there is a maximum packet size. This  is  usually
  559. around  1500 bytes. If we consider a very low bitrate  codec,  the
  560. minimum block size from any particular user is 32 bits (otherwise,
  561. overheads  become  very large, and we lose word alignment,  so  32
  562. bits is a good minimum). Dividing 1500 bytes by 4 bytes, we obtain
  563. a  maximum of 375 users. Multiplying by two, the number of  active
  564. channels needed is around 750.
  565.  
  566. Based  on these bounds, we need to simultaneously support at least
  567. 10  users, and at most 750. This would imply that at least 8 to 10
  568. bits of channel ID are required.
  569.  
  570.  
  571. 4.4.2     Channel ID Reuse Problem
  572.  
  573. It  is  important to guarantee that data from a particular channel
  574. is  never  routed to a different channel; this would mean  that  a
  575. user  may  hear pieces of conversations from different  users,  an
  576. error  we  consider catastrophic. Such misrouting becomes possible
  577. when  a  channel is torn down, and a new channel is  set  up  soon
  578. after  using  the same channel ID. Such a scenario is depicted  in
  579. Figure 3. Sometime after channel K is torn down, a new channel  is
  580. set  up  using the same channel ID, K. If the data packets (dotted
  581. lines)  are  being  delayed significantly,  blocks  from  the  old
  582. channel  K may still be present in the data stream after  the  new
  583. channel K is established. These blocks will then be played out  to
  584. the  new  user  of  channel  K.  Protocol  support  is  needed  to
  585. guarantee that this can never happen.
  586.  
  587.                     |  Chnl K data here  |
  588.                     | .......>           |
  589.                     |                    |
  590.                     | .......>           |
  591.                     |                    |
  592.                     |                    |
  593.                     |   Teardown K       |
  594.                     | --------------->   |
  595.                     |                    |
  596.                     |   Ack Teardown K   |
  597.                     | <---------------   |
  598.                     |                    |
  599.                     |   Setup K          |
  600.                     | --------------->   |
  601.                     |                    |
  602.                     |   Ack Setup K      |
  603.                     | <---------------   |
  604.                     |   Recv old Chnl K  |
  605.                     |        .........>  |
  606.                     |        .........>  |
  607.                  Source               Destination
  608.                                  
  609.                 Figure 3: Channel ID Reuse Problem
  610.  
  611. The  solution  lies  in  an  intelligent signaling  protocol.  The
  612. protocol  must  support  a  two-way  handshake  for  all   control
  613. messages.  In  addition, three simple rules must be  obeyed  at  a
  614.  
  615. J. Rosenberg, H. Schulzrinne   Expires 5/26/97               Pg. 10
  616.  
  617. INTERNET-DRAFT                                       Nov. 26, 1997
  618.  
  619. source when setting up or tearing down connections:
  620.  
  621. 1.   When a source sends a teardown message, it stops sending data
  622.   in the UDP stream for that channel. Furthermore, in the signaling
  623.   message,  it  indicates the sequence number of the packet  which
  624.   contained  the  last block for that channel, call this  sequence
  625.   number K.
  626. 2.    A  source  cannot re-use a channel identifier until  it  has
  627.   received an acknowledge from the destination that that particular
  628.   channel was successfully torn down.
  629. 3.   A source cannot send begin to send data from a particular
  630. channel in the UDP stream until it has received an acknowledge
  631. from the destination that the setup is complete.
  632.  
  633. A few simple rules must also be used at the receiver:
  634.  
  635. 1.    When  a  receiver  gets a teardown message,  it  checks  the
  636.   highest SN received so far (call this sequence number M). If M >
  637.   K,  the  channel is torn down, and any further blocks containing
  638.   that channel ID are discarded. If M < K, blocks from that channel
  639.   are accepted until the received SN exceeds K. Once this happens,
  640.   the channel is torn down and no further blocks with that channel
  641.   ID are accepted.
  642. 2.    When a setup message is received, the destination will begin
  643.   to  accept blocks with the given channel identifier, but only if
  644.   the sequence numbers of the packets in which they ride is greater
  645.   than K.
  646.  
  647. The  use  of the sequence numbers allows the receiver to  separate
  648. the  old channel K blocks from the new ones. This guarantees  that
  649. the  destination will not misroute packets. An additional  benefit
  650. is  that  the end of speech will not be clipped if the  last  data
  651. packets  arrive after the teardown is received. This  protocol  is
  652. quite  simple  to implement, although it requires a table  at  the
  653. receiver of the values of K for each channel ID.
  654.                                  
  655. Alternate solutions to this reuse problem exist which can  operate
  656. when the above restrictions are relaxed. The simplest approach  is
  657. to  have  the source keep a linked list of free channel ID's.  The
  658. list is initialized to contain all channel ID's, in order. When  a
  659. new channel is required to be established, the channel ID is taken
  660. from  the top of the list. When a channel is torn down, its ID  is
  661. placed  at  the  bottom of the list. This makes the  time  between
  662. channel  ID reuse as long as possible, and reduces the probability
  663. of  confusion.  With  this method, it is no  longer  necessary  to
  664. include  sequence  numbers in the tear down  messages.  Also,  the
  665. receiver does not need to maintain a table.
  666.  
  667.  
  668. 4.4.3     Channel ID Coding
  669.  
  670. This  section discusses some of the options for coding the channel
  671. ID field.
  672.  
  673.  
  674. 4.4.3.1   Fixed Length
  675.  
  676.  
  677. J. Rosenberg, H. Schulzrinne   Expires 5/26/97               Pg. 11
  678.  
  679. INTERNET-DRAFT                                       Nov. 26, 1997
  680.  
  681. The  fixed  length approach is the most straightforward.  A  fixed
  682. number  of  bits is assigned to the channel ID. Issues surrounding
  683. the number of bits required have been discussed above.
  684.  
  685.  
  686.  
  687. 4.4.3.2   Implicit + Present Mask
  688.  
  689. In  reality, the channel ID's are very redundant. Both source  and
  690. destination  know the set of active connections and their  channel
  691. identifiers from the signalling messages. Therefore, if the blocks
  692. are  placed in the packet in order of increasing channel ID,  very
  693. little  information actually needs to be sent.  In  fact,  without
  694. silence suppression, channel activity and the presence of a  block
  695. in  a  packet  are  likely  to be equivalent,  in  which  case  NO
  696. information actually needs to be sent about channel ID's.
  697.  
  698. Unfortunately, there are some practical problems with this. First,
  699. silence suppression is used. Secondly, even if it weren't,  it  is
  700. possible for the voice codecs at the ITG not to have their framing
  701. synchronized (as in the general case above), so that a packet  may
  702. not   contain  data  from  all  users.  Thirdly,  the  source  and
  703. destination  do  NOT have a consistent view of the  state  of  the
  704. system. There is a delay while signaling messages are in transit.
  705.  
  706. A   few   simple   mechanisms  can  be  used  to  overcome   these
  707. complexities.  In the header of the packet, a mask is  sent.  Each
  708. bit  in  the mask indicates whether data from a channel is present
  709. in  the packet or not. Mapping of channel ID's to bits is done  by
  710. sorting  the  channel ID's, and mapping the lowest number  to  the
  711. first bit, next lowest to the second, etc. Therefore, if a channel
  712. has  no  data for that packet, its bit is set to zero. Given  that
  713. the  source  and  destination agree on how  many  connections  are
  714. active at all points in time, the number of bits required is known
  715. to both sides.
  716.  
  717. The  next  step  is  to  deal with the differences  in  state.  An
  718. additional  field, called the "state-number", perhaps 5  bits,  is
  719. sent  in the header of the packet. This field starts at zero. Lets
  720. say  at  some point in time, its value is N. The source wishes  to
  721. tear  down  a  channel.  It sends the tear  down  message  to  the
  722. destination,  but continues to send data for that channel  (or  it
  723. may  choose to send nothing, but must set the appropriate  bit  in
  724. the  mask to zero). When the destination receives the message,  it
  725. replies  with an acknowledge. When the acknowledge is received  by
  726. the  source,  the source considers the channel torn down,  and  no
  727. longer sends data for it, nor considers it in computing the  mask.
  728. In  the packet where this happens, the source also increments  the
  729. state-number field to N+1. The destination knows that  the  source
  730. will  do  this, and will therefore consider the state changed  for
  731. all  packets whose value of the field is N+1 or greater. When  the
  732. next   signaling  message  takes  effect,  the  field  is  further
  733. increased. Even if packets are lost, the value of the state-number
  734. field  for  any  correctly received packet  completely  tells  the
  735. destination  the  state  of the system as  seen  in  that  packet.
  736. Furthermore, it is not necessary to wait for a particular setup or
  737. teardown  to  be acknowledged before requesting another  setup  or
  738. teardown.
  739.  
  740. J. Rosenberg, H. Schulzrinne   Expires 5/26/97               Pg. 12
  741.  
  742. INTERNET-DRAFT                                       Nov. 26, 1997
  743.  
  744.  
  745. The  number of bits for the state-number field should be set large
  746. enough to represent the maximum number of state changes which  can
  747. have taken effect during a round trip time. As an alternative,  an
  748. additional  exchange can occur. After the destination  receives  a
  749. packet  with  state number greater than N, it destroys  the  state
  750. related  to N, and sends back, reliably, a "free-state N" message,
  751. indicating  to  the destination that state N is now  de-allocated,
  752. and  can  be  used  again. Until such a message is  received,  the
  753. source  cannot reuse state N. This is essentially a  window  based
  754. flow  control, where the flow is equal to changes in  state.  With
  755. this  addition,  the number of bits for the state  number  can  be
  756. safely  reduced,  and it is guaranteed that the  destination  will
  757. never confuse the state, independent of the number of state-number
  758. bits  used. However, the use of too few state bits can cause  call
  759. blocking or delay the teardown of inactive channels.
  760.  
  761. This  problem  in state difference appears to be  similar  to  the
  762. channel  ID  reuse  problem described in Section  4.4.2.  However,
  763. there is an important difference. In the channel ID reuse problem,
  764. if  the  packet containing the last block of a user arrives before
  765. the  signaling message tearing down that connection, there  is  no
  766. problem. The destination will generally play out silence until the
  767. signaling message is received. Here, however, the destination must
  768. know  that  blocks  are  no  longer present  in  the  data  stream
  769. independent of when the signaling messages arrive.
  770.  
  771. There are some drawbacks to this approach. They require the source
  772. and  destination  to maintain state. Any error  in  processing  at
  773. either  end,  or  a  hardware failure, causes a complete  loss  of
  774. synchronization. This "hard-state" nature of the protocol  can  be
  775. relaxed by having the source send the complete state of the system
  776. with  each signaling message, along with the "state-number"  field
  777. for  which this state takes effect. This guarantees that  even  in
  778. the  event  of  end-system  failure,  the  system  state  will  be
  779. refreshed  whenever  a  new connection is set  up  or  torn  down.
  780. Furthermore,  the  state  can  be  sent  periodically  to  improve
  781. performance.
  782.  
  783.  
  784. 4.5  Length Indicators
  785.  
  786. There  are  many ways to actually code the length indicators.  The
  787. first  question, however, is the range of lengths  which  must  be
  788. coded.
  789.  
  790.  
  791. 4.5.1     Range of Length Indicators
  792.  
  793. Here,   there   is  a  clear  tradeoff  between  flexibility   and
  794.  
  795. J. Rosenberg, H. Schulzrinne   Expires 5/26/97               Pg. 13
  796.  
  797. INTERNET-DRAFT                                       Nov. 26, 1997
  798.  
  799. efficiency. A larger range can accommodate a variety of  different
  800. media  (such  as video) where lengths may be large. However,  this
  801. comes  at  the expense of a long length field, which  may  require
  802. another  word  of header to hold. For voice, one  would  expect  a
  803. maximum  bitrate  to  be  64 kbps, and around  50ms  packetization
  804. delay. This yields exactly 100 words of data. Therefore, an  eight
  805. bit field is probably sufficient for most voice applications.
  806.  
  807.  
  808. 4.5.2     PTI Based Lengths
  809.  
  810. In  many applications, the amount of data present depends  on  the
  811. voice codec in use. Frame based coders will generally send a frame
  812. at  a time. Since the codec type is indicated by the PTI field, it
  813. may  not  always be necessary to send length information  at  all.
  814. Even  for non-frame based codecs, such as PCM, default data  sizes
  815. can  be set in the standard (as in RFC 1890 [4]). An extension bit
  816. can be used to indicate a non-standard length, so that when set, a
  817. length field follows. This allows for efficient coding of the most
  818. common   cases,  but  allows  for  variable  lengths  with  little
  819. additional cost.
  820.  
  821.  
  822.  
  823. 4.5.3     Variable Length w/ Indicator
  824.  
  825. In  this  approach, a variable length header is used. All  of  the
  826. length indicators for all of the blocks are placed together in the
  827. beginning  of  the packet. However, the first four  bits  of  this
  828. header  field  indicate the number of bits used  for  each  length
  829. field.  What follows are the length fields themselves, each  using
  830. the number of bits indicated by the first four bits. This approach
  831. scales  well,  using a small overhead when the block  lengths  are
  832. small, and a larger overhead when they are larger. The drawback is
  833. a  variable length header field, plus additional complexity in the
  834. parsing. An example of this technique is depicted in Figure 4.  In
  835. the  first  example, the four bit indicator field has a  value  of
  836. three, so that the length fields are all three bits long. The four
  837. lengths  are then 2,6,3, and 8. In the second example, the  4  bit
  838. indicator  has a value of two, so that the length fields  are  all
  839. two bits long. The four lengths are thus 3,2,1, and 3.
  840.  
  841.           Example A:  0011 010 110 011 100
  842.           Example B:  0010  11  10  01  11
  843.                                  
  844.               Figure 4: Variable Length w/ Indicator
  845.  
  846.  
  847. 4.5.4     Remaining Packet Length Based Lengths
  848.  
  849. UDP  always informs RTP of how many bytes are in the payload. This
  850. itself restricts the possible length of the first block, since its
  851. length  must  be less than the total packet length minus  the  RTP
  852. header. Furthermore, as each block is placed into the packet,  the
  853. possible set of lengths that it can have shrinks - it must  always
  854. be  less  than the remaining length in the packet. This  approach,
  855. therefore, codes each length field with log2 of the number of bits
  856.  
  857. J. Rosenberg, H. Schulzrinne   Expires 5/26/97               Pg. 14
  858.  
  859. INTERNET-DRAFT                                       Nov. 26, 1997
  860.  
  861. remaining  in the packet. This approach works extremely well  when
  862. there  is a long packet followed by several shorter ones,  whereas
  863. the  previous  approach performs poorly in this case. Furthermore,
  864. it  eliminates  the  length  indicator  present  in  the  previous
  865. approach.  However,  it  is even more complex  than  the  previous
  866. technique.  It  can  result in no savings under  some  conditions,
  867. especially since the header fields must be rounded to 32 bits.
  868.  
  869. Consider  an  example. The total size of the packet is  31  words.
  870. Inside  of it are three blocks, the first whose length is 17,  the
  871. second 8, and the third, 6. We would code the length field with  5
  872. bits.  After this block is read, the remaining amount of  data  in
  873. the  packet is 14 words. Therefore, the next length field is coded
  874. with 4 bits. After this block, the remaining amount of data in the
  875. packet  is 6 words, so the final length field is coded with  three
  876. bits.  The  total  is therefore 5+4+3 = 12 bits. In  the  previous
  877. approach  (Section  4.5.3), the entire  length  field  would  have
  878. required  4  bits  for the indicator (whose  value  would  be  5),
  879. followed by 3 five bit fields, for a total of 19 bits.
  880.  
  881. One  may  question this example since the overhead of  the  length
  882. fields  itself  is  not  taken  into account  when  computing  the
  883. remaining length of the packet. While this can be incorporated, it
  884. makes  things even more complex, and it is not actually necessary.
  885. All  that  is  required is that the length fields are  coded  with
  886. log2(M),  where  M is any bound on the remaining  amount  of  data
  887. which  can be deterministically computed from past information.  A
  888. simple  bound  is the packet length minus the data seen  thus  far
  889. (one  can  also subtract away any fixed length fields),  precisely
  890. the metric used in the example above.
  891.  
  892.  
  893. 4.5.5     Table Based Approach
  894.  
  895. Realistically, most systems will operate with codecs that generate
  896. data  in  a  fixed set of lengths (a frame size, for example).  In
  897. that  case, the set of lengths which can appear in the packet  are
  898. usually  very restricted. To take advantage of this fact, a  table
  899. can  be  transmitted to the receiver reliably before  transmission
  900. commences. This table can indicate the actual length of  a  block,
  901. and  its  coding. The symbols transmitted in the data packets  are
  902. then  used in this table to look up the actual lengths.  This  can
  903. reduce  the  length field to 2 or 3 bits. These lengths  then  all
  904. occur  next to each other in the header. The technique now  relies
  905. on  state  at  the  receiver, and the parsing process  is  further
  906. complicated by table lookups. In addition, the approach only works
  907. if you know the set of lengths before the system begins operation.
  908. If  you  allow  the  table  to be dynamically  modified  during  a
  909. session,  synchronization problems occur, and the  system  becomes
  910. quite complex.
  911.  
  912. Further  gains  can be achieved through the use of  Huffman  codes
  913. instead of fixed length codes This only makes sense when different
  914.  
  915. J. Rosenberg, H. Schulzrinne   Expires 5/26/97               Pg. 15
  916.  
  917. INTERNET-DRAFT                                       Nov. 26, 1997
  918.  
  919. codecs  (and  correspondingly different  lengths)  are  used  with
  920. different frequencies. An example of such a situation is when  the
  921. codec  changes to a higher rate because of music-on-hold;  a  rare
  922. event in general.
  923.  
  924.  
  925.  
  926. 4.6  Marker Bit
  927.  
  928. The  marker bit has a general functionality, but is normally  used
  929. to  indicate  the beginning of a talkspurt. It seems like  a  good
  930. idea to include this bit for each user.
  931.  
  932. 4.7  Location of Per User Overhead
  933.  
  934. There  will generally be overhead on a per-user basis (information
  935. such as channel ID, length, etc.). This information can be located
  936. in  one of three places. First, it can all reside in front of  the
  937. block  to  which it is applicable. Second, it can  all  be  pasted
  938. together  and  reside up front in the header of  the  packet.  The
  939. third  is  a  hybrid solution, where some of it resides  up  front
  940. (such as channel ID), and some resides in front of the data. There
  941. are  various pros and cons to the different approaches. The hybrid
  942. approach can be complex, since data is split into multiple places.
  943. The  case  where  all  the header is up  front  has  a  few  minor
  944. advantages. First, it allows for a complete separation of the data
  945. from  the header. The implementation is likely to be a little less
  946. complex, since extracting blocks does not require actually  moving
  947. through the payload.
  948.  
  949.  
  950.  
  951. 5.   Options
  952.  
  953.  
  954. 5.1  Option I: Mixer Based
  955.  
  956. This option is the most straightforward to implement, but has  the
  957. most  overhead.  The basic premise is to reuse the  mixer  concept
  958. introduced in RTP. Each user is considered a contributing  source,
  959. and  the gateway is considered a mixer. However, instead of mixing
  960. the media, separate data from each user appear in the payload. The
  961. 32  bit CSRC identifies each user, acting as the channel ID.  Data
  962. from each user is organized into blocks. Each block has its own 32
  963. bit header, which includes the length (12 bits) in units of 32 bit
  964. words,  Marker bit (1b), TimeStamp Offset (12b), and Payload  Type
  965. (7b).  Furthermore, the payload type and marker bit  are  stricken
  966. from  the RTP header (since they only make sense for an individual
  967. user),  and the CC field expanded to fill the missing bytes.  This
  968. allows  for  a 12 bit CC field, or 4096 users in a  packet.  Thus,
  969. the packet would look like:
  970.  
  971.                                  
  972.                         Figure 5: Option I
  973.  
  974. J. Rosenberg, H. Schulzrinne   Expires 5/26/97               Pg. 16
  975.  
  976. INTERNET-DRAFT                                       Nov. 26, 1997
  977.  
  978. This approach allows for the most amount of generality in terms of
  979. variable length coders and coders with different frame sizes  (see
  980. Section 4.3.1). The channel ID is longer than necessary, but using
  981. the   concept  of  a  contributing  source  for  the  channel   ID
  982. necessitates  the  use of the additional bits. There  are  several
  983. variations on option I, many of which have been mentioned above:
  984.  
  985. I.A:  Put the CSRC with each 32 bit length+M+PT field, instead  of
  986. all  of them being at the beginning. This has some pros and  cons.
  987. As  an  interesting  artifact of this  change,  it  is  no  longer
  988. necessary  to  have a CC field. The length passed  up  by  UDP  is
  989. sufficient  to  recover the point at where you stop  checking  for
  990. additional  blocks from users in the payload. In fact, the  length
  991. field in the last block is not strictly necessary either.
  992.  
  993. I.B:  Do  the opposite of I.A. Put the length+M+PT field up  front
  994. along  with the CSRC fields, with the pattern being CSRC 1, length
  995. 1, CSRC 2, length 2, etc. Here again, the CC field is not strictly
  996. necessary.
  997.  
  998. I.C:  The  CSRC  field can be shrunk to 8 bits.  This  allows  for
  999. either 4 or two channel ID's to be coded in the space of one word,
  1000. whereas only one could in the current size of the field.
  1001.  
  1002. I.D: The CSRC field can be shrunk to 16 bits.
  1003.  
  1004.  
  1005. 5.2  Option II: One word header
  1006.  
  1007. This  option eliminates the large channel ID field present in  the
  1008. previous option. In the RTP header, the CC bit is set to zero, the
  1009. marker  bit has no meaning, and the payload type is TBD  (possible
  1010. uses include an indication of the number of blocks in the packet).
  1011. The  RTP  timestamp  corresponds to the generation  of  the  first
  1012. sample,  among  all blocks, enclosed in this packet.  A  one  word
  1013. header precedes each block of data. The number of blocks is  known
  1014. by  parsing  them until the end of the RTP packet.  The  one  word
  1015. field  has a channel ID (8 bits), length (8 bits), Marker (1 bit),
  1016. timestamp offset (11 bits), and payload type (4 bits). Channel  ID
  1017. number  255  is reserved, and causes the header to be expanded  to
  1018. allow  for  greater length, payload type, and possibly channel  ID
  1019. encodings.  The specific format for this expanded  header  is  for
  1020. further study. Given the compacted payload type space, it may be a
  1021. good idea to allow negotiation of the meaning for the payload type
  1022. at the beginning of the connection. It may be worthwhile to expand
  1023. the length field at the expense of the channel ID - this issue  is
  1024. for further study.
  1025.  
  1026. The format of the packet is thus:
  1027.  
  1028.  
  1029.                                  
  1030.                         Figure 6: Option II
  1031.  
  1032. J. Rosenberg, H. Schulzrinne   Expires 5/26/97               Pg. 17
  1033.  
  1034. INTERNET-DRAFT                                       Nov. 26, 1997
  1035.  
  1036.  
  1037. 5.3  Option III - Restricted Case
  1038.  
  1039. Option  II  has  the advantage of being able to  support  multiple
  1040. frame  sizes  within a single packet. However,  it  comes  at  the
  1041. expense  of  a 32 bit header (which can be large for  low  bitrate
  1042. codecs), and at a reduced payload type field. This option has a 16
  1043. bit  header, but does not support different frame sizes  within  a
  1044. packet.  It therefore falls into the category described in Section
  1045. 4.3.2. Of the 16 bit header, the first bit is an expand bit (to be
  1046. described  shortly),  and the second bit is the  marker  bit.  The
  1047. following  6 bits indicate payload type, and the remaining  8  are
  1048. for  channel ID. When the expand bit is set, an additional 16 bits
  1049. are  present, which indicate the length of the block. When  expand
  1050. is clear, the length is derived from the payload type. Since there
  1051. is  no timestamp offset, all the blocks in the packet must be time
  1052. aligned  and  have the same frame lengths. Different sized  frames
  1053. are supported by using a different SSRC for each frame length (see
  1054. Section  4.3.2). In the RTP header, the CC field is  always  zero.
  1055. The  marker  bits  and payload type are undefined.  The  timestamp
  1056. indicates  the  time  of generation of the first  sample  of  each
  1057. block.  SSRC  is  randomly chosen, but always different  for  each
  1058. frame size.
  1059.  
  1060. The  block headers are all located at the beginning of the packet,
  1061. and follow each other. If the total length of the fields is not  a
  1062. multiple of 32 bits, it is padded out to 32. The structure of  the
  1063. header  is  such that fields never break across packet boundaries.
  1064. An  example  of such a packet is given in Figure 7.  There  are  7
  1065. blocks in this example. The first two have standard lengths  based
  1066. on  the  PT field. The next one uses the expansion bit to indicate
  1067. the  length. The fourth uses the PT field, the fifth the expansion
  1068. bit,  and the last two use the PT field. The last 16 bits  of  the
  1069. header are padded out.
  1070.                                  
  1071.                        Figure 7: Option III
  1072.  
  1073.  
  1074.  
  1075. 5.4  Option IV - Stacked RTP
  1076.  
  1077. This  approach uses a duplicate of the RTP header as the per-block
  1078. header.  It  is  therefore  extremely inefficient  (12  bytes  per
  1079. block), but has several advantages: different media types  can  be
  1080. mixed,  since  the  timestamps are no longer related,  and  little
  1081. processing is required if the sources being combined came  from  a
  1082. single  user RTP source. It also works well when one of the  users
  1083. is  actually a mixer (for example, a conference bridge), since the
  1084. CSRC  can be used. Its main advantage is the reduction in overhead
  1085. due  to  the  IP and UDP headers. In addition to the standard  RTP
  1086. header,  an  additional header is required for length  indication.
  1087. This header has a number of 16 bit fields, each of which indicates
  1088. a  length  for its corresponding block (including the 12 byte  RTP
  1089. header).  The  number of such 16 bit lengths fields  is  known  by
  1090. continuing  to look for additional length fields until  the  total
  1091. length of the packet passed up from UDP has been accounted for. If
  1092. an  odd  number  of  such  length  fields  is  required,  then  an
  1093. additional  16  bits  of padding is inserted to  make  the  length
  1094.  
  1095. J. Rosenberg, H. Schulzrinne   Expires 5/26/97               Pg. 18
  1096.  
  1097. INTERNET-DRAFT                                       Nov. 26, 1997
  1098.  
  1099. header a multiple of 32 bits.
  1100.  
  1101. The format of such a packet is given in  Figure 8.
  1102.  
  1103.                                  
  1104.                         Figure 8: Option IV
  1105.  
  1106. 5.5  Option V: Compacted
  1107.  
  1108. This  option uses the Implicit + Mask approach outlined in Section
  1109. 4.4.3.2  to  code  the  channel ID. In all other  respects  it  is
  1110. similar to Option III. Now, however, the per-block header  can  be
  1111. reduced  to one byte: 1 bit of expansion, 1 bit of marker,  and  6
  1112. bits  of payload type. Furthermore, the length field (present when
  1113. the  expansion bit is set) is reduced to 8 bits from 16 in  Option
  1114. III.  This  reduction saves on space, but it also guarantees  that
  1115. fields  remain  aligned  on byte boundaries.  The  mask  bits  are
  1116. present in the beginning of the packet, and they are preceded by a
  1117. 8  bit  state-number. If the number of active channels  is  not  a
  1118. multiple of 32, the mask field is padded out to a full word.  This
  1119. approach  is  extremely efficient, but the channel  identification
  1120. procedure  is  more  complex  and  requires  additional  signaling
  1121. support.
  1122.  
  1123. A  diagram of a typical packet for this option is given in  Figure
  1124. 9.  The  marker bits are indicated with lowercase m's.  There  are
  1125. four active channels, each of which is present in this packet (all
  1126. four  mask  bits would then be 1). The first block has a  standard
  1127. length, but the second has its expansion bit set, so that an 8 bit
  1128. length field follows. The remaining two blocks have normal  8  bit
  1129. headers.  The  last 24 bits of the header are  padded  to  a  word
  1130. boundary.
  1131.  
  1132.                                  
  1133.                         Figure 9: Option V
  1134.  
  1135. 6.   Comparison of Options
  1136.  
  1137. In  this section, the options are compared in terms of efficiency.
  1138. Issues  relating  to complexity, scalability, and generality  have
  1139. already  been  discussed in previous sections. The  analysis  here
  1140. consists  of  two  parts.  The first is a  table,  indicating  the
  1141. efficiency of each option for a variety of speech codecs.  Several
  1142. tables  are  included for different numbers of users.  The  second
  1143. analysis  consists  of  a  series of  graphs  which  consider  the
  1144. efficiency vs. bitrate, assuming a fixed frame size and a  certain
  1145. number  of  users. This analysis helps to indicate  the  range  of
  1146. codecs which may be reasonably supported with each option.
  1147.  
  1148.  
  1149. 6.1  Specific Codecs
  1150.  
  1151. In  both  Table  1 and Table 2, the efficiency vs. codec  for  all
  1152. three options is tabulated. For G.711, G.726, G.728 and G.722, the
  1153. frame  size listed is a multiple of the actual frame size  of  the
  1154. codec, which is too small to be sent one at a time. The efficiency
  1155. is  computed as the number of words of payload such a codec  would
  1156.  
  1157. J. Rosenberg, H. Schulzrinne   Expires 5/26/97               Pg. 19
  1158.  
  1159. INTERNET-DRAFT                                       Nov. 26, 1997
  1160.  
  1161. occupy,  times  the number of users, divided by the  total  packet
  1162. size (i.e., it does not consider inefficiencies due to padding the
  1163. payload  portion).  Note  that Option  V  is  always  superior  in
  1164. efficiency. The efficiencies are generally 1 to 10 percent  apart.
  1165. Table  1 considers the case where there are 10 users, and Table  2
  1166. considers the case where there are 24.
  1167.  
  1168. Codec     Bitrate  FrameSize Opti  Optio Optio Optio Optio  Optio  Optio
  1169.          (kbps)   (ms)      on    n I.C n I.D n II  n III  n IV   n V
  1170.                           I
  1171. G.711          64       20 93.0 94.56 94.12 95.24 96.39 90.50 96.84
  1172.                              2%     %     %     %     %     %    %
  1173. G.726,         32       20 86.9 89.69 88.89 90.91 93.02 82.64 93.88
  1174.                              6%     %     %     %     %     %    %
  1175. G.728,         16    18.75 76.9 81.30 80.00 83.33 86.96 70.42 88.47
  1176.                              2%     %     %     %     %     %    %
  1177. G.729           8       10 50.0 56.60 54.55 60.00 66.67 41.67 69.72
  1178.                              0%     %     %     %     %     %    %
  1179. G.723         5.3       30 62.5 68.49 66.67 71.43 76.92 54.35 79.33
  1180.                              0%     %     %     %     %     %    %
  1181. G.723         6.3       30 66.6 72.29 70.59 75.00 80.00 58.82 82.16
  1182.                              7%     %     %     %     %     %    %
  1183. ITU 4kbps       4       20 50.0 56.60 54.55 60.00 66.67 41.67 69.72
  1184.                              0%     %     %     %     %     %    %
  1185. G.722          64       15 90.9 92.88 92.31 93.75 95.24 87.72 95.84
  1186.                              1%     %     %     %     %     %    %
  1187. GSM  Full      13       20 75.0 79.65 78.26 81.82 85.71 68.18 87.35
  1188. Rate                         0%     %     %     %     %     %    %
  1189. TCH  Half     5.6       20 57.1 63.49 61.54 66.67 72.73 48.78 75.43
  1190. Rate                         4%     %     %     %     %     %    %
  1191. IS54         7.95       20 62.5 68.49 66.67 71.43 76.92 54.35 79.33
  1192.                              0%     %     %     %     %     %    %
  1193. IS96          8.5       20 66.6 72.29 70.59 75.00 80.00 58.82 82.16
  1194.                              7%     %     %     %     %     %    %
  1195. EVRC          8.5       20 66.6 72.29 70.59 75.00 80.00 58.82 82.16
  1196.                              7%     %     %     %     %     %    %
  1197. PDC  Full     6.7       20 62.5 68.49 66.67 71.43 76.92 54.35 79.33
  1198. Rate                         0%     %     %     %     %     %    %
  1199. PDC  Half    3.45       40 62.5 68.49 66.67 71.43 76.92 54.35 79.33
  1200. Rate                         0%     %     %     %     %     %    %
  1201.                          Table 1: 10 Users
  1202.  
  1203. J. Rosenberg, H. Schulzrinne   Expires 5/26/97               Pg. 20
  1204.  
  1205. INTERNET-DRAFT                                       Nov. 26, 1997
  1206.  
  1207. Codec     Bitrat  FrameSize Optio Optio  Optio  Optio  Optio  Optio  Optio
  1208.          e       (ms)      n  I  n I.C  n I.D  n II   n III  n IV   n V
  1209.          (kbps)
  1210. G.711         64       20 94.30 96.00 95.43 96.58 97.76 91.34 98.26
  1211.                               %     %     %     %     %     %    %
  1212. G.726         32       20 89.22 92.31 91.25 93.39 95.62 84.06 96.57
  1213.                               %     %     %     %     %     %    %
  1214. G.728         16    18.75 80.54 85.71 83.92 87.59 91.60 72.51 93.37
  1215.                               %     %     %     %     %     %    %
  1216. G.729          8       10 55.38 64.29 61.02 67.92 76.60 44.17 80.87
  1217.                               %     %     %     %     %     %    %
  1218. G.723        5.3       30 67.42 75.00 72.29 77.92 84.51 56.87 87.57
  1219.                               %     %     %     %     %     %    %
  1220. G.723        6.3       30 71.29 78.26 75.79 80.90 86.75 61.28 89.42
  1221.                               %     %     %     %     %     %    %
  1222. ITU 4kbps      4       20 55.38 64.29 61.02 67.92 76.60 44.17 80.87
  1223.                               %     %     %     %     %     %    %
  1224. G.722         64       15 92.54 94.74 93.99 95.49 97.04 88.78 97.69
  1225.                               %     %     %     %     %     %    %
  1226. GSM  Full     13       20 78.83 84.38 82.44 86.40 90.76 70.36 92.69
  1227. Rate                          %     %     %     %     %     %    %
  1228. TCH  Half    5.6       20 62.34 70.59 67.61 73.85 81.36 51.34 84.93
  1229. Rate                          %     %     %     %     %     %    %
  1230. IS54        7.95       20 67.42 75.00 72.29 77.92 84.51 56.87 87.57
  1231.                               %     %     %     %     %     %    %
  1232. IS96         8.5       20 71.29 78.26 75.79 80.90 86.75 61.28 89.42
  1233.                               %     %     %     %     %     %    %
  1234. EVRC         8.5       20 71.29 78.26 75.79 80.90 86.75 61.28 89.42
  1235.                               %     %     %     %     %     %    %
  1236. PDC  Full    6.7       20 67.42 75.00 72.29 77.92 84.51 56.87 87.57
  1237. Rate                          %     %     %     %     %     %    %
  1238. PDC  Half   3.45       40 67.42 75.00 72.29 77.92 84.51 56.87 87.57
  1239. Rate                          %     %     %     %     %     %    %
  1240.                          Table 2: 24 Users
  1241.  
  1242. 6.2  Efficiency vs. Bitrate
  1243. The  following figure considers the efficiency of the protocol vs.
  1244. bitrate. For this case, the frame size is fixed at 20ms,  and  the
  1245. number  of  users  at 24. As the bitrate varies,  the  block  size
  1246. varies,  and therefore the efficiency does as well. The efficiency
  1247. here  is  computed in a slightly different manner than  the  graph
  1248. above.  Here, the efficiency is the bitrate times the  frame  size
  1249. (without  padding to 32 bits), divided by the same  quantity  plus
  1250. the  packet and block overhead. This avoids the otherwise sawtooth
  1251. behavior of the graph, which makes it very difficult to read.
  1252.  
  1253. The  graph  is very illustrative. The ordering of the efficiencies
  1254. is  no  surprise;  option  V  is  always  superior.  However,  the
  1255. difference  between  the  options  is  interesting.  Despite   the
  1256. difference in overhead by a factor of two, Option V and Option III
  1257. are very close in efficiencies over a wide range of bitrates. This
  1258. is due to the fact that it requires a lot of users at low bitrates
  1259. to   overcome  the  IP/UDP/RTP  header  overhead,  and  at  higher
  1260. bitrates,  the  payload  sizes  are  large  enough  to  make   the
  1261. difference in block headers inconsequential.
  1262.  
  1263.  
  1264.  
  1265. J. Rosenberg, H. Schulzrinne   Expires 5/26/97               Pg. 21
  1266.  
  1267. INTERNET-DRAFT                                       Nov. 26, 1997
  1268.  
  1269.  
  1270.  
  1271. 7.   References
  1272. _______________________________
  1273. [1]  R.  Ramjee, J. Kurose, D. Towsley, H. Schulzrinne,  "Adaptive
  1274. Playout Mechanisms for Packetized Audio Applications in Wide  Area
  1275. Networks", Proceedings of IEEE Infocom, 1994
  1276. [2] H. Schulzrinne, S. Casner, R. Frederick, V. Jacobson, "RTP:  A
  1277. Transport  Protocol  for  Real-Time  Applications",  Audio  Visual
  1278. Working Group Request for Comments RFC 1889, IETF, January 1996
  1279. [3] M. Handley, V. Hardman, I. Kouvelas, C. Perkins, J. Bolot,  A.
  1280. Vega-Garcia,   S.  Fosse-Parisis,  "Payload  Format   Issues   for
  1281. Redundant Encodings in RTP", Work In Progress
  1282. [4]  H.  Schulzrinne, "RTP Profile for Audio and Video Conferences
  1283. with  Minimal  Control", Audio Visual Working  Group  Request  for
  1284. Comments RFC 1890, IETF, January 1996
  1285.