Presentation is loading. Please wait.

Presentation is loading. Please wait.

SIP:Session Initiation Protocol Che-Yu Kuo Computer & Information Science Department University of Delaware May 11, 2010 CISC 856: TCP/IP and Upper Layer.

Similar presentations


Presentation on theme: "SIP:Session Initiation Protocol Che-Yu Kuo Computer & Information Science Department University of Delaware May 11, 2010 CISC 856: TCP/IP and Upper Layer."— Presentation transcript:

1 SIP:Session Initiation Protocol Che-Yu Kuo Computer & Information Science Department University of Delaware May 11, 2010 CISC 856: TCP/IP and Upper Layer Protocols

2 What is SIP?  Proposed Standard described in IETF RFC 2543  Application-layer control protocol  A signaling protocol for initiating, managing and terminating voice and audio session across packet networks with one or more participants.  Text-based protocol with highly extensible

3 SIP Functionality  User location  User availability  User Capabilities  Session setup  Session Management

4 SIP basic services  Call forwarding  Call diversion  Personal mobility  Calling and called party authentication  Terminal capabilities negotiation  Multicast conferencing

5 SIP operation USER AGENT 1 USER AGENT2 1.invitation2.invitation 3. OK4. OK 5.Acknowledge6.Acknowledge 7. Audio/Video data From: Thomas Doumas Next Generation Telephony: A Look at Session Initiation Protocol White Paper

6 SIP entities  User Agent (UA)  User agent client (UAC)  User agent server (UAS)  Proxy server  Stateless proxy server  Stateful proxy server  Redirect server  Registrar

7 SIP Protocol Structure From: http://docs.sun.com/app/docs/doc/821-0203/6nl988v7d  Client  Sending Request  Receiving Response  Server  Receiving Request  Sending Response  Framing  Error Handling  Client  INVITE Transaction  ACK  Non INVITE Transaction  Matching Requests to Client Transactions  Server  INVITE Transaction  Non INVITE Transaction  Matching Requests to Server Transactions  Error Handling

8 SIP Protocols  SIP provides basic elements of telephony  SIP: Call setup and termination  SDP: Describe call configuation  RTP: data transfer  RTCP: data stream management

9 SIP Protocol stack TCP From: Thomas Doumas Next Generation Telephony: A Look at Session Initiation Protocol White Paper UDP SDPSIPRTPRTCP IP Link and Physical Layers

10 SIP on TCP / UDP  SIP can run over any datagram or stream protocol.  Why UDP is default protocol??  Performance  Scalability

11 SIP addressing  SIP clients are identified by a SIP URL which follows the “user @ host” form.  User: user name / telephone number  Host: domain name / host name/ numeric network address  Examples: sip:graceland@ixlmemphis.com sip:+1-800-555-1212@information.att.net

12 SIP Messages  SIP Requests Sent from the client to the server  SIP Responses Sent from the server to the client  Message parts  Start line  Headers  Body(content)

13 SIP request methods MethodDescription INVITE Initiates a call, changes call parameters ACK Confirms a final response for INVITE BYE Terminates a call CANCEL Cancel 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.

14 Invite message ParameterDescription Call-ID Uniquely identifies a particular session Cseq A monotonically increasing sequence number used to indetify the sequence of requests associated with a given Call-ID From A SIP URL that identifies the initiator of the request. May include a “friendly name” (e.q. John) To A SIP URL that identifies the recipient of the request. May include a “friendly name” Via Indicates the path taken by the request.

15 SIP response types  Provisional  1xx = provisional, searching, ringing, queuing etc.  Final  2xx = success  3xx = redirection, forwarding  4xx = request failure(client mistakes)  5xx = server failure  6xx = global failure (busy, refusal, not available anywhere)

16 SIP response examples  100 trying  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

17 SDP: session description protocol  Used to described the attributes of SIP sessions  SDP parameters are encapsulated as the message body of a SIP request  Encoded with ASCII text  Simple form =

18 Information in SDP  Session Information  Session name and purpose  Time(s) the session is active  Information about the bandwidth  Contact information for the person responsible for this session  Media Information  Type of media(audio/video)  Type of Transport protocol(UDP/TCP/RTP)  Media Format(H.261/Mpeg)  Multicast address and Transport Port for media  Remote address for media and Transport Port for contact address

