Messaging in RCS

Instant (multimedia) messaging is a key feature for RCS as it should replace SMS service. There are more types of messages which can be sent through the IMS network.

When we will take a look on the SIP indication of capabilities by Accept header there are quite a few of supported formats:

  • Text/plain
  • Message/CPIM
  • Application/reginfo+xml
  • Application/vnd.3gpp.sms
  • Message/imdn+xml
  • Application/3gpp-ims+xml

For common Instant Messages we typically use Common Profile for Instant Messaging (CPIM). This format allows compatibility among various messaging technologies. Notifications are then sent as in Instant Message Disposition Notification (IMDN) format.

Messages can be exchanged over SIP or MSRP protocol. Sometimes  also http/ws is being used for transfer of rich content.

Update: For the information about RCS Universal profile read the post GSMA Advanced Messaging – RCS Universal Profile.

RCS 5.2 defines two basic types of messaging. They are the Session Mode Messaging which is based on SIP INVITE and MSRP session and the Pager Mode Messaging which is based on SIP Message. The RCS refers to OMA CPM which is considered to be an evolution of the SMS/MMS messaging services.

Note that SIP MESSAGE can be used also for other than messaging purposes in IMS network (e. g. during eSRVCC registration)

 

Session Mode Messaging

Session mode does use SIP INVITE and SDP protocol to establish the session. Within the session MSRP protocol is used. This allows to split ones conversation into dialogs and use “..is typing” notifications. On the other hand more resources is needed.

IMS and MSRP
IMS and MSRP

The call flow itself is quite standard SIP session.

RCS CallFlow
RCS CallFlow

The protocol which is used for the data transmition is MSRP. Note that in contrast to RTP (e.g. in VoLTE) the MSRP goes from A-SBC to RCS Application Server. That’s because of the possible interworking with legacy network or because of other messaging services.

This doesn’t usually apply to data (Application/3gpp-ims+xml), which is not intercepted by RCS server, or which can be sent using http protocol via Content Server (http is the only option in RCS UP).

As in VoLTE, also in RCS we apply both originating and terminating services.

MSRP CallFlow
Session Mode Messaging CallFlow

 

Notifications are transferred as standard messages. To find out if the MSRP message is notification or not, we have to firstly decode the CPIM Message.

MSRP hash123456789 SEND
To-Path: msrp://172.14.1.74:1634/n0faf-345-2s00t0+0;tcp
From-Path: msrp://172.64.2.56:513500/123456720;tcp
Message-ID: 01100
Byte-Range: 1-471/471
Content-Type: message/cpim

NS: imdn <urn:ietf:params:imdn>
From: <sip:+123456789012@example.test>
To: <sip:+191234567890@operator.com;user=phone>
imdn.Message-ID: 251
DateTime: 2013-05-23T08:12:31.730Z
Content-Disposition: notification

Content-Type: message/imdn+xml; charset=utf-8
Content-Length: 234

<?xml version='1.0' encoding='utf-8' ?>
<imdn xmlns="urn:ietf:params:xml:ns:imdn">
    <message-id>248</message-id>
    <datetime>2013-05-13T08:12:22.730</datetime>
    <display-notification><status><displayed /></status></display-notification>
</imdn>
-------2afsdffgdfgdfga-f8b0-1dfgd009-1bg1$

Note that SIP MESSAGE method is needed for notifications before the session is established as the INVITE can contain the first message already. Definitely there will be other posts with more details.

The RCS Universal Profile does use only the Session Mode for Advanced Messaging service.

Pager Mode Messaging

Pager mode or Standalone messaging is based on OMA SIMPLE IM or OMA CPM. In this case no session is established and it depends on a client how it will interpret. In Pager mode SIP MESSAGE method is used for the message transfer. The Pager mode used to be a preferred variant for some time.

Pager mode messaging
Pager mode messaging

Each notification is sent as a new SIP MESSAGE.

Pager Mode + IMDN
Pager Mode + IMDN

