How to map custom CDR format to Asterisk format to make CDR-stats work?

124 views
Skip to first unread message

Gavin Sweet

unread,
Jan 2, 2015, 7:49:11 AM1/2/15
to cdr-...@googlegroups.com
Hi

I've got CDR-stats installed and working as far as I can tell, but I have no data available.

Our CDR format is not an Asterisk standard - we use our own format, which is based on aggregating and normalising data from multiple switches and third party operators.
I could use the import function in the GUI to get some CDRs up and running, but would like to do this through the backend in order to automate the process.

So, I assume I can create a database by converting our CDRs into a format that looks enough like an Asterisk CDR database to make CDR-stats work.

My questions are:
1. what schema does the Asterisk DB need to have? Is there a specification you are using?
2. Is this the only way to achieve what I want? Or is there a way to do the mapping in the application configuration instead?

Many thanks!

Sales Star2Billing

unread,
Jan 2, 2015, 7:55:58 AM1/2/15
to cdr-...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "CDR-Stats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cdr-stats+...@googlegroups.com.
To post to this group, send email to cdr-...@googlegroups.com.
Visit this group at http://groups.google.com/group/cdr-stats.
For more options, visit https://groups.google.com/d/optout.

Gavin Sweet

unread,
Jan 5, 2015, 8:51:32 AM1/5/15
to cdr-...@googlegroups.com
Hi Joe - thanks. Two more quick question before I create and populate my database:

Does CDR stats require/use ALL of the base fields below? 
And do you require/use the extended fields (peeraccount, linkedid, sequence)?

CREATE TABLE cdr ( 
        calldate datetime NOT NULL default '0000-00-00 00:00:00', 
        clid varchar(80) NOT NULL default '', 
        src varchar(80) NOT NULL default '', 
        dst varchar(80) NOT NULL default '', 
        dcontext varchar(80) NOT NULL default '', 
        channel varchar(80) NOT NULL default '', 
        dstchannel varchar(80) NOT NULL default '', 
        lastapp varchar(80) NOT NULL default '', 
        lastdata varchar(80) NOT NULL default '', 
        duration int(11) NOT NULL default '0', 
        billsec int(11) NOT NULL default '0', 
        disposition varchar(45) NOT NULL default '', 
        amaflags int(11) NOT NULL default '0', 
        accountcode varchar(20) NOT NULL default '', 
        uniqueid varchar(32) NOT NULL default '', 
        userfield varchar(255) NOT NULL default '' 
);


Cheers
Gavin
Reply all
Reply to author
Forward
0 new messages