Skip to main content

Posts

Showing posts with the label PCAP

Dissecting traces with DTMF tones

I'm sure I belong to the large group of people who love to analyse network traces with tools like Wireshark. Being able to see the details of a packet or datagram down to the level of the bits is not only extremely useful, but also fascinating. Time ago I wrote a dissector for Wireshark, using the Lua interface, and that was fun (I see it's still available here ). The official recommendation  is to use Lua only for prototyping and testing, but when performances are not key and there isn't the intent to add the dissector to the official distribution, it's fast and effective. In order to parse network traces with audio and extract it into the payload first, and then decode it into a WAV file, C is a viable solution. I wrote about a program that does that here and since it attracted some attention and feedback I wrote an updated version later . More recently I wanted to identify programmatically the presence (and value) of DTMF tones - as RTP Events, RFC 2833 - in network ...

Around sipp with pcap and authentication support

This is just a practical guide to have latest sipp on debian , to benefit from features that are not available in the stock package ( sip-tester  - version 3.2.1). For example support for playing pcap files or computing authentication hashes. Build sipp with pcap support apt-get install autoconf libncurses5-dev libpcap-dev g++ cd /usr/local/src/ git clone https://github.com/SIPp/sipp.git cd sipp/ ./build.sh --with-pcap ./sipp is the built binary. You can see the version and capabilities with './sipp -v', e.g.: $ ./sipp -v SIPp v3.6-dev-149-gb95f98f-PCAP-RTPSTREAM. ... This version will be able to use actions like exec rtp_stream="file.wav" or exec play_pcap_audio="pcap/g711a.pcap" (see details in current documentation ). A little caveat for 'rtp_stream' and WAV files . As the documentation says sipp expects a WAV file encoded with PCAM ('A-law'). You can also loop that audio for as long as you need, by adding '...

VoIP calls encoded with SILK: from RTP to WAV, update

Three and a half years ago (which really sounds like a lot of time!) I was working with a VoIP infrastructure using SILK . As it often happens to server-side developers/integrators, you have to prove whether the audio provided by a client or to a client is correctly encoded :-) Wireshark is able to decode, and play, G.711 streams, but not SILK (or Opus - more on this later). So I thought of having my own tool handy, to generate a WAV file for a PCAP with RTP carrying SILK frames. The first part requires extracting the SILK payload and writing it down into a bistream file. Then you have to decode the audio using the SILK SDK decoder, to get a raw audio file. From there to a WAV file it is very easy. As I tried to describe in this previous post , I had to reverse engineer the test files contained in the SDK, to see what a SILK file looked like. Since the SILK payload is not constant, all that was needed was to insert 2 Bytes with the length of the following SILK frame. At the be...