IMS - RCS  

 

 

 

Standalone Message

This sample message sequence is to outline the steps for a standalone message flow in a Rich Communication Services (RCS) context. This flow ensures that the sender is informed when the message is delivered and when it is read by the recipient, which are features of RCS

Step

Direction

Protocol

Message

Comments

(1)

UA1 --> Proxy/UA2

SIP

MESSAGE

Send a text '123456789abcdef'

(2)

UA1 <-- Proxy/UA2

SIP

200 OK  

(3)

UA1 <-- Proxy/UA2

SIP

MESSAGE

Delivery Notification

(4)

UA1 --> Proxy/UA2

SIP

200 OK  

(5)

UA1 <-- Proxy/UA2

SIP

MESSAGE

Display Notification

(6)

UA1 --> Proxy/UA2

SIP

200 OK  

Here is a step-by-step explanation of the messaging sequence:

  • User Agent 1 (UA1) to Proxy/UA2 - MESSAGE: UA1 initiates the process by sending a SIP MESSAGE request through a proxy server to User Agent 2 (UA2). The MESSAGE contains a payload, which is a text '123456789abcdef' in this case. This is the actual content of the message being sent.
  • Proxy/UA2 to UA1 - 200 OK: UA2 or the proxy server acknowledges the receipt of the SIP MESSAGE request with a 200 OK response. This indicates that the message has been successfully received at the destination or the proxy server.
  • Proxy/UA2 to UA1 - MESSAGE (Delivery Notification): After the 200 OK response, a delivery notification is sent back to UA1. This is a MESSAGE request which implies that the message has been delivered to the intended recipient (UA2).
  • UA1 to Proxy/UA2 - 200 OK: UA1 sends a 200 OK response to acknowledge the receipt of the delivery notification MESSAGE.
  • Proxy/UA2 to UA1 - MESSAGE (Display Notification): A display notification is sent to UA1. This indicates that the message has not only been delivered but also has been displayed on the recipient's device (UA2).
  • UA1 to Proxy/UA2 - 200 OK: Finally, UA1 sends a 200 OK response to acknowledge the receipt of the display notification MESSAGE.

(1) MESSAGE

