Skip to main content

I'm creating an app for my organization that does a handful of customized things that RingCentral does not do. This is my first time to use the RingCentral API and I'm stuck on how to get the Incoming Call webhook to work for all extensions in my organization. I'm using the .NET SDK and right now I have:

var rc = new RestClient(CLIENT_ID, CLIENT_SECRET, SERVER_URL);
await rc.Authorize(USERNAME, EXTENSION, PASSWORD);
await rc.Restapi().Subscription().Post(new CreateSubscriptionRequest
{
eventFilters = new[] { "/restapi/v1.0/account/~/extension/~/incoming-call-pickup"
     deliveryMode = new NotificationDeliveryModeRequest
     {
         transportType = "WebHook",
         address = IncomingCallWebHookAddress
     }
});


But this seems to only set up the webhook to be fired for events on this one user's extension, even though the user is a Super Admin.

Is it possible to set up this webhook so that it fires each time an incoming call comes in for the over 100 users in our organization? It seems like this would be a nightmare to manage long term unless I can just have the super admin grant permissions for all extensions.

Thanks in advance!

Just change the event filter with this:

"/restapi/v1.0/account/~/incoming-call-pickup"

Make sure you login with a super admin extension.


Thanks Phong - Changing to the below worked for me.

"/restapi/v1.0/account/~/incoming-call-pickup"

Is this EventFilter still valid? "eventFilters":["/restapi/v1.0/account/~/incoming-call-pickup"]

I got a Bad Response error


"errorCode":"CMN-101","message":"Parameter [eventFilters] value is invalid","errors":[{"errorCode":"CMN-101","message":"Parameter [eventFilters] value is invalid","parameterName":"eventFilters"}],"parameterName":"eventFilters


If I wanted to get notified every time an outbound call is made for any of our extensions, can I use this?

"/restapi/v1.0/account/~/extension/~/telephony/session"



For getting notification on every extension, use the Account level event filter

/restapi/v1.0/account/~/telephony/sessions

For getting only outbound calls, use the direction params

/restapi/v1.0/account/~/telephony/sessions?direction=Outbound

Thanks Phong.

Was missing leading "/"




All,

Not sure about the "incoming-call-pickup" event anymore but it seems that it is not supported.

To receive an event of a call gets connected, simply use the /telephony/sessions event filter with the direction=inbound, then detect the connected status of a call

/restapi/v1.0/account/~/telephony/sessions?direction=Inbound

Read this article for further info about telephony session notifications.


Actually, your filter was missing the 's' as it must be '/sessions'


Reply