connor-blakely avatar image
connor-blakely asked Leonard leWang Deactivated edited

How to filter a call log by action and result

I am retrieving the call log for a user by sending a GET request via cURl in php. I have had no issue retrieving these logs and adjusting inputs such as perPage or dateFrom.

An example of a successful call(Sandbox):

However, while viewing the doc found here:!/Call_Log/loadExtensionCallLog

I do not see how to specify action and result under the GET /v1.0/account/{accountId}/extension/{extensionId}/call-log

I would like to filter the call log by the action of "Phone Call" and result of "Missed".

Is this possible with a GET request or will it have to be done after the records are retrieved?


developer sandbox
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

benjamin-dean avatar image
benjamin-dean answered benjamin-dean commented
There are a few additional query parameters which will get you "closer" to where you want to be (I'll show some URL examples below). The only part that you "should" need to filter the response data for (based on the criteria you've provided) is "result" === "Missed". I've submitted a suggestion to our API Product Management team to consider adding the ability to filter on some of the Call Log Record data in the call-log requests as well. If I learn there is a way to filter by result=Missed, I will update this ticket.

Here are the query parameters you can use to filter call-logs:
  • Filter by Phone Number (cannot be used with extensionNumber query param simultaneously)
    Param Name === phoneNumber
    Value Format === Number, <countryCode><areaCode><exchangeCode><identifier>
    Example === 13215551212

  • Filter by Extension Number (cannot be used with phoneNumber query param simultaneously)
    Param Name === extensionNumber
    Value Format === Number, <extensionNumber> // Note, this is NOT the extension ID
    Example === 104

  • Filter by Voice (Phone Call)
    Param Name === type
    Value Format === String, One of the valid Call Types, either "Voice" -or- "Fax"
    Example === Voice

  • Filter by Direction
    Param Name === direction
    Value Format === String, One of the valid Call Direction strings, either "Inbound" -or- "Outbound"
    Example === Inbound
Here is a cURL example using all of these together (except extensionNumber since we cannot use that and phoneNumber together in same query):

The results of these calls will contain the appropriately time-based range (as defined by the default of last 24 hours, or by using the dateFrom and dateTo query params). Each record will have a "result" property, you will just need to filter out the results by the value "Missed" to get the records you want.

Let me know if you'd like some example code for filtering these results.

1 |3000

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

connor-blakely avatar image connor-blakely commented ·
Hey  Benjamin, 

If I understood your response correctly there is no current way to add "result" as a query param while requesting a Call Log record. This is the exact information I was looking for. 

Thanks for your time, 

0 Likes 0 ·
benjamin-dean avatar image benjamin-dean commented ·
Yes, that is correct. To filter for result = "Missed", you would need to do that post-response.

Happy to help.
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