Session Initialization Protocol SIP Presented by Lei Luo
Session Initialization Protocol (SIP) Presented by: Lei Luo Computer & Information Science Department University of Delaware Nov. 18, 2004 Some slides are borrowed from Dorgham Sisalem’s SIP Tutorial
What Is SIP? Alice’s Home Station Alice Phone Network Bob 2
What is SIP? l. A signaling protocol ¡ Set up ¡ Modify Multimedia Sessions ¡ Tear down ¡ Request/deliver presence and Instant messages l Enable Internet endpoints ¡ Discover one another ¡ Agree on a characterization of a session 3
What is NOT SIP? l Not a transport protocol l Not a media transmission protocol l Not a Qo. S Reservation Protocol l Not an integrated communications system 4
Internet Multimedia Protocol Stack SCTP Source: Henning Schulzrinne, http: //www. cs. columbia. edu/~hgs/internet/ 5
What can SIP Do? l User Location l User Availability l User Capability l Session Setup l Session Management 6
What Else Can SIP Do? l Request/deliver presence information and instant message sessions: ¡ Publish and upload presence information ¡ Request delivery of presence information ¡ Notify presence and other events ¡ Transport instant messages 7
Marconi Tesla INVITE g 180 Ringin 200 OK ACK Media Session BYE 200 OK Simple SIP session establishment example 8
Proxy Server Alice INVITE Bob INVITE g 180 Ringin 200 OK ACK Media Session BYE 200 OK SIP call example with proxy server 9
Alice Registrar Server REGISTER Contact: sip: a lice@128. 175. 13. 16 200 OK SIP registration example 10
SUBSCRIBE 200 OK NOTIFY 200 OK … NOTIFY 200 OK MESSAGE 200 OK SIP presence and instant message example 11
How does SIP Work? l Based on HTTP-like request/response model l Text-based protocol l Use the UTF-8 charset l SIP message ¡A request from a client to a server ¡ A response from a server to a client 12
SIP User Agent (UA) l l SIP-enabled end-devices Maintain states on calls Local and remote tags ¡ Call-ID ¡ Local and remote CSeq header fields ¡ Contain client (UAC) & server applications (UAS) l Must support SDP for media description l 13
SIP User Agent Examples Cisco Siemens MIC 14
Presence Agent l SIP devices ¡ Receive subscription requests ¡ Generate state notifications l Collect presence information l Need to authenticate a subscription request 15
SIP Gateway l. A special type of UA ¡ Interface a SIP network to a non-SIP network l Terminate the signaling path l May or may not terminate the media path l Support much more users than normal UA 16
SIP Networks with Gateways Telephone switch Local/long distance 1 -212 -5551212 Internal Telephone Extn: 7040 rtspd: media server Single machine Department PBX 713 x SIP/PSTN Gateway sipconf: Conference server Proxy, redirect, registrar server Extn: 7134 RTSP clients sipum: Unified messaging SQL database Web server Web based configuration SNMP (Network Management) H. 323 Extn: 7136 xiaotaow@cs Quicktime RTSP SIP/H. 323 Gateway Net. Meeting 17 Borrowed from Xiaotao Wu’s slides (Columbia University, 2002)
SIP Servers SIP Workhorses l Logical Entities ¡ Accept SIP requests ¡ Respond to requests l Types of Servers ¡ Proxy Server ¡ Redirect Server ¡ Registration Server 18
SIP Message Format Generic-message = Start-line *message-header CRLF [ message-body ] Start-line = Request-Line / Status-Line Request-Line = Method SP Request-URI SP SIP-Version CRLF Status-Line = SIP-Version SP Status-Code SP Reason-Phase CRLF SP – blank space 19
SIP Methods Sets l Basic Methods l Extended Methods ¡ INVITE ¡ REFER ¡ REGISTER ¡ SUBSCRIBE ¡ BYE ¡ NOTIFY ¡ ACK ¡ MESSAGE ¡ CANCEL ¡ etc. ¡ OPTIONS 20
SIP Response Codes l Consistent with/extend HTTP/1. 1 response codes 1 xx – Informational ¡ 2 xx – Success Borrowed from HTTP ¡ 3 xx – Redirection ¡ 4 xx – Client error ¡ 5 xx – Server failure ¡ 6 xx – Global Failure Created for SIP ¡ l l 600 – Busy Everywhere 603 – Decline 604 – Does Not Exist Anywhere etc. 21
SIP Registration Server Alice REGISTER sip: registrar. udel. edu Via: SIP/2. 0/UDP 128. 175. 13. 50: 5060; branch=z 9 h. G 4 b. Kus 19 Max-Forwards: 70 To: Alice <sip: alice@eecis. udel. edu> From: Alice <sip: alice@eecis. udel. edu>; tag=3431 Call-ID: 23@128. 175. 13. 50 Registrar Server CSeq: 1 REGISTER SIP/2. 0 200 OK Contact: sip: alice@128. 175. 13. 50 Via: 0 SIP/2. 0/UDP 128. 175. 13. 50: 5060; Content-Length: branch=z 9 h. G 4 b. Kus 19 To: Alice <sip: alice@eecis. udel. edu> From: Alice <sip: alice@eecis. udel. edu>; tag=3431 Call-ID: 23@128. 175. 13. 50 CSeq: 1 REGISTER Contact: <sip: alice@128. 175. 13. 50>; expires=3600 Content-Length: 0 22
SIP Proxy Server DNS server INVITE sip: bob@yahoo. com SIP/2. 0 Via: SIP/2. 0/UDP 100. 101. 102. 103: 5060; branch=z 9 h. G 4 b. Kmp 17 a Outbound To: Bob <sip: bob@yahoo. com> proxy server From: Alice <sip: alice@udel. edu>; tag=42 Subject: Where are you exactly? Contact: <sip: alice@pc. udel. edu> INVITE sip: bob@yahoo. com SIP/2. 0 Via: SIP/2. 0/UDP proxy. udel. com: 5060; branch=z 9 h. G 4 b. K 83842. 1 Via: SIP/2. 0/UDP 100. 101. 102. 103: 5060; branch=z 9 h. G 4 b. Kmp 17 a To: Bob <sip: bob@yahoo. com> From: Alice <sip: alice@udel. edu>; tag=42 Subject: Where are you exactly? Contact: <sip: alice@pc. udel. edu> 100 Trying 180 Ringing 200 OK BYE ACK Alice SIP Trapezoid Media (RTP) Location server INVITE sip: bob@yahoo. com SIP/2. 0 Via: SIP/2. 0/UDP proxy. yahoo. com: 5060; branch=z 9 h. G 4 b. Ktiop 3 Via: SIP/2. 0/UDP proxy. udel. com: 5060; branch=z 9 h. G 4 b. K 83842. 1 Via: SIP/2. 0/UDP 100. 101. 102. 103: 5060; branch=z 9 h. G 4 b. Kmp 17 a To: Inbound Bob <sip: bob@yahoo. com> From: Alice <sip: alice@udel. edu>; tag=42 proxy server Subject: Where are you exactly? Contact: <sip: alice@pc. udel. edu> 180 Ringing 200 OK Bob 23
SIP Proxy Server INVITE Bob Bob’s Phone 486 Busy Here Alice INVITE Bob Proxy servers can make flexible “routing decisions” to decide where to send a request. Bob’s voicemail 24
SIP Proxy Server INVITE 200 Bob OK Bob’s Office Phone INVITE Bob Alice 200 OK CANCEL INVITE Bob CANCEL In parallel search, a proxy issues several requests to possible user locations upon receiving an incoming request. Bob’s Cell Phone Bob’s Home Phone 25
SIP Redirect Server SIP/2. 0 302 Moved Temporarily INVITE sip: bob@yahoo. com SIP/2. 0 Via: SIP/2. 0/UDP 100. 101. 102. 103: 5060; branch=z 9 h. G 4 b. Kmp 17 a To: Bob <sip: bob@yahoo. com>; tag=64 To: Bob <sip: bob@yahoo. com> From: Alice <sip: alice@udel. edu>; tag=42 Subject: Where are you exactly? Contact: sip: alice@200. 201. 202. 203 Contact: <sip: alice@pc. udel. edu> ACK Redirect Server INVITE sip: bob@200. 201. 202. 203 SIP/2. 0 Via: SIP/2. 0/UDP 100. 101. 102. 103: 5060; branch=z 9 h. G 4 b. Kmp 17 a To: Bob <sip: bob@yahoo. com> From: Alice <sip: alice@udel. edu>; tag=13473 Subject: Where are you exactly? Contact: <sip: alice@pc. udel. edu> Alice Bob 26
That’s It! l We have learned a lot about SIP!! No Way!!! Did we really learn a lot of stuff about SIP? Then what are we gonna do? 27
Key References l J. Rosenberg, SIP: Session Initialization Protocol, RFC 3261, 2002 l A. Johnston, SIP: Understanding the Session Initialization Protocol, 2 nd edition l J. Kuthan and D. Sisalem, SIP Tutorial http: //iptel. org/sip/ l SIP web site: http: //www. cs. columbia. edu/sip/ 28
Questions?
- Slides: 29