question

snakeboard-snakeboard13303 avatar image
snakeboard-snakeboard13303 asked Phong Vu commented

Cannot distinguish between ringing and answered calls for "active calls"

I'm using this endpoint to get the "active calls" for an extension, and I need to distinguish between calls that are still ringing, and calls that have been answered:


https://platform.devtest.ringcentral.com/restapi/v1.0/account/accountId/extension/extensionId/active...


However, all of the call records have a "result" of "In Progress", which is not listed as one of the 37 valid enum values in the documentation. The record will show "In Progress" before and after the call has been answered.


How can I distinguish between ringing and answered calls?


phone
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered
Hi,

I will double check if it is by design or a bug.

Meanwhile, you can use the presence API to detect the telephony status of a user instead of using the active call API.

Please check this blog and tutorial for instructions. It is even better when you use the push notification and detect the status.

https://medium.com/ringcentral-developers/how-to-get-a-new-call-recording-notification-ee9f2a6e41a0
https://ringcentral-tutorials.github.io/callrecording-notification-node/?distinctId=1398916020

+ Phong
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

snakeboard-snakeboard13303 avatar image
snakeboard-snakeboard13303 answered
Thank you. I look forward to hearing more...
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

snakeboard-snakeboard13303 avatar image
snakeboard-snakeboard13303 answered Phong Vu commented
Good morning,

Is there any update on this?

Thank you.
1 comment
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image Phong Vu ♦♦ commented ·
Hi Snakeboard,

I checked the documentation and I can confirm that there is no "Answering" result from this API. The enum also show a wrong value "ResultInProgress" while it should be just "In Progress". I also observed that some time there is a delay in updating the result status. In my test, the call was connected but the API returned "In Progress", but if I poll several time, the result finally got updated to "Call Connected".

As I said, the presence API would satisfy your need to detect ringing and also telephony status better.

+ Phong 
0 Likes 0 ·

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys