Session Initialization Protocol (SIP)
Download
Report
Transcript Session Initialization Protocol (SIP)
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?
A signaling protocol
Set up
Modify
Multimedia Sessions
Tear down
Request/deliver presence and Instant messages
Enable Internet endpoints
Discover one another
Agree on a characterization of a session
3
What is NOT SIP?
Not a transport protocol
Not a media transmission protocol
Not a QoS Reservation Protocol
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?
User Location
User Availability
User Capability
Session Setup
Session Management
6
What Else Can SIP Do?
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
ACK
Media Session
200 OK
Simple SIP session establishment example
8
Proxy
Server
Alice
INVITE
Bob
INVITE
ACK
Media Session
200 OK
SIP call example with proxy server
9
Alice
Registrar Server
SIP registration example
10
SUBSCRIBE
…
MESSAGE
SIP presence and instant message example
11
How does SIP Work?
Based on HTTP-like request/response model
Text-based protocol
Use the UTF-8 charset
SIP message
A request from a client to a server
A response from a server to a client
12
SIP User Agent (UA)
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)
Must support SDP for media description
13
SIP User Agent Examples
Cisco
Siemens
MIC
14
Presence Agent
SIP devices
Receive subscription requests
Generate state notifications
Collect presence information
Need to authenticate a subscription request
15
SIP Gateway
A special type of UA
Interface a SIP network to a non-SIP network
Terminate the signaling path
May or may not terminate the media path
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
Department
PBX
713x
SIP/PSTN Gateway
Quicktime
Single machine
RTSP
sipconf:
Conference server
Proxy,
redirect,
registrar
server
Extn: 7134
RTSP clients
sipum:
Unified
messaging
SQL
database
Web based
configuration
SNMP
(Network
Management)
H.323
Extn: 7136
xiaotaow@cs
Web
server
SIP/H.323
Gateway
NetMeeting
17
Borrowed from Xiaotao Wu’s slides (Columbia University, 2002)
SIP Servers SIP Workhorses
Logical Entities
Accept SIP requests
Respond to requests
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
Basic Methods
INVITE
REGISTER
BYE
ACK
CANCEL
OPTIONS
Extended Methods
REFER
SUBSCRIBE
NOTIFY
MESSAGE
etc.
20
SIP Response Codes
Consistent with/extend HTTP/1.1 response codes
1xx – Informational
2xx – Success
Borrowed from HTTP
3xx – Redirection
4xx – Client error
5xx – Server failure
6xx – Global Failure Created for SIP
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=z9hG4bKus19
Max-Forwards: 70
To: Alice <sip:[email protected]>
From: Alice <sip:[email protected]>;tag=3431
Call-ID: [email protected]
Registrar Server
CSeq: 1 REGISTER
SIP/2.0
200
OK
Contact: sip:[email protected]
Via:0 SIP/2.0/UDP 128.175.13.50:5060;
Content-Length:
branch=z9hG4bKus19
To: Alice <sip:[email protected]>
From: Alice <sip:[email protected]>;tag=3431
Call-ID: [email protected]
CSeq: 1 REGISTER
Contact: <sip:[email protected]>;expires=3600
Content-Length: 0
22
SIP Proxy Server
DNS server
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 100.101.102.103:5060;
branch=z9hG4bKmp17a
Outbound
To: Bob <sip:[email protected]>
proxy server
From: Alice <sip:[email protected]>;tag=42
Subject: Where are you exactly?
Contact: <sip:[email protected]>
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP proxy.udel.com:5060;
branch=z9hG4bK83842.1
Via: SIP/2.0/UDP 100.101.102.103:5060;
branch=z9hG4bKmp17a
To: Bob <sip:[email protected]>
From: Alice <sip:[email protected]>;tag=42
Subject: Where are you exactly?
Contact: <sip:[email protected]>
100
Trying
180
Ringing
200 OK
Location
server
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP proxy.yahoo.com:5060;
branch=z9hG4bKtiop3
Via: SIP/2.0/UDP proxy.udel.com:5060;
branch=z9hG4bK83842.1
Via: SIP/2.0/UDP 100.101.102.103:5060;
branch=z9hG4bKmp17a
To:Inbound
Bob <sip:[email protected]>
From: Alice <sip:[email protected]>;tag=42
proxy server
Subject: Where are you exactly?
Contact: <sip:[email protected]>
100 Trying
180 Ringing
200 OK
BYE
ACK
180 Ringing
200 OK
Media (RTP)
Alice
SIP Trapezoid
200 OK
Bob
23
SIP Proxy Server
INVITE Bob
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
200Bob
OK
Bob’s
Office
Phone
INVITE Bob
Alice
Bob’s Cell
Phone
CANCEL
INVITE
Bob
200 OK
INVITE
Bob
CANCEL
In parallel search, a proxy issues several
requests to possible user locations upon
receiving an incoming request.
Bob’s
Home
Phone
25
SIP Redirect Server
SIP/2.0 302 Moved Temporarily
INVITE sip:[email protected] SIP/2.0 Via: SIP/2.0/UDP 100.101.102.103:5060;
Via: SIP/2.0/UDP 100.101.102.103:5060; branch=z9hG4bKmp17a
branch=z9hG4bKmp17a
To: Bob <sip:[email protected]>;tag=64
To: Bob <sip:[email protected]>
From: Alice <sip:[email protected]>;tag=42
From: Alice <sip:[email protected]>;tag=42
Subject: Where are you exactly?
Subject: Where are you exactly?
Contact: sip:[email protected]
Contact: <sip:[email protected]>
ACK
Redirect Server
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 100.101.102.103:5060;
branch=z9hG4bKmp17a
To: Bob <sip:[email protected]>
From: Alice <sip:[email protected]>;tag=13473
Subject: Where are you exactly?
Contact: <sip:[email protected]>
Alice
Bob
26
That’s It!
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
J. Rosenberg, SIP: Session Initialization
Protocol, RFC 3261, 2002
A. Johnston, SIP: Understanding the
Session Initialization Protocol, 2nd edition
J. Kuthan and D. Sisalem, SIP Tutorial
http://iptel.org/sip/
SIP web site:
http://www.cs.columbia.edu/sip/
28
Questions?