How do I download CDR reports to my computer from the PBX for archival purposes?

 

Using WinSCP to log into the PBX

To retrieve call reports from the PBXtra for archival purposes:

  1. First the root name and password must be set on the PBXtra .  For details, see:
    What is the root password for my server?

USE CAUTION when setting a root password, as it may expose your PBX to attack.  Refer to the above article for more information.

  1. Once the root password is set the user must connect into the PBXtra
    from another location.  This is accomplished using an application such
    as WinSCP freely available at:

http://winscp.net/eng/index.<wbr/>php

  1. Once this application is installed on another computer on the same
    local network, the user must connect into the PBXtra using the IP
    address of the PBXtra and logging in using the root password that was
    earlier set.

  2. Once the user is logged into the PBXtra the files may be downloaded to
    the remote machine and saved for archival use by the following steps:

    1. Create a directory/folder on local computer

    2. Connect to the PBXtra

    3. Identify and select the target directory/folder (created in step 1 on the local machine.  If using WinSCP the local machine will be on the left.

    4. Identify and select the source directory/folder:

/var/log/asterisk/cdr-csv/ on the PBXtra . If using WinSCP the source
machine will be located on the right.

e. Download the desired files to be archived.

NOTE: All of your CDR folders are grouped by week on your server, such
as 07-10-01.

 

How are files named?

The files in the directory are named like this:

Master.csv.1114459934

 

The file named ‘Master.csv’ is the ACTIVE file, and should not be
opened and read. If you try to read the active file, it may change
while you are reading it. The Master.csv.xxxxxxxxxx files are the
INACTIVE files that have already been rotated by the system on a 5
minute interval, and will no longer change. The integer string on the
end of the filename represents the UNIX time that the file was
rotated. This is the number of seconds elapsed since Jan 1, 1970. You
can convert this to a human readable date using the website:

http://www.epochconverter.com/

where entering the string: 1114459934 would be:

GMT: Mon, 25 Apr 2005 20:12:14 GMT

 

Return to Documentation Home I Return to Sangoma Support