How to enable CDR on AsteriskNOW and FreePBX
Print
133
How to enable CDR on AsteriskNOW and FreePBX
Installing the following yum packages:
yum install asterisk-odbc
Modify the config files:
Setup your config files like the following. If you have changed your database usernames/passwords from the default install you might need to make adjustments below.
[root@pbx asterisk]# cat /etc/odbc.ini [MySQL-asteriskcdrdb] Driver = MySQL Description = MySQL connection to 'asteriskcdrdb' database Server = localhost Port = 3306 Database = asteriskcdrdb Option = 3 Socket =
[global] dsn=asteriskcdrdb loguniqueid=yes dispositionstring=yes table=cdr ;"cdr" is default table name
[root@pbx asterisk]# cat /etc/asterisk/cdr.conf
SHOULD BE EMPTY.
THIS SHOULD ALREADY BE SET:
[root@pbx asterisk]# cat /etc/asterisk/cdr_mysql.conf ; ; Note - if the database server is hosted on the same machine as the ; asterisk server, you can achieve a local Unix socket connection by ; setting hostname = localhost ; ; port and sock are both optional parameters. If hostname is specified ; and is not "localhost", then cdr_mysql will attempt to connect to the ; port specified or use the default port. If hostname is not specified ; or if hostname is "localhost", then cdr_mysql will attempt to connect ; to the socket file specified by sock or otherwise use the default socket ; file. ; [global] hostname = localhost dbname=asteriskcdrdb password = fpbx user = freepbx userfield=1 ;port=3306 ;sock=/tmp/mysql.sock
Now restart Asterisk:
[root@pbx asterisk]# amportal restart
Open Asterisk Console:
[root@pbx asterisk]# asterisk -rvvv
Check Asterisk CDR Module Status:
pbx*CLI> cdr show status
Call Detail Record (CDR) settings ---------------------------------- Logging: Enabled Mode: Simple Log unanswered calls: No