19 Request Message example INVITE sip:bob@acme.com SIP/2.0 Via: SIP/2.0/UDP alice_ws.radvision.com From: Alice A. To: Bob B. Call-ID: 2388990012@alice_ws.radvision.com CSeq: 1 INVITE Subject: Lunch today. Content-Type: application/SDP Content-Length: 182 {BODY} v=0 o=Alice 53655765 2353687637 IN IP4 128.3.4.5 s=Call from Alice. c=IN IP4 alice_ws.radvision.com M=audio 3456 RTP/AVP 0 3 4 5

20 Response Message example SIP/2.0 200 OK Via: SIP/2.0/UDP alice_ws.radvision.com From: Alice A. To: Bob B. ;tag=17462311 Call-ID: 2388990012@alice_ws.radvision.com CSeq: 1 INVITE Content-Type: application/SDP Content-Length: 200 {BODY} v=0 o=Bob 4858949 4858949 IN IP4 192.1.2.3 s=Lunch c=IN IP4 machine1.acme.com m=audio 5004 RTP/AVP 0 3

21 Session establishment and termination UACUAS 1: INVITE bob@lab.acme.com 2. 100 Trying 3. 180 Ringing 4. 182 Queued, 2callers ahead 5. 182 Queued, 1callers ahead 6. 200 OK 7.ACK 1: BYE bob@lab.acme.com 2. 200 OK

22 Registration Bob’s softphone Biloxi.com registrar Register 200 OK REGISTER sip:registrar.biloxi.com SIP/2.0 Via: SIP/2.0/UDP bobspc.biloxi.com:5060;branch=z9hG4bKnashds7 Max-Forwards: 70 To: Bob From: Bob ;tag=456248 Call-ID: 843817637684230@998sdasdh09 CSeq: 1826 REGISTER Contact: Expires: 7200 Content-Length: 0 SIP/2.0 200 OK Via: SIP/2.0/UDP bobspc.biloxi.com:5060;branch=z9hG4bKnashds7 ;received=192.0.2.4 To: Bob ;tag=2493k59kd From: Bob ;tag=456248 Call-ID: 843817637684230@998sdasdh09 CSeq: 1826 REGISTER Contact: Expires: 7200 Content-Length: 0

23 Call Redirection UAC Redirect server sip.acme.com Location Service UAS gw.telco.com 1. INVITE bob@ acme.com 2. bob@acme.com? 3. 35733572@ gw.telco.com 4. 302 Moved temporarily 35733572@gw.telco.com 5.ACK 6. INVITE 35733572@gw.telco.com 7. 200 OK 8.ACK

24 Call Proxy Bob’s softphone Biloxi.com Proxy Atlanta.com Proxy Alice’s softphone 1.INVITE 3..INVITE 5..INVITE 2.100 Trying 4.100 Trying 6.180 Ringing 1. INVITE Alice -> atlanta.com proxy INVITE sip:bob@biloxi.com SIP/2.0 Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8 Max-Forwards: 70 To: Bob From: Alice ;tag=1928301774 Call-ID: a84b4c76e66710 CSeq: 314159 INVITE Contact: Content-Type: application/sdp Content-Length: 142 2. 100 Trying atlanta.com proxy -> Alice SIP/2.0 100 Trying Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8 ;received=192.0.2.1 To: Bob From: Alice ;tag=1928301774 Call-ID: a84b4c76e66710 CSeq: 314159 INVITE Content-Length: 0 3 INVITE atlanta.com proxy -> biloxi.com proxy INVITE sip:bob@biloxi.com SIP/2.0 Via: SIP/2.0/UDP bigbox3.site3.atlanta.com;branch=z9hG4bK77ef4c2312983.1 Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8 ;received=192.0.2.1 Max-Forwards: 69 To: Bob From: Alice ;tag=1928301774 Call-ID: a84b4c76e66710 CSeq: 314159 INVITE Contact: Content-Type: application/sdp Content-Length: 142 F4 100 Trying biloxi.com proxy -> atlanta.com proxy SIP/2.0 100 Trying Via: SIP/2.0/UDP bigbox3.site3.atlanta.com;branch=z9hG4bK77ef4c2312983.1 ;received=192.0.2.2 Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8 ;received=192.0.2.1 To: Bob From: Alice ;tag=1928301774 Call-ID: a84b4c76e66710 CSeq: 314159 INVITE Content-Length: 0 5.INVITE biloxi.com proxy -> Bob INVITE sip:bob@192.0.2.4 SIP/2.0 Via: SIP/2.0/UDP server10.biloxi.com;branch=z9hG4bK4b43c2ff8.1 Via: SIP/2.0/UDP bigbox3.site3.atlanta.com;branch=z9hG4bK77ef4c2312983.1 ;received=192.0.2.2 Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8 ;received=192.0.2.1 Max-Forwards: 68 To: Bob From: Alice ;tag=1928301774 Call-ID: a84b4c76e66710 CSeq: 314159 INVITE Contact: Content-Type: application/sdp Content-Length: 142 6.180 Ringing Bob -> biloxi.com proxy SIP/2.0 180 Ringing Via: SIP/2.0/UDP server10.biloxi.com;branch=z9hG4bK4b43c2ff8.1 ;received=192.0.2.3 Via: SIP/2.0/UDP bigbox3.site3.atlanta.com;branch=z9hG4bK77ef4c2312983.1 ;received=192.0.2.2 Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8 ;received=192.0.2.1 To: Bob ;tag=a6c85cf From: Alice ;tag=1928301774 Call-ID: a84b4c76e66710 Contact: CSeq: 314159 INVITE Content-Length: 0

