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
Inbound Webhook not firing
Tags: webhooks
Oct 13, 2021 at 7:45pm   •   1 replies  •  0 likes
Nigel McLaughlin

I'm subscribed to /restapi/v1.0/account/~/telephony/sessions and although it sends me outbound notifications it never fires on Inbound ones -> I have verified this by logging calls to the webhook page.

It successfully rings the App so the extension I'm calling is definitely online, but the even is never delivered.

1 Answer
answered on Oct 14, 2021 at 7:11am  

I am not aware of such a problem and all my tests work well on both sandbox and production environment.

Can you simply copy/paste and run this Node JS code using PubNub notification to see if it works or not. If this code does not work, then it is in your account setup and we will have a look at that later. But if this works, then something is wrong with your Webhooks code, parhaps.

Change the server domain accordingly if you run on production!

const RingCentral = require('@ringcentral/sdk').SDK
const Subscriptions = require('@ringcentral/subscriptions').Subscriptions;

RINGCENTRAL_CLIENTID = ''
RINGCENTRAL_CLIENTSECRET = ''
RINGCENTRAL_SERVER = 'https://platform.devtest.ringcentral.com'

RINGCENTRAL_USERNAME = ''
RINGCENTRAL_PASSWORD = ''
RINGCENTRAL_EXTENSION = ''

const rcsdk = new RingCentral({
  server: RINGCENTRAL_SERVER,
  clientId: RINGCENTRAL_CLIENTID,
  clientSecret: RINGCENTRAL_CLIENTSECRET
})

const subscriptions = new Subscriptions({
   sdk: rcsdk
});
var subscription = subscriptions.createSubscription();

var platform = rcsdk.platform();

platform.login({
        username: RINGCENTRAL_USERNAME,
        extension: RINGCENTRAL_EXTENSION,
        password: RINGCENTRAL_PASSWORD
      })

platform.on(platform.events.loginSuccess, function(e){
    console.log("Login success")
    subscribe_for_csn_notification()
});

function subscribe_for_csn_notification(){
    var eventFilters = [
      '/restapi/v1.0/account/~/telephony/sessions'
    ]
    subscription.setEventFilters(eventFilters)
    .register()
    .then(function(subscriptionResponse) {
        console.log("Ready to receive company tel session events via PubNub.")
    })
    .catch(function(e) {
        console.error(e);
        throw e;
    });
}

subscription.on(subscription.events.notification, function(msg) {
    console.log(JSON.stringify(msg.body));
    console.log("======");
});

 0



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