1.1.1. 代理服务器呼叫
例1
1. Proxy server accepts the INVITE request
2. It then contacts the location service with all or parts of the address
3. And obtains a more precise location
4. Proxy server issues an INVITE request to the address(es) returned by the location service
5. The user agent server alerts the user and returns a success indication to the proxy server
6. The proxy server then returns the success result to the original caller
7. The caller confirms receipt to the callee using ACK message (with a response returned)
例2
通过SIP代理建立呼叫的例子, SIP 用户cz@cs.tu-berlin.de 呼叫SIP 用户henning@cs.columbia.edu 的过程
例3
例4
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.
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 |
| | |--------------->|
| | | |
F1 INVITE Alice -> Proxy 1
INVITE sip:bob@biloxi.example.com SIP/2.0
Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74b43
Max-Forwards: 70
Route:
From: Alice ;tag=9fxced76sl
To: Bob
Call-ID: 3848276298220188511@atlanta.example.com
CSeq: 1 INVITE
Contact:
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 ;tag=9fxced76sl
To: Bob ;tag=3flal12sf
Call-ID: 3848276298220188511@atlanta.example.com
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:bob@biloxi.example.com SIP/2.0
Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74b43
Max-Forwards: 70
From: Alice ;tag=9fxced76sl
To: Bob ;tag=3flal12sf
Call-ID: 3848276298220188511@atlanta.example.com
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:bob@biloxi.example.com SIP/2.0
Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74bf9
Max-Forwards: 70
Route:
From: Alice ;tag=9fxced76sl
To: Bob
Call-ID: 3848276298220188511@atlanta.example.com
CSeq: 2 INVITE
Contact:
Proxy-Authorization: Digest username="alice",
realm="atlanta.example.com",
nonce="wf84f1ceczx41ae6cbe5aea9c8e88d359", opaque="",
uri="sip:bob@biloxi.example.com",
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:bob@biloxi.example.com 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:
From: Alice ;tag=9fxced76sl
To: Bob
Call-ID: 3848276298220188511@atlanta.example.com
CSeq: 2 INVITE
Contact:
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 ;tag=9fxced76sl
To: Bob
Call-ID: 3848276298220188511@atlanta.example.com
CSeq: 2 INVITE
Content-Length: 0
F7 INVITE Proxy 2 -> Bob
INVITE sip:bob@client.biloxi.example.com 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: ,
From: Alice ;tag=9fxced76sl
To: Bob
Call-ID: 3848276298220188511@atlanta.example.com
CSeq: 2 INVITE
Contact:
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 ;tag=9fxced76sl
To: Bob
Call-ID: 3848276298220188511@atlanta.example.com
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: ,
From: Alice ;tag=9fxced76sl
To: Bob ;tag=314159
Call-ID: 3848276298220188511@atlanta.example.com
Contact:
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: ,
From: Alice ;tag=9fxced76sl
To: Bob ;tag=314159
Call-ID: 3848276298220188511@atlanta.example.com
Contact:
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: ,
From: Alice ;tag=9fxced76sl
To: Bob ;tag=314159
Call-ID: 3848276298220188511@atlanta.example.com
Contact:
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: ,
From: Alice ;tag=9fxced76sl
To: Bob ;tag=314159
Call-ID: 3848276298220188511@atlanta.example.com
CSeq: 2 INVITE
Contact:
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: ,
From: Alice ;tag=9fxced76sl
To: Bob ;tag=314159
Call-ID: 3848276298220188511@atlanta.example.com
CSeq: 2 INVITE
Contact:
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: ,
From: Alice ;tag=9fxced76sl
To: Bob ;tag=314159
Call-ID: 3848276298220188511@atlanta.example.com
CSeq: 2 INVITE
Contact:
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:bob@client.biloxi.example.com SIP/2.0
Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74b76
Max-Forwards: 70
Route: ,
From: Alice ;tag=9fxced76sl
To: Bob ;tag=314159
Call-ID: 3848276298220188511@atlanta.example.com
CSeq: 2 ACK
Content-Length: 0
F16 ACK Proxy 1 -> Proxy 2
ACK sip:bob@client.biloxi.example.com 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:
From: Alice ;tag=9fxced76sl
To: Bob ;tag=314159
Call-ID: 3848276298220188511@atlanta.example.com
CSeq: 2 ACK
Content-Length: 0
F17 ACK Proxy 2 -> Bob
ACK sip:bob@client.biloxi.example.com 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 ;tag=9fxced76sl
To: Bob ;tag=314159
Call-ID: 3848276298220188511@atlanta.example.com
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:alice@client.atlanta.example.com SIP/2.0
Via: SIP/2.0/TCP client.biloxi.example.com:5060;branch=z9hG4bKnashds7
Max-Forwards: 70
Route: ,
From: Bob ;tag=314159
To: Alice ;tag=9fxced76sl
Call-ID: 3848276298220188511@atlanta.example.com
CSeq: 1 BYE
Content-Length: 0
F19 BYE Proxy 2 -> Proxy 1
BYE sip:alice@client.atlanta.example.com 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:
From: Bob ;tag=314159
To: Alice ;tag=9fxced76sl
Call-ID: 3848276298220188511@atlanta.example.com
CSeq: 1 BYE
Content-Length: 0
F20 BYE Proxy 1 -> Alice
BYE sip:alice@client.atlanta.example.com 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 ;tag=314159
To: Alice ;tag=9fxced76sl
Call-ID: 3848276298220188511@atlanta.example.com
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 ;tag=314159
To: Alice ;tag=9fxced76sl
Call-ID: 3848276298220188511@atlanta.example.com
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 ;tag=314159
To: Alice ;tag=9fxced76sl
Call-ID: 3848276298220188511@atlanta.example.com
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 ;tag=314159
To: Alice ;tag=9fxced76sl
Call-ID: 3848276298220188511@atlanta.example.com
CSeq: 1 BYE
Content-Length: 0
重定向呼叫
当重定向服务器(其功能可包含在代理服务器和用户终端中)收到主叫用户代理的INVITE邀请消息,它通过查找定位服务器发现该呼叫应该被重新定向(重定向的原因有多种,如用户位置改变、实现负荷分担等等),就构造一个重定向响应消息(状态码为3xx),将新的目标地址回送给主叫用户代理。主叫用户代理收到重定向响应消息后,将逐一向新的目标地址发送INVITE邀请,直至收到成功响应并建立呼叫。如果尝试了所有的新目标而无法建立呼叫,则本次呼叫失败。
重定向服务器接受SIP请求,并将被呼叫方的SIP地址映射成零个(如果没有可知地址)或更多的新地址并且将它们返回客户机。不像代理服务器,重定向服务器不传递请求到其他服务器。
重定向服务器非常类似于DNS(Domain Name Service),它收到用户的请求后,若判定自身不是目的地址,则向用户响应下一个应访问服务器的地址,而不是转发请求报文。
例1
1. The redirect server accepts the INVITE request
2. It then contacts the location service as before
3. And obtains a more precise location
4. Instead of contacting the newly found address itself, returns the address to the caller
5. Caller confirms receipt to the Redirect Server using ACK (with a response returned)
6. The caller issues a new request (with a new call-ID) to the address returned by the server
7. The callee returns a success indication to the caller
8. The caller and callee complete the handshake with an ACK
例2
一个完整的会话
BOB home.net Jack (atosc.org)
UA1 Redirect UA2
| REGISTER | .
|-------------->| .
| 200 OK | .
|<--------------| .
. . .
later... . . .
. . .
. | REGISTER |
. |<--------------|
. | 200 OK |
. |-------------->|
. . .
later... . . .
| INVITE jack@home.net .
|-------------->| .
|302 Moved temporarily .
|<--------------| .
| ACK | .
|-------------->| .
| INVITE jack@office.atosc.org |
| audio |
|------------------------------>|
| 180 Ringing |
|<------------------------------|
| 180 Ringing |
|<------------------------------|
| 200 OK |
|<------------------------------|
| ACK jack@office.atosc.org |
|------------------------------>|
. .
later . .
. .
| INVITE bob@bob.home.net |
| audio + video |
|<------------------------------|
| 200 OK |
|------------------------------>|
| ACK bob@bob.home.org |
|<------------------------------|
. .
later . .
. .
| BYE jack@office.atosc.org |
|------------------------------>|
| 200 OK |
|<------------------------------|
| |
首先,所有的用户代理向注册服务器(在这个样例中,重定向服务器具有注册服务功能。注册服务器也就是定位服务器)。
会话由INVITE事务发起,联系在jack@home.net。一个重定向服务器使用重定向功能将找到的jack办公室的地址信息反馈给发起呼叫端UA1。UA1获取了新的目标地址的信息,发起对jack@atosc.org的呼叫。UA2首先振铃,jack接起电话发回200 OK成功应答。过了几分钟,jack和bob向使用他们的摄像头,以便能看到对方的视频信息。新的会话媒体参数修改由jack发起INVITE而进行交互协商,最终结束由bob发起。
例3
In this scenario, User A places a call to User B using first a
Redirect server then a Proxy Server. The INVITE message is first
sent to the Redirect Server. The Server returns a 302 Moved
Temporarily response (F2) containing a Contact header with User B's
current SIP address. User A then generates a new INVITE and sends to
User B via the Proxy Server and the call proceeds normally.
INVITE F1
A->Redir Proxy
INVITE sip:UserB@redirect.wcom.com SIP/2.0
Via: SIP/2.0/UDP here.com:5060
From: TheBigGuy <sip:UserA@here.com>
To: TheLittleGuy <sip:UserB@there.com>
Call-Id: 12345600@here.com
CSeq: 1 INVITE
Contact: TheBigGuy <sip:UserA@here.com>
Content-Type: application/sdp
Content-Length:132
……
302 Moved Temporarily F2
Redir Proxy->A
SIP/2.0 302 Moved Temporarily
Contact: sip:UserB@ss2.wcom.com
Via: SIP/2.0/UDP here.com:5060
From: TheBigGuy <sip:UserA@here.com>
To: TheLittleGuy <sip:UserB@there.com>
Call-Id: 12345600@here.com
CSeq: 1 INVITE
Content-Length: 0
ACK F3
A->Redir Proxy
ACK sip:UserB@redirect.wcom.com SIP/2.0
Via: SIP/2.0/UDP here.com:5060
From: TheBigGuy <sip:UserA@here.com>
To: TheLittleGuy <sip:UserB@there.com>
Call-Id: 12345600@here.com
CSeq: 1 INVITE
Content-Length: 0
INVITE F4
A -> Proxy
INVITE sip:UserB@ss2.wcom.com SIP/2.0
Via: SIP/2.0/UDP here.com:5060
From: TheBigGuy <sip:UserA@here.com>
To: TheLittleGuy <sip:UserB@there.com>
Call-Id: 12345600@here.com
CSeq: 2 INVITE
Contact: TheBigGuy <sip:UserA@here.com>
Content-Type: application/sdp
Content-Length:132
……
1.1.1. Call Transfer
呼叫转移:A switching system service feature that allows the calling or called user to instruct the local switching equipment or switch attendant to transfer an existing call to another terminal.
Note: Call transfer may be available on a call-by-call basis or on a semipermanent basis.
例:
A calls B, B transfers the call to C
1.A dials the celfone no. of B& [SEND]
2.Put A on hold in order to call C by pressing : 2 &[SEND]
3.Dial Phone number of C & [SEND]
4.To transfer A to C : press 4 & [SEND]
There are currently three ways of implementing call transfer:
BYE/ALSO
REFER method
RE-INVITE
- BYE/ALSO
在BYE请求消息中添加Contact头域,加入意欲转至的第三方地址就可以实现此业务.
例
BYE with an ALSO header in it. The ALSO header will have the SIP address of phone C.
BYE with ALSO(SIP address of phone C)
B -------------------------------------------------> Proxy
INVITE, from A
Proxy ---------------------------------------------> C
A is on hold
180
C -------------------------------------------------> Proxy
180
Proxy ---------------------------------------------> A
200
A -------------------------------------------------> Proxy
200
Proxy ---------------------------------------------> C
A <================================================> C
- REFER
例1
Transferor Transferee Transfer
| | Target
| INVITE | |
Call-ID:1 |<-------------------| |
| 200 OK | |
Call-ID:1 |------------------->| |
| ACK | |
Call-ID:1 |<-------------------| |
| INVITE (hold) | |
Call-ID:1 |------------------->| |
| 200 OK | |
Call-ID:1 |<-------------------| |
| ACK | |
Call-ID:1 |------------------->| |
| REFER | |
Call-ID:1 |------------------->| |
| 202 Accepted | |
Call-ID:1 |<-------------------| |
| NOTIFY (100 Trying)| |
Call-ID:1 |<-------------------| |
| 200 OK | |
Call-ID:1 |------------------->| |
| | INVITE |
Call-ID:2 | |------------------->|
| | 200 OK |
Call-ID:2 | |<-------------------|
| | ACK |
Call-ID:2 | |------------------->|
| NOTIFY (200 OK) | |
Call-ID:1 |<-------------------| |
| 200 OK | |
Call-ID:1 |------------------->| |
| BYE | |
Call-ID:1 |------------------->| |
| 200 OK | |
Call-ID:1 |<-------------------| |
| | BYE |
Call-ID:2 | |<-------------------|
| | 200 OK |
Call-ID:2 | |------------------->|
例2 Peer-to-Peer Third Party Call Control
Dialer Phone Bob
| | |
F1 |---REFER----->| |
F2 | |----INVITE--->| Hold
| |<--200(INV)---|
| |-----ACK----->|
|<-200(REFER)--| |
| | |
F1 Dialer -> Phone
REFER sip:phone.foo.com SIP/2.0
Call-ID: 3@dialer.foo.com
Refer-To: <sip:bob@foo.com?body="c=0.0.0.0">
F2 Phone -> Bob
INVITE sip:bob@foo.com SIP/2.0
Call-ID: 101@phone.foo.com
- RE-INVITE
例1
Original App Target
UA UA
| | |
|--INVITE----->| |
|<---200-------| |
|----ACK------>| |
| | |
|<===RTP======>| |
| | |
| ..time.. | |
| | |
|<--SUBSCRIBE--| |
|----200------>| |
| | |
| |--INVITE---->|
| |<---180------|
|<--reINVITE---|<---200------|
|----200------>| |
|<---ACK-------|----ACK----->|
| | |
|<=========RTP==============>|
| | |
| ..time.. | |
| | |
|---NOTIFY---->| |
|<---200-------| |
| | |
|<--reINVITE---|----BYE----->|
|-----200----->|<---200------|
|<----ACK------| |
| | |
|<====RTP=====>| |
| | |
The example below shows a typical scenario used for calling cards.
The Application acts as both an ordinary UA and as a 3pcc controller.
例2
Alice Bob Carol
| INVITE F1 | |
|--------------->| |
| 180 Ringing F2 | |
|<---------------| |
| 200 OK F3 | |
|<---------------| |
| ACK F4 | |
|--------------->| |
| RTP | |
|<==============>| INVITE Join:A-B F5
| |<-------------|
| | 180 F6 |
| |------------->|
| re-INVITE F7 | |
|<---------------| |
| 200 OK F8 | |
|--------------->| |
| ACK F9 | |
|<---------------| |
| | 200 OK F10 |
| |------------->|
| | ACK F11 |
| |<-------------|
| | RTP |
| |<============>|
In this scenario, Alice and Bob are in a 2 party call and Carol
wishes to join resulting in a three party call.Carol could have
learned Bobs conference URI using some non-SIP means, or possibly
from a NOTIFY with the dialog package sent by Bob. Carol sends an
INVITE to Bob containing a Join header identifying the dialog between
Alice and Bob. Bob re-INVITEs Alice to switch to focus mode and
includes the "isfocus" feature tag as described in. Bob then accepts the
INVITE from Carol, resulting in the 3-way call.