Пожалуйста, войдите здесь. Часто задаваемые вопросы О нас
Задайте Ваш вопрос

История изменений [назад]

нажмите, чтобы скрыть/показать версии 1
изначальная версия
редактировать

спросил 2015-02-24 18:14:42 +0400

Trusilya Gravatar Trusilya

Elastix не пишит репорты

root@sip ~]# asterisk -rx "module show like cdr"
Module                         Description                              Use Count 
app_cdr.so                     Tell Asterisk to not maintain a CDR for  0         
app_forkcdr.so                 Fork The CDR into 2 separate entities    0         
cdr_adaptive_odbc.so           Adaptive ODBC CDR backend                0         
cdr_csv.so                     Comma Separated Values CDR Backend       0         
cdr_custom.so                  Customizable Comma Separated Values CDR  0         
cdr_manager.so                 Asterisk Manager Interface CDR Backend   0         
cdr_mysql.so                   MySQL CDR Backend                        0         
cdr_odbc.so                    ODBC CDR Backend                         0         
cdr_sqlite3_custom.so          SQLite3 Custom CDR Module                0         
cdr_syslog.so                  Customizable syslog CDR Backend          0         
func_cdr.so                    Call Detail Record (CDR) dialplan functi 0         
11 modules loaded
[root@sip ~]# asterisk -rx "module show like mysql"
Module                         Description                              Use Count 
app_cbmysql.so                 CBMysql conference scheduling            0         
app_mysql.so                   Simple Mysql Interface                   0         
cdr_mysql.so                   MySQL CDR Backend                        0         
res_config_mysql.so            MySQL RealTime Configuration Driver      0         
4 modules loaded
[root@sip ~]# asterisk -rx "cdr mysql status"
Connected to asteriskcdrdb on socket file default using table cdr for 5 minutes, 45 seconds.
Wrote 0 records since last restart.
[root@sip ~]# 

[root@sip ~]# 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=127.0.0.1
dbname=asteriskcdrdb 
password=1234512345
user=root
userfield=1
;port=3306 
;sock=/tmp/mysql.sock

[root@sip ~]# tail -f /var/log/httpd/error_log
[Tue Feb 24 17:24:27 2015] [notice] Digest: done
[Tue Feb 24 17:24:27 2015] [notice] SSL FIPS mode disabled
[Tue Feb 24 17:24:27 2015] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Tue Feb 24 17:56:25 2015] [notice] caught SIGTERM, shutting down
[Tue Feb 24 17:59:35 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Feb 24 17:59:35 2015] [notice] SSL FIPS mode disabled
[Tue Feb 24 17:59:35 2015] [notice] Digest: generating secret for digest authentication ...
[Tue Feb 24 17:59:35 2015] [notice] Digest: done
[Tue Feb 24 17:59:35 2015] [notice] SSL FIPS mode disabled
[Tue Feb 24 17:59:35 2015] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations

[root@sip ~]# cat /etc/asterisk/cdr_manager.conf 
[general]
enabled = yes

Вроде все правильно, все настройки на месте , но отчеты не отображаются , что проверить чтобы починить ?

Смотрел также таблицу MySQL в таблице данных тоже нету.

Elastix не пишит пишет репорты

root@sip ~]# asterisk -rx "module show like cdr"
Module                         Description                              Use Count 
app_cdr.so                     Tell Asterisk to not maintain a CDR for  0         
app_forkcdr.so                 Fork The CDR into 2 separate entities    0         
cdr_adaptive_odbc.so           Adaptive ODBC CDR backend                0         
cdr_csv.so                     Comma Separated Values CDR Backend       0         
cdr_custom.so                  Customizable Comma Separated Values CDR  0         
cdr_manager.so                 Asterisk Manager Interface CDR Backend   0         
cdr_mysql.so                   MySQL CDR Backend                        0         
cdr_odbc.so                    ODBC CDR Backend                         0         
cdr_sqlite3_custom.so          SQLite3 Custom CDR Module                0         
cdr_syslog.so                  Customizable syslog CDR Backend          0         
func_cdr.so                    Call Detail Record (CDR) dialplan functi 0         
11 modules loaded
[root@sip ~]# asterisk -rx "module show like mysql"
Module                         Description                              Use Count 
app_cbmysql.so                 CBMysql conference scheduling            0         
app_mysql.so                   Simple Mysql Interface                   0         
cdr_mysql.so                   MySQL CDR Backend                        0         
res_config_mysql.so            MySQL RealTime Configuration Driver      0         
4 modules loaded
[root@sip ~]# asterisk -rx "cdr mysql status"
Connected to asteriskcdrdb on socket file default using table cdr for 5 minutes, 45 seconds.
Wrote 0 records since last restart.
[root@sip ~]# 

