Question

message-store fax status is always received

  • 23 January 2019
  • 5 replies
  • 1596 views

I am successfully retrieving an extension's message list using "message-store". We are able to obtain most of the information we require for faxes in our message box, except for:


1) "Status" for Inbound and Outbound faxes we cannot seem to access properly. We are trying records['messageStatus']. but this returns "Received" for all messages, including those that are "Partial Receive" as displayed in the web-app call-log.

We also tried referencing all of these:

records['to']['messageStatus']
records['to']['faxErrorCode']
records['from']['messageStatus']
records['from']['faxErrorCode']
and they all return as not set (null).

Where / how do we obtain the proper "Status" of a fax message?


2) "To phoneNumber" for Outbound faxes we cannot seem to access. We have tried:

records['subject']

records['to']['phoneNumber']

records['from']['phoneNumber']
and they all return as not set (null).

Where / how do we obtain the proper "phoneNumber" of an outgoing sent fax message?


Thanks



5 replies

Userlevel 1
Hi Michel,

I guess it is just the matter of delay time of syncing the message store. Can you give more time and try reading the message store again to see if the messageStatus updated.

Regarding to the to number, there is no "to" field in the response. Instead, you can get the to number from the "subject" field.

Let me know if you still see those message status unchanged or null.

+ Phong
Maybe there is a typo?  I remember records is an array.  So instead of records['subject'], you should try records[0]['subject'].
I'm not sure it would be a sync issue, since the message I am checking on is now 12 hrs old - it should be synced by now, correct?.  Here is the full response array I just pulled a few minutes ago, note that this message shows as "Partial Receive" in our web-app call log, but the only returned API inf indicates a status of "Received":

[uri] => https://platform.ringcentral.com/restapi/v1.0/account/57489449/extension/381982024/message-store/103...
[id] => 1033226798024
[from] => Array (
   [phoneNumber] => xxxxxxxx 
   [name] => CONFIDENTIAL
   [location] => Edmonton, AB )
[type] => Fax
[creationTime] => 2019-01-23T16:14:22.000Z
[readStatus] => Unread
[priority] => Normal
[attachments] => Array ( [0] => Array (
    [id] => 1033226798024 [uri] => https://media.ringcentral.com/restapi/v1.0/account/57489449/extension/381982024/message-store/103322...
    [type] => RenderedDocument
    [contentType] => image/tiff ) )
[direction] => Inbound
[availability] => Alive
[subject] => xxxxxxxx 
[messageStatus] => Received
[faxResolution] => High
[faxPageCount] => 1
[lastModifiedTime] => 2019-01-23T16:14:22.533Z

(note that the phone/fax numbers are returned, they are just replaced with xxxxxxx for privacy)

On Outbound messages we did find the "to" number (we just had a typo!)
With further analysis of our messages through the API, I have found that if faxes are partially received and there is any size of an attachment on the message, then it is accessible through the API through the message-store with a "Received" status.  BUT all the faxes that have no attachment due to receive errors DO NOT show up at all in the message-store. 

I assume I will have to check the API "call-log" data to confirm all the incoming faxes that had receive errors and no partial message was obtained.

This still leaves me with my original problem, because when I try to download fax messages that were only partially received, I cannot obtain the proper status so that we can determine that we are missing pages and need identify it and handle it differently.
Hi Michael, I remember that when a fax sending failed I used to check the call log to see the exact failure reason.  For inbound fax, if its status is not received, you probably won't see it at all.  So check call log data is indeed a way to get data about all the faxes.

Reply