CRM Link API for old calls

I am trying to pull the entire call history for our PBX from the CRM Link REST API. However, it only seems to allow me to go back to a few days ago - presumably when I enabled the REST API.

Does this sound correct? For example, my CDR reports go back years. However, I can only traverse the REST API for records a few days old and newer.

If I pick an old call id from a CDR report I get something along like lines of {'status': true, 'data':[]}

Should the REST api go back further than the date it was enabled?

Only calls that have been processed by the crm module with rest enableed would be logged. These are stored independently and not pulled from the cdr/cel

1 Like

Is there another API way you would recommend to pull the legacy call history and recordings? I am looking at using CDR Report csv files but the data output doesn’t make it easy to pull the recording file.

I also just looked at the CEL exports but they only seem to contain a couple of fields, not the detail data. I.e. the export only contains “Date Caller Dialed Duration Play Details”

From a shell

mysql asteriskcdrdb -e 'describe cel;describe cdr'
1 Like

I am working on an integration that does not have shell access to the pbx. The REST api lets me fetch records - but not for calls that occurred before REST was enabled.

I am trying to figure out the most user friendly way to get the call history details before the REST api was enabled.

The goal of the integration is to persist the recordings and associate with appropriate conversation chains. So I need the call details along with the recording.

@dicko was trying to “lead the horse to water” and essentially gave you the answer. If you look at the cdr table you will see a field for the recording file location if there is one. You can write a script in any language you want to do a mysql lookup on that table, pull details, and provide the recording file.

1 Like

Sorry for being dense. Wouldn’t I need shell access to the server to query the local database? I only have access to the pbx over the http port.

I saw there were a few other web apis available but the documentation on the graphql cdr api didn’t get me going. Is that what I should be using?

That’s kinda a Catch-22 Yosarian :wink:

Why do you not have greater access to a PBX you are trying to manage?

CDR module has graphql methods you can use to query records CDR Module GraphQL APIs - PBX GUI - Documentation

1 Like

How can I retrieve the recording file and voicemail that the CDR says exists?

Does the file store api make this possible?

What is proper etiquette on this forum for replying to keep the topic open. It keeps telling me that the topic closes based on the time of the last reply

If you wish to contribute to a closed thread, you can flag it to the moderator requesting it be reopened, otherwise you can start a new thread with a link to the previous one to continue a discussion.

Keeping threads alive without furthering the discussion won’t accomplish anything.

1 Like

So the final piece to the puzzle to solve my problem is how to take the recording filename string from the CDR reponse and retrieve the corresponding sound file.

I have been investigating but cannot seem to figure out how to make that happen. Any tips or pointers you can share? Thanks!

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.