Professional Documents
Culture Documents
Type of business:
• Enterprise?
• System integrator? reseller?
• Government?
• Other?
SIP experience?
• I know how to spell it
• Worked with it a bit
• Wrote several of the SIP RFCs
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
About Dan York
www.ietf.org
www.voxeo.com
www.sipforum.org
blogs.voxeo.com/speakingofstandards
www.disruptivetelephony.com www.7ducattacks.com
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
About Voxeo
Founded in 1999
World’s largest hosted VoiceXML and CCXML platform – Over
82,000 hosted ports globally; hundreds of premise deployments
Over 100,000 developers using Voxeo platforms
The Voxeo difference: Unlocked Communications, Customer
Obsession Teams, Communications Passion
Services/software available for free: www.voxeo.com/free
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Voxeo - Built for VoIP Since Day One
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Voxeo: Design Once − Deploy Anywhere
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
A Quick Background
Some (brief!) Background on VoIP
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Circuit Switched Network
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Packet Switched Network
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Public Switched Telephone Network (PSTN)
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Today...
ITSP
ITSP
ITSP
ITSP
ITSP
ITSP
ITSP
ITSP
Internet
ITSP
ITSP ITSP
Telephony
Service
Provider ITSP
ITSP
ITSP
ITSP ITSP
ITSP
ITSP
ITSP
ITSP
ITSP ITSP
ITSP ITSP ITSP ITSP ITSP
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Traditional Telephony
1.1
PSTN
PBX
Gateways
Physical
Voicemail
Wiring
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
VoIP and Unified Communications
1.2
Mobile
Devices
IM Application
Internet Servers
Networks
Operating
Systems
PSTN
IP-PBX VoIP
Gateways
Web IP Social
Firewalls
Servers Network Networks
Physical Directory
Voicemail
Wiring Servers
Desktop
Email PCs Database
Servers CRM Servers
Systems
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
VoIP Protocols
H.323
• ITU defined VoIP protocol
• ITU is very formal, government oriented
• More “telephony” in nature than Internet
SIP
• IETF (Internet Engineering Task Force) defined
protocol for general multimedia session establishment
• IETF is much less formal, individual oriented
• More “Internet” in nature than telephony
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
H.323 vs. SIP
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
SIP Basics
SIP
Session Initiation Protocol
Allows for IPv4 and IPv6 (Next generation mobile phones use SIP over
TCP/IPv6)
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
SIP
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Why is SIP Important?
It’s all about standards
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Major Components of SIP
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
User Agents
SIP Proxy
• Often what is sold as a proxy is really a Proxy/Registrar/
Redirect server
• Proxy is often part of IP-PBX, “call server”, etc.
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Basic SIP Call Flow
3.1
Proxy
SIP SIP
Alice Bob
Media
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
SIP & Media Paths
SIP SIP
Proxy Proxy
A SIP B
SIP SIP
Alice Bob
Media (RTP, MSRP, etc.)
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Proxy
Bob is over at
bob-isp.com.
I’ll proxy the
call over there!
sip.bob-isp.com
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Registration
sip.cogentforce.com
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Registration
SIP
Registrar
1
SIP
2
SIP SIP
Proxy Proxy
A SIP B
SIP SIP
Alice Bob
Media (RTP, MSRP, etc.)
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Redirection
“I need to
call Bob!”
sip.cogentforce.com
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
The Simple Picture
SIP SIP
Proxy Proxy
A SIP B
SIP SIP
Alice Bob
Media (RTP, MSRP, etc.)
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
The Complex Reality
Media Media
Alice Proxy Proxy Bob
Media A Media B Media
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
SIP Messages
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
SIP Messages
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Registration Call Flow
SIP Server
REGISTER
401 Unauthorized
REGISTER
200 OK
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Basic Call Flow
SIP Server
INVITE
INVITE
100 Trying
180 Ringing
180 Ringing
200 OK
200 OK
ACK
ACK
Bi-directional Media between endpoints
BYE
BYE
200 OK
200 OK
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
No-answer Call Flow
SIP Server
INVITE
INVITE
100 Trying
180 Ringing
180 Ringing
CANCEL
200 OK
CANCEL
200 OK
487 Request Terminated
487 Request Terminated
ACK
ACK
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
AORs and Contacts
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Registration, revisited
192.168.0.1
Registrar
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Registration, revisited
Registrar
10.0.1.1
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
INVITE message
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
INVITE message
INVITE sip:bob@bigcompany.com SIP/2.0
SIP request, method is INVITE, target is an AoR (for Bob)
Via: SIP/2.0/TCP aliceua.phonecompany.com:5060
Via header tracks where it has been (more on this later)
From: Alice <sip:alice@phonecompany.com>; tag=ss95cbav
Message is from Alice, and this is the SIP URL for Alice. The tag is unique
to this call and selected by Alice’s UA
To: Bob <sip:bob@bigcompany.com>
Alice is trying to contact Bob at his SIP URL (a tag will be selected by
Bob’s UA later
Call-ID: 3848276298220188511@aliceua.phonecompany.com
Call-ID is a unique ID to track this particular call (selected by Alice’s UA)
CSeq: 1 INVITE
Used to track which responses go with which messages. Responses to
this invite will also have a CSeq of 1 INVITE
Max-Forwards: 10
Used in routing (more on this later)
Contact: <sip:alice@aliceua.phonecompany.com;transport=tcp>
How to contact Alice directly. Notice this is a contact (has a host)
…snip…
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Calls and Dialogs
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Transaction
A transaction defines a particular operation that is
carried out between the endpoints
• Example: (INVITE) Set up the call, (BYE) end the call
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Dialogs and Transactions
SIP Server
INVITE
INVITE
100 Trying
Transaction 1
180 Ringing
180 Ringing
200 OK
Dialog/Call
200 OK
ACK
ACK
Bi-directional Media between endpoints
Transaction 2
BYE
BYE
200 OK
200 OK
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Routing
The Complex Reality
Media Media
Alice Proxy Proxy Bob
Media A Media B Media
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Routing
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
INVITE message
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
INVITE message
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Routing Responses
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
INVITE message
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Record Route
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Forking
Forking
Can combine
• Ring desk phone and mobile, then VM if no answer
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Parallel Forking
time a
SIP Server Desk Phone
Caller time a
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Sequential Forking
time a
SIP Server Desk Phone
Caller time b
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Parallel & Sequential Forking
Desk Phone
time a
Mobile Phone
Caller
time b
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
SIP Trunking & PSTN Interconnection
Gateways
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Gateway example
SIP Server
Gateway
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
SIP Trunking
Internet
Carrier PSTN
PBX
Corp HQ
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
SIP Trunking
ITSP
Internet
PBX
PSTN
Corp HQ
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
SIP Trunking – Multiple ITSPs
ITSP 1
Internet
PBX
ITSP 2
PSTN
Corp HQ
ITSP 3
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
SIP Trunking - Failover
PBX
ITSP
Corp HQ
Internet PSTN
PBX
Office
A
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
SIP Trunking - Geography
ITSP
(Boston)
Internet
PBX ITSP
(Paris)
PSTN
Corp HQ
ITSP
(Tokyo)
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
SIP Trunking - SIPconnect
Initiative of the
SIP Forum to increase
interoperabilty between on-premise systems
and SIP service providers
http://www.sipforum.org/sipconnect
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
The Many Protocols Used In SIP
The (Many) Protocols in a “SIP” Call
UA UA
SIP Server
SIP/SDP SIP/SDP
Media (RTP/RTCP)
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
SIP, SDP, and RTP
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Codecs (encoding)
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
SDP/RTP
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
INVITE message
v=0
o=CogentForce-UA 10010 605 IN IP4 aliceua.phonecompany.com
s=SIP Call
c=IN IP4 192.0.1.1
t=0 0
m=audio 49172 RTP/AVP 0 8 16
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
INVITE message
<snip!>
Content-Type: application/sdp
Content-Length: 134
The content of the message is SDP – to describe the media of the
call. We have 134 bytes of SDP
v=0
v is the SDP version number -- 0
o=CogentForce-UA 10010 605 IN IP4 aliceua.phonecompany.com
o is a description of the UA and a session ID
s=SIP Call
s is an string to encode a name for this session
c=IN IP4 192.0.1.1
c tells the other side what address to send the media to
t=0 0
t indicates start and end times. 0 and 0 don’t specify times in advance
m=audio 49172 RTP/AVP 0 8 16
m describes the media. We are listening for audio of type
RTP/AVP on port 49172
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Offer/Answer
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Instant Messaging / SIMPLE
Instant Message and Presence
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Instant Message and Presence
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Extending SIP
SIMPLE isn’t the only extension
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
NAT / Firewall Traversal
NAT/FW Traversal
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Firewalls and Media
A UA Contacts
another UA (or a
proxy), sending SIP
messages.
The process of
sending the
message (on most
NATs/FWs) creates
a mapping that
allows responses to
reach the sender
SIP
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Firewalls and Media
Media (RTP) is on a
different port
(different opening in
the FW) than SIP
It is possible that at
the time the media
is sent, it is rejected
by the firewall
RTP
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
NAT/FW Traversal
Several Solutions
• IETF efforts
• STUN, TURN and ICE
• Query outside servers to find out “public” address
• Can use media relays to help get media between two hosts
behind firewalls
• Session Border Controllers (SBCs)
• Sit near (or in) the firewall/NAT, rewrite the internals of the
packets, work with firewall to open ports
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Session Border Controllers
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Session Border Controller
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Peer-To-Peer SIP
Peer-to-Peer (P2P) SIP
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Client/Server Session
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
P2P Session
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Distributed Systems
Home Teleworkers
7.1
PC
UC Home
System
Firewall Internet Firewall
IP
Corp HQ Phone
Home
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Mobile Workers
Laptop
UC
client
WiFi
UC
System
Firewall Internet Café
Router
Corp HQ
Mobile
Data
Network Mobile
UC
client
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Intra-company and Cloud
Corporate
Internet
Network
IVR Voicemail
IM IM IM
PSTN
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Inter-company Federation
Internet
Corporate Corporate
Network Network
UC UC UC UC
System System System System
Company A Company B
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Resources
Some Good SIP Webpages
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Books on SIP
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation
Acknowledge/Thanks
©© Voxeo
Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org)
Corporation