i have installed asterisk and configured CDR.
Now i want to put the CDR in a different serveur. Can you help me ?
I changed /etc/asterisk/asterisk.conf by changing the path of the files log (astlogdir => root@x.x.x.x:/var/log/asterisk), but nothing.
Hi
i forgot to tell you that the 2 servers are in different networks !
should i wrote :
[color=green]hostname=81.192.xxx.xxx:portNumber ?[/color]
thanks
aicha
i would make sure you can connect to the remote server through the mysql client (outside of asterisk) first - this may just be a permissions/network issue. once you can connect to the remote database from your asterisk box and issue queries, i think you would be good to go…
There are lots of possible reasons why logging fail. It would certainly help if you can provide more info what diagnostic action(s) were taken to narrow down the possibilities. Otherwise, it would be difficult.
hi ,
I don’t know what is the problem. I try to connect to my MySql server via another machin in another network and it is ok. but when I try to point the data of CDR in this database, il doesn’t work !
Last time, you tell me that I should put the hostname of the distant server in the file cdr_mysql.conf. Can I put there 81.192.xxx.xxx ? because hostname is a string ?
should I put the hostname in the distant server only ? or in the local server too ?
hi,
the local server is in a private network. so I wrote in the file cdr_mysql.conf which is the distant server : 81.192.xxx.xxx . this adress is the IP adress of my internet access but we have many computers here.
so what can I do to tell to the distant server that it is my computer not another computer ?
thanks you very much to help me.
Aicha
I have to admit that I am really confused after reading your last 2 posts.
Firstly, don’t understand why you tested connecting to the MySQL CDR server with another machine from another network? If the objective is to log from Asterisk to a remote CDR server, then the diagnosis should be conducted with the relevant systems to get the intended results.
I had not tried with MySQL, but had tested with PGSQL logging to a remote CDR in the same private subnet. Both hostname and ip worked IIRC with the conf file.
CDR logging are essentially inserts if I am not wrong. Therefore you should test sending insert queries with mysql client, from the Asterisk server to the remote CDR db, with the same credentials as you would with Asterisk. The problem could be with grants. If it’s working, then check if the cdr_mysql.so module is loaded with “show modules” from Asterisk cli. Check with “cdr status” next. Finally, you could use tools like tcpdump and ethereal to analyse the traffic during logging.
As mentioned earlier, “There are lots of possible reasons why logging fail”
Hi ,
I am sorry but english is not my mother’s tongue . It is why I make many mistakes and I find difficulties to exprim myself
I will try many possibilities this aftenoon and after I will tell you.
I can tell from your posts that you have difficulty explaining you situation:)
That’s ok, but my emphasis is on the analytic approach in dealing with the issue. It’s important as most or all of us can only help you over the Internet.
Also, try reading thru’ at least once before posting. Useful in my case, especially when some of my posts/emails/messages did not even make sense when I looked at them:)
Hi
i found that cdr_mysql.so is not load in the local server.
I write
[color=green]load => cdr_mysql.so
load => res_mysql.so[/color]
in the files /etc/asterisk/modules.conf
but is does not resolve the problem. Do you know how can I load theses modules???
Hi
[color=green][modules]
autoload=yes[/color]
[color=green]and astetisk_addons is installed.[/color]
But i haven’t MySql installed in the local server ( between others reasons, it is why I want to have the CDR in another computer ). MySql is installed in the distant server. Is it a problem ? Is it why res_mysql.so can not be loaded ?
All the res_mysql is doing while loaded is to connect to the sql server.
So make sure its not using socks and you have actually access to the server.
Can you connect to the mysql server with other tools/prompt from that machine ?
Can you post the result from the CLI when doing a
RELOAD
command ?
There is a line stating the state of the mysql connection.
You can use “Putty” and change the buffer to 2000 lines, so you dont loose any lines. Also you can have putty logging all output to a file or/and copying it to the clipboard.