question

Josh Sprow avatar image
Josh Sprow asked Josh Sprow commented

Fetching company call logs from inactive extensions

* Reposting so that I can be the point of contact

Hi there,

I've been tasked with gathering and analyzing call logs for our company, but I'm running into problems grabbing the percent of calls accepted each month.

If request all company call logs, some of the extensions I'm looking for aren't being returned. I suspect it's because the users associated with these extensions are "Not Activated" (Correct me if I'm wrong). I can see the % Answered KPI for these numbers on the analytics page, btw.

I'm able to come up with the number if I call the API, requesting logs for those specific extensions. The problem is, with rate limits, the process is taking far too long. (I want to archive logs for every extension, as well.)

Because of the way our phone system is set up, we're using some inactive extensions that only exists to forward calls to others. I tried a workaround where I get these numbers' forwarding agents and come up with the counts that way. However, there's overlap with the agents' numbers, so the counts aren't accurate.

So, my questions...

- Am I doing it wrong?

- Is there another way to retrieve inactive users' call logs?

- Are there any endpoints that can pull values from the analytics page? If I'm able to archive the active users' logs and get the counts I'm looking for some other way, that'd be fine.

Thanks much!


rest api
1 |3000

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

1 Answer

Phong Vu avatar image
Phong Vu answered Josh Sprow commented

Based on my tests, I could read call records of "Not Activated" extensions both ways, using the extension level and the account level APIs. The difference is that the call record data returned from the account level API gives more call legs. It includes the leg information of those extensions specified in the "RingGroup".

Can you run this test:

1) Call the call log at extension level using the extension id of a "Not Activated" user.

2) Call the call log at the account level.

3) Pick a session id of one of the call records you read from the 1st step and search for it from the result you read from the 2nd step.

If you have a large account with many call records, you can use the same "dateFrom" and "dateTo" for a short time period, to read both ways to make it easier to find the record.

3 comments
1 |3000

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

Josh Sprow avatar image Josh Sprow commented ·

Much appreciated Phong. I ran your test and everything worked as it's supposed to.

After a little more digging, it looks like I was trying to fetch logs using call queue extension IDs. Because they had the same names as the user extensions I was looking for (the inactive accounts), it looked like there was an issue with those users.

When I used the user extension IDs, the logs were fetched correctly.


0 Likes 0 ·
Josh Sprow avatar image Josh Sprow Josh Sprow commented ·

After looking at the legs returned form that endpoint, I'm having trouble figuring out how to find which extension to use so that I can get the "Answered" count. In other community posts, some have suggested using the first leg, but the startTime is often the same between legs. Also, using the leg's index in the array seems like it might be unreliable.

Is there another field I should be looking at?

PS. This would be easier if I could just hit an analytics endpoint...

0 Likes 0 ·
Josh Sprow avatar image Josh Sprow commented ·

I'll make a new question with what I asked in my last comment, since it's not 100% related to this one.

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