Uncategorized

Asterisk CDR Statistics

I’ve been a beneficiary of the open source software community for quite some time now. Ever since downloading Slackware Linux onto upteen floppy disks in 1995, I have used and profited from the use of open source software, whether it it be an operating system, programming language, server technology or desktop application. However, up until this point I’ve never given anything back to the open source community (I really don’t count my Twitter CLI script), chiefly because every software system I have created or worked on has been proprietary and subject to non-disclosure agreements. I’m not grumbling about that, not all software is meant to be or should be open source and working on such systems has paid the bills (just about).

So, what have I written? Unhappy about the lack of a decent (and free of charge) system for analysing caller detail records (CDRs) generated by Asterisk PBX telephone systems, I decided that I would combine a number of techniques that I have learnt and developed over the past year or so to put my own package together, and it’s now at the stage where I think it could be considered a beta. This means that it’s not perfect but it’s more or less there. I’ve started hosting it over at Github.

Principal features

  • Clean, modern interface.
  • Supports multiple Asterisk servers which record their CDRs to a MySQL database.
  • Uses Google Chart API to generate dynamic charts.
  • Quick and advanced search facilities.
  • Rolling monthly and annual reports.
  • MVC framework*.

Screenshots

Further development

Where does it go from here? I’m open to suggestion, which is why I’ve published it and I would welcome comments from anyone who’s interested and/or finds it useful, whether you are a developer or just an end user. Is it useful? Does it work out of the box on your system? Is it easy to install for someone who isn’t a developer? What other features would be useful, bearing in mind that the data produced by the Asterisk CDR MySQL add-on is relatively limited?

I know that the documentation is a little rough around the edges and so I shall be paying attention to that, certainly. I also want to do some really thorough and structured testing in order to ensure it’s as robust as possible. I’ve tested it, obviously, but I’ve not seriously tried to break it yet.

So please feel free to download it, either as a tarball for installation or from the Subversion repository if you would like a good look under the hood. Please submit any comments, suggestions or indeed any code you would like to contribute via the Google Code page in order that all information pertaining to it is kept in the same place. I won’t publish any comments made directly on this blog post for this reason.

8 comments

  • Chris

    Great job! Just installed and works great. Installed right out of the box. Still evaluating the features and may suggest more.

    Thanks,

    Chris

  • No problem, glad you like it! I look forward to your feedback.

    Stu

  • Slanj

    Hello!

    Thank you for your system.

    At first, as wrote on Google Code, it would be great to define time period on which data on summary page displayed.

  • Nathan M

    I have a question and then a suggestion on top of it. I have a client that is looking to see a report of the extensions inbound+outbound usage. Along witht hat they want to ability for it to email an entire team 4 times a day. They currently have this on their traditional PBX. Any thoughts would help. I am about to install this to see if you have the extension usage report.

  • Nam

    Fantastic! It works right out of the box.

    I would like to report a bug: If I clicked on ‘Month Report’ it crashed. This is the error log:

    PHP Fatal error: Uncaught exception ‘Exception’ with message ‘DateTime::__construct(): It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘Asia/Bangkok’ for ‘ICT/7.0/no DST’ instead’ in /var/www/html/agcdr/application/controllers/ReportsController.php:62\nStack trace:\n#0 /var/www/html/agcdr/application/controllers/ReportsController.php(62): DateTime->__construct(‘2011-12-01’)\n#1 /var/www/html/agcdr/application/classes/Router.php(114): ReportsController->month()\n#2 /var/www/html/agcdr/public/index.php(103): Router->loader()\n#3 {main}\n thrown in /var/www/html/agcdr/application/controllers/ReportsController.php on line 62

    Mine is a CentOS 6.2 32bit