4.2.1 SIP MESSAGE Forwarding

In this example, Alice, Bob, and Leslie are in a three-party IM conference. Alice sends an IM to the IM MCU, which causes it to be forwarded to all other conference participants. Finally, the success or failure result is communicated back to Alice. Leslie is a legacy user that does not understand Multipurpose Internet Mail Extensions (MIME) multipart/alternative.

Forwarding of instant messages in the conference

Figure 3: Forwarding of instant messages in the conference

  1. Alice sends an IM to the IM MCU as Content-Type "multipart/alternative" (MIME) inside a SIP MESSAGE. The same message contents are sent in multiple formats so that the IM MCU can decide which part or parts to forward to each conference participant.

    Each alternative part of the MIME body, as described in [RFC2045], declares its own Content-Type and Content-Transfer-Encoding, followed by the actual message contents. In this example, the first MIME part is of type "text/plain", and the charset is "UTF-8". An optional additional parameter, msgr, is also associated with the Content-Type and is opaque to the server. The msgr parameter describes the markup, if any, to be applied to plaintext. In this example, its value has been set to the base64 encoding of the string "X-MMS-IM-Format: FN=MS%20Shell%20Dlg%202; EF=; CO=0; CS=0; PF=0".

    • FN (Font Name) in this case is "MS Shell Dlg 2", with spaces escaped using "%20".

    • EF (Effects) can be applied to the text. Available effects are "bold", "italic", "underline", or "strike-through". In this example, there are none.

    • CO (Color) is a 6-digit hex number that indicates the RGB components of the text's color or a single zero, which is a shortcut to indicate black.

    • CS (Character Set) is set to "0", which corresponds to ANSI_CHARSET. This parameter is not to be confused with the charset parameter described earlier.

    • PF (Pitch and Family) is zero or a two-digit number to indicate the font's general family and pitch. Available families are "Roman", "Swiss", "Modern", "Script", or "Decorative". Available pitches are "Default", "Fixed", or "Variable". In this example, the font family is "FF_DONTCARE" and the pitch is "Default".

      The second MIME part in this example is of type "text/rtf" and is simply included following the Content-Type and Content-Transfer-Encoding.

      The protocol client in this example sends "binary" Content-Transfer-Encoding for each MIME part.

    MESSAGE sip:poola.topa.contoso.com:5061;transport=tls;ms-fe=M17-OCG.topa.contoso.com;ms-role-rs-from;ms-role-rs-to;ms-ent-dest;lr;ms-rgs-cid=278C00;ms-route-sig=gawBV3W7gW7wQGkGzvc60Eq2zMtUd1zTgz1UuIVQAA SIP/2.0
    Via: SIP/2.0/TLS 10.56.64.122:4549
    Max-Forwards: 70
    From: <sip:alice@contoso.com>;tag=ed6cde9bad;epid=bd4bd366c2
    To: <sip:alice@contoso.com;gruu;opaque=app:conf:chat:id:34EC7C6FEEC47347AC518A89994F01E5>;tag=1522e88d0
    Call-ID: ceb555f8ac224a489bfb3008029724da
    CSeq: 8 MESSAGE
    Route: <sip:poola.topa.contoso.com:5062;transport=tls;ms-fe=M18-OCG.topa.contoso.com>
    User-Agent: UCCP/2.0.6362.0 OC/2.0.6362.0 (Microsoft Office Communicator)
    Supported: timer
    Proxy-Authorization: Kerberos qop="auth", realm="SIP Communications Service", opaque="FAD7FAF9", crand="28f68121", cnum="110", targetname="sip/M17-OCG.topa.contoso.com", response="602306092a864886f71201020201011100ffffffff7d2a31d1cd1192c4601885b08a8c1909"
    Content-Type: multipart/alternative; boundary="----=_NextPart_036_0787_01246BBD.76AB26E4"
    Content-Length: 856
    This is a multi-part message in MIME format.
    ------=_NextPart_036_0787_01246BBD.76AB26E4
    Content-Type: text/plain; charset=UTF-8;msgr=WAAtAE0ATQBTAC0ASQBNAC0ARgBvAHIAbQBhAHQAOgAgAEYATgA9AE0AUwAlADIAMABTAGgAZQBsAGwAJQAyADAARABsAGcAJQAyADAAMgA7ACAARQBGAD0AOwAgAEMATwA9ADAAOwAgAEMAUwA9ADAAOwAgAFAARgA9ADAACgANAAoADQA
    Content-Transfer-Encoding: binary
    This IM text will be broadcast to all other conference participants.
    ------=_NextPart_036_0787_01246BBD.76AB26E4
    Content-Type: text/rtf
    Content-Transfer-Encoding: binary
    {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 MS Shell Dlg 2;}}
    {\colortbl ;\red0\green0\blue0;}
    {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\tx720\cf1\f0\fs20 This IM text will be broadcast to all other conference participants.\par
    }
    ------=_NextPart_036_0787_01246BBD.76AB26E4--
    
  2. The IM MCU responds with 202 Accepted to indicate to the sender that the MESSAGE was successfully received by the MCU. Because the delivery of this message to all the conference participants happens asynchronously, the Message-Id header specifies an integer value that can be correlated with a subsequent IMDN that arrives in a BENOTIFY, shown in the next example.

    SIP/2.0 202 Accepted
    Authentication-Info: Kerberos rspauth="602306092A864886F71201020201011100FFFFFFFFC1DB6A39FB060F0A0174B78BE877941B", srand="A7AA6C1F", snum="145", opaque="FAD7FAF9", qop="auth", targetname="sip/M17-OCG.topa.contoso.com", realm="SIP Communications Service"
    Via: SIP/2.0/TLS 10.56.64.122:4549;received=10.29.107.208;ms-received-port=4549;ms-received-cid=278C00
    FROM: <sip:alice@contoso.com>;tag=ed6cde9bad;epid=bd4bd366c2
    TO: <sip:alice@contoso.com;gruu;opaque=app:conf:chat:id:34EC7C6FEEC47347AC518A89994F01E5>;tag=1522e88d0
    CSEQ: 8 MESSAGE
    CALL-ID: ceb555f8ac224a489bfb3008029724da
    CONTENT-LENGTH: 0
    Message-Id: 2
    
  3. The message is forwarded to the first other participant. In this case, the participant has previously indicated support for "multipart/alternative", so the MCU forwards the MIME. An Ms-Sender header was added by the IM MCU when forwarding this message. It contains the sender's display name and SIP address, or Globally Routable User Agent URI (GRUU). This is what the receiving protocol clients use to determine who initiated the message.

    MESSAGE sip:10.29.107.208:3099;transport=tls;ms-opaque=6aa03e3cda;ms-received-cid=276D00;grid SIP/2.0
    Via: SIP/2.0/TLS 10.29.106.52:5061;branch=z9hG4bKE10E8F31.CFFE0BBD;branched=FALSE;ms-internal-info="cbSmwhbNjC62Wek1GebdqSnEtjCb_P_gu9EddarwAA"
    Authentication-Info: Kerberos rspauth="602306092A864886F71201020201011100FFFFFFFF3979126E3B5272B7CF271083BDCB5BCB", srand="02B995A3", snum="111", opaque="CD48A57F", qop="auth", targetname="sip/M17-OCG.topa.contoso.com", realm="SIP Communications Service"
    Max-Forwards: 69
    Via: SIP/2.0/TLS 10.29.106.56:32860;branch=z9hG4bK6a543dac;ms-received-port=32860;ms-received-cid=280700
    FROM: <sip:alice@contoso.com;gruu;opaque=app:conf:chat:id:34EC7C6FEEC47347AC518A89994F01E5>;tag=69e3d4d355
    TO: <sip:bob@contoso.com>;epid=dceed2edfb;tag=8d5fe550ec
    CSEQ: 7 MESSAGE
    CALL-ID: 7d8a83ab0e114373a8a2c8478b041285
    CONTENT-LENGTH: 856
    CONTENT-TYPE: multipart/alternative; boundary="----=_NextPart_036_0787_01246BBD.76AB26E4"
    Ms-Sender: "Alice"<sip:alice@contoso.com;opaque=user:epid:XVjJHDlexlmisnhQrAkWqwAA;gruu>
    Message-Id: 2
    This is a multi-part message in MIME format.
    ------=_NextPart_036_0787_01246BBD.76AB26E4
    Content-Type: text/plain; charset=UTF-8;msgr=WAAtAE0ATQBTAC0ASQBNAC0ARgBvAHIAbQBhAHQAOgAgAEYATgA9AE0AUwAlADIAMABTAGgAZQBsAGwAJQAyADAARABsAGcAJQAyADAAMgA7ACAARQBGAD0AOwAgAEMATwA9ADAAOwAgAEMAUwA9ADAAOwAgAFAARgA9ADAACgANAAoADQA
    Content-Transfer-Encoding: binary
    This IM text will be broadcast to all other conference participants.
    ------=_NextPart_036_0787_01246BBD.76AB26E4
    Content-Type: text/rtf
    Content-Transfer-Encoding: binary
    {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 MS Shell Dlg 2;}}
    {\colortbl ;\red0\green0\blue0;}
    {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\tx720\cf1\f0\fs20 This IM text will be broadcast to all other conference participants.\par
    }
    ------=_NextPart_036_0787_01246BBD.76AB26E4--
    
  4. The message is also forwarded to the other participant, a protocol client that does not understand "multipart/alternative". In this case, the IM MCU extracts one of the alternative parts that the participant will understand and forwards only that. In the following example, the alternative part is "text/plain". Note that the ms-sender header was added by the IM MCU when forwarding this message.

    MESSAGE sip:leslie@fabrikam.com:4765;maddr=10.24.33.4;transport=tls;ms-received-cid=B5900 SIP/2.0
    Via: SIP/2.0/TLS 10.29.106.5:5061;branch=z9hG4bK0AB665A2.75FBBEC2;branched=FALSE;ms-internal-info="ciqPyXH2Akj5ksp0Wo3GaLo6DCCxh1-77C23BsCgAA"
    Authentication-Info: Kerberos rspauth="602306092A864886F71201020201011100FFFFFFFF182A5E33F648272908940BE72430A362", srand="5CF74D5C", snum="38", opaque="A89755E7", qop="auth", targetname="sip/N14-OCG.fabrikam.com", realm="SIP Communications Service"
    Max-Forwards: 66
    Via: SIP/2.0/TLS 10.29.105.34:1291;branch=z9hG4bK66AB579B.E60094D7;branched=FALSE;ms-received-port=1291;ms-received-cid=126700
    ms-edge-proxy-message-trust: ms-source-type=DirectPartner;ms-ep-fqdn=l16-rtc.fabrikam.com;ms-source-verified-user=verified;ms-source-network=federation
    Via: SIP/2.0/TLS 10.29.104.82:33068;branch=z9hG4bK4DD678D9.6C02C440;branched=FALSE;ms-internal-info="cgdEjJwnxotYtXhcHufcu1-5V6kUVsAsRAYrqmMgAA";ms-received-port=33068;ms-received-cid=15800
    ms-archiving: TRUE
    Via: SIP/2.0/TLS 10.29.106.56:32875;branch=z9hG4bK1CDBDCC0.5B60CDAF;branched=FALSE;ms-received-port=32875;ms-received-cid=C700
    Via: SIP/2.0/TLS 10.29.106.56:32876;branch=z9hG4bKc0ddca1c;ms-received-port=32876;ms-received-cid=3C8E00
    FROM: <sip:alice@contoso.com;gruu;opaque=app:conf:chat:id:34EC7C6FEEC47347AC518A89994F01E5>;tag=1f908ff25d
    TO: <sip:leslie@fabrikam.com>;epid=4a5d495edf;tag=7e517ba081
    CSEQ: 9 MESSAGE
    CALL-ID: 2253fab3fcb147c3a8be00e941df6ed2
    CONTENT-LENGTH: 86
    CONTENT-TYPE: text/plain; charset=UTF-8;msgr=WAAtAE0ATQBTAC0ASQBNAC0ARgBvAHIAbQBhAHQAOgAgAEYATgA9AE0AUwAlADIAMABTAGgAZQBsAGwAJQAyADAARABsAGcAJQAyADAAMgA7ACAARQBGAD0AOwAgAEMATwA9ADAAOwAgAEMAUwA9ADAAOwAgAFAARgA9ADAACgANAAoADQA
    Ms-Sender: "Alice"<sip:alice@contoso.com;opaque=user:epid:XVjJHDlexlmisnhQrAkWqwAA;gruu>
    Message-Id: 2
    Alice: This IM text will be broadcast to all other conference participants.
    
  5. Bob signals that the MESSAGE was successfully received and processed.

    SIP/2.0 200 OK
    Via: SIP/2.0/TLS 10.29.106.52:5061;branch=z9hG4bKE10E8F31.CFFE0BBD;branched=FALSE;ms-internal-info="cbSmwhbNjC62Wek1GebdqSnEtjCb_P_gu9EddarwAA"
    Via: SIP/2.0/TLS 10.29.106.56:32860;branch=z9hG4bK6a543dac;ms-received-port=32860;ms-received-cid=280700
    From: <sip:alice@contoso.com;gruu;opaque=app:conf:chat:id:34EC7C6FEEC47347AC518A89994F01E5>;tag=69e3d4d355
    To: <sip:bob@contoso.com>;tag=8d5fe550ec;epid=dceed2edfb
    Call-ID: 7d8a83ab0e114373a8a2c8478b041285
    CSeq: 7 MESSAGE
    Contact: <sip:bob@contoso.com;opaque=user:epid:d7NL6_mHNFSL3I1rbITi2gAA;gruu>
    User-Agent: UCCP/2.0.6362.0 OC/2.0.6362.0 (Microsoft Office Communicator)
    Proxy-Authorization: Kerberos qop="auth", realm="SIP Communications Service", opaque="CD48A57F", crand="c29d4077", cnum="87", targetname="sip/M17-OCG.topa.contoso.com", response="602306092a864886f71201020201011100ffffffff19e829d40e0027ccb112257cbae0ae87"
    Content-Length: 0
    
  6. Leslie signals that the MESSAGE was successfully received and processed.

    SIP/2.0 200 OK
    Via: SIP/2.0/TLS 10.29.106.5:5061;branch=z9hG4bK0AB665A2.75FBBEC2;branched=FALSE;ms-internal-info="ciqPyXH2Akj5ksp0Wo3GaLo6DCCxh1-77C23BsCgAA"
    Via: SIP/2.0/TLS 10.29.105.34:1291;branch=z9hG4bK66AB579B.E60094D7;branched=FALSE;ms-received-port=1291;ms-received-cid=126700
    Via: SIP/2.0/TLS 10.29.104.82:33068;branch=z9hG4bK4DD678D9.6C02C440;branched=FALSE;ms-internal-info="cgdEjJwnxotYtXhcHufcu1-5V6kUVsAsRAYrqmMgAA";ms-received-port=33068;ms-received-cid=15800
    Via: SIP/2.0/TLS 10.29.106.56:32875;branch=z9hG4bK1CDBDCC0.5B60CDAF;branched=FALSE;ms-received-port=32875;ms-received-cid=C700
    Via: SIP/2.0/TLS 10.29.106.56:32876;branch=z9hG4bKc0ddca1c;ms-received-port=32876;ms-received-cid=3C8E00
    From: <sip:alice@contoso.com;gruu;opaque=app:conf:chat:id:34EC7C6FEEC47347AC518A89994F01E5>;tag=1f908ff25d
    To: <sip:leslie@fabrikam.com>;epid=4a5d495edf;tag=7e517ba081
    Call-ID: 2253fab3fcb147c3a8be00e941df6ed2
    CSeq: 9 MESSAGE
    Contact: <sip:leslie@fabrikam.com:4765;maddr=10.24.33.4;transport=tls>;proxy=replace
    User-Agent: LCC/1.3
    Proxy-Authorization: Kerberos qop="auth", realm="SIP Communications Service", opaque="A89755E7", crand="9c90f6ff", cnum="30", targetname="sip/N14-OCG.fabrikam.com", response="602306092a864886f71201020201011100ffffffff1881c2675c619de3a68ff1364d09374a"
    Content-Length: 0
    
  7. Because the IM MCU has confirmed successful delivery of the MESSAGE to all other conference participants, it sends a BENOTIFY to the originator of the message, indicating success through IMDN. The message-id node, "2" in this case, corresponds to the Message-Id value that was returned to the sender in the previous 202 response. recipient nodes in the IMDN are used to communicate failure reasons. Because there are no recipient nodes, it means that this message was successfully delivered to all IM conference participants.

    BENOTIFY sip:10.29.107.208:4549;transport=tls;ms-opaque=232f90d8bd;ms-received-cid=278C00;grid SIP/2.0
    Via: SIP/2.0/TLS 10.29.106.52:5061;branch=z9hG4bK91A7D60F.8CA55DD1;branched=FALSE
    Authentication-Info: Kerberos rspauth="602306092A864886F71201020201011100FFFFFFFFF582C9A91232D41E4679E9916568D21F", srand="0B039919", snum="146", opaque="FAD7FAF9", qop="auth", targetname="sip/M17-OCG.topa.contoso.com", realm="SIP Communications Service"
    Max-Forwards: 69
    Via: SIP/2.0/TLS 10.29.106.56:32860;branch=z9hG4bK92ef85b2;ms-received-port=32860;ms-received-cid=280700
    FROM: <sip:alice@contoso.com;gruu;opaque=app:conf:chat:id:34EC7C6FEEC47347AC518A89994F01E5>;tag=1522e88d0
    TO: <sip:alice@contoso.com>;epid=bd4bd366c2;tag=ed6cde9bad
    CSEQ: 1 BENOTIFY
    CALL-ID: ceb555f8ac224a489bfb3008029724da
    CONTENT-LENGTH: 230
    CONTENT-TYPE: application/ms-imdn+xml
    <?xml version="1.0" encoding="utf-8"?><imdn xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/rtc/2005/08/imdn">
      <message-id>2</message-id>
    </imdn>