Voice Over IP (VoIP)
Voice Over IP (VoIP)
Voice Over IP (VoIP)
VoIP
indigoo.com
VOICE OVER IP
OVERVIEW OF VOICE OVER IP TECHNOLOGIES,
NETWORK ARCHITECTURES AND PROTOCOLS
Peter R. Egli
INDIGOO.COM1/54
Rev. 3.20
Voice over IP
indigoo.com
Contents
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
VoIP functions
Voice Codecs
Echo problem with VoIP
Voice Activity Detection / Comfort Noise Generation
Jitter = inter-packet arrival variations
VoIP relies heavily on DSP technology
Transport of real-time traffic: RTP / RTCP RFC1889
H.323
SIP Session Initiation Protocol RFC3261
MGCP - RFC2705/2805
Fax over IP
SIP / H.323 / MGCP centralized model vs. Skype peer2peer model
VoIP regulatory issues
2/54
Rev. 3.20
indigoo.com
Voice over IP
1. VoIP functions
Signaling comprises all functions to set up, control and teardown a VoIP call/session.
Examples of VoIP signaling protocols: H.323, SIP, MGCP, H.248, NCS, Skype. UDP and TCP are
used for signaling transport.
The data path is responsible for encoding, packetizing and compressing the voice. UDP is
always used for the data path since:
a. TCP would introduce too much delay and
b. Retransmissions are not necessary and only distort the voice in case of packet loss.
Signaling
Data
Path
Voice
IP
IP
Voice
Voice
IP
IP
Voice
Signaling
Voice
IP
IP
Data
Path
Voice
3/54
Rev. 3.20
indigoo.com
Voice over IP
2. Voice Codecs (1/12)
Codec means Coder Decoder. Coding means encoding the (already digitized) voice
samples into a different format, e.g. for compression (reduction of data rate).
Digital Voice Transmission Model (PSTN) without Codecs:
Speaker
Mic
D
A
Analog
voice
PSTN
Digital
samples
Digital
samples
Analog
voice
D
Analog
voice
Coder
Uncompressed
voice samples
PSTN
Compressed
voice samples
Coder
A
D
Analog
voice
Uncompressed
voice samples
4/54
Rev. 3.20
indigoo.com
Voice over IP
2. Voice Codecs (2/12)
Pulse Code Modulation PCM:
Sample (measure) amplitude at equal time intervals and encode the amplitude
as digital value.
POTS (analog) signal in frequency domain:
f [Hz]
300Hz
t [s]
3.3kHz
1/8000s
Sampling:
The analog signal is sampled at aequi-distant time intervals.
The sampling frequency must be at least double the highest
signal frequency (Nyquist theorem: sampling frequency >= 2*fmax).
This means the sampling frequency must be 2*3.3kHz ~= 8kHz.
Quantization of samples:
The samples are digitized (A/D converter) which results in a stream of 13 (A-law) or 14 (-law) bit
samples (voice over analog lines requires >12 bits due to ~60dB dynamics = power range).
Peter R. Egli 2015
5/54
Rev. 3.20
indigoo.com
Voice over IP
2. Voice Codecs (3/12)
G.711 Codec:
The G.711 Codec performs compansion (COMPression and ExpANSION) for reducing
the data rate and amplify weak signals in order to increase S/N ratio:
Reduction of 13 (A-law) and 14 (-law) bits to 8 bits according to a non-linear
compression curve:
1. Step: Raise power of weak signals
2. Step: Linear quantization
A-law and -law differ in the compansion curve.
G.711 is the standard codec used in PSTNs.
Sampling:
8kHz sampling rate, 8bits / sample 64kbps channels.
Peter R. Egli 2015
6/54
Rev. 3.20
indigoo.com
Voice over IP
2. Voice Codecs (4/12)
Voice Compression Codecs:
Purpose of compression: bandwidth reduction.
f [Hz]
1.2kHz 1.205kHz
7/54
Rev. 3.20
indigoo.com
Voice over IP
2. Voice Codecs (5/12)
Overview of codecs (1):
G.711
G.721
G.722
Date
1972
1984
Toll-quality
Yes
Yes
MOS
4.20
G.723 .1
G.723.1
G.726
G.727
G.728
1988
1995
Yes
Near toll
4.00
N/A
64
32
3.4kHz
G.729A
1995
1990
1990
1992
1995
No
Near toll
N/A
yes
Near toll
3.65
3.90
3.85
4.00
3.61
3.70
48 / 56 / 64
5.3
6.3
16/24/32/40
16/24/32/64
16
3.4kHz
7kHz
3.4kHz
3.4kHz
3.4kHz
3.4kHz
3.4kHz
3.4kHz
No
No
No
No
No
No
No
No
No
a-law/u-law
ADPCM
SB-ADPCM
ACELP
MP-MLQ
ADPCM
ADPCM
LD-CELP
CS-ACELP
0.125
20
1.5
30
30
0.125
0.125
0.625 - 2.5
10
N/A
N/A
7.5
7.5
N/A
N/A
sample
sample
20bytes
24bytes
Sample
Sample
0.625ms
10bytes
Complexity [DSP
MIPS/RAM/ROM]
0.1MIPS
2w RAM
50w ROM
10MIPS
256w RAM
4kw ROM
10MIPS
256w RAM
4kw ROM
18MIPS
2.1kw RAM
7kw ROM
16MIPS
2.1kw RAM
7kw ROM
12MIPS
256w RAM
12kw ROM
12MIPS
256w RAM
12kw ROM
33MIPS
3.4kw RAM
8kw ROM
22MIPS
2.5kw RAM
9.5kw ROM
Pass fax/modem
Yes
No
No
No
No
No
No
yes
No
14
n.a.
N/A
N/A
< 3%
< 3%
N/A
N/A
N/A
< 5%
Yes (annex I)
N/A
No
Yes
Yes
N/A
N/A
N/A
Yes
Bit-robustness
Yes
Yes
Yes
N/A
N/A
Yes
Yes
N/A
Yes
No
No
No
Yes
Yes
No
No
No
Yes
N/A
N/A
N/A
~ 18 / 8
N/A
N/A
N/A
N/A
~ 20 / 9
License
No
N/A
N/A
Yes
Yes
N/A
N/A
N/A
N/A
Application
ISDN
Obsolete
VoIP
VoIP
VoIP
VoIP
VoIP
PSTN
VoIP
Comments
Standard high
qualitiy VoIP
codec.
Audio
encoder
Embedded
version of
G.726
Std. medium
Q/bit rate VoIP
codec.
Tandeming
Packet loss tolerance
PLC
8/54
Rev. 3.20
indigoo.com
Voice over IP
2. Voice Codecs (6/12)
Overview of codecs (2):
GSM EFR
Speex
iLBC (RFC3951)
AMR-NB
G.719
1996
2003?
2004
1999
2008
Toll-quality
Near toll
Near toll
Near toll
Yes
Yes
MOS
3.5 - 3.9
n.a.
3.4 - 4
3.79 - 4.14
N/A
12.2
2 - 44kbps
15.2kbps or 13.3kbps
4.75-12.2
32 - 128
3.4kHz
N/A
3.4kHz
3.4kHz
20Hz - 20kHz
No
Yes
N/A
Yes
CD-ACELP
CELP
LPC
ACELP
Yes
Adaptive time resolution
etc.
20
20ms
40ms (end-to-end)
N/A
10ms (@ 8kHz)
0 (@ 12.2kbps)
N/A
22.5ms
N/A
20ms
20ms
Complexity [DSP
MIPS/RAM/ROM]
15.4MIPS
4.7kw
5.9kw
Variable
22 MIPS
~7MIPS
Pass fax/modem
no
N/A
N/A
N/A
N/A
Tandeming
N/A
N/A
N/A
N/A
n.a.
10%
Very good
N/A
N/A
PLC
Yes
Yes
Yes
Yes
N/A
Bit-robustness
Yes
N/A
N/A
Yes
N/A
VAD / DTX
N/A
N/A
2/2
0 / 0 (open source)
N/A
N/A
N/A
Free
N/A
GSM
Free
VoIP, online game voice
comm.
VoIP
GSM
Date
9/54
Rev. 3.20
Voice over IP
indigoo.com
10/54
Rev. 3.20
Voice over IP
indigoo.com
11/54
Rev. 3.20
indigoo.com
Voice over IP
2. Voice Codecs (9/12)
Codec technology (2):
Waveform coding
Hybrid coding
Vocoding
5
Toll quality: MOS ~4
4
Narrowband speech
coding
PCM
3
32
16
MOS: Mean Opinion Score; speech quality assessment by representative group of people.
Peter R. Egli 2015
12/54
Rev. 3.20
indigoo.com
Voice over IP
2. Voice Codecs (10/12)
Characteristics of voice coders (1):
a. Bit rate (usually higher compression results in lower voice quality).
Coder
A
Voice frame
Peter R. Egli 2015
Frame buffer
13/54
Rev. 3.20
indigoo.com
Voice over IP
2. Voice Codecs (11/12)
Without fragmentation:
Voice
Frame buffer
Transmission line
Jumbo data packet
Voice
With fragmentation:
Voice
Data
Voice
14/54
Rev. 3.20
Voice over IP
indigoo.com
15/54
Rev. 3.20
indigoo.com
Voice over IP
3. Echo problem with VoIP (1/5)
2 wires
Phone
Acoustic Echo in
handset and
echo in hands-free
mode.
Phone
Hybrid
2w/4w circuit in
Central Office.
Electric Echo (Hybrid Echo)
Hybrid
2w/4w circuit in
Central Office.
Electric Echo (Hybrid Echo)
Original
signal
Ttransmission
TH2Accoustic
Ttransmission
Ttransmission
Time
Peter R. Egli 2015
16/54
Rev. 3.20
indigoo.com
Voice over IP
3. Echo problem with VoIP (2/5)
Echo types:
Echoes (reflections) occur at different points in the transmission path. Echoes are again
reflected at these points but are also dampened (amplitude reduced).
Talker echo:
Echo that talker hears (his own voice).
Listener echo:
Echo of talker signal that listener hears.
Remote talker echo:
Echo of talker signal that talker hears but that is generated at the far
end.
4 wires
2 wires
2 wires
Phone
Phone
Talker Echo
Listener Echo
17/54
Rev. 3.20
indigoo.com
Voice over IP
3. Echo problem with VoIP (3/5)
Phone
Hybrid
2w/4w circuit
Central Office
Delay
(sample
storage)
Subtractor
Echo canceller
Input speech
signal
Output
signal
without echo
18/54
Rev. 3.20
indigoo.com
Voice over IP
3. Echo problem with VoIP (4/5)
2 factors contribute to the echo problem:
a. Signal reflections (hybrid, acoustic).
b. Transmission delay.
Thus the echo problem depends on the transmission delay which
can not be controlled (satellite links, long haul transatlantic lines).
Echo cancellation needs to be done at long delay lines ingress points.
PSTN
Echo
Canc.
Echo
Canc.
PSTN
19/54
Rev. 3.20
indigoo.com
Voice over IP
3. Echo problem with VoIP (5/5)
Gateway
Echo
Canc.
VoIP
20/54
Rev. 3.20
indigoo.com
Voice over IP
Problems of VAD:
1. Hangover:
Codec remains active for some time (typ. 200ms) after voice level has fallen below threshold.
2. Front end clipping:
VAD needs some time to detect if signal amplitude has exceeded the
threshold. The first syllable may be cut off (Meier Eier problem).
3. Silent periods:
Silent periods are very disturbing during a conversation (line appears to be dead). Comfort
Noise Generation (CNG) produces an artificial background noise so that the line does not
appear to be dead. CNG measures the background noise level and spectral distribution and
transmit this information to peer which plays back the noise signal.
21/54
Rev. 3.20
indigoo.com
Voice over IP
5. Jitter = inter-packet arrival variations
Sender
Receiver
Voice packets nicely spaced
(traffic shaping).
Packet network
introduces non-uniform
delay.
VoIP
Phone has
built-in
dejitter buffer
The dejitter buffer stores packets and replays them evenly towards the speaker thus ensuring
that there are no dropouts.
But: The dejitter buffer introduces additional delay!
Peter R. Egli 2015
22/54
Rev. 3.20
indigoo.com
Voice over IP
6. VoIP relies heavily on DSP technology
Whos doing all the coding, echo cancellation, voice activity detection, fax/modem
detection/modulation etc.? DSP Digital Signal Processor.
The DSP digital signal processing is mainly MAC: Multiply ACcumulate operations.
E.g. Finite Impulse Response filter (FIR):
YN = XN * C1 + XN-1*C2 + XN-2*C3 .... + X0*CN
The DSP is optimised for these calculations (harward architecture).
...0100101101001...
(voice sample stream)
...11010010...
(compressed voice)
Data RAM
(coefficients and samples)
C (coefficient)
Instruction
RAM
(software,
program)
X (sample)
Control
Accumulator
+
Data Path
23/54
Rev. 3.20
indigoo.com
Voice over IP
7. Transport of real-time traffic: RTP / RTCP RFC1889 (1/2)
Almost all VoIP protocols (H.323, SIP, MGCP, Skinny) use RTP over UDP for the transport of
voice or video.
RTP does not itself provide real-time characteristics. Instead it transports information that
help the application achieve real-time behavior.
RTP: Real Time traffic Transport Protocol functions:
1. Sequencing (SN) (reordering of voice packets).
2. Time stamping (dejitter buffer control).
3. Payload type (PT) indication (which codec was used for voice in RTP packet).
4. Multiplexing (SSRC) (indication of source in case of conferencing).
5. Layer 4 framing (M) (indication of video frame).
RTCP: Real Time Transport Control Protocol functions:
1. Long term delay and packet loss statistics (5s).
2. Quality monitoring.
RTP protocol stack:
Voice Frame
Data (voice samples or compressed voice)
RTP
UDP
SSRC
IP
Ethernet / Frame Relay / ATM
Peter R. Egli 2015
Time Stamp
V=2 P E
CC
PT
SN
24/54
Rev. 3.20
Voice over IP
indigoo.com
25/54
Rev. 3.20
indigoo.com
Voice over IP
8. H.323 (1/8)
H.323 = ITU-T all in one protocol suite for voice, data, fax and video over IP. H.323 is not a
protocol but a protocol suite (also called umbrella standard).
H.323 Protocol components and protocol stacks:
H.450
H.235
H.225.0
Annex L
H.225.0 H.225.0
Annex K Annex G
H.235
H.235
H.245
H.225.0Q.931
Audio / video
codecs
H.235
H.235
T.120
TCP
H.225.0-RAS
T.38
RTP
RTCP
UDP
IP
Data link layer
Physical layer
H.225.0-Q.931:
H.245:
H.225.0-RAS:
H.235:
H.450:
T.120/T.12x:
T.38:
Peter R. Egli 2015
indigoo.com
Voice over IP
8. H.323 (2/8)
H.323 Components (1):
IP (H.323)
H.323 Gatekeeper
H.323 proxy
IP
(e.g. LAN)
PSTN
H.323 gateway
H.323 terminal
(soft client)
H.323 terminal
(IP phone)
MCU
H.323
MP
H.323
MC
27/54
Rev. 3.20
Voice over IP
indigoo.com
8. H.323 (3/8)
H.323 Components (2):
MCU: Multipoint Control Unit (MC + n*MP):
Conferences between >2 parties need a multipoint unit for mixing the voice streams so that each
party can hear all other conversation partners. The MCU consists of a control unit
(Multipoint Controller MC) and 1 or many MPs (devices that actually mix audio streams for a
conversation. The MPs are either specialized hardware devices with DSPs or powerful general
purpose processors.
H.323 gateway:
The gateway interfaces the H.323 network (IP) to the PSTN (packet to circuit conversion). It consists
of a signaling gateway (e.g. H.323 to ISDN signaling) and a data path gateway (e.g. RTP G.723 to G.711
transcoding).
H.323 Proxy:
Proxies allow to connect an internal H.323 network (private) to an external H.323 network (public). In
addition proxies afford firewall functionality (firewall for H.323 services).
H.323 Terminal:
Either softphones (soft clients) or hardphones.
28/54
Rev. 3.20
indigoo.com
Voice over IP
8. H.323 (4/8)
Signalling (terminal to terminal) (1):
Message flow for direct signaling between 2 H.323 clients.
IP
H.323 terminal (A)
Phase 1
CALL PROCEEDING
ALERTING (B is ringing)
CONNECT (B hooked off)
Phase 2
29/54
Rev. 3.20
Voice over IP
indigoo.com
8. H.323 (5/8)
Signalling (terminal to terminal) (2):
H.323 signalling phase 1:
H.225.0-Q.931 protocol messages are used for call setup (setup, alerting, disconnect).
As its name implies this protocol is very similar to the ISDN signalling protocol (=Q.931).
H.323 signalling phase 2:
H.245 data channel signalling capability exchange (similar to PPP LCP) where each peer tells
the other its capabilities. The 2 parties agree on the set of capabilities (codec to be used, VAD
etc.) for the session.
If both parties disagree on media channel settings one party becomes master and resolves the
conflict (Master slave determination).
The media channel characteristics may be changed during the call (optional mode request
procedure), e.g. change of codec for a fax transmission (see below).
30/54
Rev. 3.20
indigoo.com
Voice over IP
8. H.323 (6/8)
Addressing:
H.323 supports multiple classes of addresses:
E.164: International PSTN phone number.
E-Mail address ([email protected]).
URL (H323://[email protected]).
IP address (some IP phones, e.g. NetMeeting can be addressed by an IP address).
String, alias name.
At startup H.323 clients (phones, gateway, MCU) register their addresses, aliases etc. with the
gatekeeper.
Alias
superman
batman
H.323 Gatekeeper
with lookup table
043 876 12 43
PSTN
IP
H.323 gateway
193.5.54.119
Mail addr.
E.164
IP
0438761243 193.5.54.119
bigboss@...
123
193.5.54.10
nobody@
124
193.5.54.20
123
[email protected]
superman
193.5.54.10
124
[email protected]
batman
193.5.54.20
31/54
Rev. 3.20
indigoo.com
Voice over IP
8. H.323 (7/8)
AAA
RADIUS
Authentication
Server
User Policy
Server
H.323 terminal
(soft client)
QoS Policy
Server
E.164 IP
URL IP (DNS)
Alias IP (LDAP)
Adress Res.
Server
RADIUS
Accounting
Server
IP
H.323 Gatekeeper
H.323 terminal
(soft client)
32/54
Rev. 3.20
indigoo.com
Voice over IP
8. H.323 (8/8)
H.225.0 RAS (2):
RAS messages:
Gatekeeper Discovery (find gatekeeper):
Gatekeeper Request GRQ
Gatekeeper Confirm/Reject GCF/GRJ
H.323
Gatekeeper
H.323 terminal
(soft client)
GRQ
GCF
RRQ
ARQ
RCF
ACF
BRQ
BCF
DRQ
DCF
URQ
UCF
33/54
Rev. 3.20
indigoo.com
Voice over IP
9. SIP - Session Initiation Protocol - RFC3261 (1/8)
SIP Components (1):
A SIP network consists of:
a. SIP User Agents (clients, phones)
b. SIP servers (SIP proxy server, redirect server, registration server)
A user agent UA is a SIP client. However SIP servers (proxy server, registration server) also
contain the UA functionality.
SIP registration
server (registrar)
IP (SIP)
SIP proxy
server
IP
(e.g. LAN)
PSTN
SIP gateway
SIP redirect
server
Peter R. Egli 2015
SIP location
server
34/54
Rev. 3.20
Voice over IP
indigoo.com
35/54
Rev. 3.20
indigoo.com
Voice over IP
9. SIP - Session Initiation Protocol - RFC3261 (3/8)
SIP session setup (1):
Call setup using SIP Direct Mode (address of callee known to caller):
alice@[20.30.40.50]
INVITE bob@[100.110.120.130]
2
1.
2.
3.
bob@[100.110.120.130]
200 OK
ACK bob@[100.110.120.130]
36/54
Rev. 3.20
indigoo.com
Voice over IP
9. SIP - Session Initiation Protocol - RFC3261 (4/8)
SIP session setup (2):
Call setup via SIP Proxy Server:
alice@[20.30.40.50]
INVITE [email protected]
where is [email protected] ?
Location Server
[email protected]
jim@students
1. Alice sends an INVITE message to fhzh.com server (which acts as proxy server).
2./3. The proxy server looks up bob in its location server (through a non-SIP protocol like
LDAP) and determines that bob is registered as jim@students.
4. The proxy server constructs a new URL [email protected] and sends the INVITE
message to Bobs PC (or SIP phone).
5./6. Bob accepts the call and sends back an ACK message to the proxy server which in
turn sends it to Alice.
7./8. Alice acknowledges with an ACK message (sent to the proxy server and from there to
bob.
Peter R. Egli 2015
37/54
Rev. 3.20
indigoo.com
Voice over IP
9. SIP - Session Initiation Protocol - RFC3261 (5/8)
SIP session setup (3):
Call setup via SIP Redirect and SIP Proxy Server:
alice@[20.30.40.50]
INVITE [email protected]
fhzh.ch
where is [email protected] ?
Location Server
bob is [email protected]
ACK [email protected]
SIP Proxy Server
ethz.ch
7
8
where is [email protected] ?
ethz.ch
Location Server
1.
[email protected]
jay@studis
38/54
Rev. 3.20
Voice over IP
indigoo.com
Desired local recipient (may or may not be ultimate recipient of the request).
To: field in response must equal To: field in request.
From:
Logical source address (who is calling). Logical means that it must not contain an IP address
or FQDN (DNS name). From: field in response must equal From: field in request.
CSeq:
CSeq (Command Sequence, sequence number) contains an 32bit integer and a method name.
The CSeq number is incremented for each new request within a dialog. CSeq serves to order
transactions within a dialog (a dialog is a session).
Call-ID:
Unique identifier for a session. Call-ID should have the same value in all messages of a
specific session (call).
Max-Forwards: Used for limiting the max. number of hops a request can make on its way to the destination.
Like the IP-TTL this field is decremented by each SIP hop.
Via:
Indicates the path taken so far and indicates the path that should be followed in routing
responses. The branch ID parameter in the via header field serves as a transaction ID for
loop detection by proxies (branch value must start with the magic cookie "z9hG4bK). The
Via field in responses should have the same value as the Via field in requests. The Via field
contains: transport protocol, the clients host name or network address and possibly the port
number (if it is missing the default port 5060 is assumed).
Peter R. Egli 2015
39/54
Rev. 3.20
Voice over IP
indigoo.com
2. Message header:
Via: SIP/2.0/UDP 172.16.61.100:5060;branch=z9hG4bKc3ebaa836
Max-Forwards: 70
To: sip:[email protected]:5060
From: sip:[email protected]:5060;tag=555a194141ced29
Call-ID: [email protected]
CSeq: 587023346 INVITE
Supported: timer
Content-Type: application/sdp
Content-Length: 196
Contact: sip:[email protected]:5060
Supported: replaces
User-Agent: MDD1200 MxSF/v3.2.5.21
2. Request body (optional, can contain session description in SDP format, body separated
from header by an empty line):
v=0
o=MxSIP 0 9 IN IP4 172.16.61.100
s=SIP Call
c=IN IP4 172.16.61.100
t=0 0
m=audio 4864 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
Peter R. Egli 2015
40/54
Rev. 3.20
Voice over IP
indigoo.com
2. Message header:
Call-ID: [email protected]
CSeq: 587023346 INVITE
From: sip:[email protected]:5060;tag=555a194141ced29
To: sip:[email protected]:5060;tag=1b4a558777daa09
Via: SIP/2.0/UDP 172.16.61.100:5060;branch=z9hG4bKc3ebaa836
Content-Length: 179
Content-Type: application/sdp
Supported: replaces
Contact: sip:[email protected]:5060
User-Agent: MDD1400 MxSF/v3.2.5.21
2. Response body (optional, can contain session description in SDP format, body separated
from header by an empty line):
v=0
o=MxSIP 0 5 IN IP4 172.16.61.101
s=SIP Call
c=IN IP4 172.16.61.101
t=0 0
m=audio 4864 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
41/54
Rev. 3.20
indigoo.com
Voice over IP
10. MGCP - RFC2705/2805 (1/6)
Media Gateway
Controller MGC
Media Gateway
Controller MGC
H.323 / SIP / BICC
MGCP
PSTN
MGCP
IP
MG
TDM circuit
PSTN
MG
IP (RTP) packets
MG: Media Gateway (converts from voice in TDM circuit to RTP (IP) packets).
MGC: Media Gateway Controller (controls MG via MGCP protocol).
Call control: Central control of call. Call control box controls MGC boxes via H.323 or SIP.
Peter R. Egli 2015
42/54
Rev. 3.20
indigoo.com
Voice over IP
10. MGCP - RFC2705/2805 (2/6)
Comparison H.323/SIP model vs. MGCP model (1):
H.323/SIP call model (peer model):
H.323 terminal/gateway
IP
H.323 terminal/gateway
TCP / UDP
IP
H.323/SIP (session
control)
RTP (voice)
TCP / UDP
IP
Each H.323/SIP endpoint is fully aware of calls / sessions. The endpoints talk directly to
each other (with H.323 or SIP).
The endpoints have wider control over local functionality (tone generation, codec
selection...).
In the peer-to-peer-model the session control protocol (H.323/SIP)is symmetric. Each side
(left or right) can initiate a call. The protocol messages can flow in either direction.
Peer model = intelligent terminal phylosophy: The terminals have all the session control
and bearer control (voice channel) functionality built-in. Supplementary features like CallForwarding are handled in the terminals.
Peter R. Egli 2015
43/54
Rev. 3.20
indigoo.com
Voice over IP
10. MGCP - RFC2705/2805 (3/6)
Comparison H.323/SIP model vs. MGCP model (2):
MGCP model (master/slave model):
Call control
SS7
SS7
Media Gateway
Controller MGC
Media Gateway
Controller MGC
H.323
H.323
MGCP
SCP
PSTN
MGCP
IP
MGCP
with MGC
MG
MGCP (bearer
RTP
control)
(voice)
TCP / UDP
IP
PSTN
Voice packets
Data path
(RTP)
SCP
MG
MGCP
with MGC
RTP
MGCP (bearer
(voice)
control)
TCP / UDP
IP
The MGCP model is asymmetric: A master (MGC) controls a slave (Media Gateway MG). The MGs
do not know the state of a call. They just open voice channels (PSTN side) and RTP streams (IP side)
and pass voice between IP and PSTN.
Gateway decomposition:
Media gateway does e.g. ISDN bearer to RTP.
MGC is feature server and implements the intelligence.
Peter R. Egli 2015
44/54
Rev. 3.20
indigoo.com
Voice over IP
10. MGCP - RFC2705/2805 (4/6)
MGCP applications:
1. Virtual Trunking with MGCP and H.323 (see picture Slide 40):
Virtual trunking means the replacement of traditional PSTN trunk lines with IP connections. This
saves money since the IP backbone networks of providers (e.g. Swisscom) have more and more
capacity (for data applications). Traditional PSTN lines however become more and more costly to
maintain (expensive equipment, expensive spare parts, old technology).
Additionally with VoIP the physical and data link layer are independent of the application (IP over
anything). This means that providers can upgrade backbone links with higher capacity lines
independently (which is not the case in the TDM world).
MGCP is used to control the media gateways (open/close voice channels).
The call control box controls the MGC with the H.323 protocol.
2. Gateway for analog phones:
Old analog phones are hooked up to an IP (VoIP) network through MGCP gateways.
The MGC controls the generation of ringing voltage, dial tone, busy tone etc. on the analog phone
port.
MGC / feature server
H.323 gatekeeper
MGCP
H.323
IP
Analog phone
Peter R. Egli 2015
MG
H.323 phone
45/54
Rev. 3.20
indigoo.com
Voice over IP
10. MGCP - RFC2705/2805 (5/6)
MGCP messages:
1. MGC MG (from controller to gateway):
Create Connection
Modify Connection
Delete Connection
Notification Request
CRCX
MDCX
DLCX
RQNT
Endpoint Configuration
Audit Connection
Audit Endpoint
EPCF
AUCX
AUEP
RSIP
Notify
NTFY
Delete Connection
DLCX
46/54
Rev. 3.20
indigoo.com
Voice over IP
10. MGCP - RFC2705/2805 (6/6)
MGCP connection setup (POTS call):
MG
MG
IP
Analog
phone
Analog
phone
200 OK
MDCX (M: sendrec)
200 OK
47/54
Rev. 3.20
indigoo.com
Voice over IP
11. Fax over IP (1/4)
T.30 (G3) fax
protocol (analog fax):
G3 fax
(analog fax)
G3 fax
(analog fax)
Phase A
Phase B
Phase C
Image data (encoded as T.4)
EOP: End Of Procedure
Phase D
Phase E
Peter R. Egli 2015
DCN: DisCoNnect
48/54
Rev. 3.20
indigoo.com
Voice over IP
11. Fax over IP (2/4)
3. Packet loss:
T.4 images are composed of black and white traces. If the change between black and white is
lost (due to packet loss in netwok) the image can not be reconstructed at the receiver.
If portions of fax control frames (HDLC) are lost the fax transmission will abort prematurely.
Packet Loss, jitter, delay
D
G3 fax
(analog fax)
Coder
(compression)
IP
Coder
(decompression)
D
A
G3 fax
(analog fax)
49/54
Rev. 3.20
indigoo.com
Voice over IP
11. Fax over IP (3/4)
Solution 1:
Use loss-less codec (G.711 or transparent):
Works reasonably good, but some fax brands/models will exhibit problems.
Even though fax is half duplex this solution will consume full-duplex bandwidth.
Packet Loss, jitter, delay
D
G3 fax
(analog fax)
Coder
(compression)
IP
Decoder
(decompression)
G3 fax
(analog fax)
G.711
G.711
Speech/voice encoded with G.711 or
transparent codec (no codec at all).
50/54
Rev. 3.20
indigoo.com
Voice over IP
11. Fax over IP (4/4)
Solution 2:
Use a fax over IP protocol:
A. T.38 (real-time fax over IP):
The fax signals (tones) are converted to messages and sent to the receiver fax where these
messages are converted back to tone signals (e.g. CNG tone signal is converted to
T.38:T30 IND:CNG message).
D
A
G3 fax
(analog fax)
T.30
T.4
IP
T.38
FoIP
T.38
FoIP
Fax GW
T.30
T.4
Fax GW
T.30 fax
D
G3 fax
(analog fax)
T.30 fax
D
A
G3 fax
(analog fax)
T.30
T.4
T.37
FoIP
Fax GW
T.30 fax
Peter R. Egli 2015
IP
TIFF
SMTP server
51/54
Rev. 3.20
indigoo.com
Voice over IP
12. SIP / H.323 / MGCP centralized model vs. Skype peer2peer model
Centralized model (SIP, H.323, MGCP):
Gatekeeper / MGC / registrar:
Central control (registration, admission, accounting...)
IP
52/54
Rev. 3.20
indigoo.com
Voice over IP
13. VoIP regulatory issues (1/2)
VoIP bypass threatens the business of the traditional telcos!
ISPs
Internet
Backbone provider
53/54
Rev. 3.20
Voice over IP
indigoo.com
54/54
Rev. 3.20