Introduction to SIP(Session Initiation Protocol)

7,653 views

Published on

SIP is a VoIP protocol in Application Layer of OSI arch

Published in: Technology

Introduction to SIP(Session Initiation Protocol)

  1. 1. Introduction to Session Iinitiation Protocol (a VoIP protocol) 2007-10-16William.L wiliwe@gmail.com
  2. 2. Agenda Introduction Architecture SIP Message Format Call Flows
  3. 3. Introduction An application-layer signaling protocol Create, Modify, and Terminate sessions SIP is ASCII text-based SIP incorporates elements of two widely used Internet protocols: HTTP SIP borrowed a client-server design and the use of URLs and URIs SMTP SIP borrowed a text-encoding scheme and header style SIP uses e-mail-like names for addresses UserName@Host-Domain
  4. 4. Architecture (1/2) Client-Server architecture --- the same as HTTP Client originates message Server responds to or forwards message Elements SIP User Agents takes direction or input from a user and acts as an agent on their behalf to set up and tear down media sessions with other user agents. SIP Servers Registrar Proxy Redirect
  5. 5. Architecture (2/2) Request Response Server Client
  6. 6. SIP Message (1/8) SIP Message Message Headers Request / Status Line Message Body C R L F
  7. 7. INVITE sip:allen@10.7.1.228:5060 SIP/2.0 Via: SIP/2.0/UDP 22.3.56.790:5060;branch=z9G4bK0e8d From: sip:carol@22.3.56.790:5060 To: sip:bob@22.3.56.789:5060 Call-ID: 1234567890@10.8.2.106 Cseq: 1 INVITE Content-Type: applcation/sdp Content-Length: 224 v=0 o=jessica 0 0 IN IP4 10.7.1.229 s=Session SDP c=IN IP4 10.7.1.229 m=audio 5004 RTP/AVP 0 3 5 a=rtpmap:0 PCMU/8000 SIP Message (2/8)
  8. 8. SIP Request Message Via: SIP/2.0/UDP 22.3.56.790:5060;branch=z9G4bK0e8d From: sip:carol@22.3.56.790:5060 To: sip:bob@22.3.56.789:5060 Call-ID: 1234567890@10.8.2.106 Cseq: 1 INVITE Content-Type: applcation/sdp Content-Length: 224 INVITE sip:allen@22.3.56.789:5060 SIP/2.0 v=0 o=jessica 0 0 IN IP4 10.7.1.229 s=Session SDP c=IN IP4 10.7.1.229 m=audio 5004 RTP/AVP 0 3 5 a=rtpmap:0 PCMU/8000 C R L F SIP Message (3/8)
  9. 9. SIP Message (4/8)
  10. 10. GET /2001/Talks/0710-ep-grid/all.htm,access HTTP/1.1 User-Agent: W3C ChACL agent Host: www.w3.org Accept: text/xml Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0 Authorization: Basic xxxxxxxxxxxxxxxxxxxx Connection: Keep-Alive, TE TE: deflate, gzip, chunked, identity, trailers HTTP Message Request HTTP/1.0 200 Date: Sat, 07 Jul 2001 14:08:12 GMT Server: Apache/1.3.6 (Unix) PHP/3.0.15 WWW-Authenticate: Basic realm="W3CACL“ Content-length: 301 Content-Type: text/xml<?xml version="1.0"?> <!-- Session-Id: 994514895.830925 --><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:s="http://www.w3.org/2001/02/acls/ns#"> <rdf:Description aboutEach="#B1"> <s:hasAccessTo rdf:resource="http://www.w3.org/2001/Talks/0710-ep-grid/all.htm"/> </rdf:Description></rdf:RDF> HTTP Message Response SIP Message (5/8) SIP messages’ format is the same as HTTP ones
  11. 11. 6 Methods defined for request REGISTER INVITE ACK BYE CANCEL OPTONS SIP Message (6/8)
  12. 12. Status codes Informational – 1xx Success – 2xx Redirection – 3xx Client-Error – 4xx Server-Error – 5xx Global-Failure – 6xx SIP Message (7/8)
  13. 13. Most header fields and its using are the same as that defined in HTTP and SMTP SIP Message (8/8)
  14. 14. Call Flows Registration Basic Call Re-INVITE – modify the session’s parameter No Answer – use CANCEL method Busy Call Hold 3-way Conference -- The third party is added
  15. 15. Registration
  16. 16. Registration_Register_request
  17. 17. Registration_Register_response
  18. 18. Request Response bob@biloix.com Registrar User Agent Entity Location Server Bob 192.0.2.4 use store bob@biloix.com : 192.0.2.4
  19. 19. Basic Call 1 2 3 4 5 6
  20. 20. Basic Call_message_1
  21. 21. Basic Call_message_2
  22. 22. Basic Call_message_3 Bob Off-hook
  23. 23. Basic Call_message_4
  24. 24. Basic Call_message_5 Bob On-hook
  25. 25. Basic Call_message_6
  26. 26. Basic Call_the session is terminated
  27. 27. Session with re-INVITE (IP Address Change) 9 6
  28. 28. F6 Session with re-INVITE – Bob’s Original IP address
  29. 29. F9 Session with re-INVITE – Bob’s new IP address
  30. 30. Unsuccessful --- No Answer
  31. 31. Unsuccessful --- Busy
  32. 32. Call Hold
  33. 33. Call Hold_message_Request F5
  34. 34. Call Hold_message_Response F6
  35. 35. Three-Way Conference --- Third Party is Added
  36. 36. Three-Way Conference - Message_1 F5
  37. 37. F8 Three-Way Conference - Message_2
  38. 38. Three-Way Conference - start to 3-way conference
  39. 39. References RFC-3261 SIP:Session Initiation Protocol Understanding the Session Initiation Protocol, Alan B. Johnstone , 2/e, 2004 draft-ietf-sipping-service-examples-10.txt, March 5, 2006 draft-ietf-sipping-conferencing-models-01.txt, January 2003 RFC 3665 Session Initiation Protocol (SIP) Basic Call Flow Examples, , December 2003 http://www.in2eps.com/xrai/ztk-ietf-wg-rai-sip.html

×