Вы находитесь на странице: 1из 6

E1-E2(CFA)/SIP

Rev Date 28.03.2011

Name of Course : E1-E2 CFA Chapter 7A Topic : SIP Date of Creation : 28.03.2011

For internal circulation of BSNL only

Page 1

E1-E2(CFA)/SIP

Rev Date 28.03.2011

Session Initiation Protocol


Introduction SIP (Session Initiation Protocol) is a signaling protocol used to create, manage and terminate sessions in an IP based network. . Session Initiation Protocol (SIP) is 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 has been the choice for services related to Voice over IP in the recent past. It is a standard (RFC 3261) put forward by Internet Engineering Task Force (IETF). It SIP is still growing and being modified to take into account all relevant features as the technology expands and evolves. But it should be noted that the job of SIP is limited to only the setup and control of sessions. The details of the data exchange within a session e.g. the encoding or codec related to an audio/video media is not controlled by SIP and is taken care of by other protocols. A Brief History of SIP Initially only the traditional switch-based telephone system was the main medium for transmitting messages. However with advent of the Internet, need was felt to fabricate a system, which connects people over the IP based network. Different communities put forward different solutions but the solution presented by IETF was finally accepted as most general one. February 1996 Initial Internet drafts were produced in the form of - Session Invitation Protocol (SIP), Simple Conference Invitation Protocol (SCIP). SIP was originally intended to create a mechanism for inviting people to large-scale multipoint conferences on the Internet Multicast Backbone (Mbone). At this stage, IP telephony didn't really exist. The first draft was known as "draft-ietf-mmusic-sip-00. It included only one request type, which was a call setup request. January 1999 The IETF published the draft called "draft-ietf-mmusic-sip-12". It contained the six requests that SIP has today. March 1999 SIP published RFC 2543 as a standard. It was modified further to generate the more modern version of RFC 3261.

For internal circulation of BSNL only

Page 1

E1-E2(CFA)/SIP

Rev Date 28.03.2011

Functions of SIP SIP is limited to only the setup, modification and termination of sessions. It serves Five major purposes. User location: determination of the end system to be used for communication; User availability: determination of the willingness of the called party to engage in communications; User capabilities: determination of the media and media parameter to be used; Session setup: "ringing", establishment of session parameters at both called and calling party; Session management: including transfer and termination of sessions, modifying session parameters, and invoking services.

Components of SIP SIP is a signaling protocol that handles setup, modification, and termination of multimedia sessions. Though SIP messages will be transported through the same physical path as used by Media stream, SIP Signalling should be considered separately from the media. SIP messages can pass via one or more servers to find out destination address, on the other hand Media stream will be direct i.e. end to end. SIP defines two basic classes of network entities : client and server. A client is any network element that sends SIP requests and receives SIP responses. Clients may or may not interact directly with a human user. A server is a network element that receives requests in order to service them and sends back responses to those requests. Four different types of servers exists: proxies, user agent servers, redirect servers, and registrars. Proxy Servers: An intermediary entity that acts as both a server and a client for the purpose of making requests on behalf of other clients. A proxy server primarily plays the role of routing, which means, its job is to ensure that a request is sent to another entity "closer" to the targeted user. Proxies are also useful for enforcing policy (for example, making sure a user is allowed to make a call). A proxy interprets, and, if necessary, rewrites specific parts of a request message before forwarding it. Redirect Servers: A redirect server is a server that accepts SIP requests, maps the destination address to zero or more new addresses and returns the translated address to the originator of the request. After that originator will contact on given addresses directly. Registrar: A registrar is a server that accepts REGISTER requests and places the information it receives in those requests into the location service for the domain it handles. As one machine / software can work as UAC or UAS depending upon the transaction in which it is engaged same is equally applicable for servers. Similarly, the same software can act as a proxy server for one request and as a redirect server for the next For internal circulation of BSNL only Page 1

E1-E2(CFA)/SIP

Rev Date 28.03.2011