This is a SIP (Session Initiation Protocol) message in the context of an IMS (IP Multimedia Subsystem) network, utilizing RCS (Rich Communication Services) features. This SIP MESSAGE request is asking the receiving server to send a text message to the specified recipient. It includes a request for delivery and read receipts, and it carries the actual message payload in plain text. This is a typical use case in RCS services, where enhanced messaging features are used over standard SMS services in an IMS environment.

    MESSAGE sip:+14448880011@sharetechnote.com;user=phone SIP/2.0

    P-Preferred-Service: urn:urn-7:3gpp-service.ims.icsi.oma.cpm.msg

    Contribution-ID: 477b66ae9662e3ad18549bf5dabf9d26d5e707ca

    Conversation-ID: 1710887c7ca47dc2c1274c11673eb0df5a604fd3

    P-Preferred-Identity: <sip:310410123456789@sharetechnote.com>

    Request-Disposition: no-fork

    User-Agent: TEST IMS 5.0

    CSeq: 1 MESSAGE

    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.msg"

    c: message/cpim

    f: <sip:310410123456789@sharetechnote.com>;tag=1384874566

    i: 3712948749@2001::1:88fe:fccf:2870:5dee

    l: 322

    m: <sip:310410123456789@[2001::1:88fe:fccf:2870:5dee]:5060>;

        +sip.instance="<urn:gsma:imei:35469106-056673-0>"

    t: <sip:+14448880011@sharetechnote.com;user=phone>

    v: SIP/2.0/TCP [2001::1:88fe:fccf:2870:5dee]:5060;branch=z9hG4bK2629405539smg;transport=TCP

     

    From: <sip:310410123456789@sharetechnote.com>

    To: <sip:+14448880011@sharetechnote.com;user=phone>

    DateTime: 2015-02-17T06:54:27Z

    NS: imdn <urn:ietf:params:imdn>

    imdn.Message-ID: PH7qAIV8cgH5

    imdn.Disposition-Notification: positive-delivery, display

     

    Content-type: text/plain;charset=UTF-8

    Content-Length: 15

     

    123456789abcdef

 Here goes the breakdown of the message

  • Start Line: The initial line MESSAGE sip:+14448880011@sharetechnote.com;user=phone SIP/2.0 indicates that this is a SIP MESSAGE request being sent to the specified SIP URI.
  • P-Preferred-Service: Specifies the service urn for a messaging service in an IMS network.
  • Contribution-ID and Conversation-ID: These are unique identifiers for the message thread and conversation, allowing messages to be correlated within a conversation.
  • P-Preferred-Identity: Indicates the asserted identity of the sender, in this case, sip:310410123456789@sharetechnote.com.
  • Request-Disposition: no-fork indicates that the message should not be forked to multiple endpoints.
  • User-Agent: Describes the software that originated the message, "TEST IMS 5.0".
  • CSeq: The command sequence number for the SIP transaction, here indicating the first message in the sequence.
  • Max-Forwards: Specifies the maximum number of hops a request can transit.
  • P-Access-Network-Info: Contains information about the access network of the sender, indicating an E-UTRAN (LTE) network.
  • Route: Specifies the route that this SIP message will take.
  • a: Indicates the accepted contact parameters, including the reference for the 3GPP IMS service.
  • c: Content-Type for the encapsulating message, which is message/cpm.
  • f: The "From" field, which contains the address of the sender and a unique tag.
  • i: The "Call-ID" field, a unique identifier for this call.
  • l: Content-Length for the encapsulating message.
  • m: The "Contact" field, which includes the sender's address and the SIP instance parameter (unique to the device).
  • t: The "To" field, which contains the address of the intended recipient.
  • v: The "Via" field, which indicates the transport used and the path the message has taken.
  • From and To: Duplicate of the "f" and "t" fields, commonly used for readability.
  • DateTime: Timestamp of when the message was formulated.
  • NS: Namespace declaration for the IMDN (Instant Message Disposition Notification) extension, which allows for message delivery and display notifications.
  • imdn.Message-ID: Unique identifier for the instant message.
  • imdn.Disposition-Notification: Requests a notification when the message is delivered and displayed.
  • Content-Type: The media type of the message body, in this case, plain text with UTF-8 character encoding.
  • Content-Length: The length of the message body, indicating a 15-character message.
  • Message Body: The actual content of the message, 123456789abcdef.

(2) 200 OK

This is used to acknowledge that the previous SIP request was successfully received, understood, and accepted. The presence of a "200 OK" response for a SIP MESSAGE request typically means that the message was successfully delivered to the intended recipient. In an RCS context, this would likely be followed by a delivery notification and then a read receipt once the recipient opens the message.

    SIP/2.0 200 OK

    Max-Forwards: 70

    Via: SIP/2.0/TCP [2001::1:88fe:fccf:2870:5dee]:5060;branch=z9hG4bK2629405539smg;transport=TCP

    From: <sip:310410123456789@sharetechnote.com>;tag=1384874566

    To: <sip:+14448880011@sharetechnote.com;user=phone>;tag=73335cbb32b744baaaf5097a34431c92

    Call-ID: 3712948749@2001::1:88fe:fccf:2870:5dee

    CSeq: 1 MESSAGE

    Server: TEST-RCS-serv/OMA1.0

    Content-Length: 0

