Upload
anne-cooper
View
237
Download
1
Embed Size (px)
Citation preview
SIP/Session mobility
陳旻秀中華大學資訊工程學系
Outline
What’s SIP SIP Overview Session Mobility Split Session
What’s SIP
Session Initiation Protocol
Application-layer control protocol
Main function -User Location Service
-Session establishment
-Session participant management
-Limited feature establishment
What is SIP ?
Session Initiation Protocol MMUSIC working group: RFC 2543 SIP working group: RFC 3261
SIP enable Internet endpoints (User agents) to discover one another and to agree on a characterization of a session they would like to share All kind of real-time multimedia types, such as
voice, video or text messages
Characteristic of SIP
Open - 如同 HTTP 以代碼表示服務狀況並採用和 SMTP
同樣的帳號模式
Extensible
- 可以像 DNS 一樣利用上下游關係進行擴充
RFC
RFC文件編號 說明
RFC2543 第一份 SIP RFC
RFC3261 SIP 的基礎
RFC3262 管理應答關係
RFC3263 SIP Proxy 規則
RFC3264 offer/answer model
RFC3265 事件表示
SIP Function and Property
A signaling protocol (application-layer control protocol) For creating, modifying, and terminating sessions
Separate signaling and media streams
End-to-End transmission
Establishing a sip session within the same domain
SIP Registrar Server
SIP Proxy Server
SIP User Agent ServerSIP User Agent Client
32
線條說明
Request
Response
Domain A
1
6
4
5
RTP
SIP Architecture
request
response
non-SIP protocol
SIP User Agent Client(Caller)
SIP User Agent Server(Callee)
SIP Proxy SIP Proxy
SIP Proxy
Location Server
SIP Redirect Server
1
2
3
4
5
6
78
9
121314
RTP
1011
Establishing a sip sessionin dissimilar domain
Domain A SIP Proxy Server
Domain A SIP Registrar Server
Domain B SIP Proxy Server
Domain B SIP Registrar Server
User Agent ClientUser Agent Server
SIP Redirect Server
2 3
4
9
1018 7
65
線條說明
Request
Response
RTP
Domain A Domain B
Network Entities
UA (User Agent) UAC (User agent client)
Initiate SIP request UAS (User agent server)
Receive request, return a response
SIP Proxy Server Forwards requests to the next any kind of SIP
servers or UA
Network Entities (cont.)
SIP Redirect Server Map SIP address into new address and return to
the client SIP Registrar Server
Accept user register requests to update user address location database
Location Server A database to obtain information about a callee's
possible location
Registrar Server
Location ServerRegistrar
Proxy
UA
Register
Store
Query Response
SIP Addressing
SIP URI E-mail like user@host sip:[email protected]
Request Method
INVITE The user is begin invited to participate in a session.
ACK The client has received a final response to an INVITE.
OPTIONS The server is begin queried as to its capabilities.
BYE The user wishes to release the call.
CANCEL It cancels a pending request (not completed request).
REGISTER
It conveys the user’s location information to a SIP server.
Response Code
1xx --- Provisional 100 Trying
2xx --- Successful 200 OK
3xx --- Redirection 302 Moved Temporarily
4xx --- Request Failure 486 Busy Here
5xx --- Server Failure 501 Not Implemented
6xx --- Global Failure 604 Does Not Exist Anywhere
Basic Call Flow
RTP
UAC (Caller)Alice’s softphone
UAS (Callee)Bob’s SIP phone
taipei.comproxy
tainan.comproxy
INVITE 1INVITE 2
100: Trying
3INVITE 4
100: Trying
5
180: Ringing
6180: Ringing
7180: Ringing
8 200: OK 9
200: OK10
200: OK11
ACK 12
BYE 13
200: OK 14
Busy Call Flow
UAC (Caller)Alice’s softphone
UAS (Callee)Bob’s SIP phone
taipei.comproxy
tainan.comproxy
INVITE 1INVITE 2
100: Trying
3INVITE 4
100: Trying
5
486: Busy
6
486: Busy
8
486: Busy
10
ACK 7
ACK 9
ACK 11
Cancel Call Flow
UAC (Caller)Alice’s softphone
UAS (Callee)Bob’s SIP phone
taipei.comproxy
tainan.comproxy
INVITE 1INVITE 2
100: Trying
3 INVITE 4100: Trying
5180: Ringing
6180: Ringing
7180: Ringing
8
200: OK10
CANCEL9
200: OK10
CANCEL9
200: OK10
CANCEL9
487: RT 11
ACK 12487: RT 11
ACK 12487: RT 11
ACK 12
SIP Message Syntax Overview Text-based
Use the UTF-8 charset (RFC 2279) Syntax similar to HTTP/1.1 (RFC 2616)
generic-message = start-line *message-header CRLF [message-body]
Start Line
Request-Line = Method SP Request-URI SP SIP-Version CRLF
Status-Line = SIP-Version SP Status-Code SP Reason-Phrase CRLF
Ex: INVITE sip:[email protected] SIP/2.0
Ex: SIP/2.0 200 OK
start-line = Request-line | Status-line
Message Header
General Header Be applied to both request and response messages
Entity Header Define information about the message body
Request Header Allow the client to pass additional information about the
request Response Header
Allow the server to pass additional information about the response
message-header = ( general-header | request-header | response-header | entity-header)
Message Header (cont.)
Basic Call Flow
RTP
UAC (Caller)Alice’s softphone
UAS (Callee)Bob’s SIP phone
taipei.comproxy
tainan.comproxy
INVITE 1INVITE 2
100: Trying
3INVITE 4
100: Trying
5
180: Ringing
6180: Ringing
7180: Ringing
8 200: OK 9
200: OK10
200: OK11
ACK 12
BYE 13
200: OK 14
Message-body
Blank-line
Message-header
An Example of SIP Request
Start-lineINVITE sip:[email protected] SIP/2.0 Via: SIP/2.0/UDP pc33.taipei.com:5060From: Alice <sip:[email protected]> To: Bob <sip:[email protected]> Call-ID: [email protected] CSeq: 1 INVITE Contact: <sip:[email protected]> Content-Type: application/sdp Content-Length: 147 v=0 o=UserA 2890844526 2890844526 IN IP4 here.com s=Session SDP c=IN IP4 100.101.102.103 t=0 0m=audio 49172 RTP/AVP 0 a=rtpmap:0 PCMU/8000
Start-line
Message-header
An Example of SIP Response
SIP/2.0 100 Trying Via: SIP/2.0/UDP pc33.taipei.com:5060From: Alice <sip:[email protected]> To: Bob <sip:[email protected]> Call-ID: [email protected] CSeq: 1 INVITE Content-Length: 0
If no body in message, there is no Content-Type and Content-Length = 0
SIP Extensions
SIP has attracted enormous interest Simple Easy to implement Easy to add functions
A large number of extensions to SIP has been proposed INFO Method REFER Method
SIP INFO Method
Specified in RFC 2976 For transferring information during an
ongoing session The transfer of mid-call signaling information
SIP REFER Method
Specified in RFC 3515 To enable the sender of the request to
instruct the receiver to contact a third party For Call Transfer applications
New header fields Refer-to Refer-by
SIP for Instant Messaging
The IETF working group – SIP for Instant Messaging and Presence
Leveraging Extensions (SIMPLE)
Four mobile issue of SIP
Terminal Mobility
Personal Mobility
Session Mobility
Service Mobility
Limitation of mobile IP
Triangle routing
Triangle registration
Encapsulation overhead
Need for home address
ISP must offer home agent service
MIP v.s. SIP
Mobility IP bind a IP address to a temporary care-of address
(ex 140.126.5.2)
SIP bind a user-level identifier to a temporary IP address
(ex sip:[email protected])
Session Mobility
Session mobility allows a user to maintain a media session even while changing terminals
Alice@mobileAlice@fixed Bob@fixed
pc pc
phone
Personal Mobility
sip.csie.chu.edu.tw
Ant.csie.chu.edu.tw
Service Mobility
Services setting bind with SIP identified “home” server Call Processing Language (CPL)
Contact: Carol <sip:[email protected]>;language="en,es,de";media="audio,video,application/chat";duplex="full";priority="urgent"
Types of session mobility
Third-party call control
RFC 3725
REFER
RFC 3515
Related work
K. Kaneko, H. Morikawa, and T. Aoyama:"Session Layer Mobility Support for 3C Everywhere Environments," In Proceeding of the 6th International Symposium on Wireless Personal Multimedia Communications (WPMC 2003), vol.2, pp.347-351, Yokosuka, Japan, October 2003.
Migration mechanism
SL Middleware
BSD socket
Port 1234
A
SL Middleware
BSD socket
Port 5678
B
SL Middleware
BSD socket
Port 1357
C
Media Stream
1. Migration Message
2. Create New Socket
3. Notify B
BSD socket
Port 24684. Create New Socket
Media Stream
Related work (cond.)
Ohta, K.; Yoshikawa, T.; Nakagawa, T.; Isoda, Y.; Kurakake, S.; NTT DoCoMo,Inc.“Adaptive terminal middleware for session mobility ” ,Distributed Computing Systems Workshops, 2003. Proceedings. 23rd International Conference on , 2003 Pages:394 - 399
Adaptive terminal middleware Session management Reliable virtual socket Proactive soft handoff
What middle layer can’t do?
Resolution300x400 Resolution
1024x768
Resolution1024x768
A B
C
Resolution 300x400
Media Stream
Resolution 1024x768
Middle layer can’t modify the application layer.
So, if we use middle layer for session mobility, we
must use resolution 300x400 here.
Session Mobility using SIP
H. Schulzrinne and E. Wedland, “Application-layer mobility using SIP”,ACM SIGMOBILE Mobile Computing and Communications Review,Vol. 4, Number 3, July 2000, pp.47-57
RFC 3515 The Session Initiation Protocol (SIP) Refer Method. R. Sparks. April 2003.
draft-ietf-sipping-3pcc-06
REFER Mechanism
B1
B2
A REFER AReferred-By:B1
INVITE AReferred-By:B1
BYE A
1
2
3
Third Party Call Control
Third party call control refers to the ability of one entity to create a call in which communication is actually between other parties
Controller
Party A Party B
Third Party Call Control (Cond.) Third Party Call Control (3pcc) is often used
for operator services and conferencing Click-to-dial allows a user to click on a web
page when they wish to speak to a customer service
Offer/Answer Model
RFC 3264 Two entities can use SDP to arrive at a common view of
a multimedia session between them
UAC (Caller)Offerer
UAS (Callee)Answerer
INVITE
Offer : audio video
200: OK
Answer : audio
ACK
RTPAudio
3PCC- Flow I
A BController
1. INVITE no SDP
2. 200 offer1
3. INVITE offer1
4. 200 OK answer1
5. ACK
6. ACK answer1
RTP
Property of Flow I
Advantage The call flow is easy
Disadvantage Retransmission time out
Suitable for the callee is a server The response time of server is short
3PCC- Flow IV
A BController
1. INVITE offer1 no m
2. 200 answer1 no m
4. INVITE no SDP
5. 200 OK offer2
8. ACK answer2
9. ACK
RTP
3. ACK
6. INVITE offer2’
7. 200 answer2’
Property of Flow IV
Advantage No retransmission timeout problem
Disadvantage Call flow is complicated
Suitable for the callee is a human
3pcc for session mobility
A BController C
1. INVITE offer1 no m
2. 200 answer1 no m 3. ACK
4. INVITE no SDP
5. 200 OK offer2
6. INVITE offer2’
7. 200 answer2’
8. ACK answer2
9. ACK
RTP9. BYE
10. ACK
Issues
Schulzrinne, H.; Xiaotao Wu; Sidiroglou, S.; Berger, S.; “ Ubiquitous computing in home networks”, Communications Magazine, IEEE , Volume: 41 , Issue: 11 , Nov. 2003 Pages:128 - 135
Issues
Seamless handover Handoff delay
The advantages of session mobility using SIP Flexible (Application layer) Easy to spread Extra application
Split session
Issues (cond.)
Change the call flow of 3PCC for suited the session mobility
Another method for session mobility using SIP? REFER Method 3PCC
Split Session
Assume devices are SIP-enabled Third-party call control
INVITE speakerphonem=audioc=pc42
INVITE displaym=videoc=pc42
192.0.2.1
192.0.2.7
INVITE pc42m=videoc=192.0.2.7m=audioc=192.0.2.1
pc42
Category of spilt session
Split all session Split partial session Add new sessions Combine session
1. Split all session
video
microphone
speaker
VideoMicrophone
speaker
All media stream move from the origin device to other devices
A B
2. Split partial session
video
Microphonespeaker
VideoMicrophone
speaker
Some media stream keep on the original device and some media stream move to the other devices
A B
3. Add new sessions
video
microphone
speaker
Microphonespeaker
Additional media stream join the communication
A B
4. Combine session
VideoMicrophone
speaker
video
microphone
speaker
We communicate with many devices and want to continue communicate when changing device
A B
Basic REFER call flow
OriginatorA1
Final RecipientA2
RecipientB
INVITE/200/Ack
INVITE
100 Trying
ACK
RTP
202 Accepted
REFER
NOTIFY :100 Trying
200 OK
RTP
200 OKNOTIFY :200 OK
200 OK
Content type:message/sigfrag; version=2.0Body:SIP/2.0 100 Trying
No Body
BYE
200 OK
3pcc for session mobility
A BController C
1. INVITE offer1 no m
2. 200 answer1 no m 3. ACK
4. INVITE no SDP
5. 200 OK offer2
6. INVITE offer2’
7. 200 answer2’
8. ACK answer2
9. ACK
RTP9. BYE
10. ACK
Compare REFER and 3pcc
REFER Advantage
Popular SIP extension Disadvantage
Not suite for all category of split session
3pcc Advantage
More flexibility than REFER Additional application
Disadvantage Need additional device (Controller=B2BUA)
On-line Split session using REFER OriginatorA@ccu
Final RecipientA_video@ccu
RecipientB@nctu
INVITE (video)
100 Trying (video)
ACK (video)
202 Accepted (video)
REFER (video@ccu)
NOTIFY :100 Trying (v)
200 OK (v)
RTP
200 OK (video)
NOTIFY :200 OK (v)
200 OK (v)
Final RecipientA_audio@ccu
REFER (audio@ccu)
202 Accepted (audio) INVITE (audio)
100 Trying (audio)NOTIFY :100 Trying (a)
200 OK (a)200 OK (audio)
NOTIFY :200 OK (a)
200 OK (a)ACK (audio)
RTP
Add body to describe media type
Problem of Split partial sessionOriginator
A@ccuFinal RecipientA_video@ccu
RecipientB@nctu
INVITE
ACK
RTP
202 Accepted
REFER
RTP
200 OKNOTIFY :200 OK
200 OK
BYE
Video
Video / Audio
Video / Audio200 OK
Terminate all session with the
same call ID
re-INVITE
200 OK
ACK
RTPAudio
On-line split session using 3pcc
OriginatorA@ccu
Final RecipientA_video@ccu
RecipientB@nctu
Final RecipientA_audio@ccu
Controller
3pcc Flow IV
3pcc Flow IV
BYE
200 OK
RTP
RTP
RTPVideo / Audio
Split partial session using 3pcc
Controller
RTP
ACK
RTPVideo / Audio
3pcc Flow IV
Video
re-INVITE
200 OK
RTPAudio
OriginatorA@ccu
RecipientB@nctu
Final RecipientA_video@ccu
Add new sessions using 3pcc
OriginatorA@ccu
Final RecipientA_video@ccu
RecipientB@nctu
Final RecipientA_audio@ccu
Controller
3pcc Flow IV
3pcc Flow IV
BYE
200 OK
RTP
RTP
RTPVideo / Audio
Audio
Video
Nested REFER
RFC 3892 September 2004
Retrieval Session
Partial Session
Partial session One or more media streams of a
session are on a user agent The others are on the different
user agents.
Rules
Session Manager Has partial sessions Has all the information of the partial session, such as
configuration, security, and authorization All the partial session can be transferred, retrieved, and
terminated by the session manager Session User
Has partial sessions Only can transfer itself partial session to the session manager.
Free Node Keeps no any partial session
Session Manager Transformation
Session Manager Transformation (SMT) Used to support the session manager state transformation between
different user agents. Provide a session manager to transfer all the session information to a
session user or a free node. After SMT, the session user will become the session manager, and the
original session manager will become a session user or a free node.
The Flowchart of SMT at Session Manager
The Flowchart of SMT at Session User or Free Node
Session Manager Acquirement Provide a session user or a free node to
acquire all the session information from the session manager. Send the acquiring message from a session user
or a free node to a session manager Authentication information will be added into the
acquiring message. The session manager accepts the acquiring
message, all the session information will return to the session user or the free node
Session Manager Acquirement
Reference
Session Initiation Protocol (RFC 3261) Session Initiation Protocol Basic Call Flow Examples (RFC 3665) The SIP INFO Method (RFC 2976) The Session Initiation Protocol Refer Method (RFC 3515)