• 沒有找到結果。

Session Initiation Protocol (SIP)

N/A
N/A
Protected

Academic year: 2022

Share "Session Initiation Protocol (SIP)"

Copied!
36
0
0

加載中.... (立即查看全文)

全文

(1)

Session Initiation Protocol (SIP)

(2)

Introduction

n

A powerful alternative to H.323

n

More flexible, simpler

n

Easier to implement

n

Advanced features

n

Better suited to the support of intelligent user devices

n

A part of IETF multimedia data and control architecture

n

SDP, RTSP (Real-Time Streaming Protocol), SAP

(Session Announcement Protocol)

(3)

The Popularity of SIP

n

Originally Developed in the MMUSIC (Multiparty Multimedia Session Control)

n A separate SIP working group

n RFC 2543

n Many developers

n The latest version: RFC 3261 (June 2002 )

n

SIP + MGCP/MEGACO

n The VoIP signaling in the future

n

“bake-offs” or SIP Interoperability Tests

n The development of SIP and its implementation by system developers has involved a number of events.

n Various vendors come together and test their products against each other

n to ensure that they have implemented the specification correctly

(4)

SIP Architecture

n

A signaling protocol

n The setup, modification, and tear-down of multimedia sessions

n

SIP + SDP

n Describe the session characteristics to potential session participants

n

Separate signaling and media streams

n Signaling may pass via one or more proxy or redirect servers

n Media stream takes a more direct path.

SIP Signaling

IP Network

(5)

SIP Network Entities [1/4]

n

Clients

n

User agent clients

n

Application programs sending SIP requests

n

Servers

n

Responds to clients’ requests

n

Clients and servers may be in the same platform.

n

Proxy acts as both clients and servers

(6)

SIP Network Entities [2/4]

n

Four types of servers

n

Proxy servers

n Act in a similar way to a proxy server used for web access

n Handle requests or forward requests to other servers after some translation

n Can be used for call forwarding, time-of-day routing, or follow-me services

ProxySIP 1.Request

Collins@work.com 2.Request

Collins@home.net

4.Response 3.Response

(7)

SIP Network Entities [3/4]

n

Redirect servers

n Accept SIP requests

n Map the destination address to zero or more new addresses

n Return the new address(es) to the originator of the request

Redirect Server 1.Request

Collins@work.com

Caller@work.com

2.Moved temporarily

Contact: Collins@home.net 3.ACK

4.Request

(8)

SIP Network Entities [4/4]

n

A user agent server

n Accepts SIP requests and contacts the user

n The user responds → an SIP response

n A SIP device

n E.g., a SIP-enabled telephone

n

A registrar (location server)

n Accepts SIP REGISTER requests

n Indicating that the user is at a particular address

n Personal mobility

n Typically combined with a proxy or redirect server

(9)

SIP Call Establishment

n

A SIP call establishment is simple.

n

A number of interim responses may be made to the

INVITE prior to the called party accepting the call.

(10)

SIP Advantages

n

Attempt to keep the signaling as simple as possible

n

Offer a great deal of flexibility

n Does not care what type of media is to be exchanged during a session or the type of transport to be used for the media

n

Various pieces of information can be included within the messages

n Including non-standard information

n Text-based encoding

n Enable the users to make intelligent decisions

n The control of the intelligent features is placed in the hands of the customer, not the network operator.

n E.g., SUBJECT header

(11)

Call Completion to Busy Subscriber Service

(12)

Overview of SIP Messaging Syntax

n

Text-based

n

Similar to HTTP

n

Disadvantage – more bandwidth consumption

n

SIP messages

n

message = start-line

*message-header CRLF [message-body]

n

start-line = request-line | status-line

n

Request-line specifies the type of request

n

The response line indicates the success or

failure of a given request.

(13)

n

Message headers

n

Additional information of the request or response

n

E.g.,

n The originator and recipient

n Retry-after header

n Subject header

n

Message body

n

Describe the type of session

n

The most common structure for the message body is SDP (Session Description Protocol).

n

Could include an ISDN User Part message

n

Examined only at the two ends

(14)

SIP Requests [1/2]

n

Method SP Request-URI SP SIP-version CRLF

n

Request-URI

n

The SIP address of the destination

n

Methods

n

INVITE, ACK, OPTIONS, BYE, CANCLE, REGISTER

n

INVITE

n Initiate a session

n Information of the calling and called parties

n The type of media

n ∼IAM (initial address message) of ISUP

n ACK only when receiving the final response

(15)

SIP Requests [2/2]

n BYE

n Terminate a session

n Can be issued by either the calling or called party

n OPTIONS

n Query a server as to its capabilities

n To support a particular type of media

n CANCEL

n Terminate a pending request

n Pending Request: an INVITE did not receive a final response

n REGISTER

n Log in and register the address with a SIP server

n “all SIP servers” – multicast address (224.0.1.175)

n Can register with multiple servers

Can have several registrations with one server

(16)

“One Number” Service

(17)

