Press "Enter" to skip to content

Day: October 24, 2008

Tapping VoIP (aka Decoding ITU-T G.711 µ-law)

Screenshot of Wireshark decoding a RTP stream using ITU-T G .711 µ-law compression.

While setting up my Nokia E51 w/ VOIP I was informed that the communication between the handset and the server uses the ITU-T G.711 µ-law codec for the audio without any additional encryption, meaning that it is relatively easy to capture and listen in on. I’d never done a VOIP capture and decode, so I set set up a capture on the firewall (tcpdump -i gem0 -s 2000 -w file.cap host x.x.x.x) and grabbed a test phone call made to Danielle as she sat in the living room with some friends.

After opening the capture in Wireshark I used the basic built-in VOIP analysis tool to get the windows shown above. The main window is the capture and decode itself, another shows the one detected VoIP call and its details, and the third is a basic playback window replying the voice of the phone call. (Click on the image above or here for a full resolution copy of the screenshot.)

Using the RTP stream analysis stuff one is able to save out the audio as an .au file. I was running into some problems with this as one half of the conversation was padded by a few minutes of silence during export (a Wireshark bug, it seems), but the audio is still very much available. Both halves of the conversation were then brought it into Audacity, aligned, the level of the inbound (remote, Danielle) side was brought up a bit, and the audio was exported it as an MP3: voip_capture_sample.mp3.

This capture and decoding was easy for me to do because of the ready access to my own network and lack of encryption of the session. Getting another person’s calls is generally a bit more complicated. That said, imagine how easy it must be for a large government agency with a tremendous budget, amazing computing resources, and access to the backbones of the country’s telecommunications infrastructure.

Leave a Comment

SIP via Asterisk on Nokia E51

My current cell phone is a Nokia E51, one of Nokia’s more recent Symbian Series 60 cell phones. Beyond being a decent phone with a decent camera it also happens to do 802.11 wireless and be a SIP endpoint.

In short, this means that my cell phone can also be a VoIP client. Today, thanks to , my phone is working for making actual calls out via the public internet, into a server, then into the phone system.

Since there were a few quirks with getting this going I wanted to document the settings used in the phone for connecting to the Asterisk-based server.

First, make sure your phone has a valid wireless network connection available, which is done via Tools → Settings → Connection → Access points. Without a configured, functional AP your phone won’t be able to connect to the internet.

Now, to configure the phone itself, the following settings must be made:

Tools → Settings → Connection → SIP settings
Profile name: NameGoesHere
Service profile: IETF
Default access point: (Pick your access point from before.)
Public user name: sip:c0nsumer@sip.host.com
Use compression: No
Registration: Always on
Use security: No

Tools → Settings → Connection → SIP settings → Proxy server
Proxy server address: sip.host.com
Realm: asterisk
User name: c0nsumer
Password: PasswordGoesHere
Allow loose routing: Yes
Transport type: UDP
Port: 5060

Tools → Settings → Connection → SIP settings → Registrar server
Proxy server address: sip.host.com
Realm: asterisk
User name: c0nsumer
Password: PasswordGoesHere
Transport type: UDP
Port: 5060

Tools → Settings → Connection → Internet tel.
Create a profile with a name of your choice, then associate the SIP profile created earlier with this. This will set up one profile which can then be used to make calls across the network via VoIP.

After this, set your new NameGoesHere profile as the default via Tools → Settings → Connection → SIP settings → Options → Default profile.

With these settings your phone will always connect to the AP whenever it is found and register with the VoIP server. It will then be able to make and receive calls. Setting Registration to When needed makes the phone prompt before connecting to the AP and the SIP server when an attempt to dial an internet call is made. Inbound calls will not work in this case.

Leave a Comment