[root@sip ~]# 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=127.0.0.1
dbname=asteriskcdrdb 
password=1234512345
user=root
userfield=1
;port=3306 
;sock=/tmp/mysql.sock

[root@sip ~]# tail -f /var/log/httpd/error_log
[Tue Feb 24 17:24:27 2015] [notice] Digest: done
[Tue Feb 24 17:24:27 2015] [notice] SSL FIPS mode disabled
[Tue Feb 24 17:24:27 2015] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Tue Feb 24 17:56:25 2015] [notice] caught SIGTERM, shutting down
[Tue Feb 24 17:59:35 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Feb 24 17:59:35 2015] [notice] SSL FIPS mode disabled
[Tue Feb 24 17:59:35 2015] [notice] Digest: generating secret for digest authentication ...
[Tue Feb 24 17:59:35 2015] [notice] Digest: done
[Tue Feb 24 17:59:35 2015] [notice] SSL FIPS mode disabled
[Tue Feb 24 17:59:35 2015] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations

[root@sip ~]# cat /etc/asterisk/cdr_manager.conf 
[general]
enabled = yes

Вроде все правильно, все настройки на месте , но отчеты не отображаются , что проверить чтобы починить ?

Смотрел также таблицу MySQL в таблице данных тоже нету.

Elastix не пишет репорты

root@sip ~]# asterisk -rx "module show like cdr"
Module                         Description                              Use Count 
app_cdr.so                     Tell Asterisk to not maintain a CDR for  0         
app_forkcdr.so                 Fork The CDR into 2 separate entities    0         
cdr_adaptive_odbc.so           Adaptive ODBC CDR backend                0         
cdr_csv.so                     Comma Separated Values CDR Backend       0         
cdr_custom.so                  Customizable Comma Separated Values CDR  0         
cdr_manager.so                 Asterisk Manager Interface CDR Backend   0         
cdr_mysql.so                   MySQL CDR Backend                        0         
cdr_odbc.so                    ODBC CDR Backend                         0         
cdr_sqlite3_custom.so          SQLite3 Custom CDR Module                0         
cdr_syslog.so                  Customizable syslog CDR Backend          0         
func_cdr.so                    Call Detail Record (CDR) dialplan functi 0         
11 modules loaded
[root@sip ~]# asterisk -rx "module show like mysql"
Module                         Description                              Use Count 
app_cbmysql.so                 CBMysql conference scheduling            0         
app_mysql.so                   Simple Mysql Interface                   0         
cdr_mysql.so                   MySQL CDR Backend                        0         
res_config_mysql.so            MySQL RealTime Configuration Driver      0         
4 modules loaded
[root@sip ~]# asterisk -rx "cdr mysql status"
Connected to asteriskcdrdb on socket file default using table cdr for 5 minutes, 45 seconds.
Wrote 0 records since last restart.
[root@sip ~]# 

[root@sip ~]# 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=127.0.0.1
dbname=asteriskcdrdb 
password=1234512345
user=root
userfield=1
;port=3306 
;sock=/tmp/mysql.sock

[root@sip ~]# tail -f /var/log/httpd/error_log
[Tue Feb 24 17:24:27 2015] [notice] Digest: done
[Tue Feb 24 17:24:27 2015] [notice] SSL FIPS mode disabled
[Tue Feb 24 17:24:27 2015] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Tue Feb 24 17:56:25 2015] [notice] caught SIGTERM, shutting down
[Tue Feb 24 17:59:35 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Feb 24 17:59:35 2015] [notice] SSL FIPS mode disabled
[Tue Feb 24 17:59:35 2015] [notice] Digest: generating secret for digest authentication ...
[Tue Feb 24 17:59:35 2015] [notice] Digest: done
[Tue Feb 24 17:59:35 2015] [notice] SSL FIPS mode disabled
[Tue Feb 24 17:59:35 2015] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations

[root@sip ~]# cat /etc/asterisk/cdr_manager.conf 
[general]
enabled = yes

Вроде все правильно, все настройки на месте , но отчеты не отображаются , что проверить чтобы починить ?

Смотрел также таблицу MySQL в таблице данных тоже нету.

 mysql> use asteriskcdrdb
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> DESCRIBE cdr
    -> ;

