PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER: Лог из консоли
Код: Выделить всё
[2017-09-10 21:12:45] WARNING[18574]: cel_odbc.c:789 odbc_log: Insert failed on 'asteriskcdrdb:cel'. CEL failed: INSERT INTO cel (eventtype, eventtime, cid_name, cid_num, cid_ani, cid_rdnis, cid_dnid, exten, context, channame, appname, appdata, amaflags, accountcode, uniqueid, linkedid, peer, userdeftype, extra) VALUES ('HANGUP', {ts '2017-09-10 21:12:45.187883'}, 'Василий Пупкин', '107', '107', '', '', 'h', 'ext-fax', 'PJSIP/107-00000001', '', '', 3, '', '1505067163.1', '1505067163.1', '', '', '{"hangupcause":16,"hangupsource":"PJSIP/107-00000001","dialstatus":""}')
[2017-09-10 21:12:45] WARNING[18569]: cdr_adaptive_odbc.c:766 odbc_log: cdr_adaptive_odbc: Insert failed on 'asteriskcdrdb:cdr'. CDR failed: INSERT INTO cdr (calldate, clid, src, dst, dcontext, channel, lastapp, lastdata, duration, billsec, disposition, amaflags, uniqueid, cnum, cnam, linkedid, sequence) VALUES ({ ts '2017-09-10 21:12:43' }, '"Василий Пупкин" <107>', '107', 's', 'ext-fax', 'PJSIP/107-00000001', 'ReceiveFAX', '/var/spool/asterisk/fax/1505067163.1.tif,f', 1, 1, 'ANSWERED', 3, '1505067163.1', '107', 'Василий Пупкин', '1505067163.1', 1)
[2017-09-10 21:12:45] WARNING[18574]: cel_odbc.c:789 odbc_log: Insert failed on 'asteriskcdrdb:cel'. CEL failed: INSERT INTO cel (eventtype, eventtime, cid_name, cid_num, cid_ani, cid_rdnis, cid_dnid, exten, context, channame, appname, appdata, amaflags, accountcode, uniqueid, linkedid, peer, userdeftype, extra) VALUES ('CHAN_END', {ts '2017-09-10 21:12:45.190739'}, 'Василий Пупкин', '107', '107', '', '', 'h', 'ext-fax', 'PJSIP/107-00000001', '', '', 3, '', '1505067163.1', '1505067163.1', '', '', '')
[2017-09-10 21:12:45] WARNING[18574]: cel_odbc.c:789 odbc_log: Insert failed on 'asteriskcdrdb:cel'. CEL failed: INSERT INTO cel (eventtype, eventtime, cid_name, cid_num, cid_ani, cid_rdnis, cid_dnid, exten, context, channame, appname, appdata, amaflags, accountcode, uniqueid, linkedid, peer, userdeftype, extra) VALUES ('LINKEDID_END', {ts '2017-09-10 21:12:45.192525'}, 'Василий Пупкин', '107', '107', '', '', 'h', 'ext-fax', 'PJSIP/107-00000001', '', '', 3, '', '1505067163.1', '1505067163.1', '', '', '')
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER: module show like odbc
Код: Выделить всё
freepbx*CLI> module show like odbc
Module Description Use Count Status Support Level
cdr_adaptive_odbc.so Adaptive ODBC CDR backend 0 Running core
cdr_odbc.so ODBC CDR Backend 0 Not Running extended
cel_odbc.so ODBC CEL backend 0 Running core
func_odbc.so ODBC lookups 0 Not Running core
res_config_odbc.so Realtime ODBC configuration 0 Running core
res_odbc.so ODBC resource 0 Running core
res_odbc_transaction.so ODBC transaction resource 0 Running core
7 modules loaded
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER: odbc show all
Код: Выделить всё
freepbx*CLI> odbc show all
ODBC DSN Settings
-----------------
Name: asteriskcdrdb
DSN: MySQL-asteriskcdrdb
Number of active connections: 2 (out of 5)[/spoiler]
[spoiler=odbcinst.ini][PostgreSQL]
Description=ODBC for PostgreSQL
Driver=/usr/lib/psqlodbcw.so
Setup=/usr/lib/libodbcpsqlS.so
Driver64=/usr/lib64/psqlodbcw.so
Setup64=/usr/lib64/libodbcpsqlS.so
FileUsage=1
[MySQL]
Description=ODBC for MySQL
Driver=/usr/lib/libmyodbc5.so
Setup=/usr/lib/libodbcmyS.so
Driver64=/usr/lib64/libmyodbc5a.so
Setup64=/usr/lib64/libodbcmyS.so
FileUsage=1
UsageCount=1
[MySQL ODBC 5.3 Unicode Driver]
Driver=/usr/lib64/libmyodbc5w.so
UsageCount=1
[MySQL ODBC 5.3 ANSI Driver]
Driver=/usr/lib64/libmyodbc5a.so
UsageCount=1
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER: odbc.ini
Код: Выделить всё
[MySQL-asteriskcdrdb]
Description=MySQL connection to 'asteriskcdrdb' database
driver=MySQL
server=localhost
database=asteriskcdrdb
Port=3306
Socket=/var/lib/mysql/mysql.sock
option=3
Charset=utf8[/spoiler]
[spoiler=cel_odbc.conf][cel]
connection=asteriskcdrdb
loguniqueid=yes
table=cel
#include cel_odbc_custom.conf
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER: res_odbc_additional.conf
Код: Выделить всё
[asteriskcdrdb]
enabled=>yes
dsn=>MySQL-asteriskcdrdb
pre-connect=>yes
max_connections=>5
username=>freepbxuser
password=>************************************
database=>asteriskcdrdb