Sunteți pe pagina 1din 26

SESSION INITIATION PROTOCOL Andrea De Iuri NSN ITALY

Soc Classification level 1 Nokia Siemens Networks

Presentation / Author / Date

Overview
SIP is an application layer protocol that is used for establishing, modifying and terminating multimedia sessions in an Internet Protocol (IP) network. SIP was created with the following design goals in mind: transport protocol neutrality able to run over reliable (TCP, SCTP) and unreliable (UDP) protocols; request routing direct or proxy-routed (control); separation of signaling and media description can add new applications or media; extensibility; personal mobility.

Soc Classification level 2 Nokia Siemens Networks

Presentation / Author / Date

SIP Architecture
Elements in SIP can be classified as User Agents (UAs) and Intermediaries (servers). A SIP UA or terminal is the end point of dialogs: it sends and receives SIP requests and responses, it is the end point of multimedia streams The UA consists of two parts: User Agent Client (UAC) the caller application that initiates requests; User Agent Server (UAS) accepts, redirects, rejects requests and sends responses to incoming requests on behalf of the user.

SIP intermediaries are logical entities through which SIP messages pass on their way to their final destination. These Intermediaries are used to route and redirect requests.

Soc Classification level 3 Nokia Siemens Networks

Presentation / Author / Date

SIP Architecture (continued)


The Intermediary Servers are:

Proxy server receives and forwards SIP requests. It can interpret or rewrite certain parts of SIP messages that do not disturb the state of a request or dialog at the end points, including the body.

Redirect server maps the address of requests to new addresses. It


redirects requests but does not participate in the transaction.

Location server keeps track of the location of users.

Registrar server a server that accepts REGISTER requests. It is used

to store explicit binding between a users address of record (SIP address) and the address of the host where the user is currently residing or wishes to receive requests.
Presentation / Author / Date

Soc Classification level 4 Nokia Siemens Networks

SIP Architecture (continued)


Two more elements that are used to provide services for SIP users:

Application Server an AS is an entity in the network that provides endusers with a service. Typical examples of such servers are presence and conferencing servers.

Back-to-Back-User-Agent as the name depicts, a B2BUA is where a


UAS and a UAC are glued together. The UAS terminates the request just like a normal UAS. The UAC initiates a new request that is somehow related to requests received at the UAS end, but not in any protocolspecific link. This entity is almost like a proxy, but breaks all the rules that govern the way a proxy can modify a request.

Soc Classification level 5 Nokia Siemens Networks

Presentation / Author / Date

SIP Entities

Soc Classification level 6 Nokia Siemens Networks

Presentation / Author / Date

SIP TRAPEZOID

Soc Classification level 7 Nokia Siemens Networks

Presentation / Author / Date

Private and Public User Identities

Soc Classification level 8 Nokia Siemens Networks

Presentation / Author / Date

Private and Public User Identities (continued)

Soc Classification level 9 Nokia Siemens Networks

Presentation / Author / Date

Public Identifiers Used in SIP

Two main types of identifiers are used in SIP:

SIP URI (sip:bob.smith@nokia.com)


and

TEL URI (tel:+358912345678)

Soc Classification level 10 Nokia Siemens Networks

Presentation / Author / Date

SIP Protocol Message Format

Soc Classification level 11 Nokia Siemens Networks

Presentation / Author / Date

SIP Message Format (Start Line)


The SIP message is made up of three parts: the start line, message headers and body. The start line contents vary depending on whether the SIP message is a request or a response. For requests it is referred to as a request line and for responses it is referred to as a status line. An example SIP request looks like: INVITE sip:bob.smith@nokia.com SIP/2.0 Via: SIP/2.0/UDP cscf1.example.com:5060;branch=z9hG4bK8542.1 Via: SIP/2.0/UDP [5555::1:2:3:4]:5060;branch=z9hG4bK45a35h76 Max-Forwards: 69 From: Alice <sip:alice@nokia.com>;tag=312345 To: Bob Smith <sip:bob.smith@nokia.com> Call-ID: 105637921 CSeq: 1 INVITE Contact: sip:alice@[5555::1:2:3:4] Content-Type: application/sdp Content-Length: 159 [body]

Soc Classification level 12 Nokia Siemens Networks

Presentation / Author / Date

SIP Requests (Start Line = Request Line)


SIP requests are distinguished from responses using the start line. The start line in the request is often referred to as the request line. It has three components: a method name, a request-URI and the protocol version.

Method the method indicates the type of request. Six are defined in the
base SIP specification [RFC3261]: the INVITE, CANCEL, ACK,BYE,REGISTER,OPTIONS.Other methods have been created as an extension to [RFC3261].

Request-URI the request-URI is a SIP or a Secure SIP (SIPS) URI that


identifies a resource that the request is addressed to.

Protocol Version the current SIP version is 2.0.

Soc Classification level 13 Nokia Siemens Networks

Presentation / Author / Date

SIP Responses (Start Line = Status Line)


SIP Responses can be distinguished from requests by looking at the start line. The start line in the response is often referred to as the status line. It has three components: the protocol version, status code and reason phrase.

Protocol Version this is identical to the protocol version in the request


line.

Status Code the status code is a three-digit code that identifies the
nature of the response. It indicates the outcome of the request.

Reason Phrase this is a free text field providing a short description of


the status code. It is mainly aimed at human users.