+---------------+--------------+------+-----+---------------------+-------+
| Field         | Type         | Null | Key | Default             | Extra |
+---------------+--------------+------+-----+---------------------+-------+
| calldate      | datetime     | NO   |     | 0000-00-00 00:00:00 |       | 
| clid          | varchar(80)  | NO   |     |                     |       | 
| src           | varchar(80)  | NO   |     |                     |       | 
| dst           | varchar(80)  | NO   |     |                     |       | 
| dcontext      | varchar(80)  | NO   |     |                     |       | 
| channel       | varchar(80)  | NO   |     |                     |       | 
| dstchannel    | varchar(80)  | NO   |     |                     |       | 
| lastapp       | varchar(80)  | NO   |     |                     |       | 
| lastdata      | varchar(80)  | NO   |     |                     |       | 
| duration      | int(11)      | NO   |     | 0                   |       | 
| billsec       | int(11)      | NO   |     | 0                   |       | 
| disposition   | varchar(45)  | NO   |     |                     |       | 
| amaflags      | int(11)      | NO   |     | 0                   |       | 
| accountcode   | varchar(20)  | NO   |     |                     |       | 
| uniqueid      | varchar(32)  | NO   | MUL |                     |       | 
| userfield     | varchar(255) | NO   |     |                     |       | 
| recordingfile | varchar(255) | NO   |     |                     |       | 
| cnum          | varchar(40)  | NO   |     |                     |       | 
| cnam          | varchar(40)  | NO   |     |                     |       | 
| outbound_cnum | varchar(40)  | NO   |     |                     |       | 
| outbound_cnam | varchar(40)  | NO   |     |                     |       | 
| dst_cnam      | varchar(40)  | NO   |     |                     |       | 
+---------------+--------------+------+-----+---------------------+-------+
22 rows in set (0.00 sec)

Elastix не пишет репорты

root@sip ~]# asterisk -rx "module show like cdr"
Module                         Description                              Use Count 
app_cdr.so                     Tell Asterisk to not maintain a CDR for  0         
app_forkcdr.so                 Fork The CDR into 2 separate entities    0         
cdr_adaptive_odbc.so           Adaptive ODBC CDR backend                0         
cdr_csv.so                     Comma Separated Values CDR Backend       0         
cdr_custom.so                  Customizable Comma Separated Values CDR  0         
cdr_manager.so                 Asterisk Manager Interface CDR Backend   0         
cdr_mysql.so                   MySQL CDR Backend                        0         
cdr_odbc.so                    ODBC CDR Backend                         0         
cdr_sqlite3_custom.so          SQLite3 Custom CDR Module                0         
cdr_syslog.so                  Customizable syslog CDR Backend          0         
func_cdr.so                    Call Detail Record (CDR) dialplan functi 0         
11 modules loaded
[root@sip ~]# asterisk -rx "module show like mysql"
Module                         Description                              Use Count 
app_cbmysql.so                 CBMysql conference scheduling            0         
app_mysql.so                   Simple Mysql Interface                   0         
cdr_mysql.so                   MySQL CDR Backend                        0         
res_config_mysql.so            MySQL RealTime Configuration Driver      0         
4 modules loaded
[root@sip ~]# asterisk -rx "cdr mysql status"
Connected to asteriskcdrdb on socket file default using table cdr for 5 minutes, 45 seconds.
Wrote 0 records since last restart.
[root@sip ~]# 

[root@sip ~]# 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=127.0.0.1
dbname=asteriskcdrdb 
password=1234512345
user=root
userfield=1
;port=3306 
;sock=/tmp/mysql.sock

[root@sip ~]# tail -f /var/log/httpd/error_log
[Tue Feb 24 17:24:27 2015] [notice] Digest: done
[Tue Feb 24 17:24:27 2015] [notice] SSL FIPS mode disabled
[Tue Feb 24 17:24:27 2015] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Tue Feb 24 17:56:25 2015] [notice] caught SIGTERM, shutting down
[Tue Feb 24 17:59:35 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Feb 24 17:59:35 2015] [notice] SSL FIPS mode disabled
[Tue Feb 24 17:59:35 2015] [notice] Digest: generating secret for digest authentication ...
[Tue Feb 24 17:59:35 2015] [notice] Digest: done
[Tue Feb 24 17:59:35 2015] [notice] SSL FIPS mode disabled
[Tue Feb 24 17:59:35 2015] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations

[root@sip ~]# cat /etc/asterisk/cdr_manager.conf 
[general]
enabled = yes

Вроде все правильно, все настройки на месте , но отчеты не отображаются , что проверить чтобы починить ?

Смотрел также таблицу MySQL в таблице данных тоже нету.

 mysql> use asteriskcdrdb
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> DESCRIBE cdr
    -> ;

