API call log some records not found in result

  • 1
  • Problem
  • Updated 1 year ago
  • Acknowledged
  • (Edited)
Hi, I created an API call using the call log endpoint ('/account/~/extension/~/call-log') in production. It shows results of the records but there are 2 missing records.

service.ringcentral.com call log records:

date/time: Yesterday 8:41 PM - this record shows in the API call log result
date/time: Yesterday 7:12 PM - this record does NOT show in the API call log result
date/time: Yesterday 5:47 PM - this record does NOT show in the API call log result
date/time: Yesterday 2:20 PM - this record shows in the API call log result
date/time: Yesterday 1:00 PM - this record shows in the API call log result

Is there something wrong with the 2 missing records? The type and direction of these two are just like the other records that show. Additional parameters in the call are: direction Inbound and type is Voice.
Photo of adcdc

adcdc

  • 212 Points 100 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Benjamin Dean

Benjamin Dean, Alum

  • 8,642 Points 5k badge 2x thumb
Could you please provide the full API Request and Response (complete with headers)?
Photo of Tyler Long

Tyler Long, Official Rep

  • 6,918 Points 5k badge 2x thumb
By default it only return call logs for the last 24 hours. If those two records are made before 24 hours, they won't be returned.

You can specify the `dateFrom` parameter to get call logs for a longer period.
(Edited)
Photo of adcdc

adcdc

  • 212 Points 100 badge 2x thumb
Request:

GET /restapi/v1.0/account/~/extension/~/call-log?direction=Inbound&type=Voice&dateFrom=2016-11-06T00:00:00.000Z&perPage=700 HTTP/1.1
Host: platform.ringcentral.com
GET /restapi/v1.0/account/~/extension/~/call-log?direction=Inbound&type=Voice&dateFrom=2016-11-06T00:00:00.000Z&perPage=700 HTTP/1.1
Accept: application/json
Authorization: Bearer SUFEMDFQ...N3pJMDhFeDAzcVA3ZjYyUWMzUGc

Response:

HTTP/1.1 200 OK
Server: nginx/1.8.0
Date: Thu, 10 Nov 2016 10:54:14 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 5359
Connection: keep-alive
Set-Cookie: RCRoutingInfo=B:f971LX5Q1QQ7jOY2bZrBbvnKjdQWGHURK1X+Qodz0DipvkIjNOlS/lKSzegxu+V6; Path=/
RCRequestId: 048ceac0-a734-11e6-979b-0050569792e2
RoutingKey: IAD01P08PAS01
Content-Language: en-US
Vary: Accept-Encoding, User-Agent
x-throttling-group: Heavy
X-Rate-Limit-Group: heavy
X-Rate-Limit-Limit: 10
X-Rate-Limit-Remaining: 9
X-Rate-Limit-Window: 60
X-AGW-Host: sjc01-c01-agw13.c01.ringcentral.com

{
"uri" : "https://platform.ringcentral.com/rest...",
"records" : [ {
"uri" : "https://platform.ringcentral.com/rest......",
"id" : "ZhC...",
"sessionId" : "123...",
"startTime" : "2016-11-09T19:23:02.752Z",
"duration" : 54,
"type" : "Voice",
"direction" : "Inbound",
"action" : "Phone Call",
"result" : "Voicemail",
"to" : {
"phoneNumber" : "+134...",
"name" : "... Company"
},
"from" : {
"phoneNumber" : "+1917...",
"name" : "WIRELESS CALLER",
"location" : "New York City, NY"
}
}, {
"uri" : "https://platform.ringcentral.com/rest......",
"id" : "ZhB...",
"sessionId" : "1233...",
"startTime" : "2016-11-09T19:09:07.361Z",
"duration" : 10,
"type" : "Voice",
"direction" : "Inbound",
"action" : "Phone Call",
"result" : "Missed",
"to" : {
"phoneNumber" : "+1347...",
"name" : "... Company"
},
"from" : {
"phoneNumber" : "+1201...",
"name" : "LEONIA NJ",
"location" : "Leonia, NJ"
}
}, {
"uri" : "https://platform.ringcentral.com/rest......",
"id" : "ZgUu...",
"sessionId" : "1233...",
"startTime" : "2016-11-08T21:56:14.871Z",
"duration" : 11,
"type" : "Voice",
"direction" : "Inbound",
"action" : "Phone Call",
"result" : "Missed",
"to" : {
"phoneNumber" : "+1347...",
"name" : "... Company"
},
"from" : {
"phoneNumber" : "+1980...",
"name" : "LOCAL"
}
}, {
"uri" : "https://platform.ringcentral.com/rest......",
"id" : "ZgIL...",
"sessionId" : "12332...",
"startTime" : "2016-11-08T19:56:33.150Z",
"duration" : 47,
"type" : "Voice",
"direction" : "Inbound",
"action" : "Phone Call",
"result" : "Missed",
"to" : {
"phoneNumber" : "+1877...",
"name" : "... Company"
},
"from" : {
"phoneNumber" : "+1512...",
"name" : "WIRELESS CALLER",
"location" : "Austin, TX"
}
}, {
"uri" : "https://platform.ringcentral.com/rest......",
"id" : "Zf_lJ...",
"sessionId" : "1233...",
"startTime" : "2016-11-08T18:38:18.039Z",
"duration" : 11,
"type" : "Voice",
"direction" : "Inbound",
"action" : "Phone Call",
"result" : "Missed",
"to" : {
"phoneNumber" : "+1347...",
"name" : "... Company"
},
"from" : {
"phoneNumber" : "+1218...",
"name" : "CUSTOMER SRV",
"location" : "Grand Rapids, MN"
}
}, {
"uri" : "https://platform.ringcentral.com/rest......",
"id" : "Zfe2...",
"sessionId" : "1232...",
"startTime" : "2016-11-08T01:41:02.634Z",
"duration" : 10,
"type" : "Voice",
"direction" : "Inbound",
"action" : "Phone Call",
"result" : "Missed",
"to" : {
"phoneNumber" : "+1347...",
"name" : "... Company"
},
"from" : {
"phoneNumber" : "+1201...",
"name" : "LEONIA NJ",
"location" : "Leonia, NJ"
}
}, {
"uri" : "https://platform.ringcentral.com/rest......",
"id" : "ZfB9...",
"sessionId" : "12323...",
"startTime" : "2016-11-07T19:20:23.664Z",
"duration" : 32,
"type" : "Voice",
"direction" : "Inbound",
"action" : "Phone Call",
"result" : "Missed",
"to" : {
"phoneNumber" : "+1347...",
"name" : "... Company"
},
"from" : {
"phoneNumber" : "+1516...",
"name" : "... ADVS",
"location" : "Nassau, NY"
}
}, {
"uri" : "https://platform.ringcentral.com/rest......",
"id" : "Ze4q...",
"sessionId" : "1232...",
"startTime" : "2016-11-07T18:00:28.859Z",
"duration" : 47,
"type" : "Voice",
"direction" : "Inbound",
"action" : "Phone Call",
"result" : "Missed",
"to" : {
"phoneNumber" : "+1877...",
"name" : "... Company"
},
"from" : {
"phoneNumber" : "+1913...",
"name" : "WIRELESS CALLER",
"location" : "Kansas City, KS"
}
} ],
"paging" : {
"page" : 1,
"perPage" : 700,
"pageStart" : 0,
"pageEnd" : 7
},
"navigation" : {
"firstPage" : {
"uri" : "https://platform.ringcentral.com/rest..."
}
}
}
Photo of adcdc

