*** NOTE: CAM now recommends connectivity to Asterisk using ODBC. You can find step by step instructions in our CAM Startup and Installation Guide available in our download page ****http://www.callaccounting.ws/download.htm
This post contains instructions on how to interface the CDR of Asterisk with Call Accounting
Mate. It is assumed that you are familiar with Asterisk and Linux in general. You should also have
a Windows machine already installed with Call Accounting Mate. You can download the latest copy of
Call Accounting Mate from www.callaccounting.ws
To enable Asterisk to be used with Call Accounting Mate an Asterisk module needs to be loaded on the
Asterisk server. Call Accounting Mate ships with the module source files needed to create the Asterisk
loadable module. It also contains the Red Hat binary module in compiled form. If you are not using Red Hat,
you need to follow steps 1-11 below. If you are using Red Hat, you can skip the compile process and
follow steps 5 - 11. The asterisk files are located in c:\bill\asterisk where you installed the Call Accounting
mate. The files contained in this directory are :
cdr.conf - configuration file for Asterisk CDR
cdr_camate - The source code file
cdr_camate.so - Asterisk loadable module for Red Hat. You may need to recompile (below 1-5) if you
are not using Red Hat.
1. You must have gcc installed on the asterisk machine. To check if GCC is installed, type the follwing
in command line
> gcc -v
You will get version of software or error if the software is not installed.
2. Copy all the files from c:\bill\asterisk on the Call Accounting Mate machine to any directory on your
3. Compile the source. Change to the directory (chdir) where you unziped the module files and type gmake. To
compile, type gmake :
4. You should now have a file called cdr_camate.so created in the same directory. This is the Asterisk loadable
5. Open asterisk.conf file. This file is located either in /etc/asterisk/ or in /usr/local/etc/asterisk/
Locate the line with a path to astmoddir. The line should be similar to below :
astmoddir => /usr/local/lib/asterisk/modules
Remember the value of astmoddir parameter. It is a file path where all Asterisk loadable modules are located.
6. Copy cdr_camate.so to that path.
7. Open file modules.conf in same directory where asterisk.conf is (usually /etc/asterisk).
Find a section [modules] and add following string to the end of section.
load => cdr_camate.so
This loads the Call Accounting Mate CDR module the next time Asterisk starts.
8. Copy cdr.conf to the directory that contains asterisk.conf (usually /etc/asterisk).
Open the file and change values of hostname and port parameters to point to your CAM software.
Hostname is either the computer name which can be resolved to an ip address or the ip address of the computer
running the Call Accounting Mate. Port is the port on which Call Accounting Mate is running. To check the port
that Call Accounting Mate is running on, access the Call Accounting Mate interface and click on
Configuration --> Web Config. You should see the value under the "Port".
9. Stop and Start Asterisk. Try making a call using the Asterisk system. Once the call is completed,
you should see the CDR data in Call Accounting Mate.
10. To check if CDR is received by Call Accounting Mate, Select Views --> Live --> Raw function in Call
Accounting Mate. If you see the CDR, the connection between Call Accounting Mate and Asterisk is complete.
11. On Call Accounting Mate, you need to specify the correct driver to be used. Select
Configuration --> Pbx Communication. Add a new PBX ID. PBX Name and description can be anything. Select
Port tab, set the port to "Asterisk". Now select the driver tab and set the PBX driver to Asterisk.
This enables the right parser to be loaded in Call Accounting Mate. The parser is used to interpret or map
the Asterisk CDR to the correct Call Accounting Mate fields.
If you face any problems, start another thread with the description of your problem.