SIP INFO Method

n

Specified in RFC 2976

n

For transferring information during an ongoing session

n

The transfer of DTMF digits

n

The transfer of account balance information

n

Pre-paid service

n

The transfer of mid-call signaling information

(18)

SIP Responses

n SIP Version SP Status Code SP Reason-Phrase CRLF

n

Reason-Phrase

n A textual description of the outcome

n Could be presented to the user

n

Status code

n A three-digit number

n 1XX Informational

n 2XX Success (only code 200 is defined)

n 3XX Redirection

n 4XX Request Failure

n 5XX Server Failure

n 6XX Global Failure

(19)

SIP Addressing

n

SIP URLs (Uniform Resource Locators)

n

user@host

n

sip:collins@home.net

n

sip:3344556789@telco.net

(20)

Message Headers

n

Provide further information about the message

n

E.g.,

n

To:header in an INVITE

n The called party

n

From:header

n The calling party

n

Four main categories

n

General, Request, Response, and Entity headers

(21)

General Headers

n

Used in both requests and responses

n

Basic information

n E.g., To:, From:, Call-ID: (uniquely identifies a specific invitation to a session), …

n

Contact:

n Provides a URL for use in future communication regarding a particular session

n Examples 1: In a SIP INVITE, the Contact header might be different from the From header.

n An third-party administrator initiates a multiparty session.

n Example 2: Used in response, it is useful for directing further requests directly to the called user.

n Example 3: It is used to indicate a more appropriate

address if an INVITE issued to a given URI failed to reach

(22)

n

Request Headers

n

Apply only to SIP requests

n

Addition information about the request or the client

n

E.g.,

n Subject:

n Priority: urgency of the request (emergency, urgent, normal, or non-urgent)

n

Response Headers

n

Further information about the response that cannot be included in the status line

n

E.g.,

n Unsupported Retry-After

(23)

Entity Headers

n

Indicate the type and format of information included in the message body

n

Content-Length: the length of the message body

n

Content-Type: the media type of the message body

n

E.g., application/sdp

n

Content-Encoding: for message compression

n

Content Disposition: how a message part should be interpreted

n

session, alert, render …

(24)

Examples of SIP Message Sequences

n

Via:

n

From: and To:

n

Call-ID:

n host-specific

n

Contact: (for future SIP message transmission)

n *

n

Content-Length:

n Zero, no msg body

n

CSeq:

n A response to any request must use the same value of CSeq as used in the request.

Expires:

(25)

Invitation

n

A two-party call

n Subject:

n optional

n Content-Type:

n application/sdp

n A dialog ID

n To identify a peer-to-peer relationship between two user agents

n Tag in From

n Tag in To

n Call-ID

(26)

Termination of a Call

n

CSeq has changed.

(27)

Redirect Servers

n

An alternative address

n 302, Moved temporarily

n

Another INVITE

n Same Call-ID

n CSeq ++

(28)

Proxy Servers [1/2]

n

Sits between a user-agent client and the far-end user- agent server

n

Numerous proxies can reside in a chain between the caller and callee.

n The most common scenario will have at least two proxies: one at the caller and one at the callee end.

n It is likely that only the last proxy in the chain changes the Request-URI.

n The other proxies in the chain would simply use the domain part of the received Request-URI as input to a location

function (e.g., DNS) to determine the next hop.

(29)

Proxy Servers [2/2]

n

Via:

n The path taken by a request

n Loop detected, 482 (status code)

n For a response

n The 1st Via: header is checked and removed.

n The second Via: header is checked.

n If it exists, perform forwarding.

n If not, the response is destined to the proxy itself.

n The response finds its way back to the originator of the request.

n Branch: used to distinguish between multiple responses to the same request

n Forking Proxy: Issue a single request to multiple destinations

(30)

Proxy State [1/2]

n

Can be either stateless or stateful

n

If stateless, the proxy takes an incoming request, performs whatever translation and forwards the corresponding outgoing request and forgets

anything.

n Retransmission takes the same path (no change on retransmission).

n

If stateful, the proxy remembers incoming requests and corresponding outgoing request.

n The proxy is able to act more intelligently on subsequent requests and responses related to the same session.

(31)

Proxy State [2/2]

n

Record-Route: and Route: Headers

n The subsequent requests may not pass through the same path as the initial request/response.

n E.g., use Contact:

n A Proxy might require that it remains in the signaling path for all subsequent requests to provide some advanced

service.

n In particular for a stateful proxy

n Insert its address into the Record-Route: header

n The response includes the Record-Route: header

n The information contained in the Record-Route: header is used in the subsequent requests related to the same call.

n The Route: header is used to record the path that the request is enforced to pass.

lr (loose routing) vs. sr (strict routing)

(32)
(33)
(34)

Forking Proxy

n

A proxy can “fork” requests

n

A user is registered at several locations

n ;branch=xxx

n

In order to handle such forking, a proxy must be

stateful.

(35)
(36)

參考文獻

相關文件