question

yanmei avatar image
yanmei asked yanmei commented

can not get Call log on for all users and extensions--- production enviroment

I am working in Production environment, I login with username = maincompanyNumber,

request is: https://platform.ringcentral.com/restapi/v1.0/account/502681018/call-log?

but can not get all call logs for all users under? Am I doing something wrong?


Thanks.


call logs
1 |3000

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

Tyler Liu avatar image
Tyler Liu answered
Could you please post the code here?

By default, this endpoint only returns call logs in the past 24 hours. You need to specify dateTo and dateFrom parameters in order to get call logs for a longer period.
1 |3000

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

yanmei avatar image
yanmei answered yanmei commented

this is request , I tried to get for one week, I can see all call logs from service.ringcentral.com.  but in my code, it didn't work.

https://platform.ringcentral.com/restapi/v1.0/account/502681018/extension/~/call-log?type=Voice&dateFrom=2016-10-21T00:00:00.000Z&dateTo=2016-10-28T00:00:00.000Z

7 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.

yanmei avatar image yanmei commented ·
this is response: 
{  "uri" : " https://platform.ringcentral.com/restapi/v1.0/account/502681018/extension/502681018/call-log?view=Si...;,
  "records" : [ {
    "uri" : " https://platform.ringcentral.com/restapi/v1.0/account/502681018/extension/502681018/call-log/ZYkK6ym...;,
    "id" : "ZYkK6ymd8g18SVE",
    "sessionId" : "1227486734019",
    "startTime" : "2016-10-27T21:36:49.943Z",
    "duration" : 46,
    "type" : "Voice",
    "direction" : "Outbound",
    "action" : "RingOut Web",
    "result" : "Call connected",
    "to" : {
      "phoneNumber" : "+19726029819",
      "name" : "POINT OF RENTAL",
      "location" : "Grand Prairie (Dallas), TX"
    },
    "from" : {
      "phoneNumber" : "+18003159339",
      "name" : "Point of Rental Software Main"
    }
  } ],
  "paging" : {
    "page" : 1,
    "perPage" : 100,
    "pageStart" : 0,
    "pageEnd" : 0
  },
  "navigation" : {
    "firstPage" : {
      "uri" : " https://platform.ringcentral.com/restapi/v1.0/account/502681018/extension/502681018/call-log?view=Si...;
    }
  }
}
1 Like 1 ·
Tyler Liu avatar image Tyler Liu ♦ commented ·
We have a C# SDK here:  https://github.com/ringcentral/ringcentral-csharp I think it also works for VB. Could you please try it? Here is the doc:  http://ringcentral-csharp.readthedocs.io/en/latest/

I am confused because you said both "still get one call log" and "response.length = -1".

You also said "one call log I made on web page today". I think the server are returning you records for the last 24 hours only. Most likely the dateFrom parameter didn't take effect. In your sample code, I don't see how you encode and specify that parameter. Could you please send the sample project(remove your credentials) to tyler.liu@ringcentral.com ? I would like to have a try.
1 Like 1 ·
yanmei avatar image yanmei commented ·

thanks Tyler,

I tried again today with https://platform.ringcentral.com, works. and response.contentlength = -1 because:   If the Content-Length header is not set in the response, ContentLength is set to the value -1, I don't have to care about contenlength. thanks for helping. problem resolved

1 Like 1 ·
John Wang avatar image John Wang ♦♦ commented ·
Can you provide the HTTP response status and body that you are receiving? It will help with the debugging.
0 Likes 0 ·
Tyler Liu avatar image Tyler Liu ♦ commented ·
Instead of  https://platform.ringcentral.com/restapi/v1.0/account/502681018/extension/~/call-log?type=Voice&dateFrom=2016-10-21T00:00:00.000Z&dateTo=2016-10-28T00:00:00.000Z

Please try  https://platform.ringcentral.com/restapi/v1.0/account/502681018/call-log?type=Voice&dateFrom=2016-10-21T00:00:00.000Z&dateTo=2016-10-28T00:00:00.000Z

Don't forget to post the HTTP response status and body here. 

And by the way, you need to do URL encoding because dateFrom and dateTo contain special characters.
0 Likes 0 ·
Show more comments

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