A very practical discussion on how to connect Asterisk with Relational Databases using ODBC database abstraction layer. This session will cover the basics of MySQL/ODBC installation, configuration and integration with Asterisk.
Additionally will be made practical examples about the benefits of this union: improving dialplan with SQL Queries, store Call Detail Records (CDR) in DB, implementing Realtime Architecture (ARA).
Proposed session is for those who do not yet know benefits of connecting an Asterisk box to a database or are interested to learn about it through a very simple step-by-step demo.
9. .: Sandwich Layers
“In order to get you into the right frame of
mind for what follows, we want you to
picture a Dagwood sandwich.”
[Asterisk™: The Definitive Guide]
11. .: MySQL: installation
root@ubuntu001:~# apt-get install mysql-server
root@ubuntu001:~# /usr/bin/mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS
RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH
STEP CAREFULLY!
Select a strong password
12. .: MySQL: configuration
root@ubuntu001:~# mysql -u root -p
mysql> CREATE USER 'asterisk'@'%' IDENTIFIED BY 'some_secret_password';
Query OK, 0 rows affected (0.00 sec)
mysql> CREATE DATABASE asterisk;
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON asterisk.* TO 'asterisk'@'%';
root@ubuntu001:~# mysql -u asterisk -p asterisk
Enter password:
mysql>