Today I had to troubleshoot an issue with a voice vendor not processing keypresses for outbound call from Freeswitch, but only for a certain carrier (Smart). We have have two main carriers here in Philippines and the other is Globe where keypresses works just fine.

We needed to prove if it was our Freeswitch installation that’s misconfigured or was the vendor not handling this carrier properly. And there’s no better place than to see the SIP and RTP traffic coming from vendor whenever a keypress has been made. And we can use tcpdump command to do that:

tcpdump -nnp -w outbound-smart.pcap -i any -s 0 port 5060 or portrange 16384-32768

This will capture SIP and RTP traffic and write them to outbound-smart.pcap file. Note that 5060 is SIP port and 16384-32768 is for RTP. The next step is to load this on Wireshark and search for rtpevent, for Globe we received those events just fine:

image

But for Smart, there’s no RTP events received:

image

We could also confirm this by actually listening to the whole call, from Wireshark go to Telephony > RTP > RTP Streams. This will list RTP streams found in your pcap file, Select all and click Analyze > Play Streams then hit the play button. You should hear the phone ringing, call being answered and depending on your app, voice files being played.

image

From playing, should be able to tell the audible noise right when the user presses a key. For better inspection of the voice instead, on the form the Play Streams button, click Save > Audio then you can load the raw audio file to something like Audacity for convenience.