Book Image

Elastix Unified Communications Server Cookbook

Book Image

Elastix Unified Communications Server Cookbook

Overview of this book

Table of Contents (24 chapters)
Elastix Unified Communications Server Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Description and Use of the Most Well-known FreePBX Modules
Addon Market Module
Asterisk Essential Commands
Asterisk Gateway Interface Programming
Helpful Linux Commands
Index

Using TCPDUMP for debugging


Another way to generate traces from within our Elastix server's command line is to use the tcpdump program. This program sets a specified network device in order to catch all the IP traffic that goes through it.

How to do it...

  1. The next example shows the command we need to execute in order to capture packets in the network device eth0.

    tcpdump -pi eth0 -s0 host XXX.XXX.XXX.XXX and udp port 5060 -vv -w file.cap
    
  2. The option -s0 captures packets of any size from host XXX.XXX.XXX.XXX traveling through the udp port 5060 and writes the output to the file.cap file. The specified host could be the IP address from an IP phone or from a VoIP provider. After making one or two calls, we exit this command by pressing Crtl + C. Then, we can transfer this file to our laptop or work station and open it, using Wireshark.

  3. In case we would like to use the TCPDUMP command over IAX, the way this command can be issued is as follows:

    tcpdump -pi eth0 -s0 host XXX.XXX.XXX.XXX and udp port...