1- Update system
dnf update
2- Insall epel repo
dnf install epel-release
3- Install unixODBC-devl
dnf --enablerepo=crb install unixODBC-devel
dnf install unixODBC
4- Install Python devel
dnf install python-devel
5 Install Python pip
dnf install python-pip
6- Install Python-Mysql and mysql-connector-odbc
dnf --enablerepo=epel-testing install python3-mysqlclient
7- Install this packages
dnf install unixODBC unixODBC-devel libtool-ltdl libtool-ltdl-devel
if libtool-ltdl-devel doesnt get install run this
dnf --enablerepo=resilientstorage install libtool-ltdl-devel
8 Install core development packages
dnf groupinstall -y --allowerasing core base "Development Tools"
9 Install these dev packages
dnf install -y make wget openssl-devel ncurses-devel newt-devel libxml2-devel kernel-devel gcc gcc-c++ sqlite-devel
dnf install -y initscripts svn chkconfig
10 Install Asterisk
cd /usr/src/
tar zxvf asterisk*
rm *.gz
cd asterisk-20*
contrib/scripts/install_prereq install
./configure --libdir=/usr/lib64 --with-pjproject-bundled --with-jansson-bundled && make menuselect && make && make install
make samples
make config
ldconfig
/etc/init.d/asterisk start
asterisk -rvvvvvvvv
11) Create a MySQL password and Asterisk realtime DB
sudo dnf install mariadb-server
sudo systemctl start mariadb
sudo systemctl status mariadb
sudo systemctl enable mariadb
mysqladmin -u root -p password 'asterisk'
mysqladmin -u root password 'asterisk'
mysqladmin -u root -pasterisk create asterisk
# pip install alembic
# cd contrib/ast-db-manage/
sqlalchemy.url = mysql://root:password@localhost/asterisk
# cp config.ini.sample config.ini
# alembic -c config.ini upgrade head
# alembic -c config.ini upgrade head INFO [alembic.migration] Context impl MySQLImpl. INFO [alembic.migration] Will assume non-transactional DDL. INFO [alembic.migration] Running upgrade None -> 4da0c5f79a9c, Create tables INFO [alembic.migration] Running upgrade 4da0c5f79a9c -> 43956d550a44, Add tables for pjsip #
# mysql -u root -p -D asterisk mysql> show tables; +--------------------+ | Tables_in_asterisk | +--------------------+ | alembic_version | | iaxfriends | | meetme | | musiconhold | | ps_aors | | ps_auths | | ps_contacts | | ps_domain_aliases | | ps_endpoint_id_ips | | ps_endpoints | | sippeers | | voicemail | +--------------------+ 12 rows in set (0.00 sec) mysql> quit
12) Install alembic
pip install alembic
alembic --version
13) Install connector
dnf install mariadb-connector-c
dnf install mariadb-connector-odbc
14 ) Install PHP
dnf install php
dnf install php-mysqlnd
Configuration files.
module reload res_odbc.so Check connection asterisk_realtime*CLI> odbc show all ODBC DSN Settings ----------------- Name: asterisk DSN: asterisk Number of active connections: 1 (out of 1) Logging: Disabled |
RESTART the asterisk service after add the transport
core restart now
Source
https://centos.pkgs.org/9-stream/centos-crb-x86_64/unixODBC-devel-2.3.9-4.el9.x86_64.rpm.html
https://rockylinux.pkgs.org/8/rockylinux-appstream-x86_64/unixODBC-devel-2.3.7-1.el8.i686.rpm.html
https://centos.pkgs.org/9-stream/centos-resilientstorage-x86_64/libtool-ltdl-devel-2.4.6-44.el9.i686.rpm.html
https://rockylinux.pkgs.org/9/rockylinux-appstream-aarch64/mariadb-connector-odbc-3.1.12-3.el9.aarch64.rpm.html
No hay comentarios:
Publicar un comentario