sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
Post on 08-Apr-2018
218 Views
Preview:
TRANSCRIPT
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
1/100
SIP FundamentalsVoiceCon Orlando 2010
Dan York, Director of Conversations, Voxeo
March 23, 2010
With thanks to David Bryan of Cogent Force
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
2/100
Quick Survey Who Are You?
Type of business:
Enterprise?
System integrator? reseller?
Government?
Other?
Have a SIP system today? Considering one?
SIP experience?
I know how to spell it
Worked with it a bit
Wrote several of the SIP RFCs
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
3/100
www.7ducattacks.com
About Dan York
blogs.voxeo.com/speakingofstandards
www.ietf.org
www.voxeo.com
www.sipforum.org
www.disruptivetelephony.com
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
4/100
About Voxeo
Founded in 1999
Worlds largest hosted VoiceXML and CCXML platform Over82,000 hosted ports globally; hundreds of premise deployments
Over 100,000 developers using Voxeo platforms
The Voxeo difference: Unlocked Communications, CustomerObsession Teams, Communications Passion
Services/software available for free: www.voxeo.com/free
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
5/100
Voxeo - Built for VoIP Since Day One
100% SIP VOIP-basedcommunications applicationplatform
Built from the ground up; nativelySIP-based
Other XML IVR platforms were builton a CT card-centric model with SIPadded afterwards as a virtual oremulated CT card
Works with the widest variety ofSIP providers, gateways,softphones and adapters
SIPMethod SIP Servlets Platform
IM, Presence, Session BorderController
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
6/100
Voxeo: Design Once Deploy Anywhere
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
7/100
A Quick Background
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
8/100
Some (brief!) Background on VoIP
Packet Switched, not Circuit switched
There is no dedicated path that traffic follows
Segmented into IP packets, sent to target, particularpath not specified
Original telephone network was circuit switched(think of the operator w/wires)
SS7, defined by the ITU (International
Telecommunications Union)
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
9/100
Circuit Switched Network
There is a dedicated, fixed line (usually
physically connected) between parties, andreserved for their use
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
10/100
Packet Switched Network
There is no physical connection. The call is
chopped into packets, which are sent overa network of devices, perhaps using
different paths
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
11/100
Public Switched Telephone Network (PSTN)
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
12/100
ITSP
PSTN
InternetTelephony
ServiceProvider
ITSPITSP
ITSP
ITSPITSPITSP
ITSP
ITSP
ITSP
ITSP
ITSP
ITSP
ITSP
ITSP
ITSP
ITSP
ITSP
ITSP
ITSP
ITSP
ITSP
ITSP
ITSP ITSP
ITSP
ITSP
ITSP
ITSPITSP
ITSP
ITSP
ITSP
ITSP
Today...
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
13/100
PBX
VoicemailPhysical
Wiring
PSTN
Gateways
1.1Traditional Telephony
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
14/100
Physical
Wiring
IP
Network
IP-PBX
Voicemail
PSTN
Gateways
Mobile
Devices
IM
Networks
Web
Servers
Email
Servers
Desktop
PCs
Operating
Systems
Firewalls
Internet
Directory
Servers
VoIP
CRM
Systems
Social
Networks
Database
Servers
1.2
Application
Servers
VoIP and Unified Communications
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
15/100
VoIP Protocols
H.323 ITU defined VoIP protocol
ITU is very formal, government oriented
More telephony in nature than Internet
SIP IETF (Internet Engineering TaskForce) defined
protocol for general multimedia session establishment
IETF is much less formal, individual oriented
More Internet in nature than telephony
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
16/100
H.323 vs. SIP
Feature H.323 SIP
Encoding Binary Text
Control Centralized server Endpoints (using
proxy)Intelligence Most in central server;
core
Most in the
endpoints; edge
Modularity Monolithic (all in one
server)
Can be multiple
servers
Defined by ITU IETF
Media RTP RTP
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
17/100
SIP Basics
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
18/100
SIP
Session Initiation Protocol
Defined (mostly) in IETF RFCs 3261-3264
Many other drafts extend SIP and add newfeatures
Text based, very similar to HTTP, mail protocols
Establishes a media sessionbetween endpoints
Allows mobility locate users using a SIP URI (sip:dyork@voxeo.com)
Multiple endpoints can be associated with single SIP URI
Usually runs on port 5060, using UDP or TCP
Allows for IPv4 and IPv6 (Next generation mobile phones use SIP overTCP/IPv6)
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
19/100
SIP
Offers Event management (Subscribe/Notify)for presence etc.
Extended by SIMPLE to support IM (Instant
Messaging)
Designed to allow easy interoperation withother Internet features such as WWW and
email
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
20/100
Why is SIP Important?
Its all about standards
The promise of interoperable equipment
A Nortel phone talking to a Cisco proxy toreach another user with an Avaya phone
Designed for the future
Any media (voice, video, text, ???)
Internet/endpoint centric design
Easily extensible
SIP has become the dominant VoIP
protocol
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
21/100
Major Components of SIP
SIP systems specify components logically
There are several components specified UA(User-Agent, Endpoint) the phone or application
Registrar keeps track of where the user is within asystem
Redirect Server used to inform devices when they needto contact different locations
Proxy Server used to relay messages back and forth
within the system
In practice, several logicalfunctions may actuallyreside in the same physicalserver/program
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
22/100
User Agents
A User Agent (also called a UA, Phone, orEndpoint) represents a user of a SIP system A particular user may have more than one UA
Can be hard device (fixed or mobile) or a soft client an application running on a PC
Soft ClientHard Phone Mobile Hard Phone
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
23/100
UAs and Proxies
Many things are really built on UAs Session Border Controllers are usually 2 UAs connected
B2BUA or Back-to-Back User Agent
(sometimes also an ALG -- special kind of firewall)
Voice mail servers
Interactive Voice Response systems
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.
Softswitch often incorporates allof this
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
24/100
Proxy
Alice
3.1
BobMedia
SIPSIP
Basic SIP Call Flow
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
25/100
SIP
Proxy
A
Alice BobMedia (RTP, MSRP, etc.)
SIPSIP
SIP
Proxy
BSIP
SIP & Media Paths
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
26/100
Proxy
sip.bob-office.com
sip.bob-isp.com
I need to call Bob!
Call here for
Bob from Alice
Call for you
from Alice!
Bob is over at
bob-isp.com.Ill proxy the
call over there!
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
27/100
Registration
Im Alice, and Ill be using a
phone at 192.168.0.1 today!
192.168.0.1 Registrar
sip.cogentforce.com
When I get a
call for Alice, Illknow to
contact her at192.168.0.1!
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
28/100
SIP
Proxy
A
Alice BobMedia (RTP, MSRP, etc.)
SIPSIP
SIP
Proxy
BSIP
SIPRegistrar
SIP1
2
Registration
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
29/100
Redirection
sip.cogentforce.com
sip.bob-office.com
I need to
call Bob!
Call here for
Bob from Alice
Call for youfrom Alice!
sip.bob-isp.com
Try him at
bob-isp.com
Call here
for Bobfrom Alice
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
30/100
SIP
Proxy
A
Alice BobMedia (RTP, MSRP, etc.)
SIPSIP
SIP
Proxy
BSIP
The Simple Picture
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
31/100
Internet (or WAN)
Alice Bob
Media
SIPSIP
SIPProxy
A SIP
SIPProxy
B
SIPProxy
N
SIPProxy
D SIP
SIPProxy
CSIP SIP
Media
Proxy
A
Media
Proxy
BMedia Media
The Complex Reality
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
32/100
SIP Messages
SIP messages fall into two types requestsandresponses
Requests include a method telling what it is theyare doing.
REGISTER, to register where to contact a user
INVITE, to start a new session (call)
BYE, to end a session that is established
CANCEL, to end a session that is still being set up (no
final response yet) ACK, part of the triple handshake
Several others
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
33/100
SIP Messages
Responses are numeric, much like HTTP
1xx Provisional 100 Trying, 180 Ringing
2xx Successful 200 OK 3xx Redirection 301 Moved Permanently, 302
Moved Temporarily
4xx Failure 404 Not Found, 410 Gone, 403Forbidden
5xx Server Failure 503 Service Unavailable
6xx Global Failure 600 Busy Everywhere
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
34/100
Registration Call Flow
SIP Server
REGISTER
401 Unauthorized
REGISTER
200 OK
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
35/100
Basic Call Flow
SIP Server
INVITEINVITE
100 Trying
180 Ringing 180 Ringing
200 OK
200 OK
ACKACK
BYEBYE
Bi-directional Media between endpoints
200 OK200 OK
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
36/100
No-answer Call Flow
SIP Server
INVITEINVITE
100 Trying
180 Ringing 180 Ringing
487 Request Terminated487 Request Terminated
ACKACK
CANCEL
200 OK
CANCEL
200 OK
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
37/100
AORs and Contacts
In SIP, a registrar maps between an AoR and acontact
AoR: Address ofRecord
Permanent, something on your business card Not tied to a specific device
sip:dyork@voxeo.com
Contact
Ephemeral, tied to a device
sip:dyork@pc141.voxeo.com
Being able to change AoRContact mapping allowsmobility
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
38/100
Registration, revisited
Im Alice (alice@phonecompany.com), and
Ill be using a phone at 192.168.0.1 today!
Registrar
AoR Contact Map:
alice@phonecompany.com alice@192.168.0.1
192.168.0.1
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
39/100
Registration, revisited
Registrar
AoR Contact Map:
alice@phonecompany.com alice@10.0.1.1
10.0.1.1
Lunch time! Mobile Time!
(alice@phonecompany.com)will be using 10.0.1.1 now!
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
40/100
INVITE message
INVITE sip:bob@bigcompany.com SIP/2.0
Via: SIP/2.0/TCP aliceua.phonecompany.com:5060
From: Alice ;tag=ss95cbav
To: Bob
Call-ID: 3848276298220188511@aliceua.phonecompany.com
CSeq: 1 INVITEMax-Forwards: 10
Contact:
snip!...
(Alice is going to call Bob)
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
41/100
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 ; tag=ss95cbav
Message is from Alice, and this is the SIP URL for Alice. The tag is unique
to this call and selected by Alices UA
To: Bob Alice is trying to contact Bob at his SIP URL (a tag will be selected byBobs UA later
Call-ID: 3848276298220188511@aliceua.phonecompany.com
Call-ID is a unique ID to track this particular call (selected by Alices UA)CSeq: 1 INVITE
Used to track which responses go with which messages. Responses to
this invite will also have a CSeq of 1 INVITEMax-Forwards: 10
Used in routing (more on this later)Contact:
How to contact Alice directly. Notice this is a contact (has a host)snip
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
42/100
Calls and Dialogs
Acallis an informal term for communicationbetween two devices
Adialogis a more specific term, which defines a
relationship between two UAs for a duration In many ways, this is what most people would think
of as a call
Defined by Call-ID, To tag, and From tag
Sender selects Call-ID, and From tag
Reciever selects To tag
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
43/100
Transaction
Atransactiondefines a particular operation that iscarried out between the endpoints Example: (INVITE) Set up the call, (BYE) end the call
Includes all responses (including the ACK)
May be several transactions within a dialog
Each transaction uses a new CSeq Command Sequence
Chosen by the initiator of the transaction
Each side must increase the CSeq for each newtransaction they initiate no specified starting point
But since some transactions are initiated by each side,within a call it might look out of order
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
44/100
Dialogs and Transactions
SIP Server
INVITEINVITE
100 Trying
180 Ringing 180 Ringing
200 OK
200 OK
ACKACK
BYEBYE
Bi-directional Media between endpoints
200 OK200 OK
Tra
nsaction1
Transaction2
Dialog/Call
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
45/100
Routing
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
46/100
Internet (or WAN)
Alice Bob
Media
SIPSIP
SIPProxy
ASIP
SIPProxy
B
SIPProxy
N
SIPProxy
DSIP
SIPProxy
CSIP SIP
Media
Proxy
A
Media
Proxy
BMedia Media
The Complex Reality
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
47/100
Routing
Each entity forwards message along path toreach destination Places next destination into Request-URI (top line)
Adds themselves as another Via
Max-Forwards is decremented to prevent loops andlimit the length of path
if it reaches 0, the message isnt forwarded again
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
48/100
INVITE message
INVITE sip:bob@bigcompany.com SIP/2.0
Via: SIP/2.0/TCP aliceua.phonecompany.com:5060
From: Alice ;tag=ss95cbav
To: Bob
Call-ID: 3848276298220188511@aliceua.phonecompany.com
CSeq: 1 INVITEMax-Forwards: 10
Contact:
snip!...
Lets see what happens as this messagepasses through the big company proxy on the
way to Bob
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
49/100
INVITE message
INVITE sip:bob@bobua.bigcompany.com SIP/2.0
Via: SIP/2.0/TCP proxy.bigcompany.com:5060
Via: SIP/2.0/TCP aliceua.phonecompany.com:5060
From: Alice ;tag=ss95cbav
To: Bob
Call-ID: 3848276298220188511@aliceua.phonecompany.comCSeq: 1 INVITE
Record-Route:
Max-Forwards: 9
Contact:
snip!...
Notice the new URI, added VIA, anddecremented Max-Forwards. This message is
forwarded to Bobs UA.
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
50/100
Routing Responses
When Bobs UA responds, it unrolls the Viaheaders to decide where to route the responses
The response traces the path back, sending the
response to the Via address of the entity thatsent the message (responding!)
That entity removes itself from the Via andpasses the message along, unrolling until it
reaches the sender
Notice that the proxy needs no state here
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
51/100
INVITE message
INVITE sip:bob@bobua.bigcompany.com SIP/2.0
Via: SIP/2.0/TCP proxy.bigcompany.com:5060
Via: SIP/2.0/TCP aliceua.phonecompany.com:5060
From: Alice ;tag=ss95cbav
To: Bob
Call-ID: 3848276298220188511@aliceua.phonecompany.comCSeq: 1 INVITE
Record-Route:
Max-Forwards: 9
Contact:
snip!...
But one more here. What is record route?
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
52/100
Record Route
Once a UA has the address of the other UAin the call, new messages can be sentdirectly between devices if they wish
Record route is a way for a proxy to requestkeep me in the loop Ensures that future transactions include this proxy,
rather than going directly to the other UA
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
53/100
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
54/100
Forking
While somewhat complicated, many featuresrequire forking
Send a message to more than one entity Need totrack (and manage both sides)
Parallel forking (send to more than one at a
time) Ring both desk and mobile at once, cancel the call
to whichever fails to pickup
Can also use redirection (sequential)
Ring desk phone, then try mobile if no answer
Can combine
Ring desk phone and mobile, then VM if no answer
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
55/100
Parallel Forking
SIP Server Desk Phone
Caller
Mobile
time a
time a
Two devices are tried at the sametime, time a
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
56/100
Sequential Forking
SIP Server Desk Phone
Caller
Voice Mail
time a
time b
One device is tried at time a, thenanother at time b
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
57/100
Parallel & Sequential Forking
SIP Server
Desk Phone
Caller
Voice Mail
time a
time b
Several devices are tried inparallel at time a, then forked to
another at time b
Mobile Phone
time a
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
58/100
SIP Trunking & PSTN Interconnection
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
59/100
Gateways
How about connecting to the outside world? If you want to talk to another SIP user, your proxy
may know how to contact that users proxy directly,and the call is all SIP
To call out to a regular phone (or to have calls comein) you use a gateway. It connects to one or moreregular phone lines to let you receive and place callsto old fashioned Plain Old TelephoneService (POTS)
Can also gateway between SIP and other protocolssuch as H.323, or to networks such as Skype
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
60/100
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
61/100
SIP Trunking
Instead of using a local gateway, use SIP toconnect to a remote gateway at a:
Internet Telephony Service Provider (ITSP)
SIP Service Provider
(other names)
Create a SIP Trunk out to remote system
NOT a physical connection like a TDM trunk. Purely a
virtual connection from your premise system to the IPaddress of the ITSP.
Can be over public Internet or over WAN, dedicatedlines or VPN
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
62/100
PBX
Corp HQ
Carrier PSTN
Internet
Trunking before SIP
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
63/100
PBX
Corp HQ
ITSP
Internet
PSTN
SIP Trunking
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
64/100
PBX
Corp HQ
PSTN
ITSP 1
InternetITSP 2
ITSP 3
SIP Trunking Multiple ITSPs
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
65/100
PBX
Corp HQ
ITSP
Internet PSTN
PBX
Office
A
SIP Trunking - Failover
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
66/100
PBX
Corp HQ
PSTN
ITSP(Boston)
InternetITSP(Paris)
ITSP(Tokyo)
SIP Trunking - Geography
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
67/100
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
68/100
The Many Protocols Used In SIP
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
69/100
Media (RTP/RTCP)
The (Many) Protocols in a SIP Call
SIP ServerSIP/SDP SIP/SDP
UA UA
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
70/100
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
71/100
Codecs (encoding)
The media that flows using RTP is encodedusing a codec
Codec is about how the audio has beenconverted to packets Example: g.711, g.729, GIPS
In general, higher quality = more network bandwidth
Codec to be used, and any parameters to be used aredescribed in SDP
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
72/100
SDP/RTP
Both of these are older IETF protocols used bySIP IETF tries to promote reuse whenever possible
Session Description Protocol Used by SIP to describe the media format, encoding,
destination, etc.
Included in SIP message as a payload
Real-time Transport Protocol Used to transport the encoded media across the wire
Can be used for media other than voice
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
73/100
INVITE message
INVITE sip:bob@bigcompany.com SIP/2.0
Via: SIP/2.0/TCP aliceua.phonecompany.com:5060From: Alice ; tag=ss95cbav
To: Bob Call-ID: 3848276298220188511@alicaua.phonecompany.com
CSeq: 1 INVITE
Contact: Content-Type: application/sdp
Content-Length: 134
v=0
o=CogentForce-UA 10010 605 IN IP4 aliceua.phonecompany.coms=SIP Call
c=IN IP4 192.0.1.1t=0 0
m=audio 49172 RTP/AVP 0 8 16
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
74/100
INVITE message
Content-Type: application/sdpContent-Length: 134
The content of the message is SDP to describe the media of thecall. We have 134 bytes of SDP
v=0
v is theSDP version number -- 0o=CogentForce-UA 10010 605 IN IP4 aliceua.phonecompany.com
o is a description of the UA and a session IDs=SIP Call
s is an string to encode a name for this session
c=IN IP4 192.0.1.1c tells the other side what address to send the media to
t=0 0t indicates start and end times. 0 and 0 dont specify times in advance
m=audio 49172 RTP/AVP 0 8 16
m describes the media. We are listening for audio of typeRTP/AVP on port 49172
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
75/100
Offer/Answer
Different UAs may support different codecs
Calling UA lists what it supports and is willing touse in the INVITE message SDP
Called UA responds with the subset of that it iswilling to use in the response SDP (200 OK)
If nothing in common, cant communicate andcall is rejected
Mechanisms exist to change this mid call (forexample, switching from audio to video)
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
76/100
Instant Messaging / SIMPLE
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
77/100
Instant Message and Presence
SIP has a set of extensions calledSIMPLE SIMPLE: SIP for Instant Messaging
(IM) and Presence LeveragingExtensions
Send text messages between devices
Can switch between text and voice
session is all SIP
Presence (ability to see status of
other user) is also supported (andpersistent on server)
Idle, Offline, Available, Busy, Offlinetill Monday
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
78/100
Instant Message and Presence
MESSAGE method used to send textmessages
SUBSCRIBE to express an interest,
subscribe to someones status
PUBLISH to change your status on thepresence server
NOTIFY is send from server to those whohave subscribed
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
79/100
Extending SIP
SIMPLE isnt the only extension
SIP was designed from the beginning to be highly extensible
Can add new methods, new responses, headers
Groups in the RAI (Realtime Applications and Infrastructure)area at IETF determine what is really an accepted standardextension
SIPCORE, DISPATCH, SIMPLE, and others
Many vendors add non-interoperable extensions to SIP
These may not work across different vendor platforms
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
80/100
NAT / Firewall Traversal
NAT/FW T l
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
81/100
NAT/FW Traversal
SIP has traditionally had some trouble gettingthrough firewalls (FWs) and NetworkAddressTranslators (NATs)
Two major causes NATs use private IP addresses, not routable fromthe outside
SIP embeds these, outside entity has no way to respond
SIP and RTP (the media) are on different ports
Each requires a specific forwarding through the firewall towork and must be opened separately
Fi ll d M di
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
82/100
Firewalls and Media
A UA Contactsanother UA (or a
proxy), sending SIP
messages.
The process of
sending themessage (on most
NATs/FWs) creates
a mapping that
allows responses to
reach the senderSIP
Fi ll d M di
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
83/100
Firewalls and Media
Media (RTP) is on adifferent port
(different opening in
the FW) than SIP
It is possible that at
the time the mediais sent, it is rejected
by the firewall
RTP
NAT/FW T l
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
84/100
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 hostsbehind firewalls
Session Border Controllers (SBCs)
Sit near (or in) the firewall/NAT, rewrite the internals of thepackets, work with firewall to open ports
S i B d C t ll
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
85/100
Session Border Controllers
Implemented either as special firewall/ALG thatmodify the packets (deep-packet inspection) or as aB2BUA
B2BUA can be thought of as a special SIP-to-SIP gatewayor as two UAs glued together, where each side is aseparate call
Can be used for
NAT Traversal
Protocol correction
Demarcation point
Codec translation
Generally handles both media and signalling
S i B d C t ll
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
86/100
Session Border Controller
SIP Server
SIP/IP network
SIP Server
SIP/IP network
Session Border Controller
(SBC)
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
87/100
Peer-To-Peer SIP
P t P (P2P) SIP
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
88/100
Peer-to-Peer (P2P) SIP
Alternate way to deliver SIP
Basic idea reduce or completely eliminatethe central servers (proxy/softswitch)
Most or all functionality is moved to the UA
Highly scalable, so good for very smalldeployments (no infrastructure) and
internet-wide deployments
Cli t/S S i
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
89/100
Client/Server Session
In a Client/Server session, two nodesmust use a central server to
communicate
P2P Session
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
90/100
P2P Session
In a Peer-to-Peer session, when twonodes communicate, a few other nodes,
rather than a central server, helpcomplete the call
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
91/100
Distributed Systems
Home Teleworkers
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
92/100
7.1
UCSystem
Corp HQ
InternetFirewall HomeFirewall
IPPhone
PC
Home
Home Teleworkers
Mobile Workers
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
93/100
UCSystem
Corp HQ
InternetFirewallWiFiCaf
Router
Mobile
UCclient
LaptopUC
client
Mobile
DataNetwork
Mobile Workers
Intra company and Cloud
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
94/100
IM
Corp HQ
Corporate
Network
Presence
Call
Control
IVRIM
Office A
Presence
Call
Control
Voicemail
IM
Office B
Presence
Call
Control
PSTN
Internet
Intra-company and Cloud
Inter company Federation
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
95/100
UCSystem
Corp HQ
UCSystem
Office A
Corporate
Network
Company A
UCSystem
Corp HQ
UCSystem
Office A
Corporate
Network
Company B
Internet
Inter-company Federation
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
96/100
Resources
Some Good SIP Webpages
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
97/100
Some Good SIP Webpages
Tech-Invite (www.tech-invite.com) is a great source for general SIPinformation with many beautiful color illustrations
SIP Forum has many links to more info (www.sipforum.org)
RFC 5411, The Hitchhikers Guide to SIP(tools.ietf.org/html/rfc5411)
SIP Tutorial at iptel.org, (www.iptel.org/tutorial)
IETF information can be found at www.ietf.org and www.softarmor.com
P2PSIP.org (www.p2psip.org) is the community site for P2PSIP
Speaking of Standards blog (blogs.voxeo.com/speakingofstandards)
Books on SIP
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
98/100
Books on SIP
Internet Communications Using SIP, HenrySinnreich and Alan B. Johnston, Wiley NetworkingCouncil Series, 2006 (second edition)
SIP: Understanding the Session Initiation
Protocol, Alan B. Johnston, Artech House, 2004
SIP Beyond VoIP, Henry Sinnreich, Alan B.Johnston and Robert J. Sparks, VON Publishing,2005
SIP Demystified, Gonzalo Camarillo, McGraw-HillTelecom Series, 2002
Acknowledge/Thanks
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
99/100
Acknowledge/Thanks
Thanks to those who have worked on SIPover the years, presented SIP tutorials, orwritten SIP books!
-
8/7/2019 sip-fundamentals-voicecon-orl-2010-2-100330105339-phpapp01
100/100
top related