Internet telephony with KPhone

Desktop Dialing


Internet telephony does not need to be complicated. You can talk to the world with just Kphone, a normal sound card, and an account with an Internet phone provider.

By Mirko Dölle

KDE's Kphone program, which Suse Linux and other distributions have recently started to include, is a simple telephony application for Linux. Kphone serves as a handy desktop tool for Voice over IP connections.

You'll find that Kphone is very easy to configure. As you can see in Figure 1, the program prompts you for a few details when you launch it: in fact, you only need to specify the User Part of SIP URL and the Host Part of SIP URL. The Outbound Proxy is only required for extremely restrictive firewalls to allow outgoing connections. To be on the safe side, you might like to specify the proxy server for your first experiments, but try to do without a proxy later.

Figure 1: KPhone does not need much information when you first launch it, but you do need to specify the user and host parts of the SIP URL.

The q-value specifies the quality of the connection. KPhone sets the quality dynamically if this field is empty. Reducing the quality manually will also reduce the bandwidth that KPhone needs, but most users can live with the defaults.

Insecure Password

After entering the data, you might like to press the Register button to tell KPhone to establish a connection to your provider. Automatic registration also makes sense: after all, people can only call you via your Internet phone while the connection is up.

KPhone always asks you for a password when you register: this is the password that your SIP provider gave you. Of course, you can store the password, but you should be aware of the dangers, as your password will be stored in clear text in your KPhone configuration file, and the file is world-readable. There is no way of changing this either, as KPhone rewrites the configuration file each time you quit the program and sets the permissions to world-readable. One workaround is to give the chmod 700 ~/.qt command to restrict access to the QT configuration directory - this protects the configuration file with your KPhone password, but still allows the system administrator to view it.

Depending on your DSL router configuration, you may also need a STUN server to be able to place and receive calls with KPhone. The computer may not be able to identify the public IP address and port the router uses for VoIP connections. In this case, the client queries the STUN server, which gives the client the IP address and port, allowing the client to pass the correct data to the call target on placing a call.

Click the Socket tab in the Preferences-SIP Preferences-TAB Socket to set this up Figure 2). Enter the name and port for your provider's STUN server in the STUN Server line. You need to change the Use STUN server option to Yes in the same tab. The same rule applies here as with using a proxy. You are better off with a STUN server for your first experiments, but try to do without it later.

Figure 2: Configuring the STUN server and other socket settings.

You will definitely need to modify your firewall configuration to allow KPhone to talk to the outside world and receive calls. For example, KPhone will always need ports 5004, 5060, and 10000 for UDP packets. And you will also need to allow UDP ports 61000 through 61099 for the STUN server.


STUN: Simple Traversal of UDP over NATs. A protocol that allows devices behind a firewall to receive data from the Internet without having to change the firewall or router settings.

First Call

KPhone is easy to use. In the simplest of all cases, just type the target SIP URL, or a landline number and area code, in the text box next to the phone icon in the main window of KPhone. If you prefer, you can click on the phone icon first. This tells KPhone to open the dial window, where you are prompted to enter a phone number or SIP URL. Click on the camera symbol for a video call.

Whether or not you can call landline subscribers via VoIP depends on your provider. Some providers require you to prepay, and until you do, you can only place calls within the VoIP network or to a VoIP phone network connected to it. On the other hand, calls from PST networks to the VoIP phone can be placed without prepaying and for free. That is, at least, you don't need to pay: the caller will be charged normal rates for the area where your landline is located, no matter where you happen to be right now.

Strict rules apply for how Internet telephony service providers assign landline numbers. You can't just have a number with the London area code if you live, say, in Munich. Most providers will give you a number that uses the area code for your billing address.

Emergency call forwarding is also based on the address you specified as your home zone or billing address. As Internet telephony is possible from anywhere in the world, it might take your local rescue services a long time to forward your emergency call to the right place in an emergency situation. The procedure for mobile phones and landlines makes more sense and will always route emergency calls to the rescue services responsible for the area in which the landline or mobile phone cell is located.

Proprietary Phone Book

KPhone has its own phone book, which is not compatible with any known addressbook format and is stored in the central ~/.qt/kphonerc configuration file. The phone book is easy to use. Select Preferences | Phone book to open the editor, where you can assign one or multiple phone numbers to each subscriber. KPhone displays a short form of the phone book entries in the main window below the phone number entry box. In fact, you only need to access the phone book window to enter new contact data; just double click the short entry in the main window.

Figure 3: Creating an entry for the Kphone phonebook.

If you just want to run KPhone to receive calls, it makes sense to iconize the KPhone window. KPhone pops up a new connection window for each incoming call and outputs a ring tone via your sound card or the PC speaker. One minor criticism is that you can't launch KPhone automatically as a service in the KDE panel - this would make it even easier to run KPhone in the background whenever you reboot.

INFO
[1] Kphone: http://www.wirlab.net/kphone/
THE AUTHOR

Mirko Dölle is the head of our Hardware Competence Center, and as such he tests more or less everything he can get his hands on - even if the lid is nailed down. On his leisure time, Mirko is the developer of the Ro-Resc miniature rescue distribution, and the co-author of the LinVDR distribution. On weekends, Mirko gives a new twist to alchemists' dream, and turns gold into lead...