25 Call Proxy Bob’s softphone Biloxi.com Proxy Atlanta.com Proxy Alice’s softphone 1.INVITE 3..INVITE 5..INVITE 2.100 Trying 4.100 Trying 6.180 Ringing 7.180 Ringing 8.180 Ringing 9. 200 OK 10. 200 OK 11. 200 OK 12. ACK 7.180 Ringing biloxi.com proxy -> atlanta.com proxy SIP/2.0 180 Ringing Via: SIP/2.0/UDP bigbox3.site3.atlanta.com;branch=z9hG4bK77ef4c2312983.1 ;received=192.0.2.2 Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8 ;received=192.0.2.1 To: Bob ;tag=a6c85cf From: Alice ;tag=1928301774 Call-ID: a84b4c76e66710 Contact: CSeq: 314159 INVITE Content-Length: 0 8 180 Ringing atlanta.com proxy -> Alice SIP/2.0 180 Ringing Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8 ;received=192.0.2.1 To: Bob ;tag=a6c85cf From: Alice ;tag=1928301774 Call-ID: a84b4c76e66710 Contact: CSeq: 314159 INVITE Content-Length: 0 9 200 OK Bob -> biloxi.com proxy SIP/2.0 200 OK Via: SIP/2.0/UDP server10.biloxi.com;branch=z9hG4bK4b43c2ff8.1 ;received=192.0.2.3 Via: SIP/2.0/UDP bigbox3.site3.atlanta.com;branch=z9hG4bK77ef4c2312983.1 ;received=192.0.2.2 Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8 ;received=192.0.2.1 To: Bob ;tag=a6c85cf From: Alice ;tag=1928301774 Call-ID: a84b4c76e66710 CSeq: 314159 INVITE Contact: Content-Type: application/sdp Content-Length: 131 10. 200 OK biloxi.com proxy -> atlanta.com proxy SIP/2.0 200 OK Via: SIP/2.0/UDP bigbox3.site3.atlanta.com;branch=z9hG4bK77ef4c2312983.1 ;received=192.0.2.2 Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8 ;received=192.0.2.1 To: Bob ;tag=a6c85cf From: Alice ;tag=1928301774 Call-ID: a84b4c76e66710 CSeq: 314159 INVITE Contact: Content-Type: application/sdp Content-Length: 131 11 200 OK atlanta.com proxy -> Alice SIP/2.0 200 OK Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8 ;received=192.0.2.1 To: Bob ;tag=a6c85cf From: Alice ;tag=1928301774 Call-ID: a84b4c76e66710 CSeq: 314159 INVITE Contact: Content-Type: application/sdp Content-Length: 131 12 ACK Alice -> Bob ACK sip:bob@192.0.2.4 SIP/2.0 Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds9 Max-Forwards: 70 To: Bob ;tag=a6c85cf From: Alice ;tag=1928301774 Call-ID: a84b4c76e66710 CSeq: 314159 ACK Content-Length: 0

