The 2 endpoints, call-log and message-store have different purposes.
1. The call-log is for getting activities and status of voice and messaging including fax of extensions. It does not matter if a voice call or a fax was sent or received successfully, it always logs whatever happens to an extension.
2. The message-store is for getting SMS, voicemail, fax messages' metadata and the message itself. For inbound messages, the system saves the metadata and the message to the message store only after a message is received successfully. For outbound messages, the system saves the message metadata and the final status regardless of if the message was sent successfully or not. Message status can be one of these Queued, Sent, Delivered, DeliveryFailed, SendingFailed, Received.
I believe that the message Id of a message is identical between the call log and the message store content.
Call log response:
{"uri":".../call-log/...?view=Simple","id":"CpSiFh7qkee_DUA","sessionId":"12791151","startTime":"2019-12-09T19:20:36.456Z","duration":50,"type":"Fax","direction":"Inbound","action":"Incoming Fax","result":"Received","to":{"phoneNumber":"+1650513XXXX","extensionId":"1426275520"},"from":{"name":"CHICAGO IL","phoneNumber":"+1312982XXXX","location":"Chicago, IL"},"message":{"uri":"https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~/message-store/1099870668021","id":"1099870668021","type":"Fax"},...
Message store response:
{"uri":".../message-store?direction=Inbound&messageType=Fax&availability=Alive&dateFrom=2019-12-08T23:03:00.000Z&page=1&perPage=100","records":[{"uri":"https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~/message-store/1099870668021","id":1099870668021, ...
You can see the ids are the same.
@Phong Vu can you please help me with issue ?
Thanks
Sorry for the mistake. Yes, "Detailed"
That's weird. If you can, install the RingCentral JS SDK and run this Node JS code. It works reliably for me.
var SDK = require('ringcentral')
RINGCENTRAL_CLIENTID = ''
RINGCENTRAL_CLIENTSECRET = ''
RINGCENTRAL_SERVER = 'https://platform.devtest.ringcentral.com
var rcsdk = new SDK({
server: RINGCENTRAL_SERVER,
appKey: RINGCENTRAL_CLIENTID,
appSecret: RINGCENTRAL_CLIENTSECRET
});
var platform = rcsdk.platform();
platform.login({
username: "USERNAME",
password: "PASSWORD",
extension: "101"
})
.then(function(resp) {
platform.get('/account/~/call-log', {
dateFrom: "2019-12-18T03:00:00.000Z
direction: ['Inbound'],
view: "Detailed"
})
.then(function (resp)
for (var record of resp.json().records){
console.log(JSON.stringify(record)
}
});
});