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
Folow this guide
http://asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/installing_configuring_odbc.html
I made a quick guide for ubuntu 18 server and MYSQL as CDR Backend
Hi,
Kindly Share the guide?
Thanks in advance
Ubuntu 18 Asterisk 16 CDR ODBC
Install packages
apt-get install unixodbc-dev unixodbc-bin unixodbc
/etc/odbc.ini
[asterisk-mysql]
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
/etc/odbcinst.ini
[MySQL]
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
/etc/asterisk/cdr_adaptive_odbc.conf
[asterisk-mysql]
connection=asterisk-mysql
table=cdr
alias start => calldate
/etc/asterisk/res_odbc.conf
[asterisk-mysql]
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 ββ
);
restart asterisk
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
Name: asterisk-mysql
DSN: asterisk-mysql
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:
$~/src/asterisk-complete/asterisk/1.8
$ ./configure
$ 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.