1 extending sip speaker: hsuan-ming chen adviser: ho-ting wu date: 2005/04/26
Post on 21-Dec-2015
226 views
TRANSCRIPT
1
Extending SIP
Speaker: Hsuan-Ming Chen
Adviser: Ho-Ting Wu
Date: 2005/04/26
2
Outline
Background Extending SIP Introduction Design Principle for SIP Extension Extension to SIP Summary
3
Background What is SIP?
SIP is an end-to-end, application-layer control (signaling) protocol for Initiating, modifying, terminating sessions
Find the user’s current location Carry session descriptions
signaling qulity of service media transport
physical
link
network
transport
4
Background (cont.)
SIP components - User Agent User Agent Client (UAC)- Initiate SIP Request User Agent Server (UAS)-Accepts or rejects call
5
Background (cont.)
SIP components - Proxy Server Heart of SIP network that contains all service logic Receives SIP messages, forwards to next SIP UAS
6
Background (cont.)
SIP components - Redirect Server Return routing information to the originating endpoint
7
Background (cont.)
SIP components - Registrar Server Maintains user’s whereabouts Typically co-located with a proxy server or a redir
ect server and may offer location services
8
Background (cont.) SIP Method
INVITE Initiates a call by inviting user to participate in session
ACK Confirms 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
9
Background (cont.)
SIP Network Architecture
10
Extending SIP Introduction
Session Initiation Protocol (SIP) is designed so that its core functionality is present in every implementation
SIP is flexible and easy to extend According to special requirements devise extensions to
meet particular needs The community has defined a set of extensions very
quickly
These extensions are implemented in a module fashion
11
Introduction (cont.)
Extension Negotiation A negotiation process is needed in order to determine the
extensions that will be used within any given session
12
Introduction (cont.) Extension Negotiation
Two headers: Require an Supported A client lists all of the extensions it needs to establish a
session in the Require header and all of the extensions it supports in the Supported header
RequireSupported
SupportedRequire
foo3, foo5 will not be used
Supports: 1, 2, 3, 4 Supports: 1, 2, 4, 5
13
Design Principle for SIP Extension
Do Not Break the Toolkit Approach Extensions to SIP should not broaden the scope
of SIP Ex. One might want to use SIP to download Web
pages from a server, but HTTP already exists for that purpose. So using sip extensions to cover HTTP functionality is not wise
14
Design Principle for SIP Extension (cont.)
Independence from Session Type SIP separates session establishment from session descript
ion Ex. should define how SIP interacts with QoS, should not d
efine how SIP can used in conjunction with SDP and RSVP in order to provide QoS
Do Not Change Method Semantics Ex. define a header called Real-Purpose be carried in INVI
TE request as follows: Real-Purpose: Tell me your capabilities
Use OPTIONS method which is defined specifically for that purpose
15
Extension to SIP 1. Reliable Delivery of Provisional Responses 2. Mid-session Transaction That Do Not Change the State of the Session 3. Multiple Message Bodies 4. Instant Messages 5. Automatic Configuration of UAs 6. Preconditions to Be Fulfilled Before Alerting 7. Caller Preferences 8. Asynchronous Notification of Events 9. Third-party Call Control 10. Session Transfer 11. Sending Commands 12. SIP Security
16
Extension to SIP (1/12)
Reliable Delivery of Provisional Responses SIP does not transmit provisional responses reliably [Draft-ietf-sip-100rel] is the SIP extension defined to
provide the reliable transfer of provisional responses
(1) INVITE
(2) 180 Ringing
(3) 200 OK
(4) ACK
Converstaion
17
Extension to SIP (1/12) (cont.)
Reliable Delivery of Provisional Responses A new method called Provisional Response ACK (PRA
CK) was defined to acknowledge the reception of provisional responses
UASs transmitting reliable provisional responses retransmit until a message from the UAC is received acknowledging reception
18
Extension to SIP (1/12) (cont.)
(1) INVITE
(2) 180 RINGING
(3) 180 RINGING
(4) PRACK(5) 200 OK
(6) 200 OK
(7) ACK
Conversation
19
Extension to SIP (2/12)
Mid-session Transaction That Do Not Change the State of the Session SIP provides a means to change the parameters
of the sessions through re-INVITEs Exchange information (ex. Billing information) that
does not influence the state of the session New SIP method called INFO [RFC 2976] provides thi
s functionality
20
Extension to SIP (3/12) Multiple Message Bodies
Deliver photos along with the session description UA needs to receive a file with the photo or a URL where
Bob’s UA can retrieve the photo An INVITE carrying a message body with two parts:
SDP session description photo
(1) INVITE
SDPLaura’ s photo
(2) 200 OK
(3) ACK
21
Extension to SIP (4/12)
Instant Messages A new method called MESSAGE was defined to carry in its
body the message that the sender wrote
Bob Larua
(1) INVITE
(4) MESSAGE“ Costa del Sol”
(2) 200 OK
How do you spell the name of the place we are
going on vocation?
(3) ACK
(5) 200 OK
22
Extension to SIP (5/12) Automatic Configuration of UAs
One of the main features of SIP is that it provides user mobility through registration
(1) I am a new laptop in the internet, I have just been connected
DHCP server
(2) Your IP address is: 140.124.181.112Your SIP domain name is: ntut.edu.tw
23
Extension to SIP (6/12)
Preconditions to Be Fulfilled Before Alerting Establishing a secure channel between two end users and
providing QoS takes time Ghost ringing
If the session is established and the network does not grant the necessary QoS, the session fails. This would mean that a user answers a SIP phone that is ringing and finds no call established
A new method called preCOnditions MET (COMET) COMETs are sent to indicate that all preconditions are met
and session establishment can proceed
24
Extension to SIP (6/12) (cont.)
(1) INVITEQoS
preconditions
(2) 183 Session Progress
(3) PRACK
(5) COMET
(4) 200 OK
(6) 200 OK
(7) 180 RINGING
Bob
per
form
s Q
oS r
eser
vatio
ns
Laur
a pe
rfor
ms
QoS
res
erva
tions
25
Extension to SIP (6/12) (cont.)
26
Extension to SIP (7/12)
Caller Preferences Ex. Fixed phone rung first, mobile phone next New headers
Accept-Contact Reject-Contact Request-Disposition
27
Extension to SIP (7/12) (cont.)
Laura uses new SIP headers to indicate her preferences
Accept-Contact
Accept-ContactReject-Contact
Reject-ContactRequest-Disposition
Request-Disposition
28
Extension to SIP (8/12)
Asynchronous Notification of Events Event notification mechanism
The SIP event notification framework enables SIP to inform users about a variety of events in which they’ve previously indicated an interest via signaling
Two new methods: SUBSCRIBE is used by a SIP entity to declare its
interest in a particular When the subscribed event occurs, NOTIFY requests
are sent containing information about the session
29
Extension to SIP (8/12) (cont.)
(1) INVITE
(2) 464 Busy here
(3) ACK
(4) SUBSCRIBELaura’ s status
(6) 200 OK(5) 200 OK
(8) NOTIFYLaura is available
(7) 200 OK
(9) 200 OK
(10) INVITE
(6) NOTIFYLaura is busy
Bob Laura
30
Extension to SIP (8/12) (cont.)
Bob receives a NOTIFY when Laura joins the conference call
LauraBob
(1) INVITE
(2) 200 OK
(3) ACK
(4) SUBSCRIBENumber of particpants
(5) 200 OK
(6) NOTIFYThere are currently 6 participants
(7) 200 OK
(8) INVITE
(9) 200 OK
(10) ACK
(11) NOTIFYThere are currently 7 participants
(12) 200 OK
ConferenceUnit
31
Extension to SIP (9/12)
Third-party Call Control
Bob establishes a session between the conference unit and his computer at home
32
Extension to SIP (9/12) (cont.)
Third-party call control message flow
Because the second INVITE contains the session description provided by Bob’s computer, the conference unit will send the audio stream to Bob’s computer.
Bob
Bob’ scomputer
Conference Unit
(1) INVITEno SDP
(2) 200 OKSDP computer
(3) INVITESDP computer
(4) 200 OKSDP conference unit
(5) ACKSDP conference unit
(6) ACKno SDP
33
Extension to SIP (10/12)
Session Transfer Using session transfer to filtrate phone call A new method REFER was defined instructs a server
to send a specific request
34
Extension to SIP (10/12) (cont.)Laura Bob
Bob’ ssecretary
Please holdwhile I transfer
your call
Conversation
Conversation
(1) INVITE
(2) 200 OK
(3) ACK
(4) INVITE (hold)
(5) 200 OK
(6) ACK
(7) REFERRefer-To: SIP: [email protected]: SIP: [email protected]
(8) 202 Accepted
(9) INVITEReferred-By: SIP: [email protected]
(10) 200 OK
(11) ACK
(12) NOTIFY
(13) 200 OK
(14) BYE
(15) 200 OK
35
Extension to SIP (11/12)
Sending Commands sometimes it is necessary to send a command to a device
outside a master/slave architecture A new method called DO was defined to carry commands
Bob controls his radio using SIP
Laura BobBob’ s radio
(1) INVITE(2) DOmute
(3) 200 OK(4) 200 OK
(5) ACK
Conversation
(6) BYE
(7) 200 OK
(2) DOSet volume to 3/10
(9) 200 OK
36
Extension to SIP (12/12) SIP Security
SIP security is concerned with the exchange of SIP signalling
Bob Laura
(1) INVITE
(2) 401 UnauthorizedWWW – authenticate: (challenge)
(3) ACK
(4) INVITEAuthorization: (Credentials)
(6) ACK
(5) 200 OK
Conversation
37
Extension to SIP (12/12) (cont.)
SIP Security A malicious proxy in the middle of the SIP path
could change the contents of the SIP message S/MIME Authentication is generic enough to
exchange secure e-mails and work with both HTTP and SIP Message are signed using a public-key encryption
mechanism An individual user has two keys
private key: only one user knows public key: available to anyone
38
Summary
SIP is flexible and easy to extend SIP security is a critical issue because it is
used in the internet SIP + Extending SIP can develop unexpected
applications
39
Reference
SIP Demystified by Gonzalo CamarilloMcGraw-Hill, Published August 2001, ISBN 0071373403
http://www.cs.columbia.edu/sip/ RFC 3261(SIP/2.0) RFC 2327(SDP)