26 Call Proxy Bob’s softphone Biloxi.com Proxy Atlanta.com Proxy Alice’s softphone 1.INVITE 3..INVITE 5..INVITE 2.100 Trying 4.100 Trying 6.180 Ringing 7.180 Ringing 8.180 Ringing 9. 200 OK 10. 200 OK 11. 200 OK 12. ACK Media Session 13.BYE 14. 200 OK 13 BYE Bob -> Alice BYE sip:alice@pc33.atlanta.com SIP/2.0 Via: SIP/2.0/UDP 192.0.2.4;branch=z9hG4bKnashds10 Max-Forwards: 70 From: Bob ;tag=a6c85cf To: Alice ;tag=1928301774 Call-ID: a84b4c76e66710 CSeq: 231 BYE Content-Length: 0 14 200 OK Alice -> Bob SIP/2.0 200 OK Via: SIP/2.0/UDP 192.0.2.4;branch=z9hG4bKnashds10 From: Bob ;tag=a6c85cf To: Alice ;tag=1928301774 Call-ID: a84b4c76e66710 CSeq: 231 BYE Content-Length: 0

27 SIP Protocol Structure From: http://docs.sun.com/app/docs/doc/821-0203/6nl988v7d

28 SIP Protocol Structure Bob’s softphone Biloxi.com Proxy Atlanta.com Proxy Alice’s softphone 1.INVITE 3..INVITE 5..INVITE 2.100 Trying 4.100 Trying 6.180 Ringing 7.180 Ringing 8.180 Ringing 9. 200 OK 10. 200 OK 11. 200 OK

29 SIP Protocol Structure Bob’s softphone Biloxi.com Proxy Atlanta.com Proxy Alice’s softphone Client Transaction UAC core Client Transport Server Transaction Proxy core Server Transport Client Transaction Client Transport Server Transaction Proxy core Server Transport Client Transaction Client Transport Server Transaction UAS core Server Transport 2.100 trying sendReceive Response 100 trying 1.Invite request request sendReceive Request Invite request Open session

30 SIP Protocol Structure Bob’s softphone Biloxi.com Proxy Atlanta.com Proxy Alice’s softphone Client Transaction UAC core Client Transport Server Transaction Proxy core Server Transport Client Transaction Client Transport Server Transaction Proxy core Server Transport Client Transaction Client Transport Server Transaction UAS core Server Transport 3.Invite request request sendReceive Request Invite request 4.100 trying sendReceive Response 100 trying

31 SIP Protocol Structure Bob’s softphone Biloxi.com Proxy Atlanta.com Proxy Alice’s softphone Client Transaction UAC core Client Transport Server Transaction Proxy core Server Transport Client Transaction Client Transport Server Transaction Proxy core Server Transport Client Transaction Client Transport Server Transaction UAS core Server Transport 5.Invite request request sendReceive Request Invite request Response sendReceive Response 180 ringing 6.180 ringing Response sendReceive Response 180 ringing 7.180 ringing Response sendReceive Response 180 ringing 8.180 ringing

32 SIP Protocol Structure Bob’s softphone Biloxi.com Proxy Atlanta.com Proxy Alice’s softphone Client Transaction UAC core Client Transport Server Transaction Proxy core Server Transport Client Transaction Client Transport Server Transaction Proxy core Server Transport Client Transaction Client Transport Server Transaction UAS core Server Transport Response sendReceive Response 200 OK 10.200 OK Response sendReceive Response 200 OK 11. 200 OK Response sendReceive Response 200 OK 9.200 OK

33 References  T. Doumas, Next Generation Telephony: A Look at Session Initiation Protocol White Paper  Radvision SIP Overview  P. Stalvig, Session Initiated Protocol(SIP): A Five-Function Protocol, 2008/07  http://www.tech-invite.com/Ti-sip-archi.html

34 Questions Thanks!


Download ppt "SIP:Session Initiation Protocol Che-Yu Kuo Computer & Information Science Department University of Delaware May 11, 2010 CISC 856: TCP/IP and Upper Layer."

Similar presentations


Ads by Google