News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Why is the Webhook Subscription Event not detecting any call notification?
Tags: developer sandbox
Mar 6, 2020 at 4:23am   •   4 replies  •  1 likes
Pramod Kangare

We are able to detect call event notifications using Subscription when we place calls using RingOut API.

Code that we used: https://github.com/ringcentral/ringcentral-csharp/tree/master/RingCentral/Subscription


But Subscription is not detecting call event notifications when the caller is calling from his Phone Device.

So we are trying with webhook subscription as per discussion with RingCentral development team member.

We have implemented webhook subscription with event filter "/restapi/v1.0/account/{accountId}/telephony/sessions".

Below is Url from where we used code example:

https://developers.ringcentral.com/guide/notifications/quick-start/webhook/c-sharp

This code is not detecting any notification after placing a call using RingOut or Phone Device. What will be the issue???

Currently, we are using a sandbox environment with the below permissions:

- Read Contacts

- Read Messages

- Read Presence

- Call Control

- Read Accounts

- Ring Out

- Read Call Log

- Webhook Subscriptions

- Edit Presence


3 Answers
answered on Nov 16, 2021 at 2:58pm  

I'm hitting a similar issue. Node.js env.

Not picking up on any call action after successful subscription.

My Code:


function setSubscription() {
    const platform = rcsdk.platform()
    platform.login({
        username: '+14706150273',
        extension: '101',
        password: '********'
    }).then(response => {
        const subscription = rcsdk.createSubscription().setEventFilters(['/account/~/telephony/sessions']);
        subscription.on(subscription.events.notification, function (msg) {
            console.log(msg);
        });
        subscription.register().then(function (response) {
            console.log(response.json());
            console.log('Success: Subscription is listening');
        }).catch(function (e) {
            console.log('Subscription Error: ' + e.message);
        });
    }).catch(e => {
        console.error(e)
    })
}


Console output after run showing successfully subscribed (but nothing after) - Calls are showing in the sandbox call log:

[nodemon] starting `node index.js`
Server is running on port: 5000
{
  uri: 'https://platform.devtest.ringcentral.com/restapi/v1.0/subscription/edde4bf6-1563-4263-94c7-247954e3ac68',
  id: 'edde4bf6-1563-4263-94c7-247954e3ac68',
  creationTime: '2021-11-16T22:52:03.946Z',
  status: 'Active',
  eventFilters: [ '/restapi/v1.0/account/307128004/telephony/sessions' ],
  expirationTime: '2021-11-16T23:07:03.946Z',
  expiresIn: 899,
  deliveryMode: {
    transportType: 'PubNub',
    encryption: false,
    address: '4174641560134678_4a93035d',
    subscriberKey: 'sub-c-b8b9cd8c-e906-11e2-b383-02ee2ddab7fe'
  }
}
Success: Subscription is listening

 0
answered on Mar 11, 2020 at 9:26am  

Hi,

1. You are using the old C-sharp SDK (deprecated). It still should work correctly but I recommend you to use the latest one.

2. Watching the video I could see that you tested correctly for sandbox and production environments. However, I could not see the notification filter you specified in your code so I don't know if it is a notification at the extension level or at the company level.

  • Account level: /account/{accountId}/telephony/sessions
  • Extension level: /account/{accountId}/extension/~/telephony/sessions

A. If the filter was set at the extension level, then the problem is that you login the app with the main company number with the extension 101, but in your test, you make a call from your own extension (605 3706083) => no notification for your extension

B. If the filter was set at the account level, then the problem is still unknown to me => Either open a support ticket with our developer support team or send me an invite for a meeting at phong.vu@ringcentral.com


 0
answered on Mar 9, 2020 at 8:26am  

Hi Mindy,

Sorry for the delayed response.

The question is a little bit confusing so I will have to ask you to try to test again as follows:

1. Keep testing with PubNub notification which worked for you when you placed a RingOut call. But with a direct call. If your PubNub app works with both type of calls, then your application permissions and testing account are correct.

2. Test your Webhooks application with the same app's and user's credentials (as you tested on your PubNub app). If this does not work, then the problem is with the Webhooks implementation, NOT the server notification. In this case, make sure your Webhooks implementation is correct by checking if it is set up correctly.


Let me know


 1



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us