Introduction to Voice over IP (Voip)
Voice over IP (Voip, pronounced voyp) is a technology that allows voice conversations to be conducted over the Internet (hence IP, for Internet Protocol) instead of the plain old telephone system (POTS).
Voice over IP isn't an especially new technology. People have been using software like Microsoft NetMeeting to chat using the Internet for several years, while Speak Freely – a pioneering piece of Voip software that has now largely fallen out of use – was first released in 1991. Many Internet users are already familiar with Voip technology thanks to the popularity of Skype. What makes Voip an interesting technology is that it is one that is set to revolutionize the way ordinary telephone conversations are conducted. Today, it is a toy for computer users to play with, but tomorrow everyone, even your grandmother, will be using it – even if they don't realize it, and even if they don't own a computer.
This article will explain how Voice over IP works, what distinguishes the different systems, and provide some technical background – with links you can follow up for greater detail if you are interested. If you are thinking about trying out Voip, this article will help you to decide which solution to use, and help you to understand what is going on in the background when you use it.
How Voip works
The basic principle of Voip is very simple. It's the same technology you have probably used already to listen to music over the Internet. Voice sounds are picked up by a microphone and digitized by the sound card. The sounds are then converted to a compressed form, compact enough to be sent in real time over the Internet, using a software driver called a codec. The term codec is short for "encoder/decoder". The sounds are encoded at the sending end, sent over the Internet and then decoded at the receiving end, where they are played back over the speakers. The only requirements are a connection between the two computers of an adequate speed, and matching codecs at each end.
To be usable, a Voip system also needs a method for establishing and managing a connection, for example, calling the other computer, finding out if they accept the call, and closing the connection when a user hangs up. Because Voip allows two way communication, and even conference calls, it's a lot more complicated than simple audio streaming. How calls are managed is the area in which Voip systems fundamentally differ, and two Voip users must be using the same system (or compatible ones) in order to be able to call each other.
Because most Internet users don't have a permanent Internet address (IP address, a number like 18.104.22.168 that uniquely identifies that computer, at that moment), Voip systems don't generally work by calling another computer direct – although that may be an option for those who do have a permanent address. Instead, each user of the service registers with an intermediate server, which maintains a record of their IP address all the time they are connected. An example of a Voip application that works this way is Picophone. The small size of the PicoPhone application file (about 64Kb, barely larger than Windows Notepad) demonstrates clearly that the basic principles of Voip are not complicated to implement.
Another reason for using an intermediate server is that it eases the problem of getting Voip to work through the firewalls that everyone uses these days. Many firewalls block any data from the Internet that is not sent in response to a specific request. This makes it impossible to call another computer direct. Because the called computer did not request any data from the caller, the call request would be blocked. By establishing a connection with a server, the Voip software opens a channel of communication through which other computers can call it. Communication may continue using the server, or information may be passed via the server that allows the two computers to open a direct connection between them and continue using that.
Although the basic requirements of a Voip system are quite simple, real-world implementations are quite complex. Voip systems in widespread use today fall into three groups: systems using the H.323 protocol, systems using the SIP protocol, and systems that use proprietary protocols.
H.323 is a standard for teleconferencing that was developed by the International Telecommunications Union (ITU). It supports full multimedia audio, video and data transmission between groups of two or more participants, and it is designed to support large networks. H.323 is network-independent: it can be used over networks using transport protocols other than TCP/IP. H.323 is still a very important protocol, but it has fallen out of use for consumer Voip products due to the fact that it is difficult to make it work through firewalls that are designed to protect computers running many different applications. It is a system best suited to large organizations that possess the technical skills to overcome these problems. As a solution for a home or small office telephony system it is best avoided.
SIP (for Session Initiation Protocol) is an Internet Engineering Task Force (IETF) standard signalling protocol for teleconferencing, telephony, presence and event notification and instant messaging. It provides a mechanism for setting up and managing connections, but not for transporting the audio or video data. It is probably now the most widely used protocol for managing Internet telephony. Like all IETF protocols, SIP is defined in a number of RFCs (Request For Comments – the standards documents that define Internet standard protocols) principally RFC 3261.
A SIP-based Voip implementation may send the encoded voice data over the network in a number of ways. Most implementations use Real-time Transport Protocol (RTP), which is defined in RFC 3550. Both SIP and RTP are implemented on UDP which, as a connectionless protocol, can cause difficulties with certain types of routers and firewalls. Usable SIP phones therefore also need to use STUN (for Simple Traversal of UDP over NAT), a protocol defined in RFC 3489 that allows a client behind a NAT router to find out its external IP address and the type of NAT device. Thanks to STUN, setting up SIP-based Voip hardware or software behind a home or small office firewall should be a simple affair, but in practise it can still be problematic.
There is little that can be said about proprietary Voip implementations such as Skype or Voipcheap, because little or no technical detail about them is published. However, one advantage of proprietary implementations is that they can be designed with the principal objective of being install-and-run on an end-user computer without any fiddling with firewall settings being required. The disadvantage is that these products will not inter-operate with anything else. This may not seem such a bad thing to users of Skype, with its millions of members, but it might be inconvenient in the future.
Codecs are software drivers that are used to encode the speech in a compact enough form that they can be sent in real time across the Internet using the bandwidth available. Codecs are not something that Voip users normally need to worry about, as the Voip clients at each end of the connection negotiate between them which one to use.
Voip software or hardware may give you the option to specify the codecs you prefer to use. This allows you to make a choice between voice quality and network bandwidth usage, which might be necessary if you want to allow multiple simultaneous calls to be held using an ordinary broadband connection. Your selection is unlikely to make any noticeable difference when talking to PSTN users, because the lowest bandwidth part of the connection will always limit the quality achievable, but Voip-to-Voip calls using a broadband Internet connection are capable of delivering much better quality than the plain old telephone system.
A broadband connection is desirable to use Voip, though it is certainly possible to use it over a dial-up modem connection if a low-bandwidth, low-fidelity codec is chosen. The table below lists some commonly used codecs.
|G.711||Pulse Code Modulation (PCM)||64||87.2|
|G.722||Adaptive Pulse Code Modulation (ADPCM)||48||66.8|
|G.726||Adaptive Differential Pulse Code Modulation (ADPCM)||32||55.2|
|G.728||Low-Delay Code Excited Linear Predication (LD-CELP)||16||31.5|
|iLBC||Internet Low Bitrate Coded (ILBC)||15||27.7|
|GSM||Regular Pulse Excited (RPE)||13||30.1|
|G.729a||Conjugate Structure Algebraic-Code Excited Linear Prediction (CS-CELP)||8||31.2|
The bit rate is an approximate indication of voice quality or fidelity, however it is only approximate. Codecs that use pulse code modulation all give high fidelity, and you will detect little or no difference between any of them. The G.728 codec will give much better quality than the only nominally lower rate GSM codec, because the algorithm it uses is much more sophisticated. However, the GSM codec uses less computing power, and so will run on simpler devices.
The bandwidth gives an indication of how much of the capacity of your broadband Internet connection will be consumed by each Voip call. The bandwidth usage is not directly proportional to the bit rate, and will depend on factors such as the protocol used. Each chunk of voice data is contained within a UDP packet with headers and other information. This adds a network overhead of some 15 - 25Kbit/s, more than doubling the bandwidth used in some cases. However, most Voip implementations use silence detection, so that no data at all is transmitted when nothing is being said.
Insufficient bandwidth can result in interruptions to the audio if Voip uses the same Internet connection as other users who may be downloading files or listening to music. For this reason, it is desirable to enable the Quality of Service "QoS" option in the TCP/IP Properties of any computer running a software Voip client, and to use a router with QoS support for your Internet connection. This will ensure that your Voip traffic will be guaranteed a slice of the available bandwidth so that call quality does not suffer due to other heavy Internet usage.
A Voip solution consists of an implementation and a service provider. As explained above, direct point-to-point communications aren't very easy to achieve in practise due to the intervention of firewalls and the fact that many users have a different IP address each time they connect to the Internet, so users need a server maintained by a third party to facilitate the task of making connections. In addition, many Voip users want facilities like PSTN numbers so that non-Voip users can call them, and the ability to call regular phone numbers. These things are part of the service offered. The availability and cost of these features, as well as the ease of installation and use of the Voip software or hardware, must be taken into account when choosing a Voip solution.
Top of the list for ease of installation and use are the proprietary solutions like Skype and Voipcheap. These products just work. However, they do not inter-operate with other services, so the benefit of free Voip-to-Voip calls will only be realized if all your friends and contacts are also using the same service. This may not be too limiting if you choose Skype, due to its widespread popularity. But before choosing it, consider the disadvantages of being locked in to a proprietary service which through its position of strength has no need to try to compete on services or pricing.
SIP-based services allow you to roll your own solution, if you have enough of a technical inclination to pick the right components. You can sign up to the service of your choice – one which offers the best rates for calling PSTN numbers, or the best range of services – and then choose your own SIP soft-phone or Voip hardware device. However, the number of providers currently available makes it hard to come to a decision, and getting it all to work can be a challenge.
If you need a simpler solution, then many SIP-based services like Sipgate can provide customized soft-phones or hardware devices preconfigured with your account details. This can provide a Skype-like install-and-go experience – as long as your firewall doesn't decide to interfere.
Many SIP-based services offer free sign-up. Some, like Sipgate or Gossiptel even provide a free PSTN number for incoming calls, though it may not be a local geographic number, and may be more expensive to call. Computer-to-computer calls are free, as are incoming calls from the POTS. You may even get the ability to call freephone numbers or make one-minute test calls without paying the service provider any money. It's worth seeking out a service like this, as it enables you to try out Voip to see whether it will work before making a commitment.
Many services allow you to pay as you go for outgoing calls by topping up your account to keep it in credit. Think twice before signing up with services that require you to pay a regular monthly fee. The cost can be as much as a regular line rental, and this doesn't make much sense unless you plan to get rid of your landline to offset the cost.
If you're thinking of dumping the landline, think again. The plain old telephone system may be low-tech, but it's reliable. A domestic broadband connection comes with no guarantee of availability, and can (and will) stop working from time to time. Voip service provider servers go offline now and again too. And none of your Voip equipment will work if you have a power cut. Few Voip services today support the ability to make emergency calls. If you switch completely to Voip, you'll have to rely on your mobile phone for emergency use.
If you already have a computer microphone, installing a software Voip phone and registering with a free service provider gives you an easy way to try Voip. But such a set-up is no replacement for a regular phone. Echo can be a problem if you use a microphone and speakers. You can buy USB handsets, but while these all work with Skype, compatibility with other soft-phone applications can be lacking.
For the serious Voip user the only solution is to buy hardware that allows you to connect a regular phone or DECT base station to your broadband connection. But this hardware is still quite expensive. It's only justifiable if you would otherwise need to pay for a second PSTN line.
Voip is an interesting technology that allows a lot of possibilities for the technically-inclined. Some people have installed the Asterisk open-source PBX software on an old computer running Linux, giving their family or business multiple lines using their ADSL broadband connection. But the regular telephone network, with it's built-in independent power supply, has reliability benefits that broadband-based Voip cannot match. And when working out the cost of your Voip system, don't forget the electricity that's used keeping that PC running 24/7.
Voip is a good way to get a cheap business line for a home-based business that's available during office hours only, or a cheap second line for use in the evening by young family members. For smaller businesses, Voip offers significant savings compared to the cost of multiple incoming lines and a PABX. But isn't a replacement for the POTS, and you should keep your landline for fallback and for emergency use.
In the future, it's likely that more calls made using regular telephones will be routed over the Internet. This should bring down the cost of overseas calls placed using regular phone companies (one of the main benefits of Voip at the moment.) Such benefits are already available from services like Call18866, which offers lower rates than many Voip services. So even now, you don't need a computer or special software or hardware to take advantage of Voip technology. Soon, we'll all be using Voip, without even realizing it.
- H.323 Information Site
- Understanding the H.323 Standard (Microsoft)
- SIP: Session Initiation Protocol home page
- RFC 3261 – SIP: Session Initiation Protocol
- RTP: Audio-Video Transport Working Group
- RFC 3550 - RTP: A Transport Protocol for Real-Time Applications
- RFC 3489 – STUN - Simple Traversal of User Datagram Protocol (UDP) Through Network Address Translators (NATs)
- Standard Speech Codecs - information