CPIM stands for Common Profile for Instant Messaging. In RCS, CPIM is normally carried inside MSRP and works as the message envelope for instant messaging payloads. MSRP provides the transport session, while CPIM carries the sender, receiver, time, message identity, namespace, content type, and the actual user message body. The CPIM format is specified in RFC 3862.
- Role of CPIM in RCS
- CPIM Inside MSRP
- CPIM Message Structure
- Important Parameters
- Troubleshooting Points
Role of CPIM in RCS
CPIM is used when an RCS instant message needs a common envelope that is independent of the transport connection. This is useful because the MSRP session identifies the transport path, but the CPIM body identifies the logical message sender, receiver, content type, timestamp, and optional message disposition information.
For a simple one-to-one chat, the UE sends an MSRP SEND request with Content-Type set to message/cpim. The message/cpim body then contains CPIM headers followed by the actual text, file-transfer metadata, or IMDN-related information, depending on the RCS feature being used.
CPIM Inside MSRP
The outer MSRP message and the inner CPIM message have different jobs. MSRP parameters are used for session delivery and chunk handling, while CPIM parameters describe the instant message itself. When debugging RCS messaging, check both layers because a failure can come from either MSRP routing or CPIM payload formatting.
MSRP Clip Carrying CPIM
The following clip shows an MSRP SEND request where the payload type is CPIM.
To-Path: msrp://pcscf.example.com:2855/iau39soe;tcp
From-Path: msrp://ue.example.com:49152/9di4ea;tcp
Message-ID: 87652491
Byte-Range: 1-241/241
Content-Type: message/cpim
-------d93kswow$
In this MSRP clip,
CPIM Payload Clip
The following clip shows the CPIM body carried by the MSRP SEND request.
To: <sip:user2@example.com>
DateTime: 2026-06-26T12:00:00Z
NS: imdn <urn:ietf:params:imdn>
imdn.Message-ID: msg-12345
Content-Type: text/plain
Hello over CPIM
In this CPIM clip,
CPIM Message Structure
A CPIM message is composed of message headers, optional extension headers, payload headers, and the payload body. In RCS troubleshooting, the most common focus is whether the CPIM sender and recipient match the SIP/MSRP session context and whether the payload Content-Type matches the body that follows it.
The CPIM envelope can also carry IMDN-related headers so that delivery and display notifications can be correlated with the original instant message. This is why the CPIM message identity should be checked together with the SIP dialog, MSRP Message-ID, and any IMDN report body.
Important Parameters
Troubleshooting Points
When CPIM handling fails, first check that the outer MSRP Content-Type is message/cpim and that the byte range covers the complete CPIM body. Then check the CPIM headers for malformed URI brackets, missing namespace declarations, inconsistent sender or recipient identity, and a payload Content-Type that does not match the body.
For IMDN-related issues, compare the original CPIM imdn.Message-ID with the message identifier in the later delivery or display notification. A mismatch at this layer often makes the user message appear delivered at the transport layer but uncorrelated at the RCS service layer.