Session Initiation Protocol
Session Initiation Protocol
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Legacy Telephone
Use SS7 as out band signaling
Time Division Multiplexing
T1 / E1 / SDH as trunk
DS0 64Kbps per channel
Routing based on dialing plan
3
Voice over IP
Voice over IP
Voice over IP
Signaling out band with SIP / H.323
Packet Switching
Transport with IP/UDP/RTP
With G.711/G.723/G.726/G.729 Codec
Routing based on IP address
5
SIP Overview
Internet telephony use a verity of signaling protocols,
such as H.323, SIP, MGCP and H.248 (MEGACO) for
initiating VoIP call.
However, SIP seems to overwhelm all the others,
mainly due to the fact that is has been adopted by
various standardization organizations i.e. IETF, ETSI,
3GPP as the protocol for both wireline and wireless
world in the Next Generation Networks (NGN) era.
SIP Protocol
SIP works in concept with several other protocols and
is only involved in the signaling potion of a
communication session. SIP acts as a carrier for the
Session Description Protocol (SDP), which describes
the media content of the session, e.g. what IP ports to
use, what codec being used etc.
In typical use, SIP sessions are simply packet streams of
the Real-time Transport Protocol (RTP).
RTP is the carrier for the actual audio or video content
itself.
9
Proxy Service
The proxy server receives SIP requests and forwards
them on behalf of the requester and consults a
database, generically called a location services, that
contains the current IP address of where the receiver
stand with.
The SIP Proxy is responsible to routing all SIP message
to their destinations.
11
Registration Service
Registration is one way that the proxy server can learn
the current location of receiver.
When initialization, at periodic intervals, user send a
REGISTER messages to a SIP register server, the
REGISTER messages associate SIP URI logged. The
register writes the association, also called a binding to a
database, called the location services, where it can be
used by the proxy server.
Often, a register and proxy is co-located and in
normally is logically not physically.
12
13
Refer Service
This extension provides a mechanism where one party
(the referrer) provides a seconds party (also the
referrer) with an arbitrary Uniform Resource
Identifiers (URI) to reference.
SIP Refer can be used to enable many applications,
including call Transfer.
SIP refer is reference to RFC-3892
14
SIP Inside
SIP messages is similar to HTTP messages and shares
some of its design principles:
It is human readable and request-response structured.
SIP proponents also claim it to be simpler than H.323.
15
SIP Request
RFC-3261
RFC-3265
16
RFC-3261
SIP uses six type of require messages
INVITE
ACK
BYE
CANCEL
OPTIONS
REGISTER
17
REGISTER
REGISTER:
Registers the address listed in the To header field
with a SIP server.
18
REGISTER
19
REGISTER
19
REGISTER
19
INVITE
INVITE :
Indicates a client being invited to participate in a call
session.
20
INVATE
21
INVATE
21
INVATE
21
INVATE
21
ACK
ACK:
confirms that the client has received a final response to
an INVITE request.
22
BYE
BYE:
Terminates a call and can be sent by either the caller or
the callee.
23
CANCEL
CANCEL:
Cancels any pending searches but does not terminate a
call that has already been accepted.
24
OPTIONS
OPTIONS:
Queries the capabilities of servers.
25
26
26
26
26
26
26
26
26
26
26
26
26
26
RFC-3265
Extends the basic request messages to
support notification.
SUBSCRIBE
NOTIFY
27
SUBSCRIBE
SUBSCRIBE:
Subscribes for a Event of Notification from the
Notifier.
28
NOTIFY
NOTIFY:
Notify the subscriber of a new event.
29
SIP Response
SIP responses are the codes used by Session Initiation
Protocol for communication. They complement the SIP
Requests, which are used to initiate action such as a
phone conversation.
30
Informational
100 : Trying
180 : Ringing
181 : Call is being forwarded
182 : Queued
183 : Session progress
32
Successful
200 : OK
202 : Accepted ( Used for referrals )
33
Redirection
300 : Multiple choices
301 : Moved permanently
302 : Moved temporarily
305 : Use proxy
380 : Alternative service
34
Client Failure
400 : Bad request
401 : Unauthorized (Only for Registers)
402 : Payment required
403 : Forbidden
404 : User not found
405 : Method not allowed
406 : Not acceptable
35
Client Failure
407 : Proxy authentication required
408 : Request timeout
410 : User gone
413 : Request entity too large
414 : Request URI too long
415 : Unsupported media type
416 : Unsupported URI scheme
36
Client Failure
420 : Bad SIP extension
421 : Extension required
423 : Interval too brief
480 : Temporarily unavailable
481 : Call / Transaction does not exist
482 : Loop detected
37
Client Failure
483 : Too many hops
484 : Address incomplete
485 : Ambiguous
486 : Busy here
487 : Request terminated
488 : Not acceptable here
38
Client Failure
491 : Request pending
493 : Undecipherable
494 : Security agreement required
39
Server Failure
500 : Server internal error
501 : Not implemented
502 : Bad gateway
503 : Service unavailable
504 : Server timeout
505 :Version not supported
506 : Message too large
40
Global Failure
600 : Busy everywhere
603 : Decline
604 : Does not exist anywhere
606 : Not acceptable
41
42
42
42
42
42
42
42
42
42
42
Summary
In Function point of view:
SIP Register and Proxy service administrate SIP
messages.
In Protocol point of view:
SIP REGISTER and INVITE messages are the predominant messages used by the SIP protocol.
43
44
RTP Inside
RTP - Real-time Transport Protocol
RTP defines a good standardized packet format for
delivering audio and video over the Internet. It was
developed by the IETF and first published in 1996 as
RFC-1889 which was obsoleted in 2003 by RFC-3550.
45
RTP Header
Payload Type : 7 bit
Sequence number : 16 bit
Time stamp : 32 bit
Synchronization source identifier : 32 bit
Miscellaneous Field ...
46
RTP Header
0
2 3 4
VER
8 9
16
P X CC M P Type
31
Sequence
Time Stemp
Contributing Source ID
47
8 byte
12 byte
20 to 160 byte
IP
UDP
RTP
Payload
Overhead
IP/UDP/RTP Header Compression
3-5
20 to 160 byte
Header
Payload
49
50
RTP/AVP
RTP Audio and Video payload Profile detail in
RFC-3551/RFC-1890.
This profile defines aspects of RTP left unspecified in
the RTP protocol definition. It is for use of the RTP,
RCTP within Audio and Video multi-participant
conferences with minimal control. It provides
interpretations of generic fields within the RTP
specification suitable for audio and video conferences,
and define a set of default mapping from payload type
numbers to codec encoding.
51
Format
Sampling Rate
Rate
PCM u-Law
8 KHz
64 Kbps
1016
8 KHz
4.8 Kbps
GSM
8 KHz
13 Kbps
G.723
8 KHz
LPC
8 KHz
2.4 Kbps
PCM a-Law
8 KHz
64 Kbps
G.722
16 KHz
48 - 64 Kbps
14
MPEG-Audio
90 KHz
15
G.728
8 KHz
18
G.729
8 KHz
26
Motion-JPEG Video
31
H.261 Video
32
MPEG-1 Video
33
MPEG-2 Video
16 Kbps
RTCP Inside
RTCP - Real Time Control Protocol
RTCP to handle the SDP described the RTP use
multiple ports and crossed the NAT ports mapping
problems, it is extension attribute to SDP.
Detail refer to RFC-3605/RFC-2377
In normally use, the RTP will use odd port and RTCP
will use the RTP port + 1, for describe and report that
RTP session status.
53
54
SDP Inside
SDP - Session Description Protocol is a format for
describing streaming media initialization parameters.
It has been published by the IETF as RFC-4566/
RFC-2327
SDP is intended for describing multimedia sessions for
the purposes of session announcement, session
invitation, and other forms of multimedia session
initiation.
55
SDP is be used in :
Session initiation
Streaming media
Email and Web
Multicast session announcement
57
SDP terms
Conference
Session
Session Announcement
Session Advertisement
Session Description
58
Conference
Conference :
It is a set of two or more communicating users along
with the software they are using.
59
Session
Session :
Session is the multimedia sender and receiver and the
following stream of data.
60
Session announcement
Session Announcement :
A Session announcement is a mechanism by which a
session description is conveyed to users in a proactive
fashion, i.e. the session description was not explicitly
requested by the user.
61
Session advertisement
Session advertisement :
Same as session announcement.
62
Session description
Session description :
A well defined format for conveying sufficient
information to discovery and participate in a
multimedia session.
63
SDP Messages
SDP session description consists of a number of lines
of text of the form :
type=value
Where type must be exactly one case-significant
character and value is structured text whose format
depends on type.
64
Session description
v= protocol version
o= originator and session identifier
s= session name
i=* session information
u=* URI of description
e=* email address
65
Session description
p=* phone number
c=* connection information
b=* zero or more bandwidth information
lines
Time description
t= time the session is active
r=* zero or more repeat times
67
Media description
m= media name and transport address
i=* media title
c=* connection information
b=* zero or more bandwidth information
lines
SDP Example
v=0
o=user1 2890844526 2890842807 IN IP4 192.168.64.4
s=Sd seminar
i=A seminar on the session description protocol
u=http://www.here.com/SDP/sdp01.txt
[email protected] (User Who)
c=IN IP4 224.2.17.12/127
t=2873397496 2873404696
a=recvonly
m=audio 3456 VAT PCMU
m=video 2232 RTP H261
m=whiteboard 32416 UDP WB
a=orient:portrait
Rewrite:
(session
(v 0)(o user1 2890844526 2890842807 IN IP4 192.168.64.4)
(s Sd seminar)(i A Seminar on the session description protocol)
(u http://www.here.com/SDP/sdp01.txt)
(e [email protected] (User Who))
(c IN IP4 224.2.17.12/127)(t 2873397496 2873404696)(a recvonly)
(all
(media (m audio 3456 VAT PCMU))
(media (m video 2232 RTP H261))
(media (m whiteboard 32416 UDP WB)
(orient portrait)
)
)
69
Summary
The SDP is used to describe the parameters of media
streams used in multimedia sessions. When a session
requires multiple ports, SDP assumes that these ports
have consecutive numbers.
However, when the session crosses a Network Address
Translated (NAT RFC-2766) device that also uses port
mapping, the ordering of ports can be destroy by the
translation. Use RTCP to resolve the problem.
70
SAP Inside
SAP - Session Announcement Protocol
SAP is a protocol for broadcasting multicast session
information.
A SAP listening application can listen to the wellknown SAP multicast address and construct a guide of
all advertised multicast sessions.
SAP was defined in RFC-2974
71
72
Quality of Service
Because the Audio and Video is delay sensitive, so when
transmit it on net, Quality of Service is more important
then others traffic. Traffic QoS can use Marking /
Filtering / Queueing methods to measure the traffic
smoothly but will increase jitter.
So if traffic jam on net, the delay jitter still can not
permit, but if the traffic path can be reservation
bandwidth for audio and video, then the service of
quality will better.
73
RSVP
RSVP is a resource reservation setup protocol
designed for quality integrated services on Internet.
RSVP is used by a host to request specific qualities of
service from the network for particular application
data streams of flows. RSVP is also used by routers to
deliver QoS requests to all nodes along the path(s) of
the flows to establish and maintain state to provide the
requested service. RSVP requests will generally result
in resources being reserved in each node along the
data path. Use RSVP to reservation bandwidth is be
defined on RFC-2205/RFC-2750.
74
Reference Documents
77
VoIP Reference
78
79
Based Protocols
80
QoS Reference
81
82