Session Initiation Protocol
SIP is an agile, general-purpose
tool for creating, modifying, and terminating sessions that works independently
of underlying transport protocols and without dependency on the type of session
that is being established.
SIP works with both IPv4 and IPv6.
The modern version of SIP is
defined in RFC document 3261.
Terminology
·
User Agents (UA): Client (originates calls) and Server
(listens for incoming calls) UA.
·
SIP Proxy Server: A SIP server that can receive SIP
requests and handles or forward them to the intended recipient.
·
SIP Redirect Server: accepts a SIP request and conveys to
the originating client the way to route the call.
·
SIP Registrar Server: accepts registration requests and
maps client’s address to user’s sign-in name or SIP URI.
·
Gateways: Provide call control and translation functions
from one format to another.
Introduction
·
It’s an application level protocol for managing sessions and is
based on HTTP like request/response model. It allows to enable multi-user sessions
regardless of media content.
·
Various kinds of SIP Servers exist: Proxy, Redirect and
Registrar.
·
SIP clients send SIP request to SIP Servers which reply with at
least one response.
·
Office Communicator 2007 is an example of SIP client.
·
Office Communications Server 2007 is an example of SIP Server.
·
SIP provides for the following basic requirements in communications:
1. User location
services
2. Session
establishment
3. Session
participant management
4. Endpoint capabilities
establishment using Session Description Protocol (SDP).
·
SIP can work with other protocols like LDAP, RTP, RADIUS, etc.
Users
in a SIP network are identified by unique SIP addresses. A SIP address is
similar to an e-mail address and is in the format of sip:userID@domain.com. Users register with a registrar server
using their assigned SIP addresses. The registrar server provides this
information to the location server upon request.
Over
time, a SIP end user might move between end systems. The location of the end
user can be dynamically registered with the SIP server. The location server can
use one or more protocols (including finger, rwhois, and LDAP) to locate the
end user. Because the end user can be logged in at more than one station and
because the location server can sometimes have inaccurate information, it might
return more than one address for the end user. If the request is coming through
a SIP proxy server, the proxy server will try each of the returned addresses
until it locates the end user. If the request is coming through a SIP redirect
server, the redirect server forwards all the addresses to the caller in the Contact
header field of the invitation response.
Session Initiation Commands

|
Method
Name
|
Description
|
|
INVITE
|
Initiates
a session. This method includes information about the calling and called
users and the type of media that is to be exchanged.
|
|
ACK
|
Sent
by the client who sends the INVITE. ACK is sent to confirm that the session
is established. Media can then be exchanged.
|
|
BYE
|
Terminates
a session. This method can be sent by either user.
|
|
CANCEL
|
Terminates
a pending request, such as an outstanding INVITE. After a session is
established, a BYE method needs to be used to terminate the session.
|
|
OPTIONS
|
Queries
the capabilities of the server or other devices. It can be used to check
media capabilities before issuing an INVITE.
|
|
REGISTER
|
Used
by client to login and register its address with a SIP registrar server.
|
SIP Architecture

1. User A calls
User B
2. SIP Proxy Server
gets location of User B
3. Call gets
proxied to User B
4. Response from
User B
5. Response gets
proxied to User A
6. Media Channel
get established between User A & User B.
SIP Response Codes
SIP response contains following:
Status Code: Three digit number
Reason Phrase: text
description of response
Status codes defined in SIP have
values between 100 and 699. The first digit of status code indicates response
class.
1xx - Provisional
2xx - Success
3xx - Redirection
4xx - Client Error
5xx - Server Error
6xx - Global
Failure
SIP Messages
SIP messages have three kinds of
headers:
General Headers: These are
used in both requests & responses and contain basic information like TO and
FROM fields.
Request Header: Part of
Request messages and contains fields like SUBJECT and PRIORITY.
Response Header: Part of
Response Messages and contains fields like UNSUPPORTED and RETRY-AFTER fields.
SAMPLE REQUEST MESSAGE
INVITE sip:userA@domain.com
SIP/2.0
Via: SIP/2.0/UDP pc1.domain.com
Max-Forward: 70
To: “userB” <sip:userB@ domain.com >
From: “userA” <sip:userA@domain.com >;tag=123
Call-ID: 1234567890@171.1.1.1
CSeq: 1 INVITE
Contact: <sip:userB@ pc1 domain.com >
Content-Type: application/sdp
Content-Length: 100
---- Message Body (SDP) Not Shown ----
SAMPLE RESPONSE MESSAGE
SIP/2.0 200 OK
Via: SIP/2.0/UDP pc1.domain.com
To: “userB” sip:userB@ domain.com ; tag=999
From: “userA” <sip:userA@domain.com >;tag=123
Call-ID: 1234567890@171.1.1.1
CSeq: 1 INVITE
Contact: <sip:userB@ pc1 domain.com >
Content-Type: application/sdp
Content-Length: 100
---- Message Body (SDP) Not Shown ----