IMS和SIP消息(Message)通過“消息會(huì)話中繼協(xié)議”SRPM( Message Session Relay Protocol)定義;其設(shè)置是為在IP網(wǎng)絡(luò)傳送短消息和視頻,此類業(yè)務(wù)也稱中“即時(shí)信息”IM((Instant Messaging);類似于短信(SMS)和彩信(MMS); "消息會(huì)話中繼協(xié)議”MSRP主要應(yīng)用于"富媒體系統(tǒng)"(RCS);“消息會(huì)話中繼協(xié)議”MSRP共有兩類:Pager Mode和Session Mode,其中:Session Mode主要用于多媒體消息(類似MMS)業(yè)務(wù)交互;
1.Session Mode特點(diǎn)
在Session Mode中的處理方式與RTP方式基本相同;消息通過建立、發(fā)送會(huì)話和結(jié)束(BYE)完成;
2.Session Mode
2.1 Session Mode中的SDP
v=0
o=TEST-IMS-UE 1234562 0 IN IP6 2001::1:4c16:9c0f:4986:9e6d
s=SS VOIP
c=IN IP6 2001::1:4c16:9c0f:4986:9e6d
t=0 0
m=message 8880 TCP/MSRP * // Indicate this is for MSRP
a=accept-types:message/cpim application/im-iscomposing+xml // allowed content type
a=accept-wrapped-types:text/plain message/imdn+xml // allowed content type
a=setup:active
a=path:msrp://[2001::1:4c16:9c0f:4986:9e6d]:8880/FmnP;tcp //MSRP URI. It indicates where message should be sent
a=msrp-cema
a=sendrecv
2.1 Session Mode中的發(fā)送方式(SEND method)
MSRP RgGcYXJW2nHr SEND
// To-Path indicates series of hopts to recipient
To-Path: msrp://[2001:0000:0000:0001:0000:0000:0000:0002]:16000/558f02b9d0;tcp
// From-Path indicates path from the sender
From-Path: msrp://[2001::1:4c16:9c0f:4986:9e6d]:8880/FmnP;tcp
// Message ID is unique per message
Message-ID: ZNsPlykpMApIABRrejarbO37ADMMae
Success-Report: no
Failure-Report: yes
// This for chucking the big data into multiple blocks
Byte-Range: 1-430/430
// contents type. It can be text/plain or cpim or any other.
Content-Type: message/cpim
3.Session Mode示例
Step | Direction | Protocol | Message | Comments |
(1) | UA1 --> Proxy/UA2 | SIP/SDP | INVITE |
|
(2) | UA1 <-- Proxy/UA2 | SIP | 100 Trying |
|
(3) | UA1 <-- Proxy/UA2 | SIP | 183 Session Progress |
|
(4) | UA1 <-- Proxy/UA2 | SIP/SDP | 200 OK |
|
(5) | UA1 --> Proxy/UA2 | SIP | ACK |
|
(6) | UA1 --> Proxy/UA2 | MSRP | SEND |
|
(7) | UA1 <-- Proxy/UA2 | MSRP | 200 OK |
|
(8) | UA1 --> Proxy/UA2 | MSRP | SEND | Send Text 'Hello' |
(9) | UA1 <-- Proxy/UA2 | MSRP | 200 OK |
|
(10) | UA1 <-- Proxy/UA2 | MSRP | SEND | Delivery Notification |
(11) | UA1 --> Proxy/UA2 | MSRP | 200 OK |
|
4.Session Mode消息
4.1 INVITE
INVITE sip:+[email]14448880000@sharetechnote.com[/email];user=phone SIP/2.0
Conversation-ID: 6b79b8bc937e4985b1dffd062b687bd7
Contribution-ID: d5e4121aeec2cc59546ebaef8966ef185a2f37f0
P-Preferred-Service: urn:urn-7:3gpp-service.ims.icsi.oma.cpm.session
P-Preferred-Identity: <sip:310410123456789@sharetechnote.com>
P-Early-Media: supported
Allow: INVITE,ACK,OPTIONS,CANCEL,BYE,UPDATE,INFO,REFER,NOTIFY,MESSAGE,PRACK
User-Agent: Samsung IMS 5.0
CSeq: 1 INVITE
Max-Forwards: 70
P-Access-Network-Info: 3GPP-E-UTRAN-FDD;utran-cell-id-3gpp=31041000010000000
Route: <sip:[2001:0:0:1::2]:5060;lr>
a: *;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.oma.cpm.session"
c: application/sdp
f: <sip:310410123456789@sharetechnote.com>;tag=284849603
i: 508868544@2001::1:4c16:9c0f:4986:9e6d
k: timer
l: 363
m: <sip:310410123456789@[2001::1:4c16:9c0f:4986:9e6d]:5060;transport=UDP>;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp- service.ims.icsi.oma.cpm.session"
t: <sip:+[email]14448880000@sharetechnote.com[/email];user=phone>
v: SIP/2.0/TCP [2001::1:4c16:9c0f:4986:9e6d]:5060;branch=z9hG4bK2563646430smg;transport=TCP
v=0
o=TEST-IMS-UE 1234562 0 IN IP6 2001::1:4c16:9c0f:4986:9e6d
s=SS VOIP
c=IN IP6 2001::1:4c16:9c0f:4986:9e6d
t=0 0
m=message 8880 TCP/MSRP *
a=accept-types:message/cpim application/im-iscomposing+xml
a=accept-wrapped-types:text/plain message/imdn+xml
a=setup:active
a=path:msrp://[2001::1:4c16:9c0f:4986:9e6d]:8880/FmnP;tcp
a=msrp-cema
a=sendrecv
4.2 100 Trying
SIP/2.0 100 Trying
Via: SIP/2.0/TCP [2001::1:4c16:9c0f:4986:9e6d]:5060;branch=z9hG4bK2563646430smg;transport=TCP
Max-Forwards: 70
From: <sip:310410123456789@sharetechnote.com>;tag=284849603
To: <sip:+[email]14448880000@sharetechnote.com[/email];user=phone>
Call-ID: 508868544@2001::1:4c16:9c0f:4986:9e6d
CSeq: 1 INVITE
Content-Length: 0
4.3 183 Session Progress
SIP/2.0 183 Session Progress
Max-Forwards: 70
Via: SIP/2.0/TCP [2001::1:4c16:9c0f:4986:9e6d]:5060;branch=z9hG4bK2563646430smg;transport=TCP
From: <sip:310410123456789@sharetechnote.com>;tag=284849603
To: <sip:+[email]14448880000@sharetechnote.com[/email];user=phone>;tag=b2fbe90a8c2e488ba04ad6d0c0956a6c
Call-ID: 508868544@2001::1:4c16:9c0f:4986:9e6d
CSeq: 1 INVITE
Contact: <sip:+[email]14448880000@sharetechnote.com[/email]>
Record-Route: <sip:[2001:0:0:1::2]:5060;lr>
Content-Length: 0
4.4 200 OK
Via: SIP/2.0/TCP [2001::1:4c16:9c0f:4986:9e6d]:5060;branch=z9hG4bK2563646430smg;transport=TCP
From: <sip:310410123456789@sharetechnote.com>;tag=284849603
To: <sip:+[email]14448880000@sharetechnote.com[/email];user=phone>;tag=b2fbe90a8c2e488ba04ad6d0c0956a6c
Call-ID: 508868544@2001::1:4c16:9c0f:4986:9e6d
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, BYE, MESSAGE
Contact: <sip:[2001:0:0:1::2]:49466;transport=tcp>
Content-Type: application/sdp
Record-Route: <sip:[2001:0:0:1::2]:5060;lr>
Content-Length: 292
v=0
o=- 1192 5963 IN IP6 2001:0:0:1::2
s=-
c=IN IP6 2001:0:0:1::2
m=message 16000 TCP/MSRP *
a=accept-types:message/cpim application/im-iscomposing+xml
a=accept-wrapped-types:*
a=path:msrp://[2001:0000:0000:0001:0000:0000:0000:0002]:16000/558f02b9d0;tcp
a=msrp-cema
a=setup:passive
.........
原文來自:http://www.sharetechnote.com/
整理:kangguoying20201004
"5G(NR)NSA網(wǎng)絡(luò)接入問題排查點(diǎn)”已在微信公眾號(hào)"跟著老康學(xué)5G"中推出,敬請(qǐng)關(guān)注!