How to get Incoming call information like phone number of the person called and the extension it was answered?

  • 1
  • Question
  • Updated 8 months ago
  • (Edited)
Hello ,

We are new to RingCentral. We are trying to get incoming call information with the extension the call is answered immediately (real time). We need a push notification or a trigger. That sends information to a particular URL. 

How can we achieve this? We use .Net .

If it can be achieved through webhook. Where can I find a sample to create a webhook.

Any help is appreciated. 

Thanks
Photo of Dev Juiced

Dev Juiced

  • 90 Points 75 badge 2x thumb

Posted 8 months ago

  • 1
Photo of John Wang

John Wang, Official Rep

  • 4,724 Points 4k badge 2x thumb
To get real-time, incoming call information, you should make a subscription with the presence event filter:

/restapi/v1.0/account/~/extension/~/presence?detailedTelephonyState=true

You can get more information on this here:

https://developer.ringcentral.com/api-docs/latest/index.html#!#RefNotifications.html

For C#, we have a PubNub subscription example:

https://github.com/ringcentral/ringcentral-csharp-client#subscription

For webhooks, we have some examples in JS and PHP:

* JS: https://github.com/grokify/ringcentral-demos-webhooks
* PHP (via Botman): https://github.com/ringcentral/glip-botman/blob/master/index.php

Try it out in C#.
(Edited)
Photo of Dev Juiced

Dev Juiced

  • 90 Points 75 badge 2x thumb
Thank you . 

Do you have any example to make subscription using C#?
Photo of Customer Support

Customer Support

  • 110 Points 100 badge 2x thumb
Currently, I do not have a webhook demo example yet.  I am working on it. But I have a sample code for C# Subscription using pub nub here, which you could refer to :    https://github.com/vyshakhbabji/ringcentral-csharp-demo/blob/master/ConsoleApplication1/Program.cs