Skip to main content

I am trying to build a Windows service that can collect call-log data from the RingCentral system, as real-time as possible. I am working in .NET Visual Basic. I have been able to POST requests to the RingCentral URL and get responses. I have also created a PubNub account and can Publish and Subscribe just fine. I understand that at RingCentral, I am supposed to POST a Subscription request and get my DeliveryMode Address and SubscriptionKey. I can see how they can be integrated with the PubNub URL. In one of the PubNub examples, I was able to Publish a string and subsequently Subscribe to the Channel and retrieve the string. What I am trying to understand is how do I access the new RingCentral notifications? Do I have to keep checking the PubNub URL for new data? Is PubNub the data host and that is why I have to query PubNub and not RingCentral directly? I don't have a data stream to test against, so when I Subscribe to PubNub I get nothing significant back. I might be on the right track and just lacking live data. Within our product, we use Marshalling so I know right away when there is new data. This process here, seems like I have to continuously query PubNub checking for new data. Is that correct?

When you setup your subscription to PubNub you should be passing in three delegates that get called in certain instances, one of those delegates, subscribeCallback, is the method on which you will get any messages back from RingCentral. PubNub is event driven so there shouldn't be any need to query once the PubNub subscription is setup.

Hey Pat, did Ralph's answers get you back on track, or do you require further assistance on this question?
Have you tried the official RingCentral C# SDK which handles subscription for you? If you can use it directly, you will be using well tested code. If you cannot use it for some reason, you can also use the code for reference. Here are links to the C# SDK:


The latest release includes some subscription changes and is 1.0.0-alpha2.

This is a Portable Class Library (PCL) that supports .NET 4.0+ on Windows and Mono for Mac as well as Xamarin.Android and Xamarin.iOS. It uses the PubNub PCL library.
Here is working VB.NET code for subscription (and SMS) using the C# SDK 1.0.0:


Thanks for the VB.NET example. I am able to create a subscription using this code.

How do I gain access to the Subscription details using this method? I checked the sdk and subscription objects and don't see any reference to the detail I need.

I am supposed to use the Address and SubscriberKey from the DeliveryMode object for creating a Subscription to PubNub.

Thanks!


Reply