question

Evan Adams avatar image
Evan Adams asked Phong Vu commented

Fax: SendingFailed, CallFailed, only coverpage received

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

},



faxfaxerrorcode
1 |1500 characters needed characters left characters exceeded

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

Phong Vu avatar image
Phong Vu answered

This is a known issue. The team is currently working on fixing it. Meanwhile, your Fax API call in sandbox will not marked as failed so your app would be good to submit for production if you want to. Fax API works as expected on production though.

1 |1500 characters needed characters left characters exceeded

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

Evan Adams avatar image
Evan Adams answered Phong Vu commented

To confirm, the known issue you refer to is causing both issues correct?

  1. Status of SendingFailed (This appears to be fixed)
  2. Only the cover page being received


1 comment
1 |1500 characters needed characters left characters exceeded

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

Correct. The fax attachment issue is being investigated and will be fixed as soon as we can.

0 Likes 0 ·

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