1 Chapter 6 Multimedia Networking Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose, Keith Ross Addison-Wesley,

Slides:



Advertisements
Similar presentations
MM Networking Applications
Advertisements

1 Multimedia Networking EECS 489 Computer Networks Z. Morley Mao Monday March 26, 2007 Acknowledgement: Some.
19 – Multimedia Networking. Multimedia Networking7-2 Multimedia and Quality of Service: What is it? multimedia applications: network audio and video (“continuous.
1 School of Computing Science Simon Fraser University CMPT 820: Multimedia Systems Network Protocols for Multimedia Applications Instructor: Dr. Mohamed.
User Control of Streaming Media: RTSP
Presented by: Yuvraj Khadke CISC 856: TCP/IP and Upper Layer Protocols 11/29/2012 Credits to: Christopher Thorpe, Varsha Mahadevan, Kevin Jeffay, James.
Chapter 6 Multimedia Networking Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose, Keith Ross Addison-Wesley, July.
Chapter 6 outline r 6.1 Multimedia Networking Applications r 6.2 Streaming stored audio and video m RTSP r 6.3 Real-time, Interactive Multimedia: Internet.
Application layer (continued) Week 4 – Lecture 2.
VoIP Using SIP/RTP by George Fu, UCCS CS 522 Semester Project Fall 2004.
Chapter 6: Multimedia Networking
Chapter 6 Multimedia Networking
1 CSE 401N Multimedia Networking Lecture Multimedia, Quality of Service: What is it? Multimedia applications: network audio and video network provides.
7: Multimedia Networking7-1 Chapter 7 Multimedia Networking A note on the use of these ppt slides: We’re making these slides freely available to all (faculty,
Multimedia Applications r Multimedia requirements r Streaming r Phone over IP r Recovering from Jitter and Loss r RTP r Diff-serv, Int-serv, RSVP.
7: Multimedia Networking 7-1 Chapter 7 Multimedia Networking A note on the use of these ppt slides: We’re making these slides freely available to all (faculty,
Dr. Philip Cannata 1 Principles of Network Applications.
Chapter 1 Introduction Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
CS640: Introduction to Computer Networks
Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April A note on the use.
CS 218 F 2003 Nov 3 lecture:  Streaming video/audio  Adaptive encoding (eg, layered encoding)  TCP friendliness References: r J. Padhye, V.Firoiu, D.
RTSP Real Time Streaming Protocol
CIS679: RTP and RTCP r Review of Last Lecture r Streaming from Web Server r RTP and RTCP.
6: Multimedia Networking6a-1 Chapter 6: Multimedia Applications r Multimedia requirements r Streaming r Phone over IP r Recovering from Jitter and Loss.
Multimedia and QoS#1#1 Multimedia Applications. Multimedia and QoS#2#2 Multimedia Applications r Multimedia requirements r Streaming r Recovering from.
Ch 7. Multimedia Networking Myungchul Kim
Chapter 7 Multimedia Applications
7: Multimedia Networking7-1 Chapter 7 Multimedia Networking A note on the use of these ppt slides: We’re making these slides freely available to all (faculty,
Advanced Multimedia University of Palestine University of Palestine Eng. Wisam Zaqoot Eng. Wisam Zaqoot October 2010 October 2010 Ref: Computer Networking:
Computer Networks: Multimedia Applications Ivan Marsic Rutgers University Chapter 3 – Multimedia & Real-time Applications.
Streaming Stored Audio and Video (1) and Video (1) Advanced Multimedia University of Palestine University of Palestine Eng. Wisam Zaqoot Eng. Wisam Zaqoot.
1 Multimedia Networking By Behzad Akbari Fall 2008 These slides are based on the slides of J. Kurose (UMASS)
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 4: Multimedia.
November 27 th, 2012 CS1652 Jack Lange University of Pittsburgh 1.
Quality of Service in the Internet The slides of part 1-3 are adapted from the slides of chapter 7 published at the companion website of the book: Computer.
Chapter 5: Summary r principles behind data link layer services: m error detection, correction m multiple access protocols m link layer addressing, ARP.
1 Multimedia Communication Multimedia Systems(Module 5 Lesson 2) Summary: r Internet Phone Example m Making the Best use of Internet’s Best-Effort Service.
1 Lecture 17 – March 21, 2002 Content-delivery services. Multimedia services Reminder  next week individual meetings and project status report are due.
CS640: Introduction to Computer Networks Aditya Akella Lecture 19 - Multimedia Networking.
Multimedia, Quality of Service: What is it?
Chapter 3 Transport Layer
E Multimedia Communications Anandi Giridharan Electrical Communication Engineering, Indian Institute of Science, Bangalore – , India Multimedia.
Chapter 6 outline r 6.1 Multimedia Networking Applications r 6.2 Streaming stored audio and video m RTSP r 6.3 Real-time Multimedia: Internet Phone Case.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose, Keith Ross Addison-Wesley,
Introduction1-1 Chapter 1 Computer Networks and the Internet Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose,
Making the Best of the Best-Effort Service (2) Advanced Multimedia University of Palestine University of Palestine Eng. Wisam Zaqoot Eng. Wisam Zaqoot.
CMPT365 Multimedia Systems 1 Multimedia Networking/Communications Spring 2015 CMPT 365 Multimedia Systems.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July A.
03/11/2015 Michael Chai; Behrouz Forouzan Staffordshire University School of Computing Streaming 1.
Part 2: Making the Best of Best-Effort
E Multimedia Communications Anandi Giridharan Electrical Communication Engineering, Indian Institute of Science, Bangalore – , India Multimedia.
Multimedia Networking Quality of Services Hongli Luo, IPFW.
Internet multimedia: simplest approach audio, video not streamed: r no, “pipelining,” long delays until playout! r audio or video stored in file r files.
7: Multimedia Networking7-1 Chapter 7 Multimedia Networking Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose,
E Multimedia Communications Anandi Giridharan Electrical Communication Engineering, Indian Institute of Science, Bangalore – , India Multimedia.
Summary: Internet Multimedia: bag of tricks r use UDP to avoid TCP congestion control (delays) for time-sensitive traffic r client-side adaptive playout.
Multimedia: Conferencing 7-1. MM Networking Applications Fundamental characteristics: typically delay sensitive – end-to-end delay – delay jitter loss.
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 4: Multimedia.
Multimedia Networking7-1 Chapter 7 Multimedia Networking A note on the use of these ppt slides: We’re making these slides freely available to all (faculty,
7: Multimedia Networking7-1 protocols for real-time interactive applications RTP, RTCP, SIP.
Chapter 7 Multimedia Networking
Chapter 3 Transport Layer
Chapter 3 Transport Layer
19 – Multimedia Networking
University of Pittsburgh
Multimedia Applications
Multimedia networking: outline
Chapter 6 Multimedia Networking
Multimedia networking: outline
Presentation transcript:

1 Chapter 6 Multimedia Networking Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose, Keith Ross Addison-Wesley, July A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in powerpoint form so you can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following:  If you use these slides (e.g., in a class) in substantially unaltered form, that you mention their source (after all, we’d like people to use our book!)  If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. Thanks and enjoy! JFK / KWR All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

2 Multimedia, Quality of Service: What is it? Multimedia applications: network audio and video (“continuous media”) network provides application with level of performance needed for application to function. QoS

3 Chapter 6: Goals Principles  Classify multimedia applications  Identify the network services the apps need  Making the best of best effort service  Mechanisms for providing QoS Protocols and Architectures  Specific protocols for best-effort  Architectures for QoS

4 Chapter 6 outline  6.1 Multimedia Networking Applications  6.2 Streaming stored audio and video m RTSP  6.3 Real-time Multimedia: Internet Phone Case Study  6.4 Protocols for Real-Time Interactive Applications m SIP

5 MM Networking Applications Fundamental characteristics:  Typically delay sensitive m end-to-end delay m delay jitter  But loss tolerant: infrequent losses cause minor glitches  Antithesis of data, which are loss intolerant but delay tolerant. Classes of MM applications: 1) Streaming stored audio and video 2) Streaming live audio and video 3) Real-time interactive audio and video Jitter is the variability of packet delays within the same packet stream

6 Streaming Stored Multimedia Streaming:  media stored at source  transmitted to client  streaming: client playout begins before all data has arrived  timing constraint for still-to-be transmitted data: in time for playout

7 Streaming Stored Multimedia: What is it? 1. video recorded 2. video sent 3. video received, played out at client Cumulative data streaming: at this time, client playing out early part of video, while server still sending later part of video network delay time

8 Streaming Stored Multimedia: Interactivity  VCR-like functionality: client can pause, rewind, FF, push slider bar m 10 sec initial delay OK m 1-2 sec until command effect OK m RTSP often used (more later)  timing constraint for still-to-be transmitted data: in time for playout

9 Streaming Live Multimedia Examples:  Internet radio talk show  Live sporting event Streaming  playback buffer  playback can lag tens of seconds after transmission  still have timing constraint Interactivity  fast forward impossible  rewind, pause possible!

10 Interactive, Real-Time Multimedia  end-end delay requirements: m audio: < 150 msec good, < 400 msec OK includes application-level (packetization) and network delays higher delays noticeable, impair interactivity  session initialization m how does callee advertise its IP address, port number, encoding algorithms?  applications: IP telephony, video conference, distributed interactive worlds

11 Internet Multicasting

12 Multicast: Connecting multiple users  Unicast: connecting two users  Multicast: connecting multiple users m Conference call m Event broadcast m Chat room  Supporting multicast m Multiple unicast Inefficient m Build a multicast tree Assume cost on links

13 The Multicast Problem  GIVEN: Network  GIVEN: User Requests (and quality requirements)  ESTABLISH: Efficient distribution trees ?

14 What is The Need for Multicasting?  Use bandwidth efficiently m Replace many unicast connections with one multicast connection m Duplicate packets only when necessary  Theoretical model m Links have cost m Find the minimum cost multicast tree 3 times the traffic

15 Steiner Tree Problem  Input: m Given a graph G(V,E) m Costs on edges m Set of nodes S  Output: m Tree T, m Includes all the nodes in S m Minimum cost  Complexity: m NP-complete

16 Steiner Tree: MST Heuristic  MST Heuristic : m define GS = complete graph on terminals edge cost = shortest path cost m find T MST = MST of GS m replace each edge of T MST with the path in G m output T MST

17 MST Approximation ratio  MST is at least 2-approximation m T MST = output of MST algo (on G(S)) m T* = optimal ST in G m Cost(T MST,G) ≤ Cost(T MST,GS) m Cost(T *,GS) ≤ 2Cost(T *,GS) m Conclusion: Cost(T MST,G) ≤ 2Cost(T *,GS)  MST is at most 2-approximation m Edges cost black = 2 red =1 m MST cost = 2k-2, OPT cost = k m Ratio 2-(1/k) k 5 4

18 Multicast: Online setting  Online Steiner problem m Terminal arrive one at a time m Need to allocate a tree to current terminals  Online Greedy : m At time t: Current tree T t-1 arriving terminal v t Find shortest path P v from v t to T t-1 Let T t be the union of P v and T t-1

19 Performance of Online Greedy  Sort terminal by their cost cost(u 1 ) ≥ cost(u 2 ) ≥ … ≥ cost(u n )  CLAIM: cost(u k ) ≤ 2OPT/k (need to prove it … )  Assuming the claim: cost(T)= cost(u 1 ) + … + cost(u n ) ≥ 2OPT/1 + … + 2OPT/n ≥ 2OPT(1 + ½ + ⅓ + ¼ +⅛ … + 1/n) ≈ 2 ln(n) OPT

20 Proving the claim  Consider U k = {u 1, …, u k }  Suppose cost(u k ) > 2 OPT /k,  Then cost(u i ) > 2OPT/k, for i<k (they where sorted)  Every u i and u j are distance at least 2OPT/k  MST(U k ) > 2OPT m Contradiction to the MST heuristic m It is at 2-approximation!  QED

21 Chapter 6 outline  6.1 Multimedia Networking Applications  6.2 Streaming stored audio and video m RTSP  6.3 Real-time Multimedia: Internet Phone Case Study  6.4 Protocols for Real-Time Interactive Applications m SIP

22 Streaming Stored Multimedia Application-level streaming techniques for making the best out of best effort service: m client side buffering m use of UDP versus TCP m multiple encodings of multimedia  jitter removal  decompression  error concealment  graphical user interface w/ controls for interactivity Media Player

23 Internet multimedia: simplest approach audio, video not streamed:  no, “pipelining,” long delays until playout!  audio or video stored in file  files transferred as HTTP object m received in entirety at client m then passed to player

24 Internet multimedia: streaming approach  browser GETs metafile  browser launches player, passing metafile  player contacts server  server streams audio/video to player

25 Streaming from a streaming server  This architecture allows for non-HTTP protocol between server and media player  Can also use UDP instead of TCP.

26 constant bit rate video transmission Cumulative data time variable network delay client video reception constant bit rate video playout at client client playout delay buffered video Streaming Multimedia: Client Buffering  Client-side buffering, playout delay compensate for network-added delay, delay jitter

27 Streaming Multimedia: Client Buffering  Client-side buffering, playout delay compensate for network-added delay, delay jitter buffered video variable fill rate, x(t) constant drain rate, d

28 Streaming Multimedia: UDP or TCP? UDP  server sends at rate appropriate for client (oblivious to network congestion !) m often send rate = encoding rate = constant rate m then, fill rate = constant rate - packet loss  short playout delay (2-5 seconds) to compensate for network delay jitter  error recover: time permitting TCP  send at maximum possible rate under TCP  fill rate fluctuates due to TCP congestion control  larger playout delay: smooth TCP delivery rate  HTTP/TCP passes more easily through firewalls

29 Streaming Multimedia: client rate(s) Q: how to handle different client receive rate capabilities? m 0.5+ Kbps ADSL m 100Mbps Ethernet A: server stores, transmits multiple copies of video, encoded at different rates 1.5 Mbps encoding 28.8 Kbps encoding

30 User Control of Streaming Media: RTSP HTTP  Does not target multimedia content  No commands for fast forward, etc. RTSP: RFC 2326  Client-server application layer protocol.  For user to control display: rewind, fast forward, pause, resume, repositioning, etc… What it doesn’t do:  does not define how audio/video is encapsulated for streaming over network  does not restrict how streamed media is transported; it can be transported over UDP or TCP  does not specify how the media player buffers audio/video

31 Chapter 6 outline  6.1 Multimedia Networking Applications  6.2 Streaming stored audio and video m RTSP  6.3 Real-time, Interactive Multimedia: Internet Phone Case Study  6.4 Protocols for Real-Time Interactive Applications m SIP

32 Real-time interactive applications  PC-2-PC phone m instant messaging services are providing this  PC-2-phone  videoconference with Webcams Going to now look at a PC-2-PC Internet phone example in detail

33 Interactive Multimedia: Internet Phone Introduce Internet Phone by way of an example  speaker’s audio: alternating talk spurts, silent periods. m 64 kbps during talk spurt  pkts generated only during talk spurts m 20 msec chunks at 8 Kbytes/sec: 160 bytes data  application-layer header added to each chunk.  Chunk+header encapsulated into UDP segment.  application sends UDP segment into socket every 20 msec during talkspurt.

34 Internet Phone: Packet Loss and Delay  network loss: IP datagram lost due to network congestion (router buffer overflow)  delay loss: IP datagram arrives too late for playout at receiver m delays: processing, queueing in network; end-system (sender, receiver) delays m typical maximum tolerable delay: 400 ms  loss tolerance: depending on voice encoding, losses concealed, packet loss rates between 1% and 10% can be tolerated.

35 Jitter: Definitions  Input: t 0, …, t n  Delay Jitter: m Delay jitter J m For every k: |t 0 + kX - t k |  J m X = (t n - t 0 ) / n  Rate Jitter m Rate Jitter A m I k = t k - t k-1 m For every k and j: |I j - I k |  A  Jitter and buffering m delay versus jitter

36 constant bit rate transmission Cumulative data time variable network delay (jitter) client reception constant bit rate playout at client client playout delay buffered data Delay Jitter  Consider the end-to-end delays of two consecutive packets: difference can be more or less than 20 msec

37 Internet Phone: Fixed Playout Delay  Receiver attempts to playout each chunk exactly q msecs after chunk was generated. m chunk has time stamp t: play out chunk at t+q. m chunk arrives after t+q: data arrives too late for playout, data “lost”  Tradeoff for q: m large q: less packet loss m small q: better interactive experience

38 Fixed Playout Delay Sender generates packets every 20 msec during talk spurt. First packet received at time r First playout schedule: begins at p Second playout schedule: begins at p’

39 Adaptive Playout Delay, I Dynamic estimate of average delay at receiver: where u is a fixed constant (e.g., u =.01).  Goal: minimize playout delay, keeping late loss rate low  Approach: adaptive playout delay adjustment: m Estimate network delay, adjust playout delay at beginning of each talk spurt. m Silent periods compressed and elongated. m Chunks still played out every 20 msec during talk spurt.

40 Adaptive playout delay II Also useful to estimate the average deviation of the delay, v i : The estimates d i and v i are calculated for every received packet, although they are only used at the beginning of a talk spurt. For first packet in talk spurt, playout time is: where K is a positive constant. Remaining packets in talkspurt are played out periodically

41 Adaptive Playout, III Q: How does receiver determine whether packet is first in a talkspurt?  If no loss, receiver looks at successive timestamps. m difference of successive stamps > 20 msec -->talk spurt begins.  With loss possible, receiver must look at both time stamps and sequence numbers. m difference of successive stamps > 20 msec and sequence numbers without gaps --> talk spurt begins.

42 Recovery from packet loss (1) forward error correction (FEC): simple scheme  for every group of n chunks create a redundant chunk by exclusive OR-ing the n original chunks  send out n+1 chunks, increasing the bandwidth by factor 1/n.  can reconstruct the original n chunks if there is at most one lost chunk from the n+1 chunks  Playout delay needs to be fixed to the time to receive all n+1 packets  Tradeoff: m increase n, less bandwidth waste m increase n, longer playout delay m increase n, higher probability that 2 or more chunks will be lost

43 Recovery from packet loss (2) 2nd FEC scheme “piggyback lower quality stream” send lower resolution audio stream as the redundant information for example, nominal stream PCM at 64 kbps and redundant stream GSM at 13 kbps. Whenever there is non-consecutive loss, the receiver can conceal the loss. Can also append (n-1)st and (n-2)nd low-bit rate chunk

44 Recovery from packet loss (3) Interleaving  chunks are broken up into smaller units  for example, 4 5 msec units per chunk  Packet contains small units from different chunks  if packet is lost, still have most of every chunk  has no redundancy overhead  but adds to playout delay

45 Summary: Internet Multimedia: bag of tricks  use UDP to avoid TCP congestion control (delays) for time-sensitive traffic  client-side adaptive playout delay: to compensate for delay  server side matches stream bandwidth to available client-to-server path bandwidth m chose among pre-encoded stream rates m dynamic server encoding rate  error recovery (on top of UDP) m FEC, interleaving m retransmissions, time permitting m conceal errors: repeat nearby data

46 Chapter 6 outline  6.1 Multimedia Networking Applications  6.2 Streaming stored audio and video m RTSP  6.3 Real-time, Interactivie Multimedia: Internet Phone Case Study  6.4 Protocols for Real-Time Interactive Applications m SIP

47 SIP  Session Initiation Protocol  Comes from IETF SIP long-term vision  All telephone calls and video conference calls take place over the Internet  People are identified by names or addresses, rather than by phone numbers.  You can reach the callee, no matter where the callee roams, no matter what IP device the callee is currently using.

48 SIP Services  Setting up a call m Provides mechanisms for caller to let callee know she wants to establish a call m Provides mechanisms so that caller and callee can agree on media type and encoding. m Provides mechanisms to end call.  Determine current IP address of callee. m Maps mnemonic identifier to current IP address  Call management m Add new media streams during call m Change encoding during call m Invite others m Transfer and hold calls

49 Setting up a call to a known IP address Alice’s SIP invite message indicates her port number & IP address. Indicates encoding that Alice prefers to receive (PCM ulaw) Bob’s 200 OK message indicates his port number, IP address & preferred encoding (GSM) SIP messages can be sent over TCP or UDP; here sent over RTP/UDP. Default SIP port number is 5060.

50 Setting up a call (more)  Codec negotiation: m Suppose Bob doesn’t have PCM ulaw encoder. m Bob will instead reply with 606 Not Acceptable Reply and list encoders he can use. m Alice can then send a new INVITE message, advertising an appropriate encoder.  Rejecting the call m Bob can reject with replies “busy,” “gone,” “payment required,” “forbidden”.  Media can be sent over RTP or some other protocol.

51 Example of SIP message INVITE SIP/2.0 Via: SIP/2.0/UDP From: To: Call-ID: Content-Type: application/sdp Content-Length: 885 c=IN IP m=audio RTP/AVP 0 Notes:  HTTP message syntax  sdp = session description protocol  Call-ID is unique for every call. Here we don’t know Bob’s IP address. Intermediate SIP servers will be necessary. Alice sends and receives SIP messages using the SIP default port number 506. Alice specifies in Via: header that SIP client sends and receives SIP messages over UDP

52 Name translation and user location  Caller wants to call callee, but only has callee’s name or address.  Need to get IP address of callee’s current host: m user moves around m DHCP protocol m user has different IP devices (PC, PDA, car device)  Result can be based on: m time of day (work, home) m caller (don’t want boss to call you at home) m status of callee (calls sent to voic when callee is already talking to someone) Service provided by SIP servers:  SIP registrar server  SIP proxy server

53 SIP Registrar REGISTER sip:domain.com SIP/2.0 Via: SIP/2.0/UDP From: To: Expires: 3600  When Bob starts SIP client, client sends SIP REGISTER message to Bob’s registrar server (similar function needed by Instant Messaging) Register Message:

54 SIP Proxy  Alice send’s invite message to her proxy server m contains address  Proxy responsible for routing SIP messages to callee m possibly through multiple proxies.  Callee sends response back through the same set of proxies.  Proxy returns SIP response message to Alice m contains Bob’s IP address  Note: proxy is analogous to local DNS server

55 Example Caller with places a call to (1) Jim sends INVITE message to umass SIP proxy. (2) Proxy forwards request to upenn registrar server. (3) upenn server returns redirect response, indicating that it should try (4) umass proxy sends INVITE to eurecom registrar. (5) eurecom regristrar forwards INVITE to , which is running keith’s SIP client. (6-8) SIP response sent back (9) media sent directly between clients. Note: also a SIP ack message, which is not shown.

56 Comparison with H.323  H.323 is another signaling protocol for real-time, interactive  H.323 is a complete, vertically integrated suite of protocols for multimedia conferencing: signaling, registration, admission control, transport and codecs.  SIP is a single component. Works with RTP, but does not mandate it. Can be combined with other protocols and services.  H.323 comes from the ITU (telephony).  SIP comes from IETF: Borrows much of its concepts from HTTP. SIP has a Web flavor, whereas H.323 has a telephony flavor.  SIP uses the KISS principle: Keep it simple stupid.

57 Basic IP Telephony Audio Packet Transfer Digitization (e.g., sampling at 8kHz, 16 bits per sample, i.e, 128 kb/s or 320 bytes per 20 ms) Real-time compression/encoding (e.g., G.729A at 8 kb/s) Transport to remote IP address and port number over UDP (Why not TCP?) Processing on receiver side is the reverse …

58 Basic IP Telephony Sampling, Quantization, Encoding … Sample at twice the highest voice frequency 2 x 4000=8000 Round off samples to one of 256 levels (introduces noise) Encode each quantized sample into 8 bit code word PCM: 8000 x 8 bits = 64 kb/s Other techniques (differential coding, linear prediction) 2.4 kb/s to 64 kb/s

59 Basic IP Telephony Problems with UDP Unreliable UDP a)Packet loss b)Out-of-order (very rarely) c)Jitter (delay variation) timeline Sender Receiver (a) (b)

