Session Initiation Protocol (SIP) Sess o
- oco (S
) Part II
- Prof. Ai-Chun Pang
Graduate Institute of Networking and Multimedia,
- Dept. of Comp. Sci. and Info. Engr.,
Session Initiation Protocol (SIP) Sess o o o oco (S ) Part II - - PowerPoint PPT Presentation
Session Initiation Protocol (SIP) Sess o o o oco (S ) Part II Prof. Ai-Chun Pang Graduate Institute of Networking and Multimedia, Dept. of Comp. Sci. and Info. Engr., National Taiwan University Email: acpang@csie.ntu.edu.tw
host-specific host specific
Zero, no msg body
A response to any request
TTL 0, unreg 2 2011/3/28
Subject:
Content Type: Content-Type:
application/sdp
A dialog ID
T
Tag in From Tag in From Tag in T
2011/3/28 3
Boss< sip:manager@station2.work.com> Daniel< sip:collins@station1.work.com>
BYE sip:manager@station2.work.com SI P/ 2.0 Via: SI P/ 2.0/ UDP station1.work.com Max Forwards: 70
a
Max-Forwards: 70 From: Daniel< sip:collins@work.com> ; tag= 44551 To: Boss< sip:manager@work.com> ; tag= 11222 Call-I D: 123456@station1.work.com CSeq: 2 BYE q Content-Length: 0
b
SI P/ 2.0 200 OK Via: SI P/ 2.0/ UDP station1.work.com Via: SI P/ 2.0/ UDP station1.work.com From: Daniel< sip:collins@work.com> ; tag= 44551 To: Boss< sip:manager@work.com> ; tag= 11222 Call-I D: 123456@station1.work.com CSeq: 2 BYE Content Length: 0
2011/3/28
4
Content-Length: 0
302, Moved T
Same Call-ID Same Call ID CSeq ++
2011/3/28
5
The most common scenario will have at least two proxies: one at the
It is likely that only the last proxy in the chain changes the Request-URI. The other proxies in the chain would simply use the domain part of the
2011/3/28
6
The path taken by a request Loop detected, 482 (status code)
The response finds its way back to the originator of the request The response finds its way back to the originator of the request.
Branch: used to distinguish between multiple responses to the same
Forking Proxy: Issue a single request to multiple destinations 2011/3/28
7
2011/3/28
8
E g use Contact: E.g., use Contact:
In particular for a stateful proxy
2011/3/28
9
2011/3/28
10
2011/3/28 11
;branch=xxx
2011/3/28
12
2011/3/28 13
2011/3/28 14
2011/3/28
15
Enable in-band call progress information to be transmitted
T
ACM (Address Complete Message) ACM (Address Complete Message) For SIP-PSTN-SIP connections
2011/3/28
16
2011/3/28
17
E.g., Instant messaging
SUBSCRIBE and NOTIFY The Event header
Subscriber Notifier
The Event header
SUBSCRIBE a 200 OK NOTIFY b c Current state information 200 OK NOTIFY d e Updated state information
2011/3/28
18
200 OK f
2011/3/28
19
Daniel<sip:Collins@station1.work.com> Boss<sip:Manager@pc1.home.com> sip:Server.work.com MESSAGE sip:Collins@work com SIP/2 0 a MESSAGE sip:Collins@work.com SIP/2.0 Via: SIP/2.0/UDP pc1.home.net Max-Forwards: 70 From: Boss<sip:Manager@home.net> T
MESSAGE sip:Collins@station1.work.com SIP/2.0 Via: SIP/2.0/UDP server.work.com Via: SIP/2.0/UDP pc1.home.net Max-Forwards: 69 b Call-ID: 123456@pc1.home.net CSeq: 1 MESSAGE Content-Type: text/plain Content-Length: 19 Content-Disposition: render From: Boss<sip:Manager@home.net> T
Call-ID: 123456@pc1.home.net CSeq: 1 MESSAGE Content-Type: text/plain p
Co te t ype: te t/p a Content-Length: 19 Content-Disposition: render
SIP/2.0 200 OK Via: SIP/2.0/UDP server.work.com Via: SIP/2.0/UDP pc1.home.net From: Boss<sip:Manager@home.net> SIP/2.0 200 OK Via: SIP/2.0/UDP pc1.home.net From: Boss<sip:Manager@home net> c d T
Call-ID: 123456@pc1.home.net CSeq: 1 MESSAGE Content-Length: 0 From: Boss<sip:Manager@home.net> T
Call-ID: 123456@pc1.home.net CSeq: 1 MESSAGE Content-Length: 0
2011/3/28
20
Daniel<sip:Collins@station1.work.com> Boss<sip:Manager@pc1.home.com> sip:Server.work.com MESSAGE sip:Manager@home net SIP/2 0 e MESSAGE sip:Manager@home.net SIP/2.0 Via: SIP/2.0/UDP station1.work.com Max-Forwards: 70 From: Daniel<sip:Collins@work.com> T
MESSAGE sip:Manager@pc1.home.net SIP/2.0 Via: SIP/2.0/UDP server.work.com; Via: SIP/2.0/UDP station1.work.com Max-Forwards: 69 f Call-ID: 456789@station1.work.com CSeq: 1101 MESSAGE Content-Type: text/plain Content-Length: 22 Content-Disposition: render From: Daniel<sip:Collins@work.com> T
Call-ID: 456789@station1.work.com CSeq: 1101 MESSAGE Content Type: text/plain p I’m fine. How are you? Content-Type: text/plain Content-Length: 22 Content-Disposition: render I’m fine. How are you? SIP/2.0 200 OK Via: SIP/2.0/UDP server.work.com Via: SIP/2.0/UDP station1.work.com From: Daniel<sip:Collins@work com> SIP/2.0 200 OK Via: SIP/2.0/UDP station1.work.com From: Daniel<sip:Collins@work com> g h From: Daniel<sip:Collins@work.com> T
Call-ID: 456789@station1.work.com CSeq: 1101 MESSAGE Content-Length: 0 From: Daniel<sip:Collins@work.com> T
Call-ID: 456789@station1.work.com CSeq: 1101 MESSAGE Content-Length: 0
2011/3/28
21
With the contact details for the third party included within the REFER request For Call Transfer applications For Call Transfer applications
Joe could return to the dialog after consultation with Susan. 22 2011/3/28
sip:Mary@station1.work.com sip:Joe@station2.work.com sip:Susan@station3.work.com a REFER sip:Joe@station2.work.com SIP/2.0 Via: SIP/2.0/UDP station1.work.com Max-Forwards: 70 From: Mary<sip:Mary@work.com>; tag=123456 T J < i J @ k > t =67890 a T
Contact: Mary<Mary@station1.work.com> Refer-T
Call-ID: 123456@station1.work.com CSeq: 123 REFER Content-Length: 0 SIP/2.0 202 Accepted Via: SIP/2.0/UDP station1.work.com; branch=z9hG4bK789 From: Mary<sip:Mary@work.com>; tag=123456 T J i J @ k 67890 INVITE sip:Susan@station3.work.com SIP/2.0 Via: SIP/2.0/UDP station2.work.com; b c T
Contact: Joe<Joe@station2.work.com> Call-ID: 123456@station1.work.com CSeq: 123 REFER Content-Length: 0 Max-Forwards: 70 From: Joe<sip:Joe@work.com>; tag=abcxyz T
Contact: Joe<Joe@station2.work.com> Call-ID: 67890@station2.work.com g Call ID: 67890@station2.work.com CSeq: 567 INVITE Content-Type: application/sdp Content-Length: xx Content-Disposition: session {message body}
23
{message body}
2011/3/28
sip:Mary@station1.work.com sip:Joe@station2.work.com sip:Susan@station3.work.com e SIP/2.0 200 OK Via: SIP/2.0/UDP station2.work.com From: Joe<sip:Joe@work.com>; tag=abcxyz T
T
Call-ID: 67890@station2.work.com CSeq: 567 INVITE Content-Type: application/sdp Content-Length: xx C t t Di iti i f g Content-Disposition: session {message body} ACK sip:Susan@station3.work.com SIP/2.0 Via: SIP/2.0/UDP station2.work.com NOTIFY sip:Mary@station1.work.com SIP/2.0 Via: SIP/2.0/UDP station2.work.com Max-Forwards: 70 Via: SIP/2.0/UDP station2.work.com Max-Forwards: 70 From: Joe<sip:Joe@work.com>; tag=abcxyz T
Call-ID: 67890@station2.work.com CS 567 ACK Max-Forwards: 70 From: Joe<sip:Joe@work.com> T
Contact: Joe<Joe@station2.work.com> Call-ID: 123456@station1.work.com CS 124 NOTIFY CSeq: 567 ACK Content-Length: 0 CSeq: 124 NOTIFY Content-Type: message/sipfrag;version=2.0 Content-Length: 15 SIP/2.0 200 OK h SIP/2.0 200 OK Via: SIP/2.0/UDP station2.work.com From: Joe<sip:Joe@work.com> T
C ll ID 123456@ t ti 1 k h
24
Call-ID: 123456@station1.work.com CSeq: 124 NOTIFY Content-Length: 0
2011/3/28
100 (trying), 180 (ringing), 183 (session in progress) Are not answered with an ACK
Unreliable
183 (to create a one-way audio path)
The state machine of a PSTN switch is driven by some of provisional
E.g., a call to an unassigned number
If the provisional response “183” is lost, the caller might left in the dark and
25 2011/3/28
RFC 3262
Reliability of Provisional
ClientA@network.com ServerB@network.com
Reliability of Provisional
Supported: 100rel RSeq Header
a
RSeq Header
Response Seq +1, when retxm
INVITE sip:ServerB@network.com SIP/2.0 Via: SIP/2.0/UDP ClientA.network.com Supported: 100rel Require: 100rel From: sip:ClientA@network.com; tag=lmnop123 To: sip:ServerB@network com
PRACK
RAck Header
To: sip:ServerB@network.com Call-ID: 123456@ClientA.network.com CSeq: 1 INVITE
??
SIP/2.0 180 Ringing b
RAck Header
Response ACK In PRACK RSeq+CSeq
g g Via: SIP/2.0/UDP ClientA.network.com Require: 100rel RSeq: 567890 From: sip:ClientA@network.com; tag=lmnop123 To: sip:ServerB@network.com; tag = xyz123 Call-ID: 123456@ClientA network com Response Lost Response Retransmit
RSeq+CSeq
Should not
Apply to 100
Call-ID: 123456@ClientA.network.com CSeq: 1 INVITE c SIP/2.0 180 Ringing Via: SIP/2.0/UDP ClientA.network.com Require: 100rel
2011/3/28
26
Default timer value = 0.5 s
...
27 2011/3/28
Daniel<sip:Collins@station1.work.com> Boss<sip:Manager@station2.work.com> INVITE sip:Manager@station2.work.com SIP/2.0 From: Daniel<sip:Collins@station1.work.com>; tag = abcd1234 a T
CSeq: 1 INVITE Content-Length: 213 Content-Type: application/sdp Content-Disposition: session Content Disposition: session v=0
s= c=IN IP4 station1 work com c=IN IP4 station1.work.com t=0 0 m=audio 4444 RTP/AVP 2 a=rtpmap 2 G726-32/8000 m=audio 4666 RTP/AVP 4 a=rtpmap 4 G723/8000 m=audio 4888 RTP/AVP 15 a=rtpmap 15 G728/8000 SIP/2.0 200 OK
2011/3/28
28
b SIP/2.0 200 OK …
Daniel<sip:Collins@station1.work.com> Boss<sip:Manager@station2.work.com> b SIP/2.0 200 OK From: Daniel<sip:Collins@station1.work.com>; tag = abcd1234 T
CSeq: 1 INVITE Content-Length: 163 g Content-Type: application/sdp Content-Disposition: session v=0
s= c=IN IP4 station2.work.com t=0 0 m=audio 0 RTP/AVP 2 di 0 RTP/AVP 4 m=audio 0 RTP/AVP 4 m=audio 6666 RTP/AVP 15 a=rtpmap 15 G728/8000 c ACK sip:manager@station2.work.com SIP/2.0 i i C i @ i 234 d From: Daniel<sip:Collins@station1.work.com>; tag = abcd1234 T
CSeq: 1 ACK Content-Length: 0 d Conversation
2011/3/28
29
T
The successful transfer of signaling messages does not imply to a
On a per-session basis
End-to-end network resources are reserved as part of session establishment.
On an aggregate basis
A certain amount of network resources are reserved in advance for a certain A certain amount of network resources are reserved in advance for a certain
Policing functions at the edge of the network 2011/3/28
30
By using the provisional responses
By involving extensions to SDP
2011/3/28
31
Each participant deals with
Mandatory means that the session
None is the initial situation and
Response 580 (precondition
2011/3/28
32
Click-to-call applications
Call transfer, call waiting, call forwarding, multi-party calling, call screening
33 2011/3/28
Policy server (call-routing, QoS) Authentication server Application server Application server
2011/3/28
34
On busy
User1 sip:Server.work.com User2 User3
486, busy here With the same To, User 3 can
I NVI TE sip:user2@server.work.com SI P/ 2.0 From: sip:user1 To: sip:user2@work.com
C
To: sip:user2@work.com Contact: User1 CSeq: 1 I NVI TE SI P/ 2.0 100 Trying From: sip:user1 To: sip:user2@work.com CSeq: 1 I NVI TE I NVI TE sip:user2@server.work.com SI P/ 2.0 From: sip:user1 To: sip:user2@work com
Contact: header in 200 response Call-forwarding-on-no-answer Timeout
CSeq: 1 I NVI TE To: sip:user2@work.com Contact: User1 CSeq: 1 I NVI TE SI P/ 2.0 486 Busy Here From: sip:user1 To: sip:user2@work.com CSeq: 1 I NVI TE
Timeout CANCEL method
CSeq: 1 I NVI TE I NVI TE sip:user3@server.work.com SI P/ 2.0 From: sip:user1 To: sip:user2@work.com CSeq: 2 I NVI TE SI P/ 2.0 200 OK From: sip:user1 To: sip:user2@work.com Contact: sip:user3@work.com CSeq: 2 I NVI TE SI P/ 2.0 200 OK From: sip:user1 To: sip:user2@work.com Contact: sip:user3@work.com CSeq: 1 I NVI TE
2011/3/28
35
CSeq: 1 I NVI TE
2011/3/28
36
Manager@work.com Proxy.work.com PSTN switch NGW
number
I NVI TE a b 100 (Trying)
100 (Trying) I NVI TE 100 (Trying) I AM c d e f
between these protocols
183 (Session Progress) Session description One-way audio g i 183 (Session Progress) Session description ACM One-way audio h
elephony (SIP-T)
One-way audio j One-way audio ANM 200 (OK) Updated session description 200 (OK) k l
m Updated session description ACK ACK n
37
Two-way audio Two-way audio
38 2011/3/28