|
Written by Hemanshu Patel
|
|
Thursday, 08 November 2007 |
|
Page 8 of 17 3.2. Session Establishment Through Two Proxies
Alice Proxy 1 Proxy 2 Bob | | | | | INVITE F1 | | | |--------------->| | | | 407 F2 | | | |<---------------| | | | ACK F3 | | | |--------------->| | | | INVITE F4 | | | |--------------->| INVITE F5 | | | 100 F6 |--------------->| INVITE F7 | |<---------------| 100 F8 |--------------->| | |<---------------| | | | | 180 F9 | | | 180 F10 |<---------------| | 180 F11 |<---------------| | |<---------------| | 200 F12 | | | 200 F13 |<---------------| | 200 F14 |<---------------| | |<---------------| | | | ACK F15 | | | |--------------->| ACK F16 | | | |--------------->| ACK F17 | | | |--------------->| | Both Way RTP Media | |<================================================>| | | | BYE F18 | | | BYE F19 |<---------------| | BYE F20 |<---------------| | |<---------------| | | | 200 F21 | | | |--------------->| 200 F22 | | | |--------------->| 200 F23 | | | |--------------->| | | | |
In this scenario, Alice completes a call to Bob using two proxies Proxy 1 and Proxy 2. The initial INVITE (F1) contains a pre-loaded Route header with the address of Proxy 1 (Proxy 1 is configured as a default outbound proxy for Alice). The request does not contain the Authorization credentials Proxy 1 requires, so a 407 Proxy Authorization response is sent containing the challenge information. A new INVITE (F4) is then sent containing the correct credentials and the call proceeds. The call terminates when Bob disconnects by initiating a BYE message.
Proxy 1 inserts a Record-Route header into the INVITE message to ensure that it is present in all subsequent message exchanges. Proxy 2 also inserts itself into the Record-Route header. The ACK (F15) and BYE (F18) both have a Route header.
Message Details
F1 INVITE Alice -> Proxy 1
INVITE sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
SIP/2.0 Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74b43 Max-Forwards: 70 Route: <sip:ss1.atlanta.example.com;lr> From: Alice <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=9fxced76sl To: Bob <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
> Call-ID:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 1 INVITE Contact: <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
;transport=tcp> Content-Type: application/sdp Content-Length: 151
v=0 o=alice 2890844526 2890844526 IN IP4 client.atlanta.example.com s=- c=IN IP4 192.0.2.101 t=0 0 m=audio 49172 RTP/AVP 0 a=rtpmap:0 PCMU/8000
/* Proxy 1 challenges Alice for authentication */
F2 407 Proxy Authorization Required Proxy 1 -> Alice
SIP/2.0 407 Proxy Authorization Required Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74b43 ;received=192.0.2.101 From: Alice <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=9fxced76sl To: Bob <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=3flal12sf Call-ID:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 1 INVITE Proxy-Authenticate: Digest realm="atlanta.example.com", qop="auth", nonce="f84f1cec41e6cbe5aea9c8e88d359", opaque="", stale=FALSE, algorithm=MD5 Content-Length: 0
F3 ACK Alice -> Proxy 1
ACK sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
SIP/2.0 Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74b43 Max-Forwards: 70 From: Alice <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=9fxced76sl To: Bob <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=3flal12sf Call-ID:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 1 ACK Content-Length: 0
/* Alice responds be re-sending the INVITE with authentication credentials in it. */
F4 INVITE Alice -> Proxy 1
INVITE sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
SIP/2.0 Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74bf9 Max-Forwards: 70 Route: <sip:ss1.atlanta.example.com;lr> From: Alice <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=9fxced76sl To: Bob <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
> Call-ID:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 2 INVITE Contact: <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
;transport=tcp> Proxy-Authorization: Digest username="alice", realm="atlanta.example.com", nonce="wf84f1ceczx41ae6cbe5aea9c8e88d359", opaque="", uri="sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
", response="42ce3cef44b22f50c6a6071bc8" Content-Type: application/sdp Content-Length: 151
v=0 o=alice 2890844526 2890844526 IN IP4 client.atlanta.example.com s=- c=IN IP4 192.0.2.101 t=0 0 m=audio 49172 RTP/AVP 0 a=rtpmap:0 PCMU/8000
/* Proxy 1 accepts the credentials and forwards the INVITE to Proxy 2. Client for Alice prepares to receive data on port 49172 from the network. */
F5 INVITE Proxy 1 -> Proxy 2
INVITE sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
SIP/2.0 Via: SIP/2.0/TCP ss1.atlanta.example.com:5060;branch=z9hG4bK2d4790.1 Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74bf9 ;received=192.0.2.101 Max-Forwards: 69 Record-Route: <sip:ss1.atlanta.example.com;lr> From: Alice <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=9fxced76sl To: Bob <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
> Call-ID:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 2 INVITE Contact: <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
;transport=tcp> Content-Type: application/sdp Content-Length: 151
v=0 o=alice 2890844526 2890844526 IN IP4 client.atlanta.example.com s=- c=IN IP4 192.0.2.101 t=0 0 m=audio 49172 RTP/AVP 0 a=rtpmap:0 PCMU/8000
F6 100 Trying Proxy 1 -> Alice
SIP/2.0 100 Trying Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74bf9 ;received=192.0.2.101 From: Alice <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=9fxced76sl To: Bob <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
> Call-ID:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 2 INVITE Content-Length: 0
F7 INVITE Proxy 2 -> Bob
INVITE sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
SIP/2.0 Via: SIP/2.0/TCP ss2.biloxi.example.com:5060;branch=z9hG4bK721e4.1 Via: SIP/2.0/TCP ss1.atlanta.example.com:5060;branch=z9hG4bK2d4790.1 ;received=192.0.2.111 Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74bf9 ;received=192.0.2.101 Max-Forwards: 68 Record-Route: <sip:ss2.biloxi.example.com;lr>, <sip:ss1.atlanta.example.com;lr>
From: Alice <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=9fxced76sl To: Bob <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
> Call-ID:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 2 INVITE Contact: <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
;transport=tcp> Content-Type: application/sdp Content-Length: 151
v=0 o=alice 2890844526 2890844526 IN IP4 client.atlanta.example.com s=- c=IN IP4 192.0.2.101 t=0 0 m=audio 49172 RTP/AVP 0 a=rtpmap:0 PCMU/8000
F8 100 Trying Proxy 2 -> Proxy 1
SIP/2.0 100 Trying Via: SIP/2.0/TCP ss1.atlanta.example.com:5060;branch=z9hG4bK2d4790.1 ;received=192.0.2.111 Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74bf9 ;received=192.0.2.101 From: Alice <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=9fxced76sl To: Bob <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
> Call-ID:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 2 INVITE Content-Length: 0
F9 180 Ringing Bob -> Proxy 2
SIP/2.0 180 Ringing Via: SIP/2.0/TCP ss2.biloxi.example.com:5060;branch=z9hG4bK721e4.1 ;received=192.0.2.222 Via: SIP/2.0/TCP ss1.atlanta.example.com:5060;branch=z9hG4bK2d4790.1 ;received=192.0.2.111 Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74bf9 ;received=192.0.2.101 Record-Route: <sip:ss2.biloxi.example.com;lr>, <sip:ss1.atlanta.example.com;lr> From: Alice <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=9fxced76sl To: Bob <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=314159 Call-ID:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
Contact: <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
;transport=tcp> CSeq: 2 INVITE Content-Length: 0
F10 180 Ringing Proxy 2 -> Proxy 1
SIP/2.0 180 Ringing Via: SIP/2.0/TCP ss1.atlanta.example.com:5060;branch=z9hG4bK2d4790.1 ;received=192.0.2.111 Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74bf9 ;received=192.0.2.101 Record-Route: <sip:ss2.biloxi.example.com;lr>, <sip:ss1.atlanta.example.com;lr> From: Alice <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=9fxced76sl To: Bob <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=314159 Call-ID:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
Contact: <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
;transport=tcp> CSeq: 2 INVITE Content-Length: 0
F11 180 Ringing Proxy 1 -> Alice
SIP/2.0 180 Ringing Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74bf9 ;received=192.0.2.101 Record-Route: <sip:ss2.biloxi.example.com;lr>, <sip:ss1.atlanta.example.com;lr> From: Alice <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=9fxced76sl To: Bob <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=314159 Call-ID:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
Contact: <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
;transport=tcp> CSeq: 2 INVITE Content-Length: 0
F12 200 OK Bob -> Proxy 2
SIP/2.0 200 OK Via: SIP/2.0/TCP ss2.biloxi.example.com:5060;branch=z9hG4bK721e4.1 ;received=192.0.2.222 Via: SIP/2.0/TCP ss1.atlanta.example.com:5060;branch=z9hG4bK2d4790.1 ;received=192.0.2.111 Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74bf9 ;received=192.0.2.101 Record-Route: <sip:ss2.biloxi.example.com;lr>, <sip:ss1.atlanta.example.com;lr> From: Alice <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=9fxced76sl To: Bob <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=314159 Call-ID:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 2 INVITE
Contact: <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
;transport=tcp> Content-Type: application/sdp Content-Length: 147
v=0 o=bob 2890844527 2890844527 IN IP4 client.biloxi.example.com s=- c=IN IP4 192.0.2.201 t=0 0 m=audio 3456 RTP/AVP 0 a=rtpmap:0 PCMU/8000
F13 200 OK Proxy 2 -> Proxy 1
SIP/2.0 200 OK Via: SIP/2.0/TCP ss1.atlanta.example.com:5060;branch=z9hG4bK2d4790.1 ;received=192.0.2.111 Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74bf9 ;received=192.0.2.101 Record-Route: <sip:ss2.biloxi.example.com;lr>, <sip:ss1.atlanta.example.com;lr> From: Alice <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=9fxced76sl To: Bob <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=314159 Call-ID:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 2 INVITE Contact: <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
;transport=tcp> Content-Type: application/sdp Content-Length: 147
v=0 o=bob 2890844527 2890844527 IN IP4 client.biloxi.example.com s=- c=IN IP4 192.0.2.201 t=0 0 m=audio 3456 RTP/AVP 0 a=rtpmap:0 PCMU/8000
F14 200 OK Proxy 1 -> Alice
SIP/2.0 200 OK Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74bf9 ;received=192.0.2.101 Record-Route: <sip:ss2.biloxi.example.com;lr>, <sip:ss1.atlanta.example.com;lr> From: Alice <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=9fxced76sl To: Bob <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=314159
Call-ID:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 2 INVITE Contact: <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
;transport=tcp> Content-Type: application/sdp Content-Length: 147
v=0 o=bob 2890844527 2890844527 IN IP4 client.biloxi.example.com s=- c=IN IP4 192.0.2.201 t=0 0 m=audio 3456 RTP/AVP 0 a=rtpmap:0 PCMU/8000
F15 ACK Alice -> Proxy 1
ACK sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
SIP/2.0 Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74b76 Max-Forwards: 70 Route: <sip:ss1.atlanta.example.com;lr>, <sip:ss2.biloxi.example.com;lr> From: Alice <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=9fxced76sl To: Bob <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=314159 Call-ID:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 2 ACK Content-Length: 0
F16 ACK Proxy 1 -> Proxy 2
ACK sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
SIP/2.0 Via: SIP/2.0/TCP ss1.atlanta.example.com:5060;branch=z9hG4bK2d4790.1 Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74b76 ;received=192.0.2.101 Max-Forwards: 69 Route: <sip:ss2.biloxi.example.com;lr> From: Alice <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=9fxced76sl To: Bob <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=314159 Call-ID:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 2 ACK Content-Length: 0
F17 ACK Proxy 2 -> Bob
ACK sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
SIP/2.0 Via: SIP/2.0/TCP ss2.biloxi.example.com:5060;branch=z9hG4bK721e4.1
Via: SIP/2.0/TCP ss1.atlanta.example.com:5060;branch=z9hG4bK2d4790.1 ;received=192.0.2.111 Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74b76 ;received=192.0.2.101 Max-Forwards: 68 From: Alice <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=9fxced76sl To: Bob <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=314159 Call-ID:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 2 ACK Content-Length: 0
/* RTP streams are established between Alice and Bob */
/* Bob Hangs Up with Alice. */
/* Again, note that the CSeq is NOT 3. Alice and Bob maintain their own separate CSeq counts */
F18 BYE Bob -> Proxy 2
BYE sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
SIP/2.0 Via: SIP/2.0/TCP client.biloxi.example.com:5060;branch=z9hG4bKnashds7 Max-Forwards: 70 Route: <sip:ss2.biloxi.example.com;lr>, <sip:ss1.atlanta.example.com;lr> From: Bob <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=314159 To: Alice <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=9fxced76sl Call-ID:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 1 BYE Content-Length: 0
F19 BYE Proxy 2 -> Proxy 1
BYE sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
SIP/2.0 Via: SIP/2.0/TCP ss2.biloxi.example.com:5060;branch=z9hG4bK721e4.1 Via: SIP/2.0/TCP client.biloxi.example.com:5060;branch=z9hG4bKnashds7 ;received=192.0.2.201 Max-Forwards: 69 Route: <sip:ss1.atlanta.example.com;lr> From: Bob <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=314159 To: Alice <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=9fxced76sl Call-ID:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 1 BYE Content-Length: 0
F20 BYE Proxy 1 -> Alice
BYE sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
SIP/2.0 Via: SIP/2.0/TCP ss1.atlanta.example.com:5060;branch=z9hG4bK2d4790.1 Via: SIP/2.0/TCP ss2.biloxi.example.com:5060;branch=z9hG4bK721e4.1 ;received=192.0.2.222 Via: SIP/2.0/TCP client.biloxi.example.com:5060;branch=z9hG4bKnashds7 ;received=192.0.2.201 Max-Forwards: 68 From: Bob <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=314159 To: Alice <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=9fxced76sl Call-ID:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 1 BYE Content-Length: 0
F21 200 OK Alice -> Proxy 1
SIP/2.0 200 OK Via: SIP/2.0/TCP ss1.atlanta.example.com:5060;branch=z9hG4bK2d4790.1 ;received=192.0.2.111 Via: SIP/2.0/TCP ss2.biloxi.example.com:5060;branch=z9hG4bK721e4.1 ;received=192.0.2.222 Via: SIP/2.0/TCP client.biloxi.example.com:5060;branch=z9hG4bKnashds7 ;received=192.0.2.201 From: Bob <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=314159 To: Alice <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=9fxced76sl Call-ID:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 1 BYE Content-Length: 0
F22 200 OK Proxy 1 -> Proxy 2
SIP/2.0 200 OK Via: SIP/2.0/TCP ss2.biloxi.example.com:5060;branch=z9hG4bK721e4.1 ;received=192.0.2.222 Via: SIP/2.0/TCP client.biloxi.example.com:5060;branch=z9hG4bKnashds7 ;received=192.0.2.101 From: Bob <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=314159 To: Alice <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=9fxced76sl Call-ID:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 1 BYE Content-Length: 0
F23 200 OK Proxy 2 -> Bob
SIP/2.0 200 OK Via: SIP/2.0/TCP client.biloxi.example.com:5060;branch=z9hG4bKnashds7 ;received=192.0.2.201 From: Bob <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=314159 To: Alice <sip:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>;tag=9fxced76sl Call-ID:
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 1 BYE Content-Length: 0
|
|
| |
|
|