question

spring-it2994 avatar image
spring-it2994 asked benjamin-dean commented

Message to Call Log Relationship

How do messages tie back to call logs? I need to get the message information for all call legs/logs that resulted in a voicemail, and cannot find the relationship between the two objects. Currently, the only IDs that I see in the detailed message data are the messageId and attachementId. The call logs have a sessionId, but I do not know what this ties to, and the call legs only have a callLogId, and a LegId.


Any help in identifying the relationship would be greatly appreciated.


Thanks!

call logs
1 |3000

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

1 Answer

benjamin-dean avatar image
benjamin-dean answered benjamin-dean commented
You're correct, this is not the easiest or most transparent task to accomplish.

Voicemails are stored in the Message Store and contain an ID for each message: voicemail/fax/sms.
Requests to Message Store can be filtered by type="VoiceMail", direction="Inbound", and dateFrom={ {beginning_time_to_search_from}}

The response contains records, each record contains properties which can be used to map this type of reverse-lookup:
- uri: which has the URI to the associated Extension
- creationTime
- to: who called/created the voicemail
- from: the target for the voicemail

Requests to Call Log can be filtered by type="Voice", direction="Inbound", view="Detailed", and dateFrom/dateTo={ {isolationTimeBasedOnMessageResponse}}

Each of the records will contain a "result" property which will be "VoiceMail" in the cases where a voicemail was left.

You can also reverse this and pull Call Logs, extracting where result=VoiceMail and then conduct the messageStore lookups for the appropriate Extensions using dateTo/dateFrom.

3 comments
1 |3000

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

This is really the only connection between the two?? This is completely crazy.

First off, I either have to pull all of the extension information over again just to get the extension ID, or parse the extension ID out of the URI. This is awful.

Second, I have to do some really, super, extra shaky connection on Message CreationTime where it is between the Call Leg StartTime and the Call Log LastModifiedTime. Why? you ask. Because The Message CreationTime does not directly match to ANY date on the Call Log or Call Leg. This is ridiculous. Why would you not simply put an ID on the Call Log when the Call Log Result = VoiceMail that ties back to a Message?? Or any number of other solid solutions.

You're basically telling me that I can get all of the voicemail information for an extension, but there is no good way to connect any voicemail message back to the actual call that it came from. This really does not make sense, and if I am the only person complaining about this, I would be shocked. 

Please fix this ASAP as this is vital information to our business, and I have been banging by head against my desk for the last several days furiously trying to deliver reports to our executive team before the Thanksgiving holiday just to be told that the very trivial thing that I am attempting is extremely shaky at best.

Please let me know as soon as possible what my options are so I can plan accordingly. 
0 Likes 0 ·
Any additional information on this? This is a pretty big issue for us at the moment.

Thanks.
0 Likes 0 ·
Based on this conversations, there is an internal discussion happening with Engineering, but it will not be fixed anytime this year.
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