+---------------+--------------+------+-----+---------------------+-------+
| Field         | Type         | Null | Key | Default             | Extra |
+---------------+--------------+------+-----+---------------------+-------+
| calldate      | datetime     | NO   |     | 0000-00-00 00:00:00 |       | 
| clid          | varchar(80)  | NO   |     |                     |       | 
| src           | varchar(80)  | NO   |     |                     |       | 
| dst           | varchar(80)  | NO   |     |                     |       | 
| dcontext      | varchar(80)  | NO   |     |                     |       | 
| channel       | varchar(80)  | NO   |     |                     |       | 
| dstchannel    | varchar(80)  | NO   |     |                     |       | 
| lastapp       | varchar(80)  | NO   |     |                     |       | 
| lastdata      | varchar(80)  | NO   |     |                     |       | 
| duration      | int(11)      | NO   |     | 0                   |       | 
| billsec       | int(11)      | NO   |     | 0                   |       | 
| disposition   | varchar(45)  | NO   |     |                     |       | 
| amaflags      | int(11)      | NO   |     | 0                   |       | 
| accountcode   | varchar(20)  | NO   |     |                     |       | 
| uniqueid      | varchar(32)  | NO   | MUL |                     |       | 
| userfield     | varchar(255) | NO   |     |                     |       | 
| recordingfile | varchar(255) | NO   |     |                     |       | 
| cnum          | varchar(40)  | NO   |     |                     |       | 
| cnam          | varchar(40)  | NO   |     |                     |       | 
| outbound_cnum | varchar(40)  | NO   |     |                     |       | 
| outbound_cnam | varchar(40)  | NO   |     |                     |       | 
| dst_cnam      | varchar(40)  | NO   |     |                     |       | 
+---------------+--------------+------+-----+---------------------+-------+
22 rows in set (0.00 sec)

[root@sip ~]# asterisk -rx"cdr show status"

Call Detail Record (CDR) settings
----------------------------------
  Logging:                    Disabled
  Mode:                       Simple

Elastix не пишет репорты

root@sip ~]# asterisk -rx "module show like cdr"
Module                         Description                              Use Count 
app_cdr.so                     Tell Asterisk to not maintain a CDR for  0         
app_forkcdr.so                 Fork The CDR into 2 separate entities    0         
cdr_adaptive_odbc.so           Adaptive ODBC CDR backend                0         
cdr_csv.so                     Comma Separated Values CDR Backend       0         
cdr_custom.so                  Customizable Comma Separated Values CDR  0         
cdr_manager.so                 Asterisk Manager Interface CDR Backend   0         
cdr_mysql.so                   MySQL CDR Backend                        0         
cdr_odbc.so                    ODBC CDR Backend                         0         
cdr_sqlite3_custom.so          SQLite3 Custom CDR Module                0         
cdr_syslog.so                  Customizable syslog CDR Backend          0         
func_cdr.so                    Call Detail Record (CDR) dialplan functi 0         
11 modules loaded
[root@sip ~]# asterisk -rx "module show like mysql"
Module                         Description                              Use Count 
app_cbmysql.so                 CBMysql conference scheduling            0         
app_mysql.so                   Simple Mysql Interface                   0         
cdr_mysql.so                   MySQL CDR Backend                        0         
res_config_mysql.so            MySQL RealTime Configuration Driver      0         
4 modules loaded
[root@sip ~]# asterisk -rx "cdr mysql status"
Connected to asteriskcdrdb on socket file default using table cdr for 5 minutes, 45 seconds.
Wrote 0 records since last restart.
[root@sip ~]# 

[root@sip ~]# 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=127.0.0.1
dbname=asteriskcdrdb 
password=1234512345
user=root
userfield=1
;port=3306 
;sock=/tmp/mysql.sock

[root@sip ~]# tail -f /var/log/httpd/error_log
[Tue Feb 24 17:24:27 2015] [notice] Digest: done
[Tue Feb 24 17:24:27 2015] [notice] SSL FIPS mode disabled
[Tue Feb 24 17:24:27 2015] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Tue Feb 24 17:56:25 2015] [notice] caught SIGTERM, shutting down
[Tue Feb 24 17:59:35 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Feb 24 17:59:35 2015] [notice] SSL FIPS mode disabled
[Tue Feb 24 17:59:35 2015] [notice] Digest: generating secret for digest authentication ...
[Tue Feb 24 17:59:35 2015] [notice] Digest: done
[Tue Feb 24 17:59:35 2015] [notice] SSL FIPS mode disabled
[Tue Feb 24 17:59:35 2015] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations

[root@sip ~]# cat /etc/asterisk/cdr_manager.conf 
[general]
enabled = yes

Вроде все правильно, все настройки на месте , но отчеты не отображаются , что проверить чтобы починить ?

Смотрел также таблицу MySQL в таблице данных тоже нету.

 mysql> use asteriskcdrdb
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> DESCRIBE cdr
    -> ;

