Share via


4.4 Best Effort NOTIFY Example

This example demonstrates the use of a BENOTIFY request to eliminate the need for the client to send a response to the notifications sent by the server.

BENOTIFY request example

Figure 4: BENOTIFY request example

Notice that in the previous example, the client includes the Supported: ms-benotify and Proxy-Require: ms-benotify headers in the SUBSCRIBE request. The 200 OK response also includes the Supported: ms-benotify header, indicating that the server also supports BENOTIFY. The client SHOULD now be ready to receive BENOTIFY messages from the server.

When the presence information of the user's clients is subscribed to changes, the server sends an update to the client by using a BENOTIFY message. The BENOTIFY is similar to a NOTIFY except that the client does not send a response to the BENOTIFY request.

 BENOTIFY sip:11.22.33.44:1677;transport=tcp;
    ms-received-cid=13000 SIP/2.0
 Authentication-Info: Kerberos 
     rspauth="602306092A864886F71201020201011100
             FFFFFFFFDDD5FE865F40D223A53244106E693F3D", 
             srand="8C489988", snum="13", opaque="B23769DD", 
             qop="auth", targetname="sip/server.contoso.com", 
             realm="SIP Communications Service"
 Via: SIP/2.0/TCP 10.196.50.15;branch=z9hG4bK50867967.8D409A15;
    branched=FALSE
 Max-Forwards: 70
 Content-Length: 1127
 From: <sip:user2@server.contoso.com>
   ;tag=DD35C0B2
   To: <sip:user2@server.contoso.com>
     ;tag=9c4ef27513d24eb9be781420407b2a87;epid=62ccbeb808
     Call-ID: 91c6c88de3c04d5180d9a2e1434a18dd
     CSeq: 2 BENOTIFY
     Require: eventlist
     Content-Type: text/xml+msrtc.pidf
     Event: presence
     subscription-state: active;expires=28367
     <presentity uri="user1@server.contoso.com" 
          xmlns="http://schemas.microsoft.com/2002/09/sip/presence" 
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <availability aggregate="300" description="" 
                     epid="03640fc59f" />
       <activity aggregate="400" description="" 
                 epid="03640fc59f" />
       <displayName displayName="User 1" />
       <devices>
         <devicePresence epid="03640fc59f" ageOfPresence="30" 
            xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
            xmlns:m="http://schemas.microsoft.com/winrtc/2002/11/sip">
           <availability aggregate="300" description="online" />
           <activity aggregate="400" description="Active" 
                     note="Note: I am online" />
           <email email="someone@microsoft.com" 
    xmlns="http://schemas.microsoft.com/2002/09/sip/client/presence">
           </email>
           <deviceName 
             name="HOSTNAME" 
     xmlns="http://schemas.microsoft.com/2002/09/sip/client/presence">
           </deviceName>
           <rtc:devicedata 
             namespace="rtcsample" 
  xmlns:rtc="http://schemas.microsoft.com/2002/09/sip/client/presence">
             &lt;![CDATA[<applicationname>RTC Sample</applicationdata>]]&gt;
           </rtc:devicedata>
         </devicePresence>
       </devices>
     </presentity>