How to get caller info (caller ID and called Nr.) from telephony presence events?

  • 1
  • Question
  • Updated 2 years ago
  • Answered
  • (Edited)
Whenever you want to be able to find out the Caller ID or the number being called during the progress of a call you can use this example:

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(...);
Photo of TT

TT, Alum

  • 412 Points 250 badge 2x thumb

Posted 3 years ago

  • 1
Photo of shan

shan

  • 90 Points 75 badge 2x thumb
Please can you provide an example as how I can achieve this via PHP/MySQL system.
Thanks
Photo of sunny

sunny

  • 100 Points 100 badge 2x thumb
Hi,
TT
As I can see there is no such rcsdk.getSubscription(); method found in C# sdk . Am i missing something or Please guide me which SDk i have to use
Photo of sunny

sunny

  • 100 Points 100 badge 2x thumb
Hi,
TT
As I can see there is no such rcsdk.getSubscription(); method found in C# sdk . Am i missing something or Please guide me which SDk i have to use
Photo of Benjamin Dean

Benjamin Dean

  • 8,602 Points 5k badge 2x thumb
If you are using the C# SDK, it is recommended to ask questions pertaining to it using the Github Issue tracker for the associated repository. In the case of the C# SDK, that is here: https://github.com/ringcentral/ringcentral-csharp/issues