question

zeeshan-yousaf2030 avatar image
zeeshan-yousaf2030 asked benjamin-dean commented

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


topic-default
1 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

benjamin-dean avatar image
benjamin-dean answered
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).
1 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

zeeshan-yousaf2030 avatar image
zeeshan-yousaf2030 answered benjamin-dean commented
how i do this in javascript.
1 comment
1 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

benjamin-dean avatar image benjamin-dean commented ·
The above example code shows how to subscribe to Presence events in JavaScript.
0 Likes 0 ·
zeeshan-yousaf2030 avatar image
zeeshan-yousaf2030 answered benjamin-dean commented
on loading page this exception occurs
Network Error when attempting to fetch resource.Server cannot authorize user

1 comment
1 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

benjamin-dean avatar image benjamin-dean commented ·
If you are using the above example application code, and receiving this error, could you please submit an issue in the Github Issue Tracker for that repository?  https://github.com/bdeanindy/ringcentral-subscription-basics/issues

If you are not using the above example application, could you please provide the code you've used to implement here along with the exact error response headers and body please?
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.