Here's what each line of the response indicates:

  • Status Line: SIP/2.0 200 OK is the status line, indicating that the SIP protocol (version 2.0) is being used and the response code is 200, meaning OK.
  • Max-Forwards: Max-Forwards: 70 suggests that this response can be forwarded up to 70 more hops before it should be discarded. This is used to limit the lifespan of the request in the network and to avoid loops.
  • Via: This field confirms the route the response has taken and includes the branch parameter that was used to identify the SIP transaction uniquely.
  • From: This is the sender's address, including the tag that was previously set in the original SIP MESSAGE request.
  • To: The recipient's address, now including a tag tag=73335cbb32b744baaaf5097a34431c92, which is generated by the recipient's server and used for further transaction matching.
  • Call-ID: The unique identifier for this call or transaction, matching the Call-ID of the original SIP request.
  • CSeq: Stands for Command Sequence and indicates the method (MESSAGE) and sequence number of the SIP request. This must match the CSeq in the request to which this is a response.
  • Server: This identifies the software server that processed the request and generated the response. In this case, it seems to be a test RCS service, possibly indicating that the server is in a test environment or mode.
  • Content-Length: Indicates the length of the response's message body. Here it is 0, which means there is no message body content associated with this response.

(3) MESSAGE

this is a SIP MESSAGE carrying an IMDN (Instant Message Disposition Notification) in it. The IMDN is used in messaging to provide information about the status of a message, such as whether it has been delivered. This SIP MESSAGE is used to inform the original sender that their message identified by imdn.Message-ID: 92c65678d0 has been delivered to the intended recipient. This is part of the richer communication features offered by RCS, where not just the message, but also its status, can be communicated back to the sender.

    MESSAGE sip:310410123456789@[2001::1:88fe:fccf:2870:5dee]:5060 SIP/2.0

    Via: SIP/2.0/UDP [2001:0:0:1::2]:5060;

          branch=z9hG4bK4b0eb0c6ab9d4ef7bac858d430ea63cc18a;rport;transport=udp

    Via: SIP/2.0/TCP [2001:0:0:1::2]:6062;branch=z9hG4bKe7c0830f56394c91985b32740e324dbf

    Max-Forwards: 68

    From: <sip:+14448880011@sharetechnote.com>;tag=d1d79837cb9140e0a4b75cba91f40178

    To: <sip:310410123456789@sharetechnote.com>

    P-Asserted-Identity: <sip:+14448880011@sharetechnote.com>

    Accept-Contact: *;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.oma.cpm.msg"

    Contribution-ID: f415972d55

    Conversation-ID: 1710887c7ca47dc2c1274c11673eb0df5a604fd3

    Content-Type: message/cpim

    Content-Length: 490

    CSeq: 1 MESSAGE

    Call-ID: fb87fae7ea0f4eaebdd51c7bce64ccf8

    Record-Route: <sip:[2001:0:0:1::2]:5060;lr>

     

    From: <sip:anonymous@anonymous.invalid>

    To: <sip:310410123456789@sharetechnote.com>

    DateTime: 2015-02-17T06:54:27.8730740Z

    NS: imdn <urn:ietf:params:imdn>

    imdn.Message-ID: 92c65678d0

     

    Content-Disposition: notification

    Content-Type: message/imdn+xml

     

    <imdn xmlns="urn:ietf:params:xml:ns:imdn">

      <message-id>PH7qAIV8cgH5</message-id>

      <delivery-notification>

        <status>

          <delivered />

        </status>

      </delivery-notification>

    </imdn>

