How to connect asterisk with my local database

Okay I have asteriskNow version 13 running in a machine.In another device I have a MySQL database;
From this device I access in AsteriskNow with ssh.
What I want is to have access in my MySQL database from asteriskNow and to set the content of cdr table in a MySQL table of this database(such that when a call is made the call details are written in MySQL table too).How it can be done?

What you re requesting here it is DB replication , https://www.digitalocean.com/community/tutorials/how-to-set-up-master-slave-replication-in-mysql

When I write the command ‘show master status’ it gives the response empty set!
26%20PM

Addressthis issue on the MYSQL forum

2 Likes

“In Asterisk 13, if you want to store CDR into DB then you have to compile addon for this and then you will have 2 configuration files. 1) cdr.conf and 2) cdr_mysql.conf. In cdr.conf enable=yes and inside cdr_mysql.conf put mysql details as follow. [global]
hostname=192.168.1.7
dbname=mydb
table=cdr
password=pass@123
user=root
port=3306
dbsock = /var/lib/mysql/mysql.sock
inside Mysql you have to provide permission to IP of Asterisk server then only Asterisk will connect in this case”

Recent version of Asterisk do not use addon, al packages are selected on the make menu select.

and Using MySQL for CDR records is supported by using ODBC and the cdr_adaptive_odbc module (depends on res_odbc).

cdr_mysql module has been deprecated in 1.8.