Beruflich Dokumente
Kultur Dokumente
AGENDA
INTRODUCTION TO SIP
SIP ENTITY
SIP REQUEST/METHODS
SIP RESPONSE
SIP HEADERS
SDP
PROTOCOL STACK OF SIP
CALL FLOWS
INTRODUCTION TO SIP
Development of SIP
SIP ENTITY
DNS
R.D.
2
P1
1
4
9
10
User Agent 1
L.S.
REG
P2
8
User Agent2
USER AGENT
REDIRECT SERVER
PROXY SERVER
10
Contd..
11
Stateful Proxy servers are those servers which store information related
to the transaction state. They store the transaction ID before forwarding
the request and when the response is received, they match the
transaction ID. They perform retransmission and advanced routing
features like FORKING.
There is another type of Proxy Servers which is Call stateful Proxy Servers
which stores both Transaction state and Call state. They are mainly used
in Billing Servers.
Slide Title | CONFIDENTIAL 2006
12
REGISTRAR SERVER
13
Contd..
14
LOCATION SERVERS
15
Location Servers are the Databases of the SIP Network. It stores all
the profiles of the User and other Information.
SIP REQUEST/METHODS
16
INVITE:
INVITE is used by an User Agent to establish a session or a
call with another User Agent. INVITE will contain media
characteristics of the proposed call or session. The media
characteristics are proposed by SDP.
Invite is also used to modify the session or media
characteristics of an established call or a session. Such type of
INVITE is called as RE-INVITE.
BYE :
BYE is used to terminate an established call or session. BYE
can be sent only by the participating User Agents.
17
Contd
18
REGISTER:
REGISTER Method is sent by User Agent to Registrar to perform
Registration. REGISTER Method is also used when a User Agent performs a
De-Registration and Third Party Registration. REGISTER is always sent by
User Agents to the Registrar.
CANCEL:
CANCEL is used to Cancel an Unestablished call or a session. CANCEL
is always used after receiving the provisional response and before
receiving the Final Response. CANCEL is always sent from Originator Side.
Ex) MISSED CALL
Contd..
19
Contd..
20
OPTIONS:
OPTIONS Method is used to query the properties and capabilities of
other User Agents and Servers. OPTIONS Method can be used only
by User Agents.
Proxy Servers cannot send OPTIONS Method, but can reply to
OPTIONS.
OPTIONAL METHODS:
REFER:
REFER is used by the User Agent to provide Reference about the
Third User Agent. REFER Method is used in case of a Call Transfer.
OPTIONAL METHODS
21
NOTIFY:
NOTIFY Method is used by an User Agent to indicate the
occurrence of an event and it will contain an EVENT ID. To receive
a NOTIFY, the User Agent has to send a SUBSCRIBE Method
SUBSCRIBE:
SUBSCRIBE is the Method which is used by the User Agent to
subscribe for the purpose of receiving notification about a
particular Event. Every Subscription has a time period and it will
be terminated after the time period is over. A Subscription can
also be terminated with the time period set to Zero.
Contd..
22
INFO:
INFO Method is used by the User Agent
to provide mid-call signaling information to
another User Agent with which it has established a
session. INFO is also used from SIP to PSTN to
carry some Signals.
UPDATE: UPDATE Method is used to change the
media characteristics of an un-established call or
a session.
MESSAGE:MESSAGE Method is Used for Instant
Messaging. Instant Messaging is a process by which
Users data is transmitted in a Protocol Message.
Also, Instant Messaging is used for short messages
and not for long messages. SIP Supports Instant
Messaging through MESSAGE Method.
Slide Title | CONFIDENTIAL 2006
SIP RESPONSES
23
1XX RESPONSES
24
2XX RESPONSES
25
3XX RESPONSES
26
4XX RESPONSES
27
4XX Responses are Client Errors. This class of Responses is used by the UA
Server to indicate that the Request cannot be fulfilled because there is a problem
with the Request that is originated by the UA Client.
Some of the Important 4XX Responses are:
400 Bad Request
401 Unauthorized
402 Payment Required
403 Forbidden
404 Not Found
406 Not Acceptable
407 Proxy Authentication Required
408 Request Timeout
410 Gone
411 Length Required
413 Request Entity Too Large
414 Request URI too Long
415 Unsupported Media Type
Contd..
28
5XX RESPONSES
29
5XX Responses are Server Errors. These Responses are sent by UA server
and will have a Retry After field indicating when the request can be
processed.
Some of the 5XX Responses are :
500 Server Internal Error
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway Timeout
505 Version Not Supported
513 Message too Large
6XX RESPONSES
30
6XX Responses are known as Global Errors. These are sent by Servers
which are absolutely sure that the request will fail wherever it is tried.
Only a server which has a definitive Knowledge can send 6xx Responses
Some of the 6XX Responses are:
600 Busy Everywhere
603 Decline
604 Does not exist anywhere
606 Not Acceptable Anywhere
Any Unrecognized Response code is treated as X00. In 1xx, it is treated
as 183.
Ex) 205 is considered as 200.
31
SIP Message consists of 3 parts. They are Start line, Headers and
Message Body.
START LINE: Every SIP message begins with a Start Line. The Start
Line conveys the message type (method in requests, and response
code in responses) and the protocol version. The Start Line may be
either a Request-line (requests) or Status-line (responses), as follows:
The Request-line includes a Request URI, which indicates the user
or service to which this request is being addressed. The Status-line
holds the numeric Status-code and its associated
Contd..
32
HEADERS:
SIP header fields are used to convey message attributes and to
modify message meaning. They are similar in syntax and semantics
to HTTP header fields and thus always take the format:
<name>:<value>
Headers can span multiple lines. Some SIP headers such as Via,
Contact, Route and Request-Route can appear multiple times in a
message or, alternatively, can take multiple comma-separated
values in a single header occurrence.
Contd..
33
MESSAGE BODY:
A message Body is used to describe the session to be initiated (for
example, in a multimedia session this may include audio and video
codec types, sampling rates etc.), or alternatively it may be used to
contain opaque textual or binary data of any type which relates in
some way to the session. Message bodies can appear both in request
and in response messages. SIP makes a clear distinction between
signaling information, conveyed in the SIP Start Line and headers, and
the session description information, which is outside the scope of SIP.
Possible body types include:
SDP Session Description Protocol (SDP).
Multipurpose Internet Mail Extensions (MIME).
Others to be defined in the IETF and in specific implementations.
Slide Title | CONFIDENTIAL 2006
HEADERS
34
35
Contd..
36
37
38
Contd..
39
40
Content Type: This header is used to specify the type that is used in message
body. It also indicates the protocol that is used. The commonly used protocol is
SDP. So the format will be:
Content Type: application/SDP.
Expires: This header is used to indicate the time period for which the message
contents or the request is valid. When this header is present in an INVITE
method, then it indicates the time period for the completion of INVITE. If it is
present in REGISTER, it indicates the time period for Registration.
Other Message body headers are Content length, Content Encoding, Content
Language.
SDP PARAMETERS
41
SDP has various parameters and they are divided into 3 types. They
are:
1) Session related parameters.
2) Timing parameters.
3) Media Related parameters.
The SDP parameters are always written in lower case.
42
TIMING PARAMETERS
43
44
45
46
TRANSPORT LAYER
47
TRANSACTION LAYER
48
Contd..
49
50
51
SIP GATEWAY:
SIP Gateway is an application that interfaces SIP network to
another network, using another protocol. There are many types of
Gateway namely:
1) SIP PSTN 2) SIP ISDN etc
From SIP point of view, Gateway is a special User Agent. A gateway
consists of hundreds of logical UAs inside. The UAs inside are
registered by means of a protocol called as TGREP (Telephone
Gateway Registration Protocol).
Gateway converts only Signaling Information and media conversion is
done by Media Gateway (MGW). MGWs are controlled by Media
Gateway Controllers (MGC).
Slide Title | CONFIDENTIAL 2006
52
53
Alice
Bobs
Invite
100 Trying; 183 Progress; 180 Ringing
200 OK
ACK
Media Session
BYE
200 OK
54
Atlanta proxy
Alice SoftPhone
Invite
100 Trying
180 Ringing
200 OK
Biloxi proxy
Invite
100 Trying
180 Ringing
200 OK
180 Ringing
200 OK
ACK
Media Session
BYE
200 OK
Slide Title | CONFIDENTIAL 2006
55
INVITE Example
F1 INVITE Alice -> atlanta.com proxy
INVITE sip:bob@biloxi.com SIP/2.0
Via: SIP/2.0/UDP
pc33.atlanta.com;branch=z9hG4bKnashds8
Max-Forwards: 70
To: Bob <sip:bob@biloxi.com>
From: Alice <sip:alice@atlanta.com>;tag=1928301774
Call-ID: a84b4c76e66710
CSeq: 314159 INVITE
Contact: <sip:alice@pc33.atlanta.com>
Content-Type: application/sdp
Content-Length: 142
Slide Title | CONFIDENTIAL 2006
56
57
58
59
60
61
62
63
64
65
SIP/2.0 200 OK
Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8
;received=192.0.2.1
To: Bob <sip:bob@biloxi.com>;tag=a6c85cf
From: Alice <sip:alice@atlanta.com>;tag=1928301774
Call-ID: a84b4c76e66710
CSeq: 314159 INVITE
Contact: <sip:bob@192.0.2.4>
Content-Type: application/sdp
Content-Length: 131
66
67
68
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.0.2.4;branch=z9hG4bKnashds10
From: Bob <sip:bob@biloxi.com>;tag=a6c85cf
To: Alice <sip:alice@atlanta.com>;tag=1928301774
Call-ID: a84b4c76e66710
CSeq: 231 BYE
Content-Length: 0
69
Thank you..