ARI API to get all calls done

Guys,
I’m trying to get the API to get all calls already done. Can someone point me to the right direction on how to do this? Looking for this information but from the API:

Thanks in advance.

Regards,

Asterisk does not provide an API for access to CDR information. This information is written out to a file, to a database, or sent as manager events only. You appear to be using FreePBX and it tells Asterisk to store them in a way, and then provides a way of viewing.

Hey jcolp,
Thanks you for the enlightened answer. Is there another way I could check this out in a programmatical way? using AGI? I’m relatively new to this so appreciate the patience.

Regards,
Ángel

AGI works on active calls and allows you to execute things on them. It has no mechanism to query past CDR data, no API in Asterisk does.

Meaning asterisk doesn’t provide me a way to get that data remotely in a programmatically way? if that’s the case, can you point me out to which location does it get’s store by default? Maybe I can have a server that reads those files/parse it and display the information trough a custom API.

Thanks you again for the response.

Asterisk expects something external to deal with the resulting records or make them available.

By default they would be written to /var/log/asterisk/cdr-csv/Master.csv

Amazing, that will do it for me. I just checked the location and it seems FreePBX modified the default location or are storing them in the database. I’ll look it up on there community.

Thanks for the amazing help, will build something with nodejs that simplifies this process so people can fulfill this particular need in the future.

Regards,
Angel