1 kommunikatsiooniteenuste arendus irt0080 loeng 4 avo ots telekommunikatsiooni õppetool, ttÜ...

48
1 Kommunikatsioonitee nuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. [email protected]

Upload: lisa-miles

Post on 16-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

1

Kommunikatsiooniteenuste arendusIRT0080Loeng 4

Avo Otstelekommunikatsiooni õppetool,

TTÜ raadio- ja sidetehnika [email protected]

Page 2: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

2

SIP Overview(1) - History• SIP ( Session initiation protocol)

• Work began in 1995

• Developed in SIP Working Group in IETF

• Proposed standard RFC2543, February 1999

• New Version of SIP - RFC 3261, June 2002

• Split from MMUSIC (Multiparty Multimedia Session Control), Sep. 1999

Page 3: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

3

SIP Overview(2) - Main Functions

SIP is an application-layer control (signaling) protocol for :– initiating sessions

Find the user’s current location Carry session descriptions

– Modifying sessions– Terminating sessions

Page 4: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

4

SIP Overview(3) - What is a session?

• Refers to an active connection between two computers for the purpose of communicating and transferring information Internet telephone calls multimedia conferences Instant Messaging However it’s not limited to the above

Page 5: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

5

SIP Overview(4) • SIP is similar to HTTP :

both use a request/response model both are text-based much of SIP’s message and header field

syntax is identical to HTTP/1.1.

• Works independent of the underlying network

transmission protocol and indifferent to media

Page 6: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

6

SIP Overview(5) • Scalability

Functionality such as proxying, redirection, location, or registration can reside in

different physical servers. Distributed functionality allows new processes

to be added without affecting other components.

Page 7: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

7

SIP Overview(6) • Interoperability

An open standard Can implement to communicate with other

SIP based products

Page 8: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

8

SIP Overview(7) • Mobility

The user can be using a PC at work, PC at home ,wireless phone, IP phone, or regular phone.

Users must register/Update their current location.

Supports user mobility by proxying or redirecting requests to a user’s current location.

Proxy servers will forward calls to the user’s current location.

Page 9: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

9

Integration with IETF Protocols• SIP forms only part of an overall IP telephony system

• Other IETF protocol standards are used to build a fully functioning VoIP system.

• example: RSVP - to reserve network resources. RTP (Real Time Transport Protocol) - to transport real

time data RTSP (Real Time Streaming Protocol) - for controlling

delivery of streaming media. RTCP (Real Time Transport Control Protocol) – provides

information about the quality of the communication.

Page 10: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

10

Related Protocols

Page 11: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

11

SIP Capabilities(1/2)• Determine location of target points – Support address resolution, name mapping, call redirection• Determine media capabilities – SIP uses Session Description Protocol (SDP) for this• Determine availability – returns a message why the remote party cannot be contacted• Establish a session between end points – also support mid

call changes, changes of media characteristics or codec

Page 12: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

12

SIP Capabilities(2/2)• Permits interaction between devices via

signaling messages

• These messages can: Register a user with a system Invite a user to join an interactive session Establish a media stream between 2 or more

end

points

• Terminate a session

Page 13: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

13

SIP Network Architecture

Page 14: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

14

SIP Component – User Agent• User Agent Client (UAC)- Initiate SIP

Request

• User Agent Server (UAS)-Accepts or rejects call

• Phones – acts as UAC or UAS

• Implemented in Hardware or Software

Components

• Includes softphones, sip ip phones

Page 15: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

15

User Agents

Page 16: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

16

SIP Component – Proxy Server• Heart of SIP network that contains all

service logic.

• Receives SIP messages, forwards to next SIP UAS.

• Interprets, rewrites or translates a request message before forwarding it.

Page 17: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

17

Scenario with Proxy Server

Page 18: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

18

SIP Component – Redirect Server• Return routing information to the

originating endpoint.

• Does not accept or terminate calls

• Does not initiate its own SIP request

Page 19: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

19

Scenario with Redirect Server

Page 20: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

20

SIP Component – Registrar

• Accept registration requests from users

• Maintains user’s whereabouts at a

Location Server

• Typically co-located with a proxy server

or a redirect server and may offer

location services

Page 21: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

21

Scenario with Registrar

Page 22: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

22

Invitation for SIP Proxy Server

Page 23: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

23

Invitation for Redirect Server

Page 24: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

24

