introduction to voip part ii dr. farid farahmand cet479 updated 5/18/2007
TRANSCRIPT
Introduction to VoIPPart II
Dr. Farid Farahmand
CET479Updated 5/18/2007
Overview
Basic concepts of VoIP and its motivating facts
How to digitally decode voice prior to its transport
How to transport voice between users After the session is established how to transport
voice How to setup and teardown voice sessions
How to create sessions How signaling protocols work
Speech Coding
Voice has to be digitally encoded/decoded Streams of 1’s and 0’s
How voice is coded impacts the channel efficiency (BW utilization) Various speech coding techniques are used
Bandwidth and voice quality are related Yet the relation is not linear For example: 16 Kbps voice transmission is not necessarily
better than 32 Kbps Objective of speech coding is to minimize BW and maintaining
high quality of speech High quality is measured by MOS metric (Mean-Option Score) Other metric alternatives are available (PSQM)
A Little about Speech
Speech is considered to be an analog signals The objective is to reconstruct the speech digitally
Input Analog SignalHuman speech: 300-3800 Hz
Sampled Analog Signal Reconstructed Digital Signal
00010010001101010011…..
SamplingBlock
Quntization
Codec
0001
00100011
0101
SamplingFrequency
Input Analog Signal
A signal can be reconstructed if
the sampling rate is twice the max. input frequency
More bits requires more BW but typically more
quantization level
A Little about Speech
Uniform quantization level can cause discrimination Loud voices will have lower quantization error
A more effective approach is to us non-uniform quantization Smaller levels smaller quantization level Larger levels Less granularity
0001
00100011
0101
More accuracy
Less accuracy
Speech-Coding Techniques
Choice of speech coding is critical to having high-quality voice
Two conflicting objectives Reducing bandwidth Maintaining the natural-sounding speech (toll
quality)
G. 711 Speech Coding
ITU Recommendation G . 711 Speech decoding Typical human speech has a maximum frequency of about 4 KHz: Fmax =
4KHz Based on Nyquist Theorem, analog signals must be sampled at twice their
maximum frequency: Sampling rate =8000 sample/second = 2 x Fmax
Each sample is represented with 8 bits BW requirement will be 64 Kbps for standard circuit switch based telephone Toll-quality (MOS) is 4.3 = Excellenet
More efficient coding techniques G.726 32 Bit rate (Kbps) toll-quality = 4.0 G.728 16 Bit rate (Kbps) toll-quality = 3.9 G.729 08 Bit rate (Kbps) toll-quality = 4.0
VoIP uses more efficient coding techniques The two ends negotiate on which coding technique to use
Next:
Basic concepts of VoIP and its motivating facts
How to digitally decode voice prior to its transport
How to transport voice between users After the session is established how to transport
voice How to setup and teardown voice sessions
How to create sessions How signaling protocols work
Transporting Voice Signals
Digitally codes voice can be encapsulated into IP packets IP is just a routing protocol IP routing is based on the destination address – packets with the
same source/destination address can take different paths Provides no quarantine of service
One way to transport the IP packet packets is using TCP The transmission control protocol (TCP)
Ensuring that all packet are delivered in sequence Providing transmission reliability TCP provides port number in its header to distinguish between
different applications (SMTP: Port 25 / Web: port 80 / Telnet: Port 23)
TCP/IP Model (Click for more information)
The five layer TCP/IP model
5. Application layer
DHCP • DNS • FTP • HTTP • IMAP4 • IRC • NNTP • MIME • POP3 • SIP • SMTP • SNMP • SSH • TELNET • BGP • RPC • RTP • RTCP • TLS/SSL • SDP • SOAP • L2TP • PPTP • …
4. Transport layer
TCP • UDP • DCCP • SCTP • GTP • …
3. Network layer
IP (IPv4 • IPv6) • ARP • RARP • ICMP • IGMP • RSVP • IPSec • …
2. Data link layer
ATM • DTM • Ethernet • FDDI • Frame Relay • GPRS • PPP • …
1. Physical layer
Ethernet physical layer • ISDN • Modems • PLC • RS232 • SONET/SDH • G.709 • Wi-Fi • …
TCP/IP Headers
Input Analog SignalHuman speech: 300-3800 Hz
Input Analog Signal
Application layerDHCP • DNS • FTP • HTTP • IMAP4 •
IRC • NNTP • MIME • POP3 • SIP •SMTP • SNMP • SSH • TELNET •BGP • RPC • RTP • RTCP • TLS/SSL• SDP • SOAP • L2TP • PPTP • …
Transport layerTCP • UDP • DCCP • SCTP • GTP • …
Network layerIP (IPv4 • IPv6) • ARP • RARP • ICMP •
IGMP • RSVP • IPSec • …
Data link layerATM • DTM • Ethernet • FDDI • Frame
Relay • GPRS • PPP • …
Physical layerEthernet physical layer • ISDN • Modems
• PLC • RS232 • SONET/SDH • G.709• Wi-Fi • …
Introduction to UDP
The User Defined Protocol performs a very simple function Passing IP packets to the end user Provides no guarantee of service and inherently unreliable Has no concept of packet ordering Yet, provides a quick one-shot transmission Most common example is using UDP in DNS
UDP
Field NameSize
(bytes)
Description
Source Port 2
Source Port: The 16-bit port number of the process that originated the UDP message on the source device. This will normally be an ephemeral (client) port number for a request sent by a client to a server, or a well-known/registered (server) port number for a reply sent by a server to a client. See the section describing port numbers for details.
Destination Port
2
Destination Port: The 16-bit port number of the process that is the ultimate intended recipient of the message on the destination device. This will usually be a well-known/registered (server) port number for a client request, or an ephemeral (client) port number for a server reply. Again, see the section describing port numbers for details.
Length 2Length: The length of the entire UDP datagram, including both header and Data
fields.
Checksum 2Checksum: An optional 16-bit checksum computed over the entire UDP datagram
plus a special “pseudo header” of fields. See below for more information.
Data Variable Data: The encapsulated higher-layer message to be sent.
Voice over UDP
UDP was not designed for transporting voice Due to its quick transporting ability, it is suitable for
voice Basic shortcoming of UDP
No packet loss recovery mechanism Voice communications can tolerate some loss Efficient coding techniques can be design to recover some
lost packets Supporting QoS can reduce the probability of packet loss
No packet ordering scheme Packets in the same session are unlikely to follow different
paths lower probability of out of ordering
…we still like to resolve some of the shortcomings of UDP
A Transport Protocol for Real-Time Application Protocol (RTP) RTP is designed to support
transporting real-time applications (voice, video, etc.)
RTP contains two protocols RTP RTP Control Protocol
Main functionalities Detect packet out-of-
sequencing Report packet loss Only provides information
and takes no action!
Data Link Layer
Physical Layer
Network Layer (IP)
UDP TCP
H.245Control
Signaling
H.225Call
Signaling
H.225RAS
SignalngRTCP
RTP
Voice/Video/Codec
Terminal / Application ControlAudio / VideoApplications
RTP Protocols
RTP resides on top of UDP Includes packet sequence number Provides timestamp (used for synchronization and
calculating jitter and delay) RTP Control Protocol (RTCP)
Considered as a companion to RTP / optional Provides feedback about quality of the voice session
Number of lost RTP packets Packet delays Inter-arrival jitter
RTP and RTCP are often established as two separate sessions Odd/Even port numbers between 1025-65,535
Next:
Basic concepts of VoIP and its motivating facts
How to digitally decode voice prior to its transport
How to transport voice between users After the session is established how to transport
voice How to setup and teardown voice sessions
How to create sessions How signaling protocols work
Call Setup and Teardown
The main question: How to establish a voice session How to teardown the session
Call setup and teardown is commonly used in traditional telephony Signaling protocols are invoked before and during the call
Setup Monitor/maintenance Teardown
SS7 is the most common signaling example used in our telephone network
In case of VoIP most initial signaling protocols were proprietary ITU-T (International Telecommunications Union Telecommunications
Standardization Sector) recommended H.323 as the signaling protocol Version 1: 1996 Version 2: 1998 Version 4: Today!
H.323 Architecture
Basic components and scope Terminal
Endpoints / end-user communication devices
Multipoint control unit (MCU) An H.323 endpoint supporting
multipoint conference Gatekeeper
Optional entity Controls a number of H.323
terminal, gateways and MCUs Offers BW control services
used to support QoS Gateway
Establishes connection to other networks (etc. ISDN)
Provides translation services between H.323 and other types of networks
A set of terminals, MCUs, that a single gatekeeper controls is called a ZONE
SCN = traditional switched circuit network (SCN)
General Idea
Overview of H.323 Protocols
The actual signaling messages between H.323 entities are specified by H.225 RAS Signaling H.223 Call Signaling H.245 Control Signaling
H.225 has two parts Call Signaling:
The setup and teardown signaling is very similar to ISDN layer 3 spec. (Q.931)
Can be carried over UDP or TCP / can be performed together – whichever is established first
RAS (registration, admission and Status) signaling Used between endpoint and a gatekeeper Always carried over UDP
Data Link Layer
Physical Layer
Network Layer (IP)
UDP TCP
H.245Control
Signaling
H.225Call
Signaling
H.225RAS
SignalngRTCP
RTP
Voice/Video/Codec
Terminal / Application ControlAudio / VideoApplications
Overview of H.323 Protocols
H.245 is a control protocol used between two or more endpoints Manages the media
streams between H.323 session participants
Establishes logical channels between endpoints The channel carries media
streams between participants and include media type, bit rate, and so on
Data Link Layer
Physical Layer
Network Layer (IP)
UDP TCP
H.245Control
Signaling
H.225Call
Signaling
H.225RAS
SignalngRTCP
RTP
Voice/Video/Codec
Terminal / Application ControlAudio / VideoApplications
References
http://www.analog.com/library/analogDialogue/archives/40-04/blackfin_voip.html
http://www.freesoft.org/CIE/RFC/1889/18.htm - RTCP