No. Fonality does not remove your CDR reports for any reason ever. They 'live' on your server, and the only mitigating factor in CDR reports is the total space on your hard drive available for storage. If your server takes 10,000 calls per day for 5 years straight, these files may begin to grow large and consume space on your hard drive unnecessarily. In this case, you may wish to offload the files into CSV format and store them on your company SAN.
Normally, you can export your call logs from your
PBXtra
server using the Reporting tab of your
PBXtra
Admin Panel. You can read this information into a program like Microsoft Excel or Crystal Reports to sort and analyze the data.
This document describes how to find the raw CDR (Call Data Record) files recorded by your
PBXtra
. These files are needed if you plan to import your call log information into a database in an automated fashion. The files are automatically created by the FONcore software on the
PBXtra
system, and are the same data that Fonality uses to update your call logs in the
PBXtra
Admin Panel.
You can find all of your CDR records grouped by week on your server in the following directory:
/var/log/asterisk/cdr-csv/07-10-01
(the date - 07-10-01 - corresponds to YY-MM-DD and a new directory is created on Monday of each week)
This directory may contain thousands of files, so don’t simply ‘cd’ to the directory and run ‘ls’. You might need to wait several minutes for your terminal to finish printing all the filenames. If you make that mistake, you will need to use CTRL+C to abort the ‘ls’ output.
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 like this:
[root@pbx0000 ~]# perl -MTime::localtime -e 'print ctime(1114459934 ) . "\n";'
Mon Apr 25 16:12:14 2005
As you can see from the above example, the number
corresponds to the date “Mon Apr 25 16:12:14 2005”.
The contents of the files will look like this:
<pre>"","7013","913105551212","internal","7013 <7013>","SIP/AABBCCDDEEFF-759f","IAX2/c1006i/1","ResetCDR","w","2006-03-31 17:43:22","2006-03-31 17:43:24","2006-03-31 17:43:26",4,2,"ANSWERED","DOCUMENTATION"</pre>
The above is one line of an example CDR file. Admittedly, this looks rather cryptic. It’s a comma separated values format. The columns are in the following order:
'''accountcode:''' An account code designation (reserved for future use in
PBXtra
)
'''src:''' Caller*ID number (string, 80 characters)
'''dst:''' Destination extension (string, 80 characters)
'''dcontext:''' Destination context/submenu (string, 80 characters)
'''clid:''' Caller*ID with text (80 characters)
'''channel:''' Channel used (80 characters)
'''dstchannel:''' Destination channel if appropriate (80 characters)
'''lastapp:''' Last application if appropriate (80 characters)
'''lastdata:''' Last application data (arguments) (80 characters)
'''start:''' Start of call (date/time)
'''answer:''' Answer of call (date/time)
'''end:''' End of call (date/time)
'''duration:''' Total time in system, in seconds (integer)
'''billsec:''' Total time call is up, in seconds (integer)
'''disposition:''' What happened to the call: ANSWERED, NO ANSWER, BUSY
'''amaflags:''' Billing flags (reserved for future use in
PBXtra
)
Note: If you do automate the insertion of this data into a database of your own, and you are confident that it’s working properly, we suggest moving the imported files to another directory on the system to make it easier for your automated program to identify new CDR files to import.
Further use of this information is beyond the scope of the
PBXtra
Annual Support and Maintenance Agreement. You are welcome to perform any integration you wish. However, the support team will not be able to supply you with information in addition to what’s shown above.