Page 1
7/12/2007 Page 1
Presentation by: Kevin M. Johnson VP Engineering & Ops
SIP
(Session Initiation Protocol)
Technical Overview
Page 2
7/12/2007 vTechnologies, Inc. Page 2
Page 3
7/12/2007 vTechnologies, Inc. Page 3
Workforce Automation Software Developer
Page 4
7/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-1 DFW-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-3745GW DFW-2851GW DFW-3550-2 RDU DFW-3550-1 SRST with RSVP Secure SIP DFW-2691GW-1 SCCP DFW-2691GW-2 SIP Video DFW-EXCH2 DFW-DCGC-EXCH DFW-TFTP-MOH DFW-MPX RSVP HNL NYC SJC-RFD-WAN PSTN DFW-2801GW DFW-3550-4 DFW-CUPS
Page 5
7/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 Ethernet
Working Group”
4 years as voting member of IEEE 802.3u
Committee [100BaseTX]
2 years as voting member of ANSI X3T9.5
Committee [FDDI over Copper]
Page 6
vTechnologies, Inc. Page 6
7/12/2007
Page 7 Page 7
VoIP (Voice over Internet Protocol) is a generic
description of any transmission of Voice OR
Video 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 because of its more efficient use of available bandwidth.
Traditional telephone networks (ISDN) are far less efficient in
their use of available bandwidth because they reserve a channel
for each connected conversation.
In data networks, everyone can use the available bandwidth to the maximum extent, which means that the line capacity is exploited efficiently.
7/12/2007 vTechnologies, Inc.
Page 8
vTechnologies, Inc. Page 8
7/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
Page 9
vTechnologies, Inc. Page 9
7/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
Page 10 Page 10
VoIP Basics
Common VoIP Transmission Methodologies
Voice and signaling channels are strictly separated in VoIP implementations.
Signaling sessions are typically administered by a server which
provides control, establishes compression and other
communication parameters.
The voice stream is established between endpoints once the signaling session has been negotiated.
UDP (User Datagram Protocol) is the preferred protocol for voice transmission over IP. Because UDP does not guarantee delivery or check for packet order, it is faster and more efficient. As well, because voice packets are time sensitive, lost packets are preferable to delayed packets.
Page 11 Page 11
VoIP Basics
Common VoIP Transmission Methodologies
(cont.)
VoIP transmission requires a protocol that is responsible for voice encoding, jitter, sequence order and bandwidth usage.
RTP (Real-time Transport Protocol) was developed by the IETF (Internet Engineering Task Force) to better support applications that require real-time packet delivery. RTP provides the following services:
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.
Page 12
vTechnologies, Inc. Page 12
7/12/2007
IP UDP RTP DATA
IP Header
(Overhead) Voice Payload(Useful Data)
VoIP Basics
Page 13 Page 13
VoIP Basics
Quality of Service
It is a common misconception that VoIP protocols incorporate some kind of Quality of Service mechanisms that provide for improved packet delivery. They do not!
RTP and its associated protocols do not provide any mechanism
for guaranteeing delivery or quality of service. They simply provide information to other applications or mechanisms that can provide appropriate service quality.
Because IP networks are connectionless by nature, they are inherently unreliable (Best Effort) when compared to connection-oriented network protocols such as ISDN. Therefore, voice communication, which has traditionally relied on a predictable, reliable infrastructure for acceptable audio quality must have other mechanisms in place to provide acceptable voice quality in an IP network.
Page 14 Page 14
VoIP Basics
Quality of Service (cont.)
QoS is a function, not of protocols, but of the underlying IP networking infrastructure, i.e. the switching and routing equipment on the LAN/WAN.
Quality of Service, which was established as a standard by the ITU in X.902, is a traffic engineering term that refers to resource reservation control mechanisms that can be implemented in an IP network. QoS mechanisms allow the marking of packets to prioritize their movement through the network and to allocate a fixed allocation of bandwidth. The current name for this marking and prioritization is Differentiated Services or DiffServ. At the IP layer, DiffServe uses DSCP (Differentiated Service Code Point) markings in the IP packet header to identify the queue to which that packet will be assigned.
Page 15
vTechnologies, Inc. Page 15
7/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
QoS
Priority
Levels
Lowest Priority Highest Priority -+Page 16 Page 16
VoIP Basics
Quality of Service (cont.)
QoS Limitations
QoS, as it currently exists, is NOT implemented on the internet and won’t be implemented in “Internet 2” because it can’t scale for large networks.
Although QoS functions well on LAN-only traffic, it only functions one-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 2 ABC 3 DEF 4 5 JKL MNO6 GHI 7 8 TUV 9 WXYZ PQRS * 0 OPER # 7960 CISCO IP PHONE i messages directories settings services
QoS Traffic Engineering
Throttling of HTTP/FTP/ Streaming Media, etc.
Page 17 Page 17
VoIP Basics
Quality of Service (cont.)
QoS Requirements
Latency: Maximum Roundtrip delay of 250ms; Maximum one-way latency 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
Page 18
vTechnologies, Inc. Page 18
SIP
Page 19 Page 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, multimedia distribution, and multimedia conferences.“
SIP does not define the underlying communications protocols, but uses existing protocol standards for transmission of the voice payload.
SIP is a request-response protocol that functions at the application-layer of the OSI model (not the IP layer) and works much like HTTP, even using URL-like addressing to identify the endpoint that is being called.
SIP uses UTF-8 (8-bit UCS/Unicode Transformation Format) encoding which is compatible with the ASCII character set.
Page 20
vTechnologies, Inc. Page 20
7/12/2007
SIP Basics
SIP
IP
Page 21 Page 21
SIP Basics
SIP Components
UA (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.
Page 22 Page 22
SIP Basics
SIP Request Messaging
INVITE – Indicates a client is being invited to participate in a call session.
ACK – Confirms that the client has received a final response to an INVITE request.
BYE – Terminates a call and can be sent by either the caller or the callee.
CANCEL – Cancels any pending searches but does not terminate an already accepted call.
REGISTER – Registers the address listed in the To header field with a SIP server.
OPTIONS – Queries the capabilities of servers.
Page 23 Page 23
SIP Basics
SIP Response Messaging:
A response to a SIP requestalways consists of a 3-digit integer result code and a short textual description.
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.
Page 24
vTechnologies, Inc. Page 24
7/12/2007
SIP Basics
SIP Request/Response Diagram ACK (2) ACK (2) 200 OK INVITE (1)SIP Stateless Proxy
sip:[email protected] INVITE (1) INVITE (2) INVITE (2) MOVED 302 ACK (1)
SIP Stateful Proxy A
INVITE (2) sip:[email protected] 200 OK INVITE (2) 200 OK 200 OK ACK (2) MEDIA (RTP) PATH
SIP Stateful Proxy B
FINAL IN-CALL SIGNALING PATH
Page 25
vTechnologies, Inc. Page 25
7/12/2007
SIP Basics
Page 26 Page 26
SIP Basics
NAT Transit and STUN
The good news is that SIP uses port 5060 and is therefore simple to configure for NAT transit.
The bad news is that RTP uses a dynamic port range (8766 to 35000), so NAT transit and firewall configuration can be problematic for the audio payload.
A SIP endpoint that is behind NAT will not be able to respond to the external SIP proxy with a recognized IP address because it only knows about its LAN-side (internal) IP address.
STUN (Simple Traversal of UDP through NATs) is a client-server protocol that provides a method for a STUN client (on the SIP UA) to send a request to a STUN server which then reports back to the STUN client what the public IP address of the NAT router is, and what port was opened by the NAT to allow incoming traffic back in to the network.
Page 27
vTechnologies, Inc. Page 27
7/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" NAT received? yes yes no no
Page 28
vTechnologies, Inc. Page 28
7/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 29
vTechnologies, Inc. Page 29
7/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 30
vTechnologies, Inc. Page 30
7/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 31
vTechnologies, Inc. Page 31
7/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 32 Page 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 the carrier and the carrier then provides the PSTN gateway to the public 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 at either G.729 or G.711 compression.
SIP trunks support DID (Direct Inward Dialing), CallerID & Location, 911, 800 inbound, LD Termination, Expanded Local Calling Areas (subject to provider’s network presence), lower LD termination costs etc.
Page 33 Page 33
SIP Basics
SIP Trunking: The Downside
Implementations by SIP carriers can vary widely because of the abundance of IETF drafts and competition between carriers and manufacturers for early dominance.
Fax support is hit and miss because it is dependent upon carrier implementation of ITU’s T.38 (fax over IP) or some other method for fax support.
QoS (?) Outbound only because we are still dealing with traffic engineering that can only be enforced on the outbound-side.
Page 34 SIP Provider SIP Provider SIP Provider Internet UA Ca ll Co ntro l 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