Thid is the breakdown of the message

  • Start Line: MESSAGE sip:310410123456789@[2001::1:88fe:fccf:2870:5dee]:5060 SIP/2.0 is the request line indicating that this is a MESSAGE request made to the user agent at the specified SIP URI using SIP version 2.0.
  • Via: These fields detail the transport used and the path the message has taken, including the protocol (UDP and TCP), the source IP, the source port, and a unique branch parameter that is used for loop detection and matching responses to requests.
  • Max-Forwards: Decremented by each SIP proxy that forwards the request. It starts at 70 and is down to 68, indicating it has passed through two proxies.
  • From: The sender's SIP URI with a tag to uniquely identify this leg of the SIP dialog.
  • To: The recipient's SIP URI.
  • P-Asserted-Identity: Indicates the identity of the user sending the SIP message; it is a way to assert the identity of the authenticated user.
  • Accept-Contact: Specifies that the sender accepts the response from entities that support the specified extension.
  • Contribution-ID and Conversation-ID: Unique identifiers for the message thread and conversation.
  • Content-Type: Indicates that the content type of the message is message/cpim, which is a MIME type for encapsulating messages in the CPIM (Common Profile for Instant Messaging) format.
  • Content-Length: Specifies the length of the message content.
  • CSeq: Command sequence number for the SIP transaction.
  • Call-ID: Unique identifier for this call or transaction.
  • Record-Route: Specifies the SIP proxy servers that should be on the path of all requests within this dialog.
  • Message Body: Contains a CPIM message with an IMDN payload, specifying the following:
  • From and To: Reiterate the sender and receiver's SIP URIs within the CPIM encapsulation.
  • DateTime: The timestamp of when the message was sent.
  • Namespace (NS): Specifies the namespace for the IMDN parameters used in the message.
  • imdn.Message-ID: A unique identifier for the message which is to be acknowledged.
  • Content-Disposition: Indicates that the purpose of this message is for a notification.
  • Content-Type: Specifies that the included content is an IMDN message in XML format.
  • imdn XML Structure: The XML structure contains the message ID and a delivery-notification element with a delivered status, indicating that the original message (identified by the same message ID) has been delivered.

(4) 200 OK

This is a SIP response message that conveys a successful outcome (indicated by "200 OK") for a previously sent SIP MESSAGE request. The message contains several SIP header fields that provide information about the transaction.

This response message is part of a transaction where the 200 OK is acknowledging that a MESSAGE request was successfully received and processed. The absence of a message body suggests that this is a simple acknowledgment without any additional information or payload.

    SIP/2.0 200 OK

    Contribution-ID: f415972d55

    Conversation-ID: 1710887c7ca47dc2c1274c11673eb0df5a604fd3

    CSeq: 1 MESSAGE

    P-Access-Network-Info: 3GPP-E-UTRAN-FDD;utran-cell-id-3gpp=31041000010000000

    f: <sip:+14448880011@sharetechnote.com>;tag=d1d79837cb9140e0a4b75cba91f40178

    i: fb87fae7ea0f4eaebdd51c7bce64ccf8

    l: 0

    t: <sip:310410123456789@sharetechnote.com>;tag=1310629065

    v: SIP/2.0/UDP [2001:0:0:1::2]:5060;

        branch=z9hG4bK4b0eb0c6ab9d4ef7bac858d430ea63cc18a;rport=5060;

        received=2001:0:0:1::2;transport=udp,SIP/2.0/TCP [2001:0:0:1::2]:6062;

        branch=z9hG4bKe7c0830f56394c91985b32740e324dbf

Thid is the breakdown of the message

  • Status Line: SIP/2.0 200 OK indicates that the previous SIP request was successfully processed.
  • Contribution-ID: This value, f415972d55, is used to identify the specific contribution within a conversation in a multi-party session, which in this context likely relates to a message thread.
  • Conversation-ID: 1710887c7ca47dc2c1274c11673eb0df5a604fd3 is a unique identifier for the entire conversation or session. This ID helps in correlating multiple messages or sessions that are part of the same conversation.
  • CSeq: The sequence number 1 and the method MESSAGE confirm that this response is in reply to the first MESSAGE request in this SIP dialog.
  • P-Access-Network-Info: Provides information about the network where the user is located. In this case, 3GPP-E-UTRAN-FDD suggests that the user is on an LTE network, and it includes specific cell ID information.
  • f (From): The sender's address, <sip:+14448880011@sharetechnote.com>, with a unique tag d1d79837cb9140e0a4b75cba91f40178 that was assigned in the original request to maintain dialog state.
  • i (Call-ID): A unique identifier for the SIP session/call, fb87fae7ea0f4eaebdd51c7bce64ccf8.
  • l (Content-Length): Indicates the length of the message body, which in this case is 0, meaning there is no body content in this response.
  • t (To): The recipient's address, <sip:310410123456789@sharetechnote.com>, with a response tag 1310629065 added by the recipient's user agent.
  • v (Via): Details the transport used by the SIP message with two separate entries (one for UDP and one for TCP), including the received parameter which indicates the actual source of the request, the branch parameter for loop prevention and matching responses with requests, and the transport protocol used.

