How to access CDR from outside server using PHP and MySQL

Community based support for the Digium Phone Application Programming Interface (API).

Moderators: jwitt, sruffell, malcolmd, Moderator

How to access CDR from outside server using PHP and MySQL

Postby mallikarjun77 » Fri Oct 31, 2014 2:45 pm

Hi,
Thanks in advance.

Can anybody help me to retrieve the call details from Elastix server from External server using PHP and Mysql?

Please post sample code.....

<?php
// we connect to example.com and port 3307
$link = mysql_connect('2xx.1xx.7x.2xx:3306', 'asteriskuser', 'admin');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);


it is showing error like below.

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'asteriskuser'@'183.83.3.194' (using password: YES) in C:\xampp\htdocs\payrol\aaa.php on line 3
Could not connect: Access denied for user 'asteriskuser'@'183.83.3.194' (using password: YES)

please check it and give me reply...
thanks
mallikarjun77
Newsterisk
 
Posts: 1
Joined: Fri Oct 31, 2014 2:39 pm

Re: How to access CDR from outside server using PHP and MySQL

Postby tomdemoor » Tue Nov 04, 2014 8:09 am

this is more a php/mysql problem and not an Asterisk/phone problem.

Is the mysql-server listening to it's external ip-address and isn't there a firewall that blocks the traffic?
tomdemoor
Oldsterisk
 
Posts: 133
Joined: Mon Jan 16, 2012 4:24 am


Return to Digium Phone API

Who is online

Users browsing this forum: No registered users and 3 guests