Why am I getting SendingFailed, Callfailed when the fax is sent?
Why is only the cover page being received?
Even from the API Explorer, I receive a notification a fax was received however I only get the cover page.
For my test I'm sending a fax to my RingCentral test fax number, but once received the message store shows a status of SendingFailed, with a faxErrorCode of CallFailed.
Sending a fax via https://developers.ringcentral.com/api-reference/Fax/createFaxMessage
Request
// https://developers.ringcentral.com/my-account.html#/applications
// Find your credentials at the above url, set them as environment variables, or enter them below
// PATH PARAMETERS
const accountId = '<ENTER VALUE>';
const extensionId = '<ENTER VALUE>';
const recipient = '<ENTER VALUE>';
const SDK = require('ringcentral');
const rcsdk = new SDK({ server: process.env.serverURL, appKey: process.env.clientId, appSecret: process.env.clientSecret});
const platform = rcsdk.platform();
var FormData = require('form-data');
formData = new FormData();
formData.append('json', new Buffer(JSON.stringify({
to: [ { 'phoneNumber': recipient} ],
faxResolution: 'High',
coverPageText: "This is a demo Fax page from Node JS"
})), {
filename: 'request.json',
contentType: 'application/json'
});
formData.append('attachment', require('fs').createReadStream('fax.jpg'));
platform.login({ username: process.env.username, extension: process.env.extension, password: process.env.password }).then(() => {
platform.post(`/restapi/v1.0/account/${ accountId}/extension/${ extensionId}/fax`, formData).then((r) => {
// HANDLE REPONSE
});
});
Response
{
"uri": https://platform.devtest.ringcentral.com/restapi/v1.0/account/288824004/extension/288824004/message-store/9227927004,
"id": 9227927004,
"to": [
{
"phoneNumber": "<My RingCentral Test Fax #>",
"location": "<My City/State>",
"messageStatus": "Queued"
}
],
"type": "Fax",
"creationTime": "2021-03-26T17:01:26.000Z",
"readStatus": "Unread",
"priority": "Normal",
"attachments": [
{
"id": 9227927004,
"uri": https://media.devtest.ringcentral.com/restapi/v1.0/account/288824004/extension/288824004/message-store/9227927004/content/9227927004,
"type": "RenderedDocument",
"contentType": "application/pdf"
}
],
"direction": "Outbound",
"availability": "Alive",
"messageStatus": "Queued",
"faxResolution": "High",
"faxPageCount": 0,
"lastModifiedTime": "2021-03-26T17:01:26.273Z",
"coverIndex": 3
}
Then after I receive the email from RingCentraly telling me the fax was received I use the following call to get that messages status from the message store list
https://developers.ringcentral.com/api-reference/Message-Store/listMessages
{
"uri": https://platform.devtest.ringcentral.com/restapi/v1.0/account/288824004/extension/288824004/message-store?availability=Alive&dateFrom=2021-03-25T17:35:00.000Z&page=1&perPage=100,
"records": [
{
"uri": https://platform.devtest.ringcentral.com/restapi/v1.0/account/288824004/extension/288824004/message-store/9227927004,
"id": 9227927004,
"extensionId": "288824004",
"to": [
{
"phoneNumber": "<My RingCentral FAX#>",
"location": "<My City/State>",
"messageStatus": "SendingFailed",
"faxErrorCode": "CallFailed"
}
],
"type": "Fax",
"creationTime": "2021-03-26T17:01:26.000Z",
"readStatus": "Unread",
"priority": "Normal",
"attachments": [
{
"id": 9227927004,
"uri": https://media.devtest.ringcentral.com/restapi/v1.0/account/288824004/extension/288824004/message-store/9227927004/content/9227927004,
"type": "RenderedDocument",
"contentType": "application/pdf"
}
],
"direction": "Outbound",
"availability": "Alive",
"messageStatus": "SendingFailed",
"faxResolution": "High",
"faxPageCount": 5,
"lastModifiedTime": "2021-03-26T17:10:27.131Z",
"coverIndex": 3
},
,
Why am I getting SendingFailed, Callfailed when the fax is sent?
Why is only the cover page being received?
Even from the API Explorer, I receive a notification a fax was received however I only get the cover page.
For my test I'm sending a fax to my RingCentral test fax number, but once received the message store shows a status of SendingFailed, with a faxErrorCode of CallFailed.
Sending a fax via https://developers.ringcentral.com/api-reference/Fax/createFaxMessage
Request
// https://developers.ringcentral.com/my-account.html#/applications
// Find your credentials at the above url, set them as environment variables, or enter them below
// PATH PARAMETERS
const accountId = '<ENTER VALUE>';
const extensionId = '<ENTER VALUE>';
const recipient = '<ENTER VALUE>';
const SDK = require('ringcentral');
const rcsdk = new SDK({ server: process.env.serverURL, appKey: process.env.clientId, appSecret: process.env.clientSecret});
const platform = rcsdk.platform();
var FormData = require('form-data');
formData = new FormData();
formData.append('json', new Buffer(JSON.stringify({
to: [ { 'phoneNumber': recipient} ],
faxResolution: 'High',
coverPageText: "This is a demo Fax page from Node JS"
})), {
filename: 'request.json',
contentType: 'application/json'
});
formData.append('attachment', require('fs').createReadStream('fax.jpg'));
platform.login({ username: process.env.username, extension: process.env.extension, password: process.env.password }).then(() => {
platform.post(`/restapi/v1.0/account/${ accountId}/extension/${ extensionId}/fax`, formData).then((r) => {
// HANDLE REPONSE
});
});
Response
{
"uri": https://platform.devtest.ringcentral.com/restapi/v1.0/account/288824004/extension/288824004/message-store/9227927004,
"id": 9227927004,
"to": [
{
"phoneNumber": "<My RingCentral Test Fax #>",
"location": "<My City/State>",
"messageStatus": "Queued"
}
],
"type": "Fax",
"creationTime": "2021-03-26T17:01:26.000Z",
"readStatus": "Unread",
"priority": "Normal",
"attachments": [
{
"id": 9227927004,
"uri": https://media.devtest.ringcentral.com/restapi/v1.0/account/288824004/extension/288824004/message-store/9227927004/content/9227927004,
"type": "RenderedDocument",
"contentType": "application/pdf"
}
],
"direction": "Outbound",
"availability": "Alive",
"messageStatus": "Queued",
"faxResolution": "High",
"faxPageCount": 0,
"lastModifiedTime": "2021-03-26T17:01:26.273Z",
"coverIndex": 3
}
Then after I receive the email from RingCentraly telling me the fax was received I use the following call to get that messages status from the message store list
https://developers.ringcentral.com/api-reference/Message-Store/listMessages
{
"uri": https://platform.devtest.ringcentral.com/restapi/v1.0/account/288824004/extension/288824004/message-store?availability=Alive&dateFrom=2021-03-25T17:35:00.000Z&page=1&perPage=100,
"records": [
{
"uri": https://platform.devtest.ringcentral.com/restapi/v1.0/account/288824004/extension/288824004/message-store/9227927004,
"id": 9227927004,
"extensionId": "288824004",
"to": [
{
"phoneNumber": "<My RingCentral FAX#>",
"location": "<My City/State>",
"messageStatus": "SendingFailed",
"faxErrorCode": "CallFailed"
}
],
"type": "Fax",
"creationTime": "2021-03-26T17:01:26.000Z",
"readStatus": "Unread",
"priority": "Normal",
"attachments": [
{
"id": 9227927004,
"uri": https://media.devtest.ringcentral.com/restapi/v1.0/account/288824004/extension/288824004/message-store/9227927004/content/9227927004,
"type": "RenderedDocument",
"contentType": "application/pdf"
}
],
"direction": "Outbound",
"availability": "Alive",
"messageStatus": "SendingFailed",
"faxResolution": "High",
"faxPageCount": 5,
"lastModifiedTime": "2021-03-26T17:10:27.131Z",
"coverIndex": 3
},
To confirm, the known issue you refer to is causing both issues correct?
- Status of SendingFailed (This appears to be fixed)
- Only the cover page being received
Correct. The fax attachment issue is being investigated and will be fixed as soon as we can.
A new Community is coming to RingCentral!
Posts are currently read-only as we transition into our new platform.We thank you for your patience
during this downtime.
Try Workflow Builder
Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!Try RingCentral Workflow Builder