(5) MESSAGE

This SIP MESSAGE request contains an Instant Message Disposition Notification (IMDN) in the message body, formatted in XML. The IMDN XML part notifies the sender that the message with the specified message ID has been displayed to the recipient.

This specific message indicates to the original sender that their message (PH7qAIV8cgH5) has been displayed to the recipient, which is part of the advanced messaging features such as read receipts in RCS (Rich Communication Services) messaging.

    MESSAGE sip:310410123456789@[2001::1:88fe:fccf:2870:5dee]:5060 SIP/2.0

    Via: SIP/2.0/UDP [2001:0:0:1::2]:5060;

           branch=z9hG4bK4b0eb0c6ab9d4ef7bac858d430ea63cc18c;rport;transport=udp

    Via: SIP/2.0/TCP [2001:0:0:1::2]:6062;branch=z9hG4bK266a90b1785b4b659ea8d0911bf4f48b

    Max-Forwards: 68

    From: <sip:+14448880011@sharetechnote.com>;tag=c5305ca476f3456a904ca1a31cf2b091

    To: <sip:310410123456789@sharetechnote.com>

    P-Asserted-Identity: <sip:+14448880011@sharetechnote.com>

    Accept-Contact: *;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.oma.cpm.msg"

    Contribution-ID: 70e1ec50d6

    Conversation-ID: 1710887c7ca47dc2c1274c11673eb0df5a604fd3

    Content-Type: message/cpim

    Content-Length: 495

    CSeq: 1 MESSAGE

    Call-ID: 30210a9d7df84045a75c8b040d6395af

    Record-Route: <sip:[2001:0:0:1::2]:5060;lr>

     

    From: "No Chat" <sip:+14448880011@sharetechnote.com>

    To: <sip:310410123456789@sharetechnote.com>

    DateTime: 2015-02-17T06:54:45.1650631Z

    NS: imdn <urn:ietf:params:imdn>

    imdn.Message-ID: cef6f7fe6d

     

    Content-Disposition: notification

    Content-Type: message/imdn+xml

     

    <imdn xmlns="urn:ietf:params:xml:ns:imdn">

      <message-id>PH7qAIV8cgH5</message-id>

      <display-notification>

        <status>

          <displayed />

        </status>

      </display-notification>

    </imdn>

Here is an explanation of the headers and the body:

  • SIP Headers
    • Start Line: Indicates this is a SIP MESSAGE request to the specified SIP URI.
    • Via: Lists the path the request has taken, with two Via headers showing that it traversed both UDP and TCP transports. The branch parameter is part of the transaction matching logic.
    • Max-Forwards: Set to 68, which decreases each time the request is processed by a SIP proxy, to prevent infinite loops in the network.
    • From: The sender's SIP URI with a unique tag for identifying the transaction.
    • To: The recipient's SIP URI.
    • P-Asserted-Identity: A header used in trusted networks to carry the identity of the user sending the SIP message.
    • Accept-Contact: Specifies acceptable communications options for the sender, in this case, indicating a reference to a 3GPP IMS service.
    • Contribution-ID: A unique identifier for this contribution to the conversation, which could be a part of a group chat or session.
    • Conversation-ID: A unique identifier for the conversation or session, allowing correlation of multiple messages and sessions.
    • Content-Type: Indicates that the message body is in the CPIM (Common Profile for Instant Messaging) format.
    • Content-Length: Specifies the length of the message body.
    • CSeq: Indicates this is the first MESSAGE request in this sequence.
    • Call-ID: A unique identifier for this call or messaging session.
    • Record-Route: Provides the address of the SIP proxy that should be used for routing subsequent messages in this dialog.
  • CPIM Body
    • From and To: Repeats the sender and recipient information within the CPIM wrapper.
    • DateTime: Timestamp of when the CPIM message was created.
    • NS (Namespace): Specifies the namespace for the IMDN extension, used for message disposition notifications.
    • imdn.Message-ID: The unique identifier of the message for which the disposition notification is being sent.
  • IMDN XML Content
    • Content-Disposition: Indicates the type of message, which is a notification.
    • Content-Type: The MIME type of the message, which is message/imdn+xml.
    • IMDN XML Structure: The XML formatted content contains:
    • message-id: The identifier of the message being notified about.
    • display-notification: Specifies that this notification is to inform that the message has been displayed.
    • status: Contains a single element, <displayed/>, confirming the message display status.