adcdc

  • 212 Points 100 badge 2x thumb
Below are the records that was not in the result:

Photo of Benjamin Dean

Benjamin Dean, Alum

  • 8,642 Points 5k badge 2x thumb
Get rid of the "Type" filter and see if you get the same results please.

/restapi/v1.0/account/~/extension/~/call-log?dateFrom=2016-11-06T00:00:00.000Z
Photo of adcdc

adcdc

  • 212 Points 100 badge 2x thumb
Yes, results are the same.
Photo of Benjamin Dean

Benjamin Dean, Alum

  • 8,642 Points 5k badge 2x thumb
Could you please use the API Explorer (https://developers.ringcentral.com/api-explorer) and see if you get the same results from there (keeping in mind it only works with Sandbox accounts).
Photo of adcdc

adcdc

  • 212 Points 100 badge 2x thumb
But the issue is in production results, how will i do that in sandbox?
Photo of Benjamin Dean

Benjamin Dean, Alum

  • 8,642 Points 5k badge 2x thumb
So this is with your production application...?

I would recommend creating a support ticket to investigate this issue. You can do that here: https://developers.ringcentral.com/support.html

Click on the "click here" link which is part of this copy: If you have not found sufficient help in either our Developer Community or the FAQ please click here to request technical assistance.

Reference this community post, make sure to share that this issue is in your production account and provide a basic overview please.
Photo of adcdc

adcdc

  • 212 Points 100 badge 2x thumb
Yes it is in production, I stated it in my post though.

Okay, Thanks.
Photo of Benjamin Dean

Benjamin Dean

  • 8,582 Points 5k badge 2x thumb
That was my fault. Support will be able to help you further with this issue.
Photo of Robert Lam

Robert Lam

  • 130 Points 100 badge 2x thumb
So what was the answer to this problem ? I also have similar problem where the API only returns the log list for some extensions but not others. I could see all of it on 

https://service.ringcentral.com

My url is

     url = self.apiUrl + 'v1.0/account/~/extension/~/call-log?dateFrom='+self.search_startdate+'&type=Voice&withRecording=true

if I specify a particular extension e.g.
     url = self.apiUrl + 'v1.0/account/~/extension/110/call-log?dateFrom='+self.search_startdate
+'&type=Voice&withRecording=true

I get this error 

   "message": "Resource for parameter [extensionId] is not found",    "parameterName": "extensionId",
    "errorCode": "CMN-102",
    "errors": [
        {
            "message": "Resource for parameter [extensionId] is not found",
            "parameterName": "extensionId",
            "errorCode": "CMN-102"
        }
    ]
(Edited)
Photo of Tyler Long

Tyler Long, Official Rep

  • 5,190 Points 5k badge 2x thumb
"v1.0/account/~/extension/~/call-log" only returns call logs for extension/~

If you want call log for all the extensions, please use "v1.0/account/~/call-log" instead.
Photo of Tyler Long

Tyler Long, Official Rep

  • 5,190 Points 5k badge 2x thumb
Another issue in you code sample is: 110 is not extension ID, it's extension's internal phone number. They are different.  That's why "Resource for parameter [extensionId] is not found".
Photo of adcdc

adcdc

  • 212 Points 100 badge 2x thumb
Thanks Tyler, the issue is because of the extension specific call logs.
Photo of adcdc

adcdc

  • 212 Points 100 badge 2x thumb
I think that is not how you specify the extension, you have to specify it in the authorize call.