Saturday, January 10, 2009

Audio Capture on Linux based IP PBX Systems

This is the method that can be used on a "Linux" based "IP PBX" system to look at a delayed connection issue. It sets up fairly easily and give the best information to track audio problems.

Set up a tcpdump to capture all the packets going to and from the IVR system.

  • mkdir /root/capture1 (or some other place and name)
  • chmod 777 /root/capture1 (tcpdump runs as pcap and cannot make additional files)
  • cd /root/capture1
  • nohup tcpdump -s0 -C10 -w cap port 8000 or 8002 or 8004 or 8006 or 8008 or 8010 or 8012 or 8014 or 8016 or 8018 or 8020 or 8022 or 2427 or 2727 or 5060 &
  • cat nohup.out to check for errors
  • If there are multiple interfaces, use ”-i eth0” to choose the interface you want.

Have the customer record the calls that are the problem. By doing this, it will make the packets flow through the server.

Check that you are actually capturing what you want with with the following command:

  • tail --lines=100000 -f cap tcpdump -n -nn -r -
  • Remember you have it on and go delete old files occasionally.

On wireshark:

  • statistics->VOIP calls
  • choose audio streams. Hold down control to choose multiple
  • player