Call Logging

I am having some internal call quality issues as the IAX provider is showing no problems.

I have found that “sip show channelstats” provides information like sent and received packets with loss. and jitter.

Is there anyway to record the stats when a call is completed, to either a log file or mysql database?


It would be helpful if you gave us some info on your system. What version of FreePBX? Asterisk? Distro install or hand built? What type of phones?

A little more detail on the exact nature of your problem would help too? Are the call quality problems manifesting themselves on extension to extension calls? What is your network topology?

I am running Elastix 2.0.3 (FreePBX v2.8.1.4) on a HP Proliant DL380 (2 x Xeon 3GHz, 4Gb RAM, 80Gb HDD Raid5) with a Sangoma A200 w/8 ports (currently not being used)

We are using the 45 x Aastra 57i phones, Firmware and Aastra Scripts on the server.

We have DLink L3 Gigabit Switches. The phones are currently not on a VLAN.

We are experiencing some static and echo on the phones, occasionally. I have checked the call logs from our IAX provider, which doesn’t show any packet loss.

I am trying to get detailed channel or peers logging to see if there is a pattern to the problem.

Is there any way to log the channelstats when a call is finished?

Thanks in advance

As I remember FreePBX uses MySQL table (freepbx_log) to log everything. You might want to check it as it almost has all the information logged. If you dont find any record in it then check your /etc/amportal.conf for the following line:

If it is true then you will not get any logs so change it to


and you will start getting logs in the table.