SIP Addressing• The SIP address is identified by a SIP

URL,in the format: user@host.

• Email-like identifier of the form

• Examples of SIP URLs:– sip:[email protected]– sip:[email protected]– sip:[email protected]

Page 25: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

25

SIP Messages• The message syntax is identical to

HTTP/1.1(RFC2616).

• Two kinds of SIP messages

SIP-message = Request | Response

Page 26: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

26

SIP Messages - Requests• INVITE – Initiates a call by inviting user to

participate in session.

• ACK - Confirms that the client has received a final response to an INVITE request.

• BYE - Indicates termination of the call.

• CANCEL - Cancels a pending request.

• REGISTER – Registers the user agent.

• OPTIONS – Used to query the capabilities of a server.

Page 27: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

27

SIP Messages - Responses

• 1xx - Informational Responses– 180 ringing

• 2xx - Successful Responses– 200 OK

• 3xx - Redirection Responses– 302 Moved Temporarily

• 4xx - Request Failure Responses.– 404 Not Found

• 5xx - Server Failure Responses.– 503 Service Unavailable

• 6xx - Global Failures Responses.– 600 Busy Everywhere

• All responses, except for 1XX, are considered final responses

Page 28: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

28

Message Headers

• Provide further information about the message• E.g.,

– To : header in an INVITE• The called party

– From : header• The calling party

• Four main categories– General, Request, Response, and Entity headers

Page 29: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

29

Header Fields• General Header

– Be applied to both request and response messages

• Entity Header– Define information about the message body

• Request Header– Allow the client to pass additional information about

the request

• Response Header– Allow the server to pass additional information

about the response

Page 30: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

30

SIP Headers

Page 31: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

31

SIP Headers – From• A field required in all requests and response

messages

• Provides identity of request’s initiator

• Example: – From: Laura Brown <sip:[email protected]>

Page 32: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

32

SIP Headers – To• Provides identity of the intended

recipient of the request

• Example:– To: Bob Johnson <sip:[email protected]>;

Page 33: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

33

SIP Headers – Call-ID(1/2)

• Provides a globally unique identifier to

distinguish specific invitations

• Typically uses a 32-bit cryptographically

random numbers

• Example:– Call-ID: [email protected]

Page 34: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

34

SIP Headers – Call-ID(2/2)

Page 35: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

35

SIP Headers – Contact(1/2)• A Contact header provides a URL where

the user can be reached directly.

• This feature is important because it offloads SIP servers that do not need to be in the signalling path after routing the first INVITE.

• Example:– Contact: Bob Johnson<sip:[email protected]>

Page 36: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

36

SIP Headers – Contact(2/2)

Page 37: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

37

SIP Header - Via• History of message’s path through

network(s)

• Helps to prevent looping and ensures

replies route back to originator

• Indicates the used transport protocol, ip

address and port of sender• Via: SIP/2.0/UDP 192.168.6.21:5060

Page 38: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

38

SIP Header – Content-Type• Provides information about media type of

message body

• Content-Type: application/sdp

Page 39: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

39

SIP Header – CSeq(1/2)• CSeq or command sequence:• Needed in both request messages as well as response messages• Need to increment this when a user with the same Call-ID wants to send different SIP methods or content ( Except ACK and Cancel)• When sending responses to requests, CSeq should be the same• The numerical part of the Cseq is used to order different

requests within the same session. • CSeq: 1 INVITE

Page 40: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

40

SIP Header – CSeq(2/2)

Page 41: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

41

An example of SIP Request

Page 42: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

42

An example of SIP Response

Page 43: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

43

Reliable Transmission of Responses(1/2)

• Final responses are transmitted reliably between server and client, using retransmissions or a reliable transport protocol to ensure delivery.

• Provisional responses may either be received by the client or be lost in the network.

Page 44: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

44

Reliable Transmission of Responses(2/2)

Page 45: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

45

Reliable Transmission of Requests(1/2)

Page 46: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

46

Reliable Transmission of Requests(2/2)

Page 47: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

47

Summary

• SIP is gaining acceptance in the industry• Open Source projects are taking the lead in SIP implementations• New generation of services are already being offered• Staying with single a vender solution is currently

workable• Interoperability between vender products is still in early stages

Page 48: 1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee

48

Reference• RFC 2543(SIP/1.0)

• RFC 3261(SIP/2.0)

• RFC 2327(SDP)