News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Fax: SendingFailed, CallFailed, only coverpage received
Tags: rest api
Mar 26, 2021 at 10:41am   •   2 replies  •  0 likes
Evan Adams

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

},



2 Answers
answered on Apr 2, 2021 at 2:30pm  

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



 0
on Apr 2, 2021 at 7:02pm   •  0 likes

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

answered on Mar 26, 2021 at 11:01am  

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.


 0



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

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us