+---------------+--------------+------+-----+---------------------+-------+
| Field         | Type         | Null | Key | Default             | Extra |
+---------------+--------------+------+-----+---------------------+-------+
| calldate      | datetime     | NO   |     | 0000-00-00 00:00:00 |       | 
| clid          | varchar(80)  | NO   |     |                     |       | 
| src           | varchar(80)  | NO   |     |                     |       | 
| dst           | varchar(80)  | NO   |     |                     |       | 
| dcontext      | varchar(80)  | NO   |     |                     |       | 
| channel       | varchar(80)  | NO   |     |                     |       | 
| dstchannel    | varchar(80)  | NO   |     |                     |       | 
| lastapp       | varchar(80)  | NO   |     |                     |       | 
| lastdata      | varchar(80)  | NO   |     |                     |       | 
| duration      | int(11)      | NO   |     | 0                   |       | 
| billsec       | int(11)      | NO   |     | 0                   |       | 
| disposition   | varchar(45)  | NO   |     |                     |       | 
| amaflags      | int(11)      | NO   |     | 0                   |       | 
| accountcode   | varchar(20)  | NO   |     |                     |       | 
| uniqueid      | varchar(32)  | NO   | MUL |                     |       | 
| userfield     | varchar(255) | NO   |     |                     |       | 
| recordingfile | varchar(255) | NO   |     |                     |       | 
| cnum          | varchar(40)  | NO   |     |                     |       | 
| cnam          | varchar(40)  | NO   |     |                     |       | 
| outbound_cnum | varchar(40)  | NO   |     |                     |       | 
| outbound_cnam | varchar(40)  | NO   |     |                     |       | 
| dst_cnam      | varchar(40)  | NO   |     |                     |       | 
+---------------+--------------+------+-----+---------------------+-------+
22 rows in set (0.00 sec)

[root@sip ~]# asterisk -rx"cdr show status"

Call Detail Record (CDR) settings
----------------------------------
  Logging:                    Disabled
  Mode:                       Simple

Делаю вот так :

[root@sip ~]# mysql -useasteriskcdrdb -uroot -pQwerty987 -e "DESCRIBE cdr;"
ERROR 1046 (3D000) at line 1: No database selected
[root@sip ~]# mysql -use asteriskcdrdb -uroot -pQwerty987 -e "DESCRIBE cdr;"
+---------------+--------------+------+-----+---------------------+-------+
| Field         | Type         | Null | Key | Default             | Extra |
+---------------+--------------+------+-----+---------------------+-------+
| calldate      | datetime     | NO   |     | 0000-00-00 00:00:00 |       | 
| clid          | varchar(80)  | NO   |     |                     |       | 
| src           | varchar(80)  | NO   |     |                     |       | 
| dst           | varchar(80)  | NO   |     |                     |       | 
| dcontext      | varchar(80)  | NO   |     |                     |       | 
| channel       | varchar(80)  | NO   |     |                     |       | 
| dstchannel    | varchar(80)  | NO   |     |                     |       | 
| lastapp       | varchar(80)  | NO   |     |                     |       | 
| lastdata      | varchar(80)  | NO   |     |                     |       | 
| duration      | int(11)      | NO   |     | 0                   |       | 
| billsec       | int(11)      | NO   |     | 0                   |       | 
| disposition   | varchar(45)  | NO   |     |                     |       | 
| amaflags      | int(11)      | NO   |     | 0                   |       | 
| accountcode   | varchar(20)  | NO   |     |                     |       | 
| uniqueid      | varchar(32)  | NO   | MUL |                     |       | 
| userfield     | varchar(255) | NO   |     |                     |       | 
| recordingfile | varchar(255) | NO   |     |                     |       | 
| cnum          | varchar(40)  | NO   |     |                     |       | 
| cnam          | varchar(40)  | NO   |     |                     |       | 
| outbound_cnum | varchar(40)  | NO   |     |                     |       | 
| outbound_cnam | varchar(40)  | NO   |     |                     |       | 
| dst_cnam      | varchar(40)  | NO   |     |                     |       | 
+---------------+--------------+------+-----+---------------------+-------+
[root@sip ~]#

Elastix не пишет репорты

