SESSION INITIATION PROTOCOL (SIP)

SESSION INITIATION PROTOCOL (SIP)

The Session Initiation Protocol (SIP) is a signaling protocol for initiating,managing and terminating voice and video sessions across packet networks. SIP sessions involve one or more participants and can use unicast or multicast communication.

SIP is being developed by the SIP Working Group, within the Internet Engineering Task Force (IETF).


SIP ENTITIES:
A SIP network is composed of four types of logical SIP entities. Each entity has specific functions and participates in SIP communication as a client (initiates requests), as a server (responds to requests), or as both.

Following are the four types of logical SIP entities

USER AGENT:
In SIP, a User Agent (UA) is the endpoint entity. User Agents initiate and terminate sessions by exchanging requests and responses.User Agent as an application, which contains both a User Agent client and User.

Agent server, as follows:

User Agent Client (UAC)—a client application that initiates SIP requests.
User Agent Server (UAS)—a server application that contacts the user when a SIP request is received and that returns a response on behalf of the user.
Some of the devices that can have a UA function in a SIP network are:
workstations, IP-phones, telephony gateways, call agents, automated answering services.


PROXY SERVER:

A Proxy Server is an intermediary entity that acts as both a server and a client for the purpose of making requests on behalf of other clients. Requests are serviced either internally or by passing them on, possibly after translation, to other servers.

REDIRECT SERVER:

A Redirect Server is a server that accepts a SIP request, maps the SIP address of the called party into zero (if there is no known address) or more new addresses and returns them to the client. Unlike Proxy servers, Redirect Servers do not pass the request on to other servers.

REGISTRAR:

A Registrar is a server that accepts REGISTER requests for the purpose of updating a location database with the contact information of the user specified in the request.


SIP MESSAGES:

MESSAGE TYPES:

There are two types of SIP messages:
Requests—sent from the client to the server.
Responses—sent from the server to the client.

REQUESTS:

Method    Description
INVITE: Initiates a call, changes call parameters (re-INVITE).
ACK: Confirms a final response for INVITE.
BYE: Terminates a call.
CANCEL: Cancels searches and “ringing”.
OPTIONS: Queries the capabilities of the other side.
REGISTER: Registers with the Location Service.
INFO: Sends mid-session information that does not modify the session state.

RESPONSES:

RESPONSE TYPES


Provisional (1xx class)—provisional responses are used by theserver to indicate progress, but they do not terminate SIP transactions.
Final (2xx, 3xx, 4xx, 5xx, 6xx classes)—final responses terminate SIP transactions.

The SIP response code set is partly based on HTTP response codes. There are two types of responses and six classes.

CLASSES
1xx = provisional, searching, ringing, queuing etc.
2xx = success
3xx = redirection, forwarding
4xx = request failure (client mistakes)
5xx = server failures
6xx = global failure (busy, refusal, not available anywhere)

Response Code Esamples:

100 Continue
180 Ringing
200 OK
300 Multiple choices
301 Moved permanently
302 Moved temporarily
400 Bad request
401 Unauthorized
403 Forbidden
408 Request time-out
480 Unavailable
481 Call-leg/Transaction does not exist
482 Loop detected
5xx Server error
600 Busy
603 Decline
604 Does not exist
606 Not acceptable


MESSAGE PARTS:

SIP Message have 3 parts those are START LINE,HEADER & BODY

START LINE:

The Start Line conveys the message type (method type in requests, and response code in responses) and the protocol version. The Start Line may be either a Request-line (requests) or a status-line(responses).

HEADER:

SIP header fields are used to convey message attributes and to modify message meaning.

:

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.

BODY (CONTENT)

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.

Possible body types include:
SDP—see Session Description Protocol (SDP).
Multipurpose Internet Mail Extensions (MIME).
Others—to be defined in the IETF and in specific implementations.


MESSAGE SAMPLES::

REQUEST MESSAGE:

Request Message line: Description

INVITE sip:bob@acme.com SIP/2.0 - Request line  Method type, request URI (SIP address of called party),SIP version.

Via: SIP/2.0/UDP - Address of previous hop.
alice_ws.radvision.com
From: Alice A. -  User originating this request.
To: Bob B. - User being invited, as specified originally.
Call-ID: 2388990012@alice_ws.radvision.com - Globally unique ID of this call.
CSeq: 1 INVITE - Command sequence. Identifiestransaction.
Subject: Lunch today.- Call subject and/or nature.
Content-Type: application/SDP Type of body—in this case SDP.
Content-Length: 182 - Number of bytes in the body.
v=0 - Version of SDP.

o=Alice 53655765 2353687637 IN IP4 128.3.4.5 - Owner/creator and session identifier, session version address type and address.
s=Call from Alice. - Session subject.
c=IN IP4 alice_ws.radvision.com - Connection information.
M=audio 3456 RTP/AVP 0 3 4 5 Media description: type, port,possible formats caller is willing to receive and send.-Request Message line Description Response

RESPONSE MESSAGE:


SIP/2.0 200 OK Status line: SIP version, response code, reason phrase.

Via: SIP/2.0/UDP alice_ws.radvision.com Copied from request.
From: Alice A. Copied from request.
To: Bob B. ;tag=17462311 Copied from request. Includes
unique tag to identify call-leg.
Call-ID: 2388990012@alice_ws.radvision.com Copied from request.
CSeq: 1 INVITE Copied from request.
Content-Type: application/SDP
Content-Length: 200
v=0 Version of SDP.

o=Bob 4858949 4858949 IN IP4 192.1.2.3 Owner/creator and session identifier, session version address type and address.
s=Lunch Session subject.
c=IN IP4 machine1.acme.com Connection information.
m=audio 5004 RTP/AVP 0 3 Description of media streams the receiver of the call is willing to accept


SIP Session Establishment and Call Termination: 



The interaction between a User Agent Client (UAC) and a User Agent Server (UAS) during trivial session establishment and termination.

CALL REDIRECTION:




Simple Call Redirection Using a Redirect Server.

SESSION DESCRIPTION PROTOCOL (SDP):

SDP is the protocol used to describe multimedia session announcement,
multimedia session invitation and other forms of multimedia session initiation.


SDP packets usually include the following information:
Session information, Session name and purpose, Time(s) the session is active.


Since the resources necessary for participating in a session may be limited, it would be useful to include the following additional information:


Information about the bandwidth to be used by the session.
Contact information for the person responsible for the session.


Media information


Type of media, such as video and audio.
Transport protocol, such as RTP/UDP/IP and H.320
Media format, such as H.261 video and MPEG video.




No comments:

Post a Comment