(6) 200 OK

This SIP message is a response to the MESSAGE request provided in your previous example. The "200 OK" indicates that the request has been successfully processed by the recipient's user agent.

This response is typical after a MESSAGE request containing a read receipt or delivery notification, acknowledging that the MESSAGE request was received and processed. The absence of a message body and the Content-Length of 0 confirm that this is an acknowledgment without additional content

    SIP/2.0 200 OK

    Contribution-ID: 70e1ec50d6

    Conversation-ID: 1710887c7ca47dc2c1274c11673eb0df5a604fd3

    CSeq: 1 MESSAGE

    P-Access-Network-Info: 3GPP-E-UTRAN-FDD;utran-cell-id-3gpp=31041000010000000

    f: <sip:+14448880011@sharetechnote.com>;tag=c5305ca476f3456a904ca1a31cf2b091

    i: 30210a9d7df84045a75c8b040d6395af

    l: 0

    t: <sip:310410123456789@sharetechnote.com>;tag=2700955583

    v: SIP/2.0/UDP [2001:0:0:1::2]:5060;

        branch=z9hG4bK4b0eb0c6ab9d4ef7bac858d430ea63cc18c;rport=5060;

        received=2001:0:0:1::2;transport=udp,SIP/2.0/TCP [2001:0:0:1::2]:6062;

        branch=z9hG4bK266a90b1785b4b659ea8d0911bf4f48b

Here's a breakdown of the SIP response headers:

  • Status Line: The response starts with SIP/2.0 200 OK, which means that the SIP request was successful.
  • Contribution-ID: The identifier 70e1ec50d6 correlates this response to a specific contribution within a conversation, especially relevant in group communication sessions.
  • Conversation-ID: 1710887c7ca47dc2c1274c11673eb0df5a604fd3 uniquely identifies the conversation to which this message belongs.
  • CSeq: The command sequence number 1 MESSAGE indicates that this is a response to the first MESSAGE request in this SIP dialog.
  • P-Access-Network-Info: Provides information about the recipient's network, specifically indicating they are on a 3GPP E-UTRAN FDD network, which is an LTE network. The cell ID is also provided, which can pinpoint the location of the cell the user is connected to.
  • f (From): <sip:+14448880011@sharetechnote.com> indicates the sender's SIP URI, with the sender's tag c5305ca476f3456a904ca1a31cf2b091 to identify the dialog.
  • i (Call-ID): The unique identifier 30210a9d7df84045a75c8b040d6395af for this SIP session or call.
  • l (Content-Length): Indicates the length of the message body, which is 0 in this response, showing that there is no body content.
  • t (To): <sip:310410123456789@sharetechnote.com> indicates the recipient's SIP URI, with the recipient's tag 2700955583 added to maintain the dialog state.
  • v (Via): Lists the transport protocols and paths the message has taken, along with the branch parameter for transaction matching and rport indicating the response should be sent back to the source port of the request.