1. Bicom Systems
  2. Solution home
  3. PBXware
  4. HOWTOs

Reports :: HOWTO CDR Database Structure

PBXware uses MySQL 5 for storing data.

To access that database:

 cd /opt/pbxware

When inside,

 show databases;

This command will show several databases, among which you will have pbxware_xxx databases, where xxx are the numbers of your tenant prefix. So, if you have 5 tenants you will have 5 pbxware_xxx tables.

Let's say that you have a tenant with prefix 100.

 use pbxware_100;

will use that tenant's database.

Now: show tables; will show all the tables in this database. CDRs table is named "cdr".

If you type: show fields from cdr; you will get list of fields which are pretty self-explanatory but here


you have most of the fields explained. The ones that are not:

tenant - tenant on which the call was made

billamount - how much the call was billed

accountcode - the extension which is making call and can be different from src field

userfield - extension which received a call and can be diferrent then dst field. In userfield sometimes you could have a recording if queue agents are in question

uniqueid - is a link to the recording which is essentially a timestamp when the call was recorded.