root@sip ~]# asterisk -rx "module show like cdr"
Module                         Description                              Use Count 
app_cdr.so                     Tell Asterisk to not maintain a CDR for  0         
app_forkcdr.so                 Fork The CDR into 2 separate entities    0         
cdr_adaptive_odbc.so           Adaptive ODBC CDR backend                0         
cdr_csv.so                     Comma Separated Values CDR Backend       0         
cdr_custom.so                  Customizable Comma Separated Values CDR  0         
cdr_manager.so                 Asterisk Manager Interface CDR Backend   0         
cdr_mysql.so                   MySQL CDR Backend                        0         
cdr_odbc.so                    ODBC CDR Backend                         0         
cdr_sqlite3_custom.so          SQLite3 Custom CDR Module                0         
cdr_syslog.so                  Customizable syslog CDR Backend          0         
func_cdr.so                    Call Detail Record (CDR) dialplan functi 0         
11 modules loaded
[root@sip ~]# asterisk -rx "module show like mysql"
Module                         Description                              Use Count 
app_cbmysql.so                 CBMysql conference scheduling            0         
app_mysql.so                   Simple Mysql Interface                   0         
cdr_mysql.so                   MySQL CDR Backend                        0         
res_config_mysql.so            MySQL RealTime Configuration Driver      0         
4 modules loaded
[root@sip ~]# asterisk -rx "cdr mysql status"
Connected to asteriskcdrdb on socket file default using table cdr for 5 minutes, 45 seconds.
Wrote 0 records since last restart.
[root@sip ~]# 

[root@sip ~]# 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=127.0.0.1
dbname=asteriskcdrdb 
password=1234512345
password=Qwerty987
user=root
userfield=1
;port=3306 
;sock=/tmp/mysql.sock

[root@sip ~]# tail -f /var/log/httpd/error_log
[Tue Feb 24 17:24:27 2015] [notice] Digest: done
[Tue Feb 24 17:24:27 2015] [notice] SSL FIPS mode disabled
[Tue Feb 24 17:24:27 2015] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Tue Feb 24 17:56:25 2015] [notice] caught SIGTERM, shutting down
[Tue Feb 24 17:59:35 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Feb 24 17:59:35 2015] [notice] SSL FIPS mode disabled
[Tue Feb 24 17:59:35 2015] [notice] Digest: generating secret for digest authentication ...
[Tue Feb 24 17:59:35 2015] [notice] Digest: done
[Tue Feb 24 17:59:35 2015] [notice] SSL FIPS mode disabled
[Tue Feb 24 17:59:35 2015] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations

[root@sip ~]# cat /etc/asterisk/cdr_manager.conf 
[general]
enabled = yes

Вроде все правильно, все настройки на месте , но отчеты не отображаются , что проверить чтобы починить ?

Смотрел также таблицу MySQL в таблице данных тоже нету.

 mysql> use asteriskcdrdb
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> DESCRIBE cdr
    -> ;

+---------------+--------------+------+-----+---------------------+-------+
| Field         | Type         | Null | Key | Default             | Extra |
+---------------+--------------+------+-----+---------------------+-------+
| calldate      | datetime     | NO   |     | 0000-00-00 00:00:00 |       | 
| clid          | varchar(80)  | NO   |     |                     |       | 
| src           | varchar(80)  | NO   |     |                     |       | 
| dst           | varchar(80)  | NO   |     |                     |       | 
| dcontext      | varchar(80)  | NO   |     |                     |       | 
| channel       | varchar(80)  | NO   |     |                     |       | 
| dstchannel    | varchar(80)  | NO   |     |                     |       | 
| lastapp       | varchar(80)  | NO   |     |                     |       | 
| lastdata      | varchar(80)  | NO   |     |                     |       | 
| duration      | int(11)      | NO   |     | 0                   |       | 
| billsec       | int(11)      | NO   |     | 0                   |       | 
| disposition   | varchar(45)  | NO   |     |                     |       | 
| amaflags      | int(11)      | NO   |     | 0                   |       | 
| accountcode   | varchar(20)  | NO   |     |                     |       | 
| uniqueid      | varchar(32)  | NO   | MUL |                     |       | 
| userfield     | varchar(255) | NO   |     |                     |       | 
| recordingfile | varchar(255) | NO   |     |                     |       | 
| cnum          | varchar(40)  | NO   |     |                     |       | 
| cnam          | varchar(40)  | NO   |     |                     |       | 
| outbound_cnum | varchar(40)  | NO   |     |                     |       | 
| outbound_cnam | varchar(40)  | NO   |     |                     |       | 
| dst_cnam      | varchar(40)  | NO   |     |                     |       | 
+---------------+--------------+------+-----+---------------------+-------+
22 rows in set (0.00 sec)

[root@sip ~]# asterisk -rx"cdr show status"

Call Detail Record (CDR) settings
----------------------------------
  Logging:                    Disabled
  Mode:                       Simple

Делаю вот так :

