fizord.ru - инфа - 542

от: cloud 2021-12-15 11:19:01

asterisk 16 mysql/mariadb debian 11
[просмотров|96] linux
mysql вы устанавливаете сами, необходим будет также phpmyadmin на вашем веб сервере, или пишите в консоли, как удобно.

apt-get install asterisk odbcinst git cmake

cd /usr/src/
git clone https://github.com/MariaDB/mariadb-connector-odbc.git
mkdir build && cd build
cmake ../mariadb-connector-odbc/ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCONC_WITH_UNIT_TESTS=Off -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_SSL=OPENSSL
cmake --build . --config RelWithDebInfo
make install

nano /etc/odbcinst.ini
[MariaDB]
Description = ODBC for MariaDB
Driver = /usr/local/lib64/mariadb/libmaodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
FileUsage = 1
UsageCount = 1


odbcinst -q -d - проверка установки odbcinst
[MariaDB]

nano /etc/odbc.ini
[MariaDB-asteriskcdrdb]
Description=MySQL connection to Asterisk
Trace = Yes
TraceFile = /tmp/odbc.log
Driver=MariaDB
Server=localhost
User=USER_SQL_ВАШ
Password=PASSWORD_SQL_ВАШ
Database=asteriskcdrdb
Port=3306
Socket=/var/run/mysqld/mysqld.sock
Option=3
Charset=utf8


nano /etc/asterisk/cdr_adaptive_odbc.conf
[asteriskcdrdb]
connection=asteriskcdrdb
table=cdr
loguniqueid=yes
usegmtime=no
alias start => calldate
alias realdst => realdst
alias remoteip => remoteip
alias start => calldate
alias hangupcause => hangupcause
alias peerip => peerip
alias recvip => recvip
alias fromuri => fromuri
alias useragent => useragent
alias filename => filename


nano /etc/asterisk/res_odbc.conf
[ENV]

[asteriskcdrdb]
enabled=>yes
dsn=>MariaDB-asteriskcdrdb
;pooling=>no
;limit=>1
pre-connect=>yes
username=>USER_SQL_ВАШ
password=>PASSWORD_SQL_ВАШ


nano /etc/asterisk/cel_odbc.conf
[cel]
connection=asteriskcdrdb
loguniqueid=yes
table=cel


[b]nano ...
загрузить
ещё
fizord.ru © 2022
site by cl0oud