База на знаења

How to enable CDR on AsteriskNOW and FreePBX  Испечати

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
Driver          = MySQL
Description             = MySQL connection to 'asteriskcdrdb' database
Server          = localhost
Port            = 3306
Database                = asteriskcdrdb
Option          = 3
Socket          =

[root@pbx asterisk]# cat /etc/asterisk/cdr_odbc.conf
; cdr_odbc.conf

table=cdr               ;"cdr" is default table name

[root@pbx asterisk]# cat /etc/asterisk/cdr.conf



[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.
hostname = localhost
password = fpbx
user = freepbx

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

* Registered Backends
    Adaptive ODBC

pbx*CLI> odbc show all

ODBC DSN Settings

  Name:   asteriskcdrdb
  DSN:    MySQL-asteriskcdrdb
    Last connection attempt: 1969-12-31 18:00:00
  Pooled: No
  Connected: Yes

You should now be able to pull data from the CDR table.

Дали Ви помогна овој одговор?

Исто така прочитајте

Error after upgrade AsteriskNOW and FreePBX
Yum upgrade breaks AsteriskNOW and FreePBX   After yum updating AsteriskNOW 2.0 I was getting...
XHR response code: 200 XHR responseText: undefined jQuery status: parsererror
After yum update you get an rrror on web interface:XHR response code: 200 XHR responseText:...