[root@sip ~]# mysql -useasteriskcdrdb -uroot -pQwerty987 -e "DESCRIBE cdr;"
ERROR 1046 (3D000) at line 1: No database selected
[root@sip ~]# mysql -use asteriskcdrdb -uroot -pQwerty987 -e "DESCRIBE cdr;"
+---------------+--------------+------+-----+---------------------+-------+
| Field         | Type         | Null | Key | Default             | Extra |
+---------------+--------------+------+-----+---------------------+-------+
| calldate      | datetime     | NO   |     | 0000-00-00 00:00:00 |       | 
| clid          | varchar(80)  | NO   |     |                     |       | 
| src           | varchar(80)  | NO   |     |                     |       | 
| dst           | varchar(80)  | NO   |     |                     |       | 
| dcontext      | varchar(80)  | NO   |     |                     |       | 
| channel       | varchar(80)  | NO   |     |                     |       | 
| dstchannel    | varchar(80)  | NO   |     |                     |       | 
| lastapp       | varchar(80)  | NO   |     |                     |       | 
| lastdata      | varchar(80)  | NO   |     |                     |       | 
| duration      | int(11)      | NO   |     | 0                   |       | 
| billsec       | int(11)      | NO   |     | 0                   |       | 
| disposition   | varchar(45)  | NO   |     |                     |       | 
| amaflags      | int(11)      | NO   |     | 0                   |       | 
| accountcode   | varchar(20)  | NO   |     |                     |       | 
| uniqueid      | varchar(32)  | NO   | MUL |                     |       | 
| userfield     | varchar(255) | NO   |     |                     |       | 
| recordingfile | varchar(255) | NO   |     |                     |       | 
| cnum          | varchar(40)  | NO   |     |                     |       | 
| cnam          | varchar(40)  | NO   |     |                     |       | 
| outbound_cnum | varchar(40)  | NO   |     |                     |       | 
| outbound_cnam | varchar(40)  | NO   |     |                     |       | 
| dst_cnam      | varchar(40)  | NO   |     |                     |       | 
+---------------+--------------+------+-----+---------------------+-------+
[root@sip ~]#

Elastix не пишет репорты

root@sip ~]# asterisk -rx "module show like cdr"
Module                         Description                              Use Count 
app_cdr.so                     Tell Asterisk to not maintain a CDR for  0         
app_forkcdr.so                 Fork The CDR into 2 separate entities    0         
cdr_adaptive_odbc.so           Adaptive ODBC CDR backend                0         
cdr_csv.so                     Comma Separated Values CDR Backend       0         
cdr_custom.so                  Customizable Comma Separated Values CDR  0         
cdr_manager.so                 Asterisk Manager Interface CDR Backend   0         
cdr_mysql.so                   MySQL CDR Backend                        0         
cdr_odbc.so                    ODBC CDR Backend                         0         
cdr_sqlite3_custom.so          SQLite3 Custom CDR Module                0         
cdr_syslog.so                  Customizable syslog CDR Backend          0         
func_cdr.so                    Call Detail Record (CDR) dialplan functi 0         
11 modules loaded
[root@sip ~]# asterisk -rx "module show like mysql"
Module                         Description                              Use Count 
app_cbmysql.so                 CBMysql conference scheduling            0         
app_mysql.so                   Simple Mysql Interface                   0         
cdr_mysql.so                   MySQL CDR Backend                        0         
res_config_mysql.so            MySQL RealTime Configuration Driver      0         
4 modules loaded
[root@sip ~]# asterisk -rx "cdr mysql status"
Connected to asteriskcdrdb on socket file default using table cdr for 5 minutes, 45 seconds.
Wrote 0 records since last restart.
[root@sip ~]# 

[root@sip ~]# 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=127.0.0.1
dbname=asteriskcdrdb 
password=Qwerty987
user=root
userfield=1
;port=3306 
;sock=/tmp/mysql.sock

[root@sip ~]# tail -f /var/log/httpd/error_log
[Tue Feb 24 17:24:27 2015] [notice] Digest: done
[Tue Feb 24 17:24:27 2015] [notice] SSL FIPS mode disabled
[Tue Feb 24 17:24:27 2015] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Tue Feb 24 17:56:25 2015] [notice] caught SIGTERM, shutting down
[Tue Feb 24 17:59:35 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Feb 24 17:59:35 2015] [notice] SSL FIPS mode disabled
[Tue Feb 24 17:59:35 2015] [notice] Digest: generating secret for digest authentication ...
[Tue Feb 24 17:59:35 2015] [notice] Digest: done
[Tue Feb 24 17:59:35 2015] [notice] SSL FIPS mode disabled
[Tue Feb 24 17:59:35 2015] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations

[root@sip ~]# cat /etc/asterisk/cdr_manager.conf 
[general]
enabled = yes

Вроде все правильно, все настройки на месте , но отчеты не отображаются , что проверить чтобы починить ?

Смотрел также таблицу MySQL в таблице данных тоже нету.

 mysql> use asteriskcdrdb
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> DESCRIBE cdr
    -> ;