60 Basic IP Telephony Receive buffer Sequence number: to detect packet loss; Just ignore the loss! Receive buffer: to absorb jitter Sender Receiver

61 Basic IP Telephony Timestamp Vs sequence number Sender Receiver Silence … t1 t2t3t4t5t6t7t8t9 Playout time vs packet loss detection Silence suppression Variable length packets

62 Basic IP Telephony Real-time Transport Protocol - RTP Encoded Audio RTP Header UDP header IP header msg sendto(…, msg, …) recvfrom(…, msg, …) Sequence number Optional contributors’ list (CSrc) Source identifier (SSrc) Timestamp (proportional to sampling time) Payload typeCCMV PX

63 Basic IP Telephony RTP based conference   Mixer Transcoder PCMU G.729 PCMU An example RTP conference (without multicast)

64 Basic IP Telephony Why do we need signaling? What is the IP address of Alice’s host? What audio encoding can it support? Bob’s host Alice’s host Register as Alice=> Query for Alice

65 Basic IP Telephony Session Initiation Protocol - SIP Address based on Columbia.edu Cisco.com home.com office.com Alice Bob 1.DNS SRV for SIP home.com  pc1.home.com pc1.home.com  INVITE 3.INVITE (proxy mode) (2) (3) m2.home.com

66 Basic IP Telephony SIP Message Format INVITE SIP/2.0 From: “Bob” To: “Alice” Subject: do you know SIP?... SIP/ OK From: “Bob” To: “Alice” Subject: do you know SIP?... Request Response

67 Basic IP Telephony Session Description Protocol - SDP AliceBob INVITE Alice I can support PCMU and G.729 Send me audio at :6780 OK; I can support PCMU Send me audio at : To port 6780 To port 8000 RTP

68 Basic IP Telephony SDP Message Format INVITE SIP/ v=0 o=bob IN IP s=SIP call c=IN IP t=0 0 m=audio 6780 RTP/AVP m=video 6790 RTP/AVP 31 Request Response SIP/ OK... c=IN IP t=0 0 m=audio 8000 RTP/AVP 0 8 m=video 0 RTP/AVP 31

69 Basic IP Telephony Example scenario Cisco.com Home.com Office.com Alice Bob (1) (2) (3) (4) 1.Invite 2.Moved to 3.Invite 4.Invite pc5

70 Basic IP Telephony VoIP Gateways External line PBX Corporate/Campus Internet LAN PBX Another campus LAN (Plain Old) Telephone Network Gateway