Soc Classification level 14 Nokia Siemens Networks

Presentation / Author / Date

SIP Responses (Status Codes)


Status codes are classified in six classes (classes 2xx to 6xx are final responses):

1xx provisional/informational responses. They indicate that the request was received and
the recipient is continuing to process the request.

2xx success responses. The request was successfully received, understood and accepted. 3xx re-direction responses. Further action needs to be taken by the requester in order to
complete the request.

4xx client error responses. The request contains a syntax error. It can also indicate that
the server cannot fulfill the request. server.

5xx server error responses. The server failed to fulfill a valid request. It is the fault of the 6xx global failure responses. The request cannot be fulfilled at any server. The server

responding with this response class needs to have definitive information about the user.

Soc Classification level 15 Nokia Siemens Networks

Presentation / Author / Date

Header Fields
Header fields contain information related to the request: for example, the initiator of the request, the recipient of the request and call identifier. Examples: To header To: SIP-URI(;parameters) From header From: SIP-URI(;parameters) Call-ID header Call-ID: unique-id CSeq header CSeq: digit method Via header Via: SIP/2.0/[transport-protocol] sent-by(;parameters) Max-Forwards header Max-Forwards: digit Contact header Contact: SIP-URI

Soc Classification level 16 Nokia Siemens Networks

Presentation / Author / Date

Message Body
The message body (payload) can carry any text-based information, while the request method and the response status code determine how the body should be interpreted. When describing a session the SIP message body is typically a Session Description Protocol (SDP) message. Example of SDP:

v=0 o=User.Alpha 2890844526 2890844526 IN IP4 here.com t=0 0 c=IN IP4 100.101.102.103 m=audio 49170 RTP/AVP 0 a=rtpmap:0 PCMU/8000

Soc Classification level 17 Nokia Siemens Networks

Presentation / Author / Date

Session, Dialog, Transaction, and Branch


The term SESSION describes the media connections between the two users. The exchange of media is done on the so-called bearer level: this means that Real-time Transport Protocol (RTP) packets are sent between 2 or among more SIP UAs. A SIP DIALOG is the signaling relation between the two UEs which is needed to establish, modify and release the multimedia session. The dialog will be first established (with the INVITE request) and will exist as long as the related session is active. Every SIP dialog is identified by the value of the Call-ID header and by the tags in the To and the From headers of the SIP requests, which in our example look like: From: "Your Brother" <sip:tobi@brother.com>;tag=veli To: "My beloved Sister" <sip:theresa@home2.hu>;tag=schwester Call-ID: apb03a0s09dkjdfglkj49555

Soc Classification level 18 Nokia Siemens Networks

Presentation / Author / Date

Session, Dialog, Transaction, and Branch (continued)


A SIP transaction comprises a single SIP request and all the responses related to it. In order to establish the session, user A sends an INVITE request to user B. At the very outset it receives a 100 (Trying) response from the SIP Proxy in response to the request. Afterwards, user B responds with a 180 (Ringing) and, finally, a 200 (OK) response. All these 4 messages belong to the same transaction and have the same Branch ID and CSeq number: From: "Your Brother" <sip:tobi@brother.com>;tag=veli To: "My beloved Sister" <sip:theresa@home2.hu>;tag=schwester Call-ID: apb03a0s09dkjdfglkj49555 CSeq: 1112 INVITE Every subsequent request sent from the same end will have a higher CSeq number than the preceding request

Soc Classification level 19 Nokia Siemens Networks

Presentation / Author / Date

Session, Dialog, Transaction, and Branch (continued)


Every entity either UA or Intermediary will correlate the responses that are received for a sent request on the basis of the branch parameter that it added as a parameter to its Via header entry: for example, the SIP Proxy of user A adds the following Via header to the INVITE request: INVITE sip:theresa@home2.hu SIP/2.0 Via: SIP/2.0/UDP proxy1.visited1.fi;branch=9pctb The branch parameter identifies the INVITE transaction (i.e., the INVITE request and the responses to it) at the Proxy1.visited.fi

Soc Classification level 20 Nokia Siemens Networks

Presentation / Author / Date

Basic Message Flow Concepts (Session Estab.)

Soc Classification level 21 Nokia Siemens Networks

Presentation / Author / Date

EXTENDING SIP (Extensions Negotiation)

Soc Classification level 22 Nokia Siemens Networks

Presentation / Author / Date

Example: EXTENDING SIP to Make it Reliable Transmission of Hop-by-Hop Provisional Responses (Unreliable)

Soc Classification level 23 Nokia Siemens Networks

Presentation / Author / Date

Example: EXTENDING SIP to Make it Reliable (continued) Transmission of E2E Provisional Responses (Unreliable)

Soc Classification level 24 Nokia Siemens Networks

Presentation / Author / Date

Example: EXTENDING SIP to Make it Reliable (continued) Transmission of Provisional Responses (100rel Reliable)

Soc Classification level 25 Nokia Siemens Networks

Presentation / Author / Date

Example: EXTENDING SIP to Make it Reliable (continued) Preconditions (carried in UPDATE and SDP)

SDP Payload:
m=audio 20000 RTP/AVP 0 a=curr:qos local sendrecv a=curr:qos remote none a=des:qos mandatory local sendrecv a=des:qos mandatory remote sendrecv

Soc Classification level 26 Nokia Siemens Networks

Presentation / Author / Date

S-ar putea să vă placă și