Share via


3.3.5.1 Receiving a NOTIFY Response to a Batched SUBSCRIBE Request

On receiving a NOTIFY SIP response to a batched SUBSCRIBE request, the client parses the response and retrieves the presence information for all contacts.

A typical NOTIFY SIP response to a batched subscription appears in the following example. Note that it is a multipart MIME body containing both a list of contacts and the presence state for each of those contacts.

 From: "Bob" <sip:watcher@tradewind.com>;
           tag=4dcbf313b0ee4dd68fdfae2d851facf2;
           epid=a892397901 
   To: <sip:watcher@tradewind.com>;
           tag=ee697d7f2d8dc2b899014154efb57a4c;
   Call-ID: dba8c92428b241ccb233e5d1a59135e2
   CSeq: 1 SUBSCRIBE 
   Expires: 23903 
   Content-Type: 
     multipart/related; 
     type="application/rlmi+xml";start=resourceList; 
     boundary=50UBfW7LSCVLtggUPe5z Content-Length: 
   Require: eventlist
   Event: presence subscription-state: active;expires=23903
   Supported: com.microsoft.autoextend, 
     ms-piggyback-first-notify, 
     ms-benotify
  
     --50UBfW7LSCVLtggUPe5z
     Content-Transfer-Encoding: binary
     Content-ID: resourceList
     Content-Type: application/rlmi+xml
  
     <list xmlns="urn:ietf:params:xml:ns:rlmi" 
           uri="sip:watcher@tradewind.com" 
           version="1" fullState="true" >
       <resource uri="sip:contact1@tradewind.com" >
         <instance id="0" state="active" 
                   cid="contact1@tradewind.com" />
       </resource>
       <resource uri="sip:contact2@tradewind.com" >
         <instance id="0" state="active" 
                   cid="contact2@tradewind.com" />
       </resource>
       <resource uri="sip:contact3@tradewind.com" >
         <instance id="0" state="active" 
                   cid="contact3@tradewind.com" />
       </resource>
     </list>
  
     --50UBfW7LSCVLtggUPe5z
     Content-Transfer-Encoding: binary
     Content-ID: contact1@tradewind.com
     Content-Type: text/xml+msrtc.pidf
     <presentity uri="contact1@tradewind.com" >
       <availability aggregate="300" description="" epid="8bfb9f3f24" />
       <activity aggregate="500" description="" epid="8bfb9f3f24" />
       <displayName displayName="Dave" />
       <email email="contact1@tradewind.com" />
       <phoneNumber label="" number="555-5555" />
       <devices>
         <devicePresence epid="8bfb9f3f24" ageOfPresence="315" >
         <availability aggregate="300" description="online" />
         <activity aggregate="500" description="In Call" />
         <deviceName name="DESKTOP" 
            xmlns="http://schemas.microsoft.com/2002/09/sip/client/presence">
         </deviceName>
       <rtc:devicedata namespace="rtcService" 
         xmlns:rtc="http://schemas.microsoft.com/2002/09/sip/client/presence">
             &lt;![CDATA[
               <caps><renders_gif/><renders_isf/></caps>
             ]]&gt;
           </rtc:devicedata>
         </devicePresence>
       </devices>
     </presentity>
  
     --50UBfW7LSCVLtggUPe5z
     Content-Transfer-Encoding: binary
     Content-ID: contact2@tradewind.com
     Content-Type: text/xml+msrtc.pidf
     <presentity uri="contact2@tradewind.com" >
      <availability aggregate="300" description=""epid="43a34cb1f7"/>
      <activity aggregate="200" description="" epid="43a34cb1f7"  />
      <displayName displayName="Joe" />"
      <email email="contact2@tradewind.com"  />
      <phoneNumber label="" number="666-6666"  />
      <devices>
        <devicePresence epid="43a34cb1f7" ageOfPresence="3301" >
        <availability aggregate="300" description="online"  />
        <activity aggregate="200" description="Idle"  />
        <deviceName name="DESKTOP" 
            xmlns=http://schemas.microsoft.com/2002/09/sip/client/presence">
        </deviceName>
             <rtc:devicedata namespace="rtcService" 
                xmlns:rtc=
                http://schemas.microsoft.com/2002/09/sip/client/presence" >
                  &lt;![CDATA[
                     <caps><renders_gif/><renders_isf/></caps>
                  ]]&gt;
             </rtc:devicedata>
         </devicePresence>
      </devices>
    </presentity>
  
     --50UBfW7LSCVLtggUPe5z
     Content-Transfer-Encoding: binary
     Content-ID: contact3@tradewind.com
     Content-Type: text/xml+msrtc.pidf
     <presentity uri="contact3@tradewind.com" >
       <availability aggregate="300" 
                     description="" epid="0e7e556112"/>
       <activity aggregate="400" 
                 description="" epid="0e7e556112"  />
       <displayName displayName="Tim"  />"
         <email email="contact3@tradewind.com"  />
         <phoneNumber label="" number="777-7777"  />
         <devices>
           <devicePresence epid="0e7e556112" 
                           ageOfPresence="3617" >
             <availability aggregate="300" 
                           description="online"  />
             <activity aggregate="400" 
                       description="Active"  />
             <deviceName name="DESKTOP" 
               xmlns=
                 "http://schemas.microsoft.com/2002/09/sip/client/presence">
             </deviceName>
             <rtc:devicedata 
               namespace="rtcService" 
               xmlns:rtc=
                  "http://schemas.microsoft.com/2002/09/sip/client/presence">
                     &lt;![CDATA[
                        <caps><renders_gif/><renders_isf/></caps>
                     ]]&gt;
            </rtc:devicedata>
           </devicePresence>
         </devices>
       </presentity>  
 --50UBfW7LSCVLtggUPe5z--

The boundary string (--50UBfW7LSCVLtggUPe5z) is used to delimit the parts of the multipart body. The first part is a list expressed in XML format that contains one entry for every Presence Document (contact) carried in the remainder of the body. Each entry of the list has a SIP URI of the contact as well as a content-id (the cid attribute) that corresponds to the Content-ID header of the subsequent MIME part that contains the Presence Document for that contact. The list acts as an index to the remaining content of the notification.

The remaining parts are Presence Documents in text/xml+msrtc.pidf format, as specified in section 2.2.1.

The batched SUBSCRIBE/NOTIFY supports versioning and partial notifications. The version number and a flag—indicating whether this notification contains information for the complete contact list or just a subset—are defined in the list portion of the body. The client SHOULD ignore out-of-order CSeq for NOTIFY/BENOTIFY requests for batched subscriptions and rely on the version number instead.