Message to Call Log Relationship

  • 1
  • Question
  • Updated 1 year ago
  • Answered
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!
Photo of Spring IT

Spring IT

  • 310 Points 250 badge 2x thumb
  • Frustrated.

Posted 2 years ago

  • 1
Photo of Benjamin Dean

Benjamin Dean

  • 8,602 Points 5k badge 2x thumb
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.
Photo of Spring IT

Spring IT

  • 310 Points 250 badge 2x thumb
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. 
Photo of Spring IT

Spring IT

  • 310 Points 250 badge 2x thumb
Any additional information on this? This is a pretty big issue for us at the moment.

Thanks.
Photo of Benjamin Dean

Benjamin Dean

  • 8,602 Points 5k badge 2x thumb
Based on this conversations, there is an internal discussion happening with Engineering, but it will not be fixed anytime this year.