cdr report data extraction / mining

johanna

Joined
Jan 5, 2009
Messages
2
Likes
0
Points
0
#1
Hi all

I would like to get some data from cdr and post them in a web page:

user || weekly outbound answered calls || avg talkin per call ||
002 || 115 || 4'52" ||

I would like to connect directly to the db and display the above data on a web page.
I have a basic php/mysql knowledge.
Any hint on how to start doing this?

Thanks
Jo
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#2
Hi Johanna. :)

This name reminds me of Eddy Grant's song "Give me hope johanna".

Pffff. Ok. So :side:

Yes, you can use the php language and create your web page style.
You must have the account and password for the database connection.
(root - eLaStIx.2oo7) that's all.
Connect to the database asteriskcdrdb and the cdr table.
After, you must select the good request (select * from ..etc).

Now, there is several programs to do it... :huh:
For exemple: Kompozer (Free)
 

Bob

Joined
Nov 4, 2007
Messages
2,400
Likes
1
Points
36
#3
Johanna,

Just one more important part to add to Danardf's post....

The MYSQL Database is set for local access only, which means that outside of the box, you cannot connect to MYSQL database. I am assuming that your Webserver is running externally to the Elastix system, so you will need to enable remote access to the database using the following

mysql -u root -p mysql

This command starts the mysql command line interface shell. Basically we have told it to login as root and request a password. It will request the password which is eLaStIx.2oo7 (note the oo are the letter o and not zero)

then once in the mysql command line interface type

GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY 'eLaStIx.2oo7' WITH GRANT OPTION;
(make sure the ; is on the end which closes the line/command off)

This command tells mysql to provide access to all databases (*.*) to root from any IP Address/domain (%) when root logs in with the elastix password.

After you have done this (without error messages), quit the mysql cli and reboot your Elastix system. You should no be able to access the MYSQL database(s) external to your Elastix box.

Please note: this is not a good way to leave security setup this way as you have left Elastix protected only by a password (and a known one at that). However, like most things, you don't want to get your task/project bogged down by increasing the complexity. Once you have your project working, then tighten security back up by

1) Changing the % to an IP address that is probably going to be just your Webserver.
2) Adding another user/password to MYSQL with access just to the database you need (CDR), and grant that user remote access only.

Hope this helps

Bob
 

johanna

Joined
Jan 5, 2009
Messages
2
Likes
0
Points
0
#4
hallo, thanks for answering.

I found the db. Tough I'm scared of the cl so I'm trying to use webmin ->
MySql - User Permission - root - (details) username:root password:dont change hosts:any permission:grant permission- Is the same of the above command?

Also I'm a bit (totaly!) lost trying to connect to elastix using dreamweaver
Access: FTP
FTP host: server address
Host directory: ???var/www/html/
Login: ???admin/root
Password: ???palosanto/password


bye
Jo
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,902
Messages
130,888
Members
17,568
Latest member
mehdii_igi
Top