Internet Telephony: Voip, Sip & More:: "Shiv Kalyanaraman Rpi" Shivkumar Kalyanaraman
Internet Telephony: Voip, Sip & More:: "Shiv Kalyanaraman Rpi" Shivkumar Kalyanaraman
Shivkumar Kalyanaraman
: “shiv kalyanaraman rpi”
Rensselaer Polytechnic Institute Shivkumar Kalyanaraman
1 Adapted from slides of Henning Schulzrinne, Doug Moeller
Overview
Telephony: history and evolution
IP Telephony: What, Why & Where?
Adding interactive multimedia to the web
Being able to do telephony on IP with a variety of devices
Consumer & business markets
Key element of convergence in carrier infrastructure
Basic IP telephony model
Protocols: SIP, H.323, RTP, Coding schemes, Megaco
Future: Invisible IP telephony and control of appliances
H.323
Megaco SIP
IPDC
MD
CP “The nice thing about standards is that you
have so many to choose from; furthermore,
if you do not like any of them, you can just
wait for next year’s model.” [Tanenbaum]
Si
gt IG
ra S
ns H.GCP Q.
H.245 VPIM
Rensselaer Polytechnic Institute Shivkumar Kalyanaraman
5
Telephony over IP standards bodies
ITU - International Telecommunication Union
http://www.itu.org
IETF - Internet Engineering Task Force.
http://www.ietf.org
ETSI - European Telecommunications Standards Institute
http://www.etsi.org/tiphon
ANSI - American National Standards Institute
http://www.ansi.org
TIA - Telecommunications Industry Association
http://www.tiaonline.org
IEEE - Institute for Electrical and Electronics Engineers
http://www.ieee.org
1996
deregulation
Note: quantity
quality
value-added
Interactive svcs
(phone, cell, sms)
still dominate on a
$$-per-Mbps basis
Operational Improvement:
Simplification of Routing Administration
LAN/Campus Integration
Policy and Directory Consolidation
Broadband Infrastructure
Residential
Media Gateway Media Gateway Controller
Traditional phone
Signaling and media gateways
To reach PSTN or other networks
Rensselaer Polytechnic Institute Shivkumar Kalyanaraman
18
Consumer VoIP at home with cable
Media
Gateway
Cable Modem Term. Sys.
MGC
Signaling
Cable Modem Gateway
MTA
(Media Terminal Adapter)
Rensselaer Polytechnic Institute Shivkumar Kalyanaraman
Other access mechanisms
19 will similarly hand over to an MGC
Consumer VoIP: AT&T CallVantage
New consumer services:
Personal conferencing: earlier available to businesses only
Prepaid Calling cards offering personal conferencing
Portable TA (terminal adaptor): can plug into any ethernet
jack or WiFi (eg: many hotels providing free internet)
Universal messaging: voice messages in email
LocateMe,
Do-Not-Disturb,
Unified Portal
However, …
Combined with bluetooth or USB interfaces, a PC-based VoIP software
can do VoIP anywhere there is cellular coverage.
Or Cellphone can be a SIP terminal
7043
CO
CO
Headquarters Branch Offices
Router
Router
Router
Router
Router
CO
Headquarters CO Branch Offices
Router
Router Router
Router
Router
Legacy PSTN
Router
Router
Router
Router Router
800 Call
• Circuit Switched to IP
App. Media App.
Server Server Server Gateway
Softswitch
Redirect Call
• Circuit Switched to IP
IP Network
SDN Call
• IP to Circuit Switched
Rensselaer Polytechnic Institute Shivkumar Kalyanaraman
28
IP-enabled circuit switches
VoIP
PBX with VoIP trunk
Gateway card
trunk between PBX
Key system or PBX
CO with VoIP line card
for IP phones
Switch
Central
Enterprise Router with
Office telco interfaces
T1/PRI
BRI
Branch office router
with telco interfaces
Router BRI
VoIP Analog trunk/line
Gateway Analog “dongle”
a few analog lines
for fax/phone
Rensselaer Polytechnic Institute Shivkumar Kalyanaraman
30
VoFR (Voice over Frame Relay)
FRF.11 standard
Allows for G.711, 729, 728, 726, and 723.1
Signaling is done by transporting CAS natively or
CCS as data
Has support for T.30 Fax, and Dialed Digits natively
Router
Switch
PBX VFRAD
VFRAD PBX
Switch
Switch
Phase 3: Voice-over-X:
Voice over Packets: VoFR, VoIP
Key: Voice moves to a higher layer (from layer 1)
I.e. an app over a frame relay, ATM or IP network
VoIP Sales pitch: Convergence, Choice, Services, Integration with Web
applications
[Better chance of convergence compared to earlier attempts: ISDN, B-ISDN]
10 regional
6 offices
1
(full mesh)
7
10
9 Class 1
8
67 sectional Class 2
1 2 3 65 66 67
offices
230 primary
1 2 3 228 229 230
offices
Class 3
1300 toll
1 2 3 1298 1299 1300
offices Class 4
19,000 end
offices Class 5
19,000
1 2 3 4 5
200 million telephones Source: Computer Networks, Andrew S. Tanenbaum
Local Office
Local Office
User A
User B
Local Office
User A
User B
Digital Analog
Analog Shivkumar Kalyanaraman
Rensselaer Polytechnic Institute
40
The PSTN – Digitization
Voice frequency is 100 - 5000 Hz, with the main portion from
300 – 3400 Hz
Nyquist Theorem states that sampling must be done at twice
the highest frequency to recreate. 4000 Hz was chosen as the
maximum frequency, thus sampling at 8000 Hz
PCM = 8kHz * 8 bits per sample = 64 kbit/s
Channel 1
Channel 2 Framing Bit
Channel 3 Channel Channel Channel Channel
TDM
1 2 3 … 24
…
Channel 24
1 D4 Frame
Code
Line Trunk
Next Switch
• Proprietary Card Card
service
deployment
Line Trunk
Next Switch
Card Card
• Very
expensive
PSTN
4210
IXC LEC
212 555
(212) 555 4210
Rensselaer Polytechnic Institute Shivkumar Kalyanaraman
49
The PSTN – Call Routing
Both NANP and International Numbering Plan – E.164, use
prefix-based dialing
SS7
The first LEC receives a call, seeing ‘1’ as the first digit and then passing the call on to the
IXC switch. The IXC then routes the call to the remote IXC responsible for ‘212’
The ‘212’ IXC looks at the office code and passes it on to the ‘555’ LEC switch
The ‘555’ LEC switch then checks the station code and signals the appropriate phone
Rensselaer Polytechnic Institute Shivkumar Kalyanaraman
50
Telephone System Summary
Analog narrowband circuits: home-> central office
64 kb/s continuous transmission, with compression
across oceans
-law: 12-bit linear range -> 8-bit bytes
Everything clocked a multiple of 125 s
Clock synchronization framing errors
AT&T: 136 “toll”switches in U.S.
Interconnected by T1, T3 lines & SONET rings
Call establishment “out-of-band” using packet-
switched signaling system (SS7)
“Common Carrier”: provider offers conduit for a fee and does not
control the content
Customer controls content/destination of transmission & assumes
criminal/civil responsibility for content
UDP datagram
Source Destination
UDP length UDP checksum Data
Port Number Port Number
2 2 2 2 0-1472
Version &
header length Protocol
IP packet
Total Packet Flags & Header Source Destination Options
TOS TTL Data
Length ID Frag Offset Checksum Address Address (if any)
1 1 2 2 2 1 1 2 4 4 0-40 0-1480
IP IP IP “any packet”
RTP RTCP
SIP
TCP UDP
IP
LAN Interface
Like H.323, can use SIP end-to-end with no network infrastructure (MGC
etc.) – peer-to-peer
Lightweight can be embedded in small devices like handhelds
Transparently …
Rensselaer Polytechnic Institute Shivkumar Kalyanaraman
72
SIP as Event Notification Protocol
NetMeeting
sip323
Hardware
Internet (SIP)
sipc phones
ecse.rpi.edu
Software SIP
user agents
Rensselaer Polytechnic Institute Shivkumar Kalyanaraman
78
SIP Sessions
“Session”: exchange of data between an association of
participants
Users may move between endpoints
Users may be addressable by multiple names
Users may communicate in several different media
SIP: enables internet endpoints to
Discover each other
Characterize the session
Location infrastructure: proxy servers, invite/register…
Name mapping and redirection services
Add/remove participants from session
Add/remove media from session
Rensselaer Polytechnic Institute Shivkumar Kalyanaraman
79
SIP Capabilities
User location: determination of the end system to be used for
communication;
User availability: determination of the willingness of the
called party to engage in communications;
User capabilities: determination of the media and media
parameters to be used;
Session setup: "ringing", establishment of session parameters
at both called and calling party;
Session management: including transfer and termination of
sessions, modifying session parameters, and invoking services.
The layer above the transaction layer is called the transaction user (TU).
1&5
george.w.bush
dcheney@wh
tony@parliament.uk
4
dcheney@wh
2&6
4. SIP/2.0 100 OK
From: sip:president@us.gov Proxy server
3
5. ACK sip:president@us.gov SIP/2.0
From: sip:tony@parliament.uk
6. ACK sip:dcheney@wh SIP/2.0
From: sip:tony@parliament.uk
Rensselaer Polytechnic Institute Shivkumar Kalyanaraman
84
Redirect Server
us.gov
Location Server
george.w.bush
parliament.uk 1&3
dcheney@wh
2
tony@parliament.uk
dcheney@wh.us.gov
Redirect Server
4&6
5
1. INVITE sip:president@us.gov
From: sip:tony@parliament.uk
2. SIP/2.0 320 Moved temporarily 4. INVITE sip:dcheney@wh.us.gov
6. ACK sip:dcheney@wh.us.gov
Contact: sip:dcheney@wh.us.gov From: tony@parliament.uk From: sip:tony@parliament.uk
3. ACK sip:president@us.gov 5. SIP/2.0 200 OK
From: sip:tony@parliament.uk To: tony@parliament.uk
Assumes Endpoints(Clients)
know each other’s IP addresses
SIP SIP
Endpoint Gateway
Signaling Invite
SIP + SDP
Plane 180 Ringing
200 OK
(TCP or UDP)
Ack
RTP Stream
Bearer RTP Stream Media (UDP)
Plane RTCP Stream
Ethernet
Regular phone 5 3
(internal)
SIP server SQL
database
sipc sipd
Bob’s phone 4 7134 => bob
sipc sipd
2
Use sip:85551212@10.0.2.3
Dial 853-8119
Phone is ringing
Alice Bob
939-7063 .. The person is not available now 853-8119
please leave a message ...
... Your voice message ...
Disconnect
INVITE bob@phone1.office.com
phone1.office.com
INVITE
bob@office.com
REGISTER bob@vm.office.com
Alice
INVITE bob@vm.office.com
vm.office.com
The voice mail server registers with the SIP proxy, sipd
Alice calls bob@office.com through SIP proxy.
SIP proxy forks the request to Bob’s phone as well as to
a voicemail
Rensselaer server.
Polytechnic Institute Shivkumar Kalyanaraman
90
Voicemail Architecture Bob
phone1.office.com;
CANCEL
200 OK
Alice
200 OK
RTP/RTCP v-mail
vm.office.com;
After 10 seconds vm contacts the
SETUP
RTSP server for recording.
vm accepts the call.
Sipd cancels the other branch and ... rtspd
...accepts the call from Alice.
Now user message gets recorded
Rensselaer Polytechnic Institute Shivkumar Kalyanaraman
91
IETF SIP Architecture Tour: Roundup
Registrar & Proxy
System Management
Interface to • admission control
non-IP or H.323 *
• address
User Agent *User Agent *User Agent
translation/forwarding
*Endpoints
networks • Firewall bypassing
Conferencing does
not need another End-user devices
box (MCU) and network proxies
Stds Status • H.450.x series provides minimal feature • Few real end-device features
(end device) set only, and not implemented by many standard, and not implemented by
• Options and versions cause interop many
problems • Many options for advanced telephony
• Slow moving features
• Good velocity
Industry • Established now, primarily system level • Rapidly growing industry momentum,
Acceptance • Few H.323-based telephones at system and device level
• End-user primarily driven by Microsoft • Growing interest in SIP-phones and
(NetMeeting), Siemens, Intel soft clients
TCP UDP
IP
LAN Interface
Gatekeeper
Ca
g ll S
l in R
S na Ca etup AS
ig l ll C /Si
RA p/S ntro on g n a
etu Co tro
l
li n
g
ll
S all
Ca C
Voice Channel
Endpoint
Gateway
Rensselaer Polytechnic Institute Shivkumar Kalyanaraman
113
H.323 Model - Gatekeeper Direct Call
Gatekeeper
RAS RAS
Call Setup/Signaling
Call Control
Voice Channel
Endpoint
Gateway
Rensselaer Polytechnic Institute Shivkumar Kalyanaraman
114
H.323 Call Signaling
Assumes Endpoints(Clients)
know each other’s IP addresses
H.323 H.323
Setup
Endpoint H.225 (TCP) Gateway
Alerting
(Q.931)
Connect
RTP Stream
Bearer RTP Stream Media (UDP)
Plane RTCP Stream
*Multipoint Control
Unit (MCU)
Multipoint Multipoint
Controller Processor *Terminal *Terminal *Terminal
(MC) (MP)
*Multipoint Control
Unit (MCU)
Multipoint Multipoint
Controller Processor *Terminal *Terminal *Terminal
(MC) (MP)
2, 6, 10, 14
1, 5, 9, 13
Gatekeeper
132.177.120.5
223-2749 223-4211
10.0.0.5 192.168.0.3
4, 8, 12, 16 3, 7, 11, 15
2 Gatekeeper
132.177.120.5
223-2749 223-4211
3, 5, 7, 9
10.0.0.5 192.168.0.3
4, 6, 8, 10
4. Connect 9. ACK
5. TCS media: G.711/30ms, G.729/30ms 10. ACK
6. TCS media: G.729/20ms, G.723
7. Open Channel G.729/30ms, 10.0.0.5:6400
8. Open Channel G.729/20ms, 192.168.0.3:2300
RTP RTCP
Megaco
TCP UDP
IP
LAN Interface
Diameter
Industry
PacketCable Defacto
IPDC NCS Std.
MGCP
Call Model Event Packages
Termination + Connection
P2P Single Media
(MGCP)
Media Session Description
Bold entries indicate
Single Media Conferencing SDP additional features in
Terminations Protocol Encoding
Physical & Ephemeral Text Megaco vs. MGCP
Command Grouping Transport
Ad hoc Embedding UDP
Event
Quarantine
Gateway
Media Gateway Controller Media Gateway Control Layer (MGC)
PSTN, Endpoint
Function
• Contains all call control intelligence
• Implements call level features (forward,
ATM,
Megaco Protocol transfer, conference, hold, …)
etc
(e.g..H.323
PSTN (e.g..
trunking H.323Gateway,
Gateway, Media Gateway Control Protocol
trunks Media Gateway Megaco Scope • Master / slave control of MGs by MGCs
Terminal, MCU)
Terminal, MCU) – Connection control
– Device control and configuration
lines PSTN line • Orthogonal to call control protocols
Media Gateway
Media Gateway Layer (MG)
Analog • Implements connections to/from IP cloud
Media Gateway
(through RTP)
• Implements or controls end device features
IP Phone (including UI)
Media Gateway • No knowledge of call level features
Media GW Controller
Reply: Notify
Reply: Add
Phone Rings
Modify: ip of MG2, ringback
Hears Ring Reply: Modify Notify: Off-hook
Off-Hook
Reply: Notify
M
interoperable t
ed
on
In theory the RTP
i
C
a,
ey stream should go
Voice (RTP)
k
CD
oft direct phone<-
,
S
So
, >GW, but many
D Vo
ftk
LC ic today tandem
e
, e
ia
y
)
TP
ed (R
Co
through the MGC
(R
M TP
nt
)
ro
e
ic
l
Vo
Voice (RTP)
IP Phone IP Phone
Media Gateway Media Gateway
Rensselaer Polytechnic Institute Shivkumar Kalyanaraman
131
Vendor Support for Standards
VoIP Protocol Support
H.323 V1 73
77
H.323 V2 26
57
H.323 other versions 17
32
SIP (orig. RFC 2543) 40
66
SIP (Latest spec) 30
81
MGCP (orig. RFC2705) 42
56
MGCP (latest spec) 30
54
H.248 (Megaco) 11
64
Other 22
30
0 10 20 30 40 50 60 70 80 90
Master/Slave
MGCP
User A
Rensselaer Polytechnic Institute Shivkumar Kalyanaraman
For examples of gateways see RFC 3435
134
Softswitch: Motivation
Class-4/5 switches bulky,
expensive. Incentive to switch
PSTN
to cheaper easily managed IP
Class 4
Class 5 switch
Voice
switch Class 5
switch
Users ISDN Switch Users
The MGC which does the call control and is the brain of the system is
usually referred to as the softswitch or call agent
The gateways are dumb devices which do whatever MGC instructs them to
do
MGC therefore does
Call setup, state maintenance, tear-down
Megaco was an earlier non-standard framework which was later
standardized jointly by ITU and IETF as MGCP
Application
Server
• Connections (call setup
and teardown)
Media Gateway
• Events (detection and Controller
processing)
Signaling
• Device management Gateway
(gateway startup,
Media
shutdown, alerts) Gateway
PSTN/
End users
packets
• Convert IP packets to Media Gateway
Controller
PSTN
• In-band event detection Signaling
and generation Gateway
SIP-T, Q.931…)
Media
Gateway
• Extremely secure
• Extremely fault tolerant PSTN/
End users
Media
Gateway
PSTN/
End users
LDAP
Connectivity Server
SIP,Parlay,JAIN
Sigtran w/SCTP
Signaling
Gateway
H.248,MGCP
Media
Gateway
PSTN/
End users
PSTN/ PSTN/
End users End users
Note: (1) 26-bytes Ethernet overhead was removed for WAN calculation.
(2) No backbone protocol overhead was used for WAN bandwidth.
(3) This is per voice direction, so multiply by 2 if on a shared (half-duplex) media
(4) No Ethernet Interframe Gap was included (another 12 bytes)
UDP datagram
Source Destination
UDP length UDP checksum Data
Port Number Port Number
2 2 2 2 0-1472
Version &
header length Protocol
IP packet
Total Packet Flags & Header Source Destination Options
TOS TTL Data
Length ID Frag Offset Checksum Address Address (if any)
1 1 2 2 2 1 1 2 4 4 0-40 0-1480
UDP Datagram 2 2 2 2 12 80
Source
Length
Checksum RTP Header Voice Payload
Destination
IP Packet Header 12 4 4 8 12 80
Source
Type UDP Header RTP Header Voice Payload CRC.
Destination
IP into ATM 5 48 + 5 48 + 5 24 16 8
IP Payload IP Payload IP Payload
Header Header Header Padding Trailer
UDP Datagram 2 2 2 2 12 30
Source
Length
Checksum RTP Header Voice Payload
Destination
IP Packet Header 12 4 4 8 12 30
Source
Type UDP Header RTP Header Voice Payload CRC.
Destination
IP into Ethernet 6 6 2 70 4
8
Preamble Source IP Payload
IP into ATM 5 48 + 5 22 18 8
IP Payload IP Payload
Header Header Padding Trailer
UDP Datagram 2 2 2 2 12 20
Source
Length
Checksum RTP Header Voice Payload
Destination
IP Packet Header 12 4 4 8 12 20
Source
Type UDP Header RTP Header Voice Payload CRC.
Destination
IP into Ethernet 6 6 2 60 4
8
Preamble Source IP Payload
IP into ATM 5 48 + 5 12 28 8
IP Payload IP Payload
Header Header Padding Trailer
ans
ans
CO
Sigtr
Sigtr
Virtual Switch
Trunk Gateway
D-channel Signalling Gateway Sigtrans SIP, H.323
PRI Media Gateway
B-channels Megaco/
H.248 Media GW
PBX Virtual
Controller Switch
6 - Presentation
5 - Session User Adaptation Modules
4 - Transport SCTP
3 - Network IP
2 - Link MLPPP / FR / ATM
1 -Institute
Rensselaer Polytechnic Physical Shivkumar Kalyanaraman
Ethernet / SONET/Serial
181
(1) SS7 Signaling Using IP Transport
Applications Applications
STP
TCAP TCAP
ISUP ISUP
SCCP SCCP
M2UA M2UA
MTP2 MTP2 SCTP SCTP
IP IP
ISUP ISUP
SCTP SCTP
MTP2 MTP2
IP IP
PSTN PSTN
TDM TDM
Data Network
POP3
Email
VPIM Browser
PBX SIP/H.323
Plain
Unified Unified
Phone
Messaging Messaging
System System SIP
Device
Rensselaer Polytechnic Institute Shivkumar Kalyanaraman
185
TRIP – Telephony Routing over IP
TRIP is a protocol for advertising the reachability of telephony
destinations between location servers, and for advertising
attributes of the routes to those destinations.
1&5
george.w.bush
dcheney@wh
tony@parliament.uk
4
dcheney@wh
2&6
4. SIP/2.0 100 OK
From: sip:president@us.gov Proxy server
Firewall 3
5. ACK sip:president@us.gov SIP/2.0
From: sip:tony@parliament.uk
6. ACK sip:dcheney@wh SIP/2.0 3.5 Midcom Protocol
From: sip:tony@parliament.uk
Rensselaer Polytechnic Institute Shivkumar Kalyanaraman
187
Mediation and Billing
Current State
H.323
H.323
SIP H.248, SIP, H.323
Stimulus
SIP, H.323
RTP
RTP
RTP
RTP