request. Proxy, location, and registrar servers defined above are logical entities; implementations may combine them into a single application. SIP Protocol Operation SIP is a text-based protocol, similar to HTTP (Hypertext Transfer Protocol). SIP messages are either request from a client to a server or responses from a server to client. Each message, whether a request or response, contains a start line followed by zero or more headers and is optionally followed by a message body. Message headers provide additional information regarding the request or response. The message body describes type of session to be established, including a description of media to be exchanged. It is important to mention that SIP does not define the structure or content of message body. It is defined by other protocols like SDP(Session Description Protocol). The job of SIP is to carry that description upto destination. SIP Request: A SIP request consists of a request line, headers, an empty line and a message body. A Request-Line contains a method name, a Request-URI, and the protocol version. The method name indicates the type of request. The core SIP specification defines six types of SIP requests, each of them with a different purpose. The Request-URI indicates the next hop, which is where the request has to be routed. URI (Universal Resource Identifier) is an address and in the form of user@host, which is similar to an email address. It may look like : SIP: xyz@bsnl.co.in Finally the protocol version of SIP is 2.0. Hence, one INVITE request may have the following format: INVITE sip:xyz@bsnl.co.in SIP/2.0 Command Meanings INVITE Invites a user to a call ACK Acknowledgement is used to facilitate reliable message exchange for INVITEs BYE Terminates a connection between users CANCEL Terminates a request, or search, for a user. It is used if a client sends an INVITE and then changes its decision to call the recipient. OPTIONS Solicits information about a server's capabilities. REGISTER Registers a user's current location INFO Used for mid-session signaling SIP Response: A SIP response consists of a status line, several headers, an empty line and a message body. The message body is optional; some responses do not carry it. Status Line: A status line has three elements: protocol version, status code and a reason phrase. The current protocol version is written as SIP/2.0. The status code reports transaction status. Status codes are integers from 100 to 699 and are grouped into six different classes. The reason phrase is meant for human eyes only. It is not meant for computers processing SIP response.

For internal circulation of BSNL only

Page 1

E1-E2(CFA)/SIP

Rev Date 28.03.2011

SIP/2.0 180 Ringing. Table shows the response group, their descriptions and examples: Response Code Description Example 1xx Informational Request received, 180 Ringing continuing to process request 181 Call is being forwarded 2xx Success Action was successfully 200 OK received, understood and accepted. 3xx Redirection Further action needs to be 300 Multiple choices taken in order to complete the request 302 Moved temporarily 4xx Client Error Request contains bad 404 Not found syntax or cannot be fulfilled at this server 408 Request timeout 5xx Server Error Server failed to fulfill an 503 Service unavailable apparently valid request 504 Version not supported 6xx Global failure Request is invalid at any 600 Busy everywhere server 604 Does not Exist anywhere SIP Headers: SIP Headers are included in a request / response in order to provide further information about the message. Depending on the request/response certain headers are mandatory, some headers are optional and some headers are not applicable. Four main categories of header exist: General Header: General Headers can be used within both requests and responses. Examples are To Header: It indicates recipient of the request. It is important to make a distinction between To header of a request and Request URI. The To Header is intended for the actual destination UA. Proxies cannot change it. On the other hand the Request URI is the address of next hop in the signaling path and is therefore changed by every proxy. From Header: It indicates the originator of the request. Call ID: It uniquely identifies a specific invitation to session. Request Headers: Request Headers apply only to SIP request and used to provide additional information to the server regarding the request itself or regarding the client. Example: Subject header, which is used to describe a textual description of the session. Response headers: They apply to responses only to provide further information regarding response. Example: Retry after header, which can indicate when a called user will be available in case called user is busy or unavailable. Entity Header: In SIP, the message body contains information about the session or information to be presented to the user. The purpose of entity header is to indicate type For internal circulation of BSNL only Page 1

E1-E2(CFA)/SIP

Rev Date 28.03.2011

and format of information included in the message body, so that appropriate application can be called upon to act on the information within the message body. Example: Content- Length: It indicates the length of the message body in octets. Basic SIP Operation Basic SIP operation is the transaction of REQUESTs and RESPONSEs. Client generates SIP requests, server receives those requests and returns responses. The basic SIP operation starts with a SIP INVITE (request) message, which is generated by calling party. The message invites the called party to participate in a session i.e. a call. After reception of INVITE called party UA can generate different responses like ringing, busy, queuing, OK etc. For instance called party UA returns ringing. Subsequently, when called party answers the call, this UA will generate OK response. The calling client acknowledges that the called party has answered by issuing an ACK message. At this point, media (voice, data, video) are exchanged. Finally, one of the parties hangs up, which causes a BYE message to be sent. The other party UA sends OK response. At this point, the call is over.

For internal circulation of BSNL only

Page 1

Вам также может понравиться