When I make a call using softphones the call detail records are not showing in cdr?It says that cdr table is empty!Why?
Have you configure the ODBC connector to write the CDR records on the DB ?
Actually in cdr table it shows some past call detail records,not the details of calls I am doing for the moment.So the call is not being registered in cdr table!When cdr show status is running it shows the following? Why it is happening?
Registered Backends none
I made a quick guide for ubuntu 18 server and MYSQL as CDR Backend
Kindly Share the guide?
Thanks in advance
apt-get install unixodbc-dev unixodbc-bin unixodbc
Description = MySQL connection to ‘asterisk’ database
Driver = MySQL
Database = asterisk
Server = localhost
UserName = root
Password = ‘’
Port = 3306
Socket = /var/run/mysqld/mysqld.sock
This lib need to be downloaded from MYSQL SITE
Description = ODBC for MySQL
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc8a.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc8S.so
FileUsage = 1
alias start => calldate
enabled => yes
dsn => asterisk-mysql
username => root
password => ‘’
pre-connect => yes
assuming asterisk db exist create the table
CREATE TABLE cdr (
calldate datetime NULL ,
clid varchar(80) NOT NULL default ‘’,
src varchar(80) NOT NULL default ‘’,
dst varchar(80) NOT NULL default ‘’,
dcontext varchar(80) NOT NULL default ‘’,
channel varchar(80) NOT NULL default ‘’,
dstchannel varchar(80) NOT NULL default ‘’,
lastapp varchar(80) NOT NULL default ‘’,
lastdata varchar(80) NOT NULL default ‘’,
duration int(11) NOT NULL default ‘0’,
billsec int(11) NOT NULL default ‘0’,
disposition varchar(45) NOT NULL default ‘’,
amaflags int(11) NOT NULL default ‘0’,
accountcode varchar(20) NOT NULL default ‘’,
uniqueid varchar(32) NOT NULL default ‘’,
userfield varchar(255) NOT NULL default ‘’
service asterisk restart
Okay I did the above configuration at my files but still cdr table does not write call detail records?
You should have similar output if run these commands
Verify the DNS connection
root@vultr:~# asterisk -x " odbc show"
ODBC DSN Settings
Number of active connections: 1 (out of 1)
ALSO the driver configuration
echo “select 1” | isql -v asterisk-mysql
| Connected! |
| sql-statement |
| help [tablename] |
| quit |
SQL> select 1
| 1 |
| 1 |
SQLRowCount returns 1
1 rows fetched
Hi @ambiorixg12 I have this issue that my CDR record is showing both start time and answer time is the same. Any idea on how i solve this?
You need to open a new thread for this issue as well post your dial plan to see if the can is answered immediately after been dialed
I have started from the link
http://asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/installing_configuring_odbc.html,and I have a problem at these commands:
$ make menuselect
$ make install
I am not sure which is my ‘source directory’ as the link says?
The source directory is the directory into which you extracted the Asterisk source files when you originally built Asterisk. If you actually used a binary package, the details will depend on how the package was constructed, and whether the packager has applied patched to the standard Asterisk code.
How to know where I have extracted the Asterisk source files?
When I go to /usr/src/ and write the command ./configure it says:
-bash: ./configure: No such file or directory
You are the only person that would know where you extracted them or even if you ever built from source.
From the fact that you are asking, I suspect you never built from source, but used a binary package. You are going to need to find out what configuration was specified when creating that binary package. If you have never built from source, you have more learning to do that can be easily put into a short forum response.
Yes I have not extracted files.AsteriskNOW is installed in a machine.