1. 建立IMS链路
INVITE sip:[email protected];user=phone SIP/2.0
Via: SIP/2.0/TCP [fc01:bbbb:cdcd:efe1:5e70:ff35:c442:b724]:8001;branch=z9hG4bK-577ab82f-001;rport
Route:
From:
To:
Call-ID:44eb613760665721e364feea57503405-8001@fc01:bbbb:cdcd:efe1:5e70:ff35:c442:b724
Conversation-ID:c7b5a02c-e3fa-4833-bab3-2ca45e1119b8
Contribution-ID:ba57bb85-cf63-4343-a6a9-96213995404b
CSeq: 1 INVITE
Contact:
Max-Forwards: 70
P-Preferred-Identity:
Security-Verify:ipsec-3gpp;alg=hmac-sha-1-96;q=0.9;spi-s=2014650206;port-s=5064;spi-c=2441734502;port-c=5063,ipsec-3gpp;alg=hmac-md5-96;q=0.7;spi-s=2014650206;port-s=5064;spi-c=2441734502;port-c=5063
Allow: INVITE,ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, UPDATE,PRACK, REGISTER
Content-Type:application/sdp //指明内容格式
Accept-Contact:*;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.oma.cpm.session"
P-Preferred-Service:urn:urn-7:3gpp-service.ims.icsi.oma.cpm.session
Content-Length:359
v=0
o=- 2014 1 IN IP6fc01:bbbb:cdcd:efe1:5e70:ff35:c442:b724
s=-
c=IN IP6fc01:bbbb:cdcd:efe1:5e70:ff35:c442:b724
t=0 0
m=message 9 TCP/MSRP* //MSRP消息
a=accept-types:message/cpimapplication/im-iscomposing+xml
a=accept-wrapped-types:*
a=sendrecv
a=path:msrp://[fc01:bbbb:cdcd:efe1:5e70:ff35:c442:b724]:9/1466944214957;tcp
a=connection:new
a=setup:active
SIP/2.0 100 Trying
Call-ID:44eb613760665721e364feea57503405-8001@fc01:bbbb:cdcd:efe1:5e70:ff35:c442:b724
CSeq: 1 INVITE
From:
Max-Forwards: 70
To:
Via: SIP/2.0/TCP[fc01:bbbb:cdcd:efe1:5e70:ff35:c442:b724]:8001;rport;branch=z9hG4bK-577ab82f-001
Content-Length: 0
SIP/2.0 180 Ringing
Allow:INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,NOTIFY,MESSAGE,SUBSCRIBE,INFO,UPDATE,PRACK,REGISTER
Call-ID:44eb613760665721e364feea57503405-8001@fc01:bbbb:cdcd:efe1:5e70:ff35:c442:b724
Contact:
CSeq: 1 INVITE
From:
Max-Forwards: 70
Record-Route:
To:
Via: SIP/2.0/TCP[fc01:bbbb:cdcd:efe1:5e70:ff35:c442:b724]:8001;rport;branch=z9hG4bK-577ab82f-001
Conversation-ID:c7b5a02c-e3fa-4833-bab3-2ca45e1119b8
Contribution-ID:ba57bb85-cf63-4343-a6a9-96213995404b
Content-Length: 0
SIP/2.0 200 OK
Call-ID:44eb613760665721e364feea57503405-8001@fc01:bbbb:cdcd:efe1:5e70:ff35:c442:b724
Contact:
Content-Type:application/sdp
CSeq: 1 INVITE
From:
Max-Forwards: 70
P-Asserted-Service:urn:urn-7:3gpp-service.ims.icsi.mmtel
Record-Route:
To:
Via: SIP/2.0/TCP[fc01:bbbb:cdcd:efe1:5e70:ff35:c442:b724]:8001;rport;branch=z9hG4bK-577ab82f-001
Conversation-ID:c7b5a02c-e3fa-4833-bab3-2ca45e1119b8
Contribution-ID:ba57bb85-cf63-4343-a6a9-96213995404b
Content-Length:309
v=0
o=RS-SimulatedUE-112341 10000 IN IP6 fc01:cafe::2
s=-
c=IN IP6fc01:cafe::2
t=0 0
m=message 8880TCP/MSRP *
b=AS:1024
a=accept-types:message/cpimapplication/im-iscomposing+xml
a=accept-wrapped-types:*
a=sendrecv
a=path:msrp://[fc01:cafe::2]:8880/vp9Gfd;tcp
a=connection:new
a=setup:passive
ACK sip:+14231234567@[fcb1:efef::1] SIP/2.0
Via: SIP/2.0/TCP[fc01:bbbb:cdcd:efe1:5e70:ff35:c442:b724]:8001;branch=z9hG4bK-577ab830-002;rport
Route:
Route:
Route:
Route:
From:
To:
Call-ID:44eb613760665721e364feea57503405-8001@fc01:bbbb:cdcd:efe1:5e70:ff35:c442:b724
Conversation-ID:c7b5a02c-e3fa-4833-bab3-2ca45e1119b8
Contribution-ID:ba57bb85-cf63-4343-a6a9-96213995404b
CSeq: 1 ACK
Contact:
Max-Forwards: 70
Allow: INVITE,ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, UPDATE,PRACK, REGISTER
Accept-Contact:*;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.oma.cpm.session"
P-Preferred-Service:urn:urn-7:3gpp-service.ims.icsi.oma.cpm.session
Content-Length: 0
2 MSRP通路建立
MSRP 1467967557725SEND
To-Path:msrp://[fc01:cafe::2]:8880/vp9Gfd;tcp //服务器地址
From-Path:msrp://[fc01:bbbb:cdcd:efe1:5e70:ff35:c442:b724]:9/1466944214957;tcp
Message-ID:1467648509639
-------1467967557725$
MSRP 1467967557725200 OK
To-Path:msrp://[fc01:bbbb:cdcd:efe1:5e70:ff35:c442:b724]:9/1466944214957;tcp
From-Path:msrp://[fc01:cafe::2]:8880/vp9Gfd;tcp
-------1467967557725$
3 MSRP发送消息
MSRP Session00003SEND
To-Path:msrp://[fc01:cafe::2]:8880/vp9Gfd;tcp
From-Path:msrp://[fc01:bbbb:cdcd:efe1:5e70:ff35:c442:b724]:9/1466944214957;tcp
Message-ID: 146766033543300001 //消息ID
Byte-Range:1-361/361 //消息字节和范围
Success-Report:no //是否需要成功发送报告
unknown-header:yes //FailureReports发送失败报告
Content-Type: message/cpim//消息格式Common Profile for InstantMessaging
From:
To: sip:[email protected] //目标端地址
DateTime:2016-07-04T15:25:36Z
NS:imdn
imdn.Message-ID:146766033543300001
imdn.Disposition-Notification:positive-delivery,negative-delivery,processing,display
Content-Type:text/plain;charset=UTF-8
Content-Length: 3
The
-------Session00003$
MSRP Session00003 200OK
To-Path: msrp://[fc01:bbbb:cdcd:efe1:5e70:ff35:c442:b724]:9/1466944214957;tcp
From-Path:msrp://[fc01:cafe::2]:8880/vp9Gfd;tcp
-------Session00003$
4 发送状态报告
MSRP rk93YOTXSEND
To-Path:msrp://[fc01:bbbb:cdcd:efe1:5e70:ff35:c442:b724]:9/1466944214957;tcp
From-Path:msrp://[fc01:cafe::2]:8880/vp9Gfd;tcp
Message-ID:zaP8g6tL
Success-Report:no
Failure-Report:yes
Byte-Range:1-*/612
Content-Type:message/cpim
To:
From:
DateTime:2016-07-04T15:25:48Z
NS: imdn
imdn.Message-ID:d0zCYhm1LFwg7jTc
Content-type:message/imdn+xml
Content-Disposition:notification
-------rk93YOTX$
MSRP rk93YOTX 200OK
To-Path:msrp://[fc01:cafe::2]:8880/vp9Gfd;tcp
From-Path:msrp://[fc01:bbbb:cdcd:efe1:5e70:ff35:c442:b724]:9/1466944214957;tcp
Message-ID:zaP8g6tL
Byte-Range:1-*/612
-------rk93YOTX$
5 显示状态报告
MSRP x571CIC9SEND
To-Path: msrp://[fc01:bbbb:cdcd:efe1:5e70:ff35:c442:b724]:9/1466944214957;tcp
From-Path:msrp://[fc01:cafe::2]:8880/vp9Gfd;tcp
Message-ID:asNRgp4V
Success-Report:no
Failure-Report:yes
Byte-Range:1-*/610
Content-Type:message/cpim
To:
From:
DateTime:2016-07-04T15:25:48Z
NS: imdn
imdn.Message-ID:KXeTZfhuEJaSGTv7
Content-type:message/imdn+xml
Content-Disposition:notification
-------x571CIC9$
MSRP x571CIC9 200OK
To-Path:msrp://[fc01:cafe::2]:8880/vp9Gfd;tcp
From-Path:msrp://[fc01:bbbb:cdcd:efe1:5e70:ff35:c442:b724]:9/1466944214957;tcp
Message-ID:asNRgp4V
Byte-Range:1-*/610
-------x571CIC9$