Just a quick answer, I recommend you to use the navigation object to navigate thru reading your call log.
This was meant to be a comment on the last user's response, but comments have a max set of chars.
I tried that, but in my testing the URLs didn't make sense. Consider - this is the result I get after fetching my second page, which is the last:
navigation {
nextPage: {
uri: 'https://platform.devtest.ringcentral.com/restapi/v1.0/account/272299004/extension/272299004/call-log?view=Detailed&direction=Inbound&showBlocked=true&withRecording=false&dateFrom=2020-01-01T00:00:00.000Z&page=3&perPage=2'
},
previousPage: {
uri: 'https://platform.devtest.ringcentral.com/restapi/v1.0/account/272299004/extension/272299004/call-log?view=Detailed&direction=Inbound&showBlocked=true&withRecording=false&dateFrom=2020-01-01T00:00:00.000Z&page=1&perPage=2'
},
firstPage: {
uri: 'https://platform.devtest.ringcentral.com/restapi/v1.0/account/272299004/extension/272299004/call-log?view=Detailed&direction=Inbound&showBlocked=true&withRecording=false&dateFrom=2020-01-01T00:00:00.000Z&page=1&perPage=2'
},
lastPage: {
uri: 'https://platform.devtest.ringcentral.com/restapi/v1.0/account/272299004/extension/272299004/call-log?view=Detailed&direction=Inbound&showBlocked=true&withRecording=false&dateFrom=2020-01-01T00:00:00.000Z&page=1&perPage=2'
}
}
Notice how firstPage and lastPage have, as far as I can see, the exact same URL. nextPage doesn't indicate it won't return anything.
Here's what I get after fetching my first page.
navigation {
nextPage: {
uri: 'https://platform.devtest.ringcentral.com/restapi/v1.0/account/272299004/extension/272299004/call-log?view=Detailed&direction=Inbound&showBlocked=true&withRecording=false&dateFrom=2020-01-01T00:00:00.000Z&page=2&perPage=2'
},
firstPage: {
uri: 'https://platform.devtest.ringcentral.com/restapi/v1.0/account/272299004/extension/272299004/call-log?view=Detailed&direction=Inbound&showBlocked=true&withRecording=false&dateFrom=2020-01-01T00:00:00.000Z&page=1&perPage=2'
},
lastPage: {
uri: 'https://platform.devtest.ringcentral.com/restapi/v1.0/account/272299004/extension/272299004/call-log?view=Detailed&direction=Inbound&showBlocked=true&withRecording=false&dateFrom=2020-01-01T00:00:00.000Z&page=1&perPage=2'
}
}
In this case, nextPage would work, but lastPage is the same as firstPage again.