FusionPBX for ex-Trixbox users

This blog is intended to be read in sequential order as it is a series of steps that I followed to build a fully functioning fusionpbx phone system. However you might just need to find out how to do a particular thing so you might want to use the search box below to find that specific step. Please give feedback - if you know a better way to do something share it!

Friday, November 11

Trouble shooting FusionPBX/FreeSWITCH

At some point in time you might want to know what is going on on your network between your PBX and a VOIP provider or between your PBX and a phone.

You can do a packet capture directly on the PBX (much simpler than trying to get wireshark loaded on another machine and connected to the network at an appropriate point where it can see all the traffic).  To do this you need to install the ngrep package.  Do this with:

yum install ngrep

Once it is installed if you want to check traffic going to your VOIP providers you can use:
ngrep -W byline port 5080
This works because on FusionPBX all external traffic comes in on port 5080.  So this will capture all packets on the external interface.

If you want to capture all the packets on the internal interface that relate to extension 102 then use:
ngrep 102@ -W byline port 5060

Note that this captures to stdin ie. directly to your console.  To end the capture you press CTRL-C.  If you want to keep your capture you'll need to scroll back in your screen buffer and cut and paste the information and put it into a text file.  There may be another way to do this but I don't know about it.  If you know another way feel free to comment.

2 comments:

  1. sipgrep provides a nice CLI interface to ngrep.

    http://wiki.freeswitch.org/wiki/Packet_Capture#sipgrep

    ReplyDelete
  2. Please note that Asterisk and Freeswitch are competing platforms. However, both can use g729. That said, I haven't tried it with either as you have to buy a licence for g729 codecs (it isn't expensive) and as I didn't need it (the other codecs I used were fine) I didn't spend the money.

    ReplyDelete