Cisco Unified Presence APIs Developer Forums

« Back to SOAP API

Correct way to subscribe to Event Notifications for CUP for Windows App

Combination View Flat View Tree View
Threads [ Previous | Next ]
Hi,
 
I am making a windows application in .NET using CUP and making use of API's given in MSVS plugin for CUP, My issue is what is the correct way to get the event notifications for Presence change.
 
I know we need to first Register our endpoint, then subscribe using registrationID, but what next?? How will I get the event notification in my windows application in which I should call the getSubscribePresence() exposed by the API.
 
If anyone could shed some light on the same, it would be great as it is a bit high priority task.
 
Thanks.

Hi Shwetha Sajeev,
 
Please try this if it works:
 
You need to starts a HttpListener from .Net windows application. You can use either the GetContext/BeginGetContext method of the HttpListener object to start listening for the notifications from the CUPS Presence Web service.
 
The method GetContext method is returned (in case of BeginGetContext method call, the callback given by you will be invoked) when a notification is received from the server. The notification will include the subscription ID as one of the Get parameters of the HTTP request (i.e. the HTTP notification) received from the server. Then you have to call the GetSubscribedPresence method to get the actual presence details for the subscription.
 
Hope this helps you.
 
Regards,
Ilayaraja M