How to get 3 month call record on asterisk

How to get 3 month call record on asterisk

recording path set is …/var/spool/asterisk/monitor/

On Wednesday 12 June 2024 at 17:09:47, m.ubaid via Asterisk Community wrote:

How to get 3 month call record on asterisk

recording path set is …/var/spool/asterisk/monitor/

Please explain in more detail what you want to do.

Antony.


Too many people spend money they haven’t earned
to buy things they don’t want,
to impress people they don’t like.

  • Will Rogers

                                                Please reply to the list;
                                                      please *don't* CC me.
    

I need to modify my script to retrieve a 3-month call record for a company audit. Below is the current script that generates a daily call record:

Today=$(date +%Y%m%d)
Yday=$(date +%Y-%m-%d -d “yesterday”)
a="itsupport@p3care.com, usher.jones@p3care.com"
cd /var/log/asterisk/cdr-custom/
echo “PFA Call details for ${Yday}” | mutt -a “Master.csv-${Today}” -s “Call_Details_${Yday}” – $a


How can I modify this script to generate a call record for the past 3 months?

On Wednesday 12 June 2024 at 17:30:28, m.ubaid via Asterisk Community wrote:

I need to modify my script to retrieve a 3-month call record for a company
audit. Below is the current script that generates a daily call record:

Today=$(date +%Y%m%d)
Yday=$(date +%Y-%m-%d -d “yesterday”)
a="itsupport@p3care.com, usher.jones@p3care.com"
cd /var/log/asterisk/cdr-custom/
echo “PFA Call details for ${Yday}” | mutt -a “Master.csv-${Today}” -s
“Call_Details_${Yday}” – $a ```

How can I modify this script to generate a call record for the past 3
months?

A simplistic approach would be to wrap much of the above into a loop which
iterates over the past 90 days, or 3 precise months if you need that level of
accuracy.

However, if you have this level of reporting requirement, I would not use CSV
log files of CDR data, but log to a database (ODBC) instead.

Database queries are much more flexible and efficient than anything you could do
with CSV files.

Also, please note that this really isn’t an Asterisk question.

Antony.


Schrödinger’s rule of data integrity: the condition of any backup is unknown
until a restore is attempted.

                                               Please reply to the list;
                                                     please *don't* CC me.

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