(session initiation protocol) technical overview
TRANSCRIPT
Page 17/12/2007 Page 1
Presentation by:
Kevin M. Johnson
VP Engineering & Ops
SIP(Session Initiation Protocol)
Technical Overview
vTechnologies, Inc.
Page 47/12/2007 Page 4
Who are we?
vTechnologies, Inc.
Converged Solutions Provider
WAN
T1 Links to
Other Sites
ATL
YYZ
HNL1 HNL2
Secure
SIP
Secure
SIP
DFW-3750-1DFW-SUB-3
DFW-SUB-4
DFW-SUB-2
DFW-SUB-1
DFW-PUB
DFW-WAN-2691
DFW-UNITY1,
DFW-UNITY2
DFW-3550-3
SFO/ORD SJC/RFD
PIX
PIX
DFW-3745GWDFW-2851GW
DFW-3550-2
RDU
DFW-3550-1
SRST with
RSVP
Secure
SIP
DFW-2691GW-1
SCCP
DFW-2691GW-2
SIP
Video
DFW-EXCH2DFW-DCGC-
EXCH
DFW-TFTP-MOHDFW-MPX
RSVP
HNL
NYCSJC-RFD-WAN
PSTN
DFW-2801GW
DFW-3550-4
DFW-CUPS
Page 57/12/2007 Page 5
Who am I?
vTechnologies, Inc.
25 Years in data and telecommunications
5 years as voting member of TIA 568 Committee[568A/B 4-Pair UTP Cabling Specification]
Founding member of IEEE “Fast EthernetWorking Group”
4 years as voting member of IEEE 802.3uCommittee [100BaseTX]
2 years as voting member of ANSI X3T9.5Committee [FDDI over Copper]
SIP ?
Page 7Page 7
VoIP (Voice over Internet Protocol) is a genericdescription of any transmission of Voice ORVideo using “Real-Time” IP networks.
VoIP is NOT a standards specification!
VoIP has become popular as a means for service providers(AT&T, Verizon etc.) to deliver voice services primarily becauseof its more efficient use of available bandwidth.
Traditional telephone networks (ISDN) are far less efficient intheir use of available bandwidth because they reserve a channelfor each connected conversation.
In data networks, everyone can use the available bandwidth tothe maximum extent, which means that the line capacity isexploited efficiently.
7/12/2007 vTechnologies, Inc.
VoIP Basics
Page 8vTechnologies, Inc. Page 87/12/2007
ISDN PRI – 1.544 Mbs/sec.
23x64K B (Bearer) Channels / 1x64K D (Delta) Channel
Supports 23 Simultaneous Full-Duplex Calls
DS1 – 1.544 Mbs/sec.
1.544 Mbs/sec. Available Bandwidth
G.729 Codec = 8K Bitstream
G.711 Codec = 64K Bitstream
Half-Duplex
VoIP Basics
Page 9vTechnologies, Inc. Page 97/12/2007
VoIP Basics
Codec BR (Kbps) NEB (Kbps) MOS
G.711 64 87.2 4.1
G.729 8 31.2 3.92
G.723.1 6.4 21.9 3.56
G.726 32 55.2 3.85
BR = Bit rate
NEB = Nominal Ethernet Bandwidth (one direction)
MOS = Mean Opinion Score of audio quality where 1 is worst and 5 is best
VoIP CODECs
Page 10Page 10
VoIP Basics
Common VoIP Transmission MethodologiesVoice and signaling channels are strictly separated in VoIPimplementations.
Signaling sessions are typically administered by a server whichprovides control, establishes compression and othercommunication parameters.
The voice stream is established between endpoints once thesignaling session has been negotiated.
UDP (User Datagram Protocol) is the preferred protocol for voicetransmission over IP. Because UDP does not guarantee deliveryor check for packet order, it is faster and more efficient. As well,because voice packets are time sensitive, lost packets arepreferable to delayed packets.
7/12/2007 vTechnologies, Inc.
Page 11Page 11
VoIP Basics
Common VoIP Transmission Methodologies(cont.)
VoIP transmission requires a protocol that is responsible forvoice encoding, jitter, sequence order and bandwidth usage.
RTP (Real-time Transport Protocol) was developed by the IETF(Internet Engineering Task Force) to better support applicationsthat require real-time packet delivery. RTP provides the followingservices:
Payload-type identification: Indication of what kind of content is being carried – typically voice or video.
Sequence numbering: Tracking of packets for resequencing, if needed, at the receiver-side.
Time stamping: Provides information to the receiver-side for synchronization and jitter calculations.
Delivery monitoring: Provides information related to packet loss and packet delay.
7/12/2007 vTechnologies, Inc.
Page 12vTechnologies, Inc. Page 127/12/2007
IP UDP DATARTP
IP Header(Overhead)
Voice Payload(Useful Data)
VoIP Basics
TYPICAL VoIP PACKET COMPOSITION
Page 13Page 13
VoIP Basics
Quality of Service
It is a common misconception that VoIP protocols incorporatesome kind of Quality of Service mechanisms that provide forimproved packet delivery. They do not!
RTP and its associated protocols do not provide any mechanismfor guaranteeing delivery or quality of service. They simplyprovide information to other applications or mechanisms thatcan provide appropriate service quality.
Because IP networks are connectionless by nature, they areinherently unreliable (Best Effort) when compared to connection-oriented network protocols such as ISDN. Therefore, voicecommunication, which has traditionally relied on a predictable,reliable infrastructure for acceptable audio quality must haveother mechanisms in place to provide acceptable voice quality inan IP network.
7/12/2007 vTechnologies, Inc.
Page 14Page 14
VoIP Basics
Quality of Service (cont.)
QoS is a function, not of protocols, but of the underlying IPnetworking infrastructure, i.e. the switching and routingequipment on the LAN/WAN.
Quality of Service, which was established as a standard by theITU in X.902, is a traffic engineering term that refers to resourcereservation control mechanisms that can be implemented in anIP network. QoS mechanisms allow the marking of packets toprioritize their movement through the network and to allocate afixed allocation of bandwidth. The current name for this markingand prioritization is Differentiated Services or DiffServ. Atthe IP layer, DiffServe uses DSCP (Differentiated Service CodePoint) markings in the IP packet header to identify the queue towhich that packet will be assigned.
7/12/2007 vTechnologies, Inc.
Page 15vTechnologies, Inc. Page 157/12/2007
Priority Level Traffic Type
0 Best Effort
1 Background
2 Standard (Spare)
Excellent Load
(Business Critical)
Controlled Load
(Streaming Multimedia)
Video
(Interactive Media)
[Less than 100ms latency and jitter]
Voice
(Interactive Voice)
[Less than 10ms latency and jitter]
Network Control Reserved Traffic
[Lowest latency and jitter]
6
7
3
4
5
VoIP Basics
QoSPriorityLevels
Lowest Priority
Highest Priority
-
+
Page 16Page 16
VoIP Basics
Quality of Service (cont.)
QoS Limitations
QoS, as it currently exists, is NOT implemented on the internet andwon’t be implemented in “Internet 2” because it can’t scale for largenetworks.
Although QoS functions well on LAN-only traffic, it only functionsone-way on internet connected endpoints.
To compensate for this limitation, inbound traffic must be“throttled” to approximate QoS functionality.
7/12/2007 vTechnologies, Inc.
1 2ABC
3DEF
4 5JKL
6MNOGHI
7 8TUV
9WXYZPQRS
* 0OPER
#
7960CISCO IP PHONE
imessages directories
settingsservices
QoS Traffic Engineering
Throttling of HTTP/FTP/
Streaming Media, etc.
Page 17Page 17
VoIP Basics
Quality of Service (cont.)
QoS Requirements
Latency: Maximum Roundtrip delay of 250ms; Maximum one-waylatency of 150ms [LAN – Local ISP – Backbone Provider]
Jitter: Maximum 2ms delay
Packet Loss:
Less than 1% packet loss for a G.711 Codec
Far less than 1% packet loss for a G.729 Codec
7/12/2007 vTechnologies, Inc.
Page 19Page 19
SIP Basics
What is SIP?The IETF SIP RFC 3261 Describes SIP as:
“…an application-layer control (signaling) protocol for creating,modifying, and terminating sessions with one or more participants.These sessions include Internet telephone calls, multimediadistribution, and multimedia conferences.“
SIP does not define the underlying communications protocols,but uses existing protocol standards for transmission of the voicepayload.
SIP is a request-response protocol that functions at theapplication-layer of the OSI model (not the IP layer) and worksmuch like HTTP, even using URL-like addressing to identify theendpoint that is being called.
SIP uses UTF-8 (8-bit UCS/Unicode Transformation Format)encoding which is compatible with the ASCII character set.
7/12/2007 vTechnologies, Inc.
Page 21Page 21
SIP Basics
SIP ComponentsUA (User Agent) – SIP network terminal (SIP telephone) that contains the UAC and UAS.
UAC (User Agent Client) – Element in terminal that initiates calls.
UAS (User Agent Server) – Element in terminal that answers calls from other UACs. The UAC and UAS allow peer-to-peer calls to be made using a client-server protocol.
Proxy Server – Server that receives connection requests from the UA and transfers them to another proxy server if the particular station is not in its sphere of administration.
Redirect server – receives connection requests and sends them back to the requester including destination data instead of sending them to the calling party
Location Server – receives registration requests from the UA and updates the terminal database with them.
7/12/2007 vTechnologies, Inc.
Page 22Page 22
SIP Basics
SIP Request Messaging
INVITE – Indicates a client is being invited to participate in a callsession.
ACK – Confirms that the client has received a final response toan INVITE request.
BYE – Terminates a call and can be sent by either the caller orthe callee.
CANCEL – Cancels any pending searches but does not terminate
an already accepted call.
REGISTER – Registers the address listed in the To header fieldwith a SIP server.
OPTIONS – Queries the capabilities of servers.
7/12/2007 vTechnologies, Inc.
Page 23Page 23
SIP Basics
SIP Response Messaging: A response to a SIP requestalways consists of a 3-digit integer result code and a short textualdescription.
PROVISIONAL (1xx) Request received, continuing to process the request. A server sends a 1xx (100 Trying, 180 Ringing) response if it expects to take more than 200 ms to obtain a final response.SUCCESS (2xx) The action was successfully received, understood, and accepted (200 OK).REDIRECTION (3xx) Further action needs to be taken in order to complete the request (301/2 Moved)CLIENT_ERROR (4xx) The request contains bad syntax or cannot be fulfilled – Most common = 404 Not Found.SERVER_ERROR (5xx) The server failed to fulfill an apparently valid request (503 Service Unavailable, 513 Message Too Large).GLOBAL_ERROR (6xx) The request cannot be fulfilled at any server – rare to see 6xx errors.
7/12/2007 vTechnologies, Inc.
Page 24vTechnologies, Inc. Page 247/12/2007
SIP Basics
SIP Request/Response
Diagram
ACK (2)
ACK (2)
200 OK
INVITE (1)
SIP Stateless Proxy
INVITE (1)
INVITE (2)
INVITE (2)
MOVED
302 ACK (1)
SIP Stateful Proxy A
INVITE (2)
200 OK
INVITE (2)
200 OK
200 OK
ACK (2)
MEDIA (RTP) PATH
SIP Stateful Proxy B
FINAL IN-CALL SIGNALING PATH
SIP Redirect Server
Page 26Page 26
SIP Basics
NAT Transit and STUNThe good news is that SIP uses port 5060 and is thereforesimple to configure for NAT transit.
The bad news is that RTP uses a dynamic port range (8766 to35000), so NAT transit and firewall configuration can beproblematic for the audio payload.
A SIP endpoint that is behind NAT will not be able to respond tothe external SIP proxy with a recognized IP address because itonly knows about its LAN-side (internal) IP address.
STUN (Simple Traversal of UDP through NATs) is a client-serverprotocol that provides a method for a STUN client (on the SIPUA) to send a request to a STUN server which then reports backto the STUN client what the public IP address of the NAT routeris, and what port was opened by the NAT to allow incomingtraffic back in to the network.
7/12/2007 vTechnologies, Inc.
Page 27vTechnologies, Inc. Page 277/12/2007
SIP Basics
STUN
SERVER
ALGORITHM
Test I:
Request echo from
same address, same
port
Test II:
Request echo from
different address,
different port
No NAT:
Check for firewall
NAT detected:
Remember public IP
received?
Public IP
is link's IP?
Open Internet
"Symmetric"Firewall "Full-cone"NAT
UDP blocked
received?
Test II:
Request echo from
different address,
different port
received?
yes
yes
yes
yes
no
no
no
no
Test I (Server #2):
Request echo from
same address,
same port
Test III:
Request echo from same
address, different port
Public IP
is constant?
"Restricted cone"
NAT
"Symmetric"
NAT
"Restricted port"
NATreceived?
yes
yes
no
no
Page 28vTechnologies, Inc. Page 287/12/2007
SIP Basics
Server 1
Server 2
Client
NAT
"Full Cone" NAT
All requests from the same internal IP address and port are mapped to the
same external IP address and port. An external host can send a packet to
the internal host, by sending a packet to the mapped external address.
Page 29vTechnologies, Inc. Page 297/12/2007
SIP Basics
Server 1
Server 2
Client
NAT
"Restricted Cone" NAT
All requests from the same internal IP address and port are mapped to the
same external IP address and port. Unlike a full cone NAT, an external host
can send a packet to the internal host only if the internal host had previously
sent a packet to it.
Page 30vTechnologies, Inc. Page 307/12/2007
SIP Basics
Server 1
Server 2
Client
NAT
"Port Restricted Cone" NAT
Port restricted cone NAT is like restricted cone NAT, but the restriction includes
port numbers. Specifically, an external host can send a packet to a particular
port on the internal host only if the internal host had previously sent a packet
from that port to the external host.
Page 31vTechnologies, Inc. Page 317/12/2007
SIP Basics
Server 1
Server 2
Client
NAT
"Symmetric" NAT
All requests from the same internal IP address and port to a specific destination IP
address and port are mapped to a unique external source IP address and port. If the
same internal host sends a packet with the same source address and port to a different
destination, a different mapping is used. Only an external host that receives a packet
can send a UDP packet back to the internal host.
Page 32Page 32
SIP Basics
SIP Trunking: What is it & why would I use it?
A SIP trunk is a VoIP trunk that uses SIP for session control.
It enables a pure IP connection from the enterprise to thecarrier and the carrier then provides the PSTN gateway to thepublic network.
Because the VoIP trunk is now a SIP trunk, it can support voice& data as well as video, broadband & mobile traffic.
Each SIP trunk will support one full-duplex voice session ateither G.729 or G.711 compression.
SIP trunks support DID (Direct Inward Dialing), CallerID &Location, 911, 800 inbound, LD Termination, Expanded LocalCalling Areas (subject to provider’s network presence), lower LDtermination costs etc.
7/12/2007 vTechnologies, Inc.
Page 33Page 33
SIP Basics
SIP Trunking: The Downside
Implementations by SIP carriers can vary widely because of theabundance of IETF drafts and competition between carriers andmanufacturers for early dominance.
Fax support is hit and miss because it is dependent upon carrierimplementation of ITU’s T.38 (fax over IP) or some othermethod for fax support.
QoS (?) Outbound only because we are still dealing with trafficengineering that can only be enforced on the outbound-side.
7/12/2007 vTechnologies, Inc.
Page 34
SIP
Provider
SIP
Provider
SIP
Provider
Inte
rnet
UA
Call
Contr
ol
Digital
Analog
• VoIP PBXs can act as SIP gateways that can support any type of endpoint
• Incoming calls are routed based on VoIP PBX’s incoming call routes using DIDs to user extensions,
hunt groups, auto attendants etc.
• SIP Trunks can be added one at a time as call volumes increase and can typically be turned-up in 24
to 48 hours.
H323
SIP phone
Digital phone
Analog phone
IP phone
Wireless VoIP
SIP TRUNKING
7/12/2007 vTechnologies, Inc.
GATEWAY