+---------------+--------------+------+-----+---------------------+-------+
| Field         | Type         | Null | Key | Default             | Extra |
+---------------+--------------+------+-----+---------------------+-------+
| calldate      | datetime     | NO   |     | 0000-00-00 00:00:00 |       | 
| clid          | varchar(80)  | NO   |     |                     |       | 
| src           | varchar(80)  | NO   |     |                     |       | 
| dst           | varchar(80)  | NO   |     |                     |       | 
| dcontext      | varchar(80)  | NO   |     |                     |       | 
| channel       | varchar(80)  | NO   |     |                     |       | 
| dstchannel    | varchar(80)  | NO   |     |                     |       | 
| lastapp       | varchar(80)  | NO   |     |                     |       | 
| lastdata      | varchar(80)  | NO   |     |                     |       | 
| duration      | int(11)      | NO   |     | 0                   |       | 
| billsec       | int(11)      | NO   |     | 0                   |       | 
| disposition   | varchar(45)  | NO   |     |                     |       | 
| amaflags      | int(11)      | NO   |     | 0                   |       | 
| accountcode   | varchar(20)  | NO   |     |                     |       | 
| uniqueid      | varchar(32)  | NO   | MUL |                     |       | 
| userfield     | varchar(255) | NO   |     |                     |       | 
| recordingfile | varchar(255) | NO   |     |                     |       | 
| cnum          | varchar(40)  | NO   |     |                     |       | 
| cnam          | varchar(40)  | NO   |     |                     |       | 
| outbound_cnum | varchar(40)  | NO   |     |                     |       | 
| outbound_cnam | varchar(40)  | NO   |     |                     |       | 
| dst_cnam      | varchar(40)  | NO   |     |                     |       | 
+---------------+--------------+------+-----+---------------------+-------+
22 rows in set (0.00 sec)

[root@sip ~]# asterisk -rx"cdr show status"

Call Detail Record (CDR) settings
----------------------------------
  Logging:                    Disabled
  Mode:                       Simple

Делаю вот так :

[root@sip ~]# mysql -useasteriskcdrdb -uroot -pQwerty987 -e "DESCRIBE cdr;"
ERROR 1046 (3D000) at line 1: No database selected
[root@sip ~]# mysql -use asteriskcdrdb -uroot -pQwerty987 -e "DESCRIBE cdr;"
+---------------+--------------+------+-----+---------------------+-------+
| Field         | Type         | Null | Key | Default             | Extra |
+---------------+--------------+------+-----+---------------------+-------+
| calldate      | datetime     | NO   |     | 0000-00-00 00:00:00 |       | 
| clid          | varchar(80)  | NO   |     |                     |       | 
| src           | varchar(80)  | NO   |     |                     |       | 
| dst           | varchar(80)  | NO   |     |                     |       | 
| dcontext      | varchar(80)  | NO   |     |                     |       | 
| channel       | varchar(80)  | NO   |     |                     |       | 
| dstchannel    | varchar(80)  | NO   |     |                     |       | 
| lastapp       | varchar(80)  | NO   |     |                     |       | 
| lastdata      | varchar(80)  | NO   |     |                     |       | 
| duration      | int(11)      | NO   |     | 0                   |       | 
| billsec       | int(11)      | NO   |     | 0                   |       | 
| disposition   | varchar(45)  | NO   |     |                     |       | 
| amaflags      | int(11)      | NO   |     | 0                   |       | 
| accountcode   | varchar(20)  | NO   |     |                     |       | 
| uniqueid      | varchar(32)  | NO   | MUL |                     |       | 
| userfield     | varchar(255) | NO   |     |                     |       | 
| recordingfile | varchar(255) | NO   |     |                     |       | 
| cnum          | varchar(40)  | NO   |     |                     |       | 
| cnam          | varchar(40)  | NO   |     |                     |       | 
| outbound_cnum | varchar(40)  | NO   |     |                     |       | 
| outbound_cnam | varchar(40)  | NO   |     |                     |       | 
| dst_cnam      | varchar(40)  | NO   |     |                     |       | 
+---------------+--------------+------+-----+---------------------+-------+
[root@sip ~]#

По прежнему состояние отключено :

[root@sip cdr-csv]# asterisk -rx "cdr show status"

Call Detail Record (CDR) settings
----------------------------------
  Logging:                    Disabled
  Mode:                       Simple
[root@sip cdr-csv]# asterisk -rx "cdr mysql status"
Connected to asteriskcdrdb on socket file default using table cdr for 1 minutes, 40 seconds.
  Wrote 0 records since last restart.

Проект компании "АТС Дизайн"
Asterisk® и Digium® являются зарегистрированными торговыми марками компании Digium, Inc., США.
IP АТС Asterisk распространяется под лицензией GNU GPL.