Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tanvir86/5e597e0fce8cf09f673cd6b471b5a2ae to your computer and use it in GitHub Desktop.
Save tanvir86/5e597e0fce8cf09f673cd6b471b5a2ae to your computer and use it in GitHub Desktop.
==========================================
⭐ For cdr table ⭐
==========================================
------------------------------------------
πŸ‘‰ /etc/odbc.ini
------------------------------------------
[odbcAsterisk]
Driver = MySQL ODBC 5.3 Unicode Driver
Description = MySQL connection to β€˜asterisk’ database
Server = localhost
Port = 3306
Database = asterisk
UserName = root
Password = Root@pr1sonl1nk
Socket = /var/lib/mysql/mysql.sock
------------------------------------------
πŸ‘‰ /etc/asterisk/cdr_odbc.conf
------------------------------------------
[global]
dsn=odbcAsterisk
loguniqueid=yes
table=cdr
dispositionstring=yes
usegmtime=no
hrtime=yes
------------------------------------------
πŸ‘‰ /etc/asterisk/res_odbc.conf
------------------------------------------
[odbcasterisk]
enabled => yes
dsn => odbcAsterisk
username => root
password => Root@pr1sonl1nk
pre-connect => yes
limit=1
share_connections=yes
sanitysql=select 1
isolation=repeatable_read
------------------------------------------
πŸ‘‰ /etc/asterisk/cdr_manager.conf
------------------------------------------
[general]
enabled = yes
------------------------------------------
πŸ‘‰ /etc/asterisk/cdr_adaptive_odbc.conf
------------------------------------------
[adaptive_connection]
connection=odbcasterisk
table=cdr
alias start => calldate
alias channel => source_channel
==========================================
⭐ For cel table ⭐
==========================================
------------------------------------------
πŸ‘‰ /etc/asterisk/cel.conf
------------------------------------------
#uncomment these lines
enable=yes
dateformat = %F %T
------------------------------------------
πŸ‘‰ /etc/asterisk/cel_odbc.conf
------------------------------------------
[cel]
connection=odbcasterisk
table=cel
username= root
password= Root@pr1sonl1nk
loguniqueid=yes
==========================================
⭐ For realtime sip peers ⭐
==========================================
------------------------------------------
πŸ‘‰ /etc/asterisk/extconfig.conf
------------------------------------------
#uncomment these lines
sippeers => odbc,odbcasterisk
------------------------------------------
πŸ‘‰ /etc/asterisk/sip.conf
------------------------------------------
#uncomment these lines
rtcachefriends=yes
rtupdate=yes
rtautoclear=yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment