日常通信中主要是兩個(gè)終端(UA)之間的通話,但經(jīng)常會(huì)遇到需要第三者加入共同討論(或認(rèn)證);這就是三方通話;在IMS/SIP系統(tǒng)中三方通話一般是先建立兩方通話,再呼叫第三方加入;
1. 三方通話流程
如下圖所示,Alice先呼通Bob,再邀請(qǐng)Carol加入一起通話;
2.三方通話消息內(nèi)容
F1 INVITE Alice -> Bob
INVITE sips:bob@biloxi.example.com SIP/2.0
Via: SIP/2.0/TLS client.atlanta.example.com:5061
;branch=z9hG4bK74bf9
Max-Forwards: 70
From: Alice <sips:alice@atlanta.example.com>;tag=1234567
To: Bob <sips:bob@biloxi.example.com>
Call-ID: [email]12345600@atlanta.example.com[/email]
CSeq: 1 INVITE
Contact: <sips:alice@client.atlanta.example.com>
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: ...
v=0
o=alice 2890844526 2890844526 IN IP4 client.atlanta.example.com
s=
c=IN IP4 client.atlanta.example.com
t=0 0
m=audio 49170 RTP/AVP 0
a=rtpmap:0 PCMU/8000
F2 180 Ringing Bob -> Alice
SIP/2.0 180 Ringing
Via: SIP/2.0/TLS client.atlanta.example.com:5061
;branch=z9hG4bK74bf9
;received=192.0.2.103
From: Alice <sips:alice@atlanta.example.com>;tag=1234567
To: Bob <sips:bob@biloxi.example.com>;tag=23431
Call-ID: [email]12345600@atlanta.example.com[/email]
CSeq: 1 INVITE
Contact: <sips:b54gh42f5@biloxi.example.com>
Content-Length: 0
F3 200 OK Bob -> Alice
SIP/2.0 200 OK
Via: SIP/2.0/TLS client.atlanta.example.com:5061
;branch=z9hG4bK74bf9
;received=192.0.2.103
From: Alice <sips:alice@atlanta.example.com>;tag=1234567
To: Bob <sips:bob@biloxi.example.com>;tag=23431
Call-ID: [email]12345600@atlanta.example.com[/email]
CSeq: 1 INVITE
Contact: <sips:b54gh42f5@biloxi.example.com>
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Supported: replaces, gruu
Content-Type: application/sdp
Content-Length: ...
v=0
o=bob 2890844527 2890844527 IN IP4 client.biloxi.example.com
s=
c=IN IP4 client.biloxi.example.com
t=0 0
m=audio 3456 RTP/AVP 0
a=rtpmap:0 PCMU/8000
F4 ACK Alice -> Bob
ACK sips:b54gh42f5@biloxi.example.com SIP/2.0
Via: SIP/2.0/TLS client.atlanta.example.com:5061
;branch=z9hG4bK74bfL
Max-Forwards: 70
From: Alice <sips:alice@atlanta.example.com>;tag=1234567
To: Bob <sips:bob@biloxi.example.com>;tag=23431
Call-ID: [email]12345600@atlanta.example.com[/email]
CSeq: 1 ACK
Content-Length: 0
/* Alice and Bob have established a session.
Bob re-INVITEs, changing Contact URIs. */
F5 INVITE Bob -> Alice
INVITE sips:alice@client.atlanta.example.com SIP/2.0
Via: SIP/2.0/TLS client.biloxi.example.com:5061
;branch=z9hG4bKnashds
Max-Forwards: 70
From: Bob <sips:bob@biloxi.example.com>;tag=23431
To: Alice <sips:alice@atlanta.example.com>;tag=1234567
Call-ID: [email]12345600@atlanta.example.com[/email]
CSeq: 1024 INVITE
Contact: <sips:bob-[email]Mixer@client.biloxi.example.com[/email]>;isfocus
Content-Type: application/sdp
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Supported: replaces, gruu
Content-Length: ...
v=0
o=bob 2890844527 2890844528 IN IP4 client.biloxi.example.com
s=
c=IN IP4 client.biloxi.example.com
t=0 0
m=audio 49172 RTP/AVP 0
a=rtpmap:0 PCMU/8000
F6 200 OK Alice -> Bob
SIP/2.0 200 OK
Via: SIP/2.0/TLS client.biloxi.example.com:5061
;branch=z9hG4bKnashds7
;received=192.0.2.113
From: Bob <sips:bob@biloxi.example.com>;tag=23431
To: Alice <sips:alice@atlanta.example.com>;tag=1234567
Call-ID: [email]12345600@atlanta.example.com[/email]
CSeq: 1024 INVITE
Contact: <sips:alice@client.atlanta.example.com>
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: ...
v=0
o=alice 2890844526 2890844526 IN IP4 client.atlanta.example.com
s=
c=IN IP4 client.atlanta.example.com
t=0 0
m=audio 49170 RTP/AVP 0
a=rtpmap:0 PCMU/8000
F7 ACK Bob -> Alice
ACK sips:alice@client.atlanta.example.com SIP/2.0
Via: SIP/2.0/TLS client.biloxi.example.com:5061
;branch=z9hG4bKnash3G
Max-Forwards: 70
From: Bob <sips:bob@biloxi.example.com>;tag=23431
To: Alice <sips:alice@atlanta.example.com>;tag=1234567
Call-ID: [email]12345600@atlanta.example.com[/email]
CSeq: 1024 ACK
Content-Length: 0
/* Bob calls Carol. */
F8 INVITE Bob -> Carol
INVITE sips:carol@chicago.example.com SIP/2.0
Via: SIP/2.0/TLS client.biloxi.example.com:5061
;branch=z9hG4bKnashJfd
Max-Forwards: 70
From: Bob <sips:bob@biloxi.example.com>;tag=8675309
To: Carol <sips:carol@chicago.example.com>
Call-ID: [email]sdjfdjfskdf@biloxi.example.com[/email]
CSeq: 42 INVITE
Contact: <sips:bob-[email]Mixer@client.biloxi.example.com[/email]>;isfocus
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Supported: replaces, gruu
Content-Type: application/sdp
Content-Length: ...
v=0
o=bob 28908445834 2890844834 IN IP4 client.biloxi.example.com
s=
c=IN IP4 client.biloxi.example.com
t=0 0
m=audio 48174 RTP/AVP 0
a=rtpmap:0 PCMU/8000
F9 180 Ringing Carol -> Bob
SIP/2.0 200 OK
Via: SIP/2.0/TLS client.biloxi.example.com:5061
;branch=z9hG4bKnashJfd
;received=192.0.2.113
From: Bob <sips:bob@biloxi.example.com>;tag=8675309
To: Carol <sips:carol@chicago.example.com>;tag=341313
Call-ID: [email]sdjfdjfskdf@biloxi.example.com[/email]
CSeq: 42 INVITE
Contact: <sips:carol@client.chicago.example.com>
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Supported: replaces
Content-Length: 0
F10 200 OK Carol -> Bob
SIP/2.0 200 OK
Via: SIP/2.0/TLS client.biloxi.example.com:5061
;branch=z9hG4bKnashJfd
;received=192.0.2.113
From: Bob <sips:bob@biloxi.example.com>;tag=8675309
To: Carol <sips:carol@chicago.example.com>;tag=341313
Call-ID: [email]sdjfdjfskdf@biloxi.example.com[/email]
CSeq: 42 INVITE
Contact: <sips:carol@client.chicago.example.com>
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: ...
v=0
o=carol 2890844922 2890844922 IN IP4 client.chicago.example.com
s=
c=IN IP4 client.chicago.example.com
t=0 0
m=audio 3456 RTP/AVP 0
a=rtpmap:0 PCMU/8000
F11 ACK Bob -> Carol
ACK sips:carol@client.chicago.example.com SIP/2.0
Via: SIP/2.0/TLS client.biloxi.example.com:5061
;branch=z9hG4bKnash431
Max-Forwards: 70
From: Bob <sips:bob@biloxi.example.com>;tag=8675309
To: Carol <sips:carol@chicago.example.com>;tag=341313
Call-ID: [email]sdjfdjfskdf@biloxi.example.com[/email]
CSeq: 42 ACK
Content-Length: 0
/* Bob's mixer now mixes media from both Alice and Carol
to create the 3-way conference. */
*消息中空行為字段間隔(space)
原文來自:RFC5359
整理:kangguoying20201029
"5G網(wǎng)絡(luò)共享方案介紹"已在微信公眾號(hào)"跟著老康學(xué)5G"中推出,敬請(qǐng)關(guān)注!