Skip to main content
The First Step
May 23, 2016 3:29 PM UTC
Question

Not Getting Call Status after Sucessful subscribition

var subscription = rcsdk.getSubscription();

subscription.on(subscription.events.notification, function(msg) {


console.log(msg.body.activeCalls[n].from);


// activeCalls is array

console.log(msg.body.activeCalls[n].to);

})

.register({


events: ['/account/~/extension/~/presence?detailedTelephonyState=true'],

})

.then(function(response) {


console.log('Success: Subscription is listening');

}).catch(function(e) {


alert('Subscription Error: ' + e.message);

});



Using This code for that



3 replies

Found Your Voice
May 23, 2016 6:00 PM UTC
Without seeing the complete code for this and how you've configured your Sandbox account I am unable to help isolate this problem any further on your specific issues.

So I created this sample application in Node.js which shows how to use the basics of the RingCentral Push Notifications.

https://github.com/bdeanindy/ringcentral-subscription-basics

Let me know if this helps (if you encounter issues with this code, please add issues in the Github issue tracker for this repository).
The First Step
May 26, 2016 8:53 AM UTC
how i do this in javascript.
The First Step
May 26, 2016 9:13 AM UTC
on loading page this exception occurs
Network Error when attempting to fetch resource.Server cannot authorize user