callaccounging.ws > Asterisk Integration

Using Call Accounting Mate with Asterisk - Must read

(1/2) > >>

Administrator:
*** 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
   Makefile            - 
   cdr_camate.so   - Asterisk loadable module for Red Hat. You may need to recompile (below 1-5) if you
                            are not using Red Hat.


Instructions
----------------
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
    Asterisk server.


3. Compile the source. Change to the directory (chdir) where you unziped the module files and type gmake. To
    compile, type gmake :

   > gmake

4. You should now have a file called cdr_camate.so created in the same directory. This is the Asterisk loadable
    module.
 
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.

gmenarvino:
Hi there!

i was trying to compile the module to get this working for my asterisk@home 2.7 running centOS 4.3 Kernel 2.6.9.34-ELsmp.
After compile it I get:

root@localhost accounting]# gmake
cdr_camate.c: In function `load_config':
cdr_camate.c:181: warning: implicit declaration of function `ast_load'
cdr_camate.c:181: warning: assignment makes pointer from integer without a cast
cdr_camate.c:226: warning: implicit declaration of function `ast_destroy'
cdr_camate.c: In function `cdr_post':
cdr_camate.c:396: warning: int format, long int arg (arg 8)
cdr_camate.c:396: warning: int format, long int arg (arg 9)
cdr_camate.c:396: warning: int format, long int arg (arg 8)
cdr_camate.c:396: warning: int format, long int arg (arg 9)
[root@localhost accounting]#

Then I can see the .so module in the same directory but when I copy it where the modules are located (/usr/lib/asterisk/modules/)
and follow the instruccions of the ducoment I cannot get asterisk started:

[root@localhost accounting]# tail /var/log/asterisk/full
Mar 27 19:19:05 VERBOSE[3787] logger.c:   == Registered application 'WaitForRing'
Mar 27 19:19:05 VERBOSE[3787] logger.c:  [app_zapscan.so]Mar 27 19:19:05 VERBOSE[3787] logger.c:  [app_zapscan.so] => (Scan Zap channels application)
Mar 27 19:19:05 VERBOSE[3787] logger.c:   == Registered application 'ZapScan'
Mar 27 19:19:05 VERBOSE[3787] logger.c:  [app_db.so]Mar 27 19:19:05 VERBOSE[3787] logger.c:  [app_db.so] => (Database Access Functions)
Mar 27 19:19:05 VERBOSE[3787] logger.c:   == Registered application 'DBget'
Mar 27 19:19:05 VERBOSE[3787] logger.c:   == Registered application 'DBput'
Mar 27 19:19:05 VERBOSE[3787] logger.c:   == Registered application 'DBdel'
Mar 27 19:19:05 VERBOSE[3787] logger.c:   == Registered application 'DBdeltree'
Mar 27 19:19:05 VERBOSE[3787] logger.c:  [cdr_camate.so]Mar 27 19:19:05 WARNING[3787] loader.c: /usr/lib/asterisk/modules/cdr_camate.so: undefined symbol: ast_load
Mar 27 19:19:05 WARNING[3787] loader.c: Loading module cdr_camate.so failed!
[root@localhost accounting]#


Do you ave any ideas?
Please let me know
Thanks
Gaston

gmenarvino:
By the way the file cdr_camate.so that should be there after the installation is not there, so I couldn't use it.
Thanks

gmenarvino:
Hello, after taking some time reading the Make File I was able to resolve the issue.

Thanks

poison:
loader.c: /usr/lib/asterisk/modules/cdr_camate.so: undefined symbol: ast_load

This is what I get after I build the cdr-camate.so and put it in the directory above and try to start asterisk

Navigation

[0] Message Index

[#] Next page

Go to full version