Question
How to get caller info (caller ID and called Nr.) from telephony presence events?
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(...);