In case of a large message it is also possible to establish a session. The mechanism is known as a Large Message Mode Messaging. This SIP session should not be confused with Session Mode Messaging as no IM session is established. The SIP session is only used to transmit exactly one large message after which the SIP session is torn down. The limit for the messages using the SIP MESSAGE method is set to a maximum size of 1300 bytes. Messages exceeding this limit are delivered in Large Message Mode.

 

The feature list of the RCS Standalone messaging service includes the following main features:

  •  Standalone messaging (text and multimedia)
  •  Delivery and Display Notifications
  •  Support for multiple devices per user
  •  Deferred Messaging
  •  Common Message Store
  •  Interworking with legacy messaging services

For both Session mode and Pager mode a seamless fallback into 3G network is available. The application server providing the functionality is called Service layer IP-SM-GW.

 

SMS over IP

Finally  it is also possible to send a traditional SMS over SIP protocol (SMSoIP). Originally was expected that 4G telephones will generate the same payload (SMS) and based on active network they’ll submit them either in 3G as classical SMS or in 4G as a SIP MESSAGE. The content of the SIP MESSAGE  is the SM-RP (24.011 – SM Relay protocol) and SMS (23.040 – SMS). It means the content of the massage is binary.

SMS over IP
SMS over IP

The application server in IMS network responsible for SMSoIP is a Transport layer IP-SM-GW. According the specification 3GPP TS24.341 IP-SM-GW can translate SIP protocol in Sigtran and vice versa. In real life also other protocols as SMPP or Diameter can be used instead of Sigtran.

 

IP-SM-GW stack
IP-SM-GW stack
IP-SM-GW Transport layer
IP-SM-GW Transport layer

 

More details can be found in the post about the Transport Level Interworking.

For the service standard definition check out the latest GSMA RCS Implementation Guidelines.

Print Friendly, PDF & Email

Realtimecommunication.info

4G/5G, VoLTE, RCS, IMS, SIP, WebRTC, IoT/M2M Descrition, CallFlows, Illustrated Guides, Tests and other stuff for telco egineers

8 thoughts to “Messaging in RCS”

  1. Whats up very nice web site!! Guy .. Beautiful ..
    Superb .. I’ll bookmark your web site and take the feeds additionally?
    I am satisfied to seek out a lot of useful info right here in the
    publish, we want work out more techniques on this regard, thanks for sharing.

    . . . . .

  2. Thank you so much for this!! I work in the field, and we implement RCS/MSRP for Verizon and this made the call flows much easier to understand!

      1. Seriously you’re website here is a wealth of information, and it caters almost perfectly to my job and work. Any chance you’ll cover H248/Megaco signaling? Also have you thought about doing a series of posts breaking down wireshark call flows?

      2. I agree that H.248 is a bit overlooked these days. I believe I’ll become more important along with SDN and Service Based Architecture (SBA). So definitely I’d like to write about Iq interface, but I’d have to go pro. Simply I don’t have enough time to cover everything 🙂
        As for the pcaps – yes – this is what I tried to do e.g. in https://realtimecommunication.wordpress.com/2015/09/07/how-to-read-tcpdump-registration/ or in https://realtimecommunication.wordpress.com/sip-illustrated-sip-by-sip/. I plan to go through some nice traces of early-media or Supp Services. Would you have some interesting trace, don’t hesitate to send me it, I’ll anonymize and post. Again the biggest issue is the time.

      3. Wow, I didn’t even see these two posts before… Are you sure you haven’t missed your calling and should be a like a professor at MIT or something?? You’re posts are not only thorough and deep, but of some of the best quality I’ve seen… Far far more digestable and readable than the RFC’s and white papers. Thank you immensely. I may message you via email and send you a trace or two so you can take a peek, of course in your free time!

      4. 🙂 thanks, made my day. If you like it, you can just let others know. My goal is to share information with brothers in arms 🙂 any pcaps or other materials are welcomed, as that is how I learn the new stuff, each operator has a different way how to deploy the services, so learning never stops. Cheers and take care. Karel

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.