VoIP Howto

v1.7, August 7, 2002


Table of Contents

1. Introduction
1.1. Introduction
1.2. Copyright
1.3. Translations
1.4. Credits
2. Background
2.1. The past
2.2. Yesterday
2.3. Today
2.4. The future
3. Overview
3.1. What is VoIP?
3.2. How does it work?
3.3. What is the advantages using VoIP rather PSTN?
3.4. Then, why everybody doesn't use it yet?
4. Technical info about VoIP
4.1. Overview on a VoIP connection
4.2. Analog to Digital Conversion
4.3. Compression Algorithms
4.4. RTP Real Time Transport Protocol
4.5. RSVP
4.6. Quality of Service (QoS)
4.7. H323 Signaling Protocol
5. Requirement
5.1. Hardware requirement
5.2. Hardware accelerating cards
5.3. Hardware gateway cards
5.4. Software requirement
5.5. Gateway software
5.6. Gatekeeper software
5.7. Other software
6. Cards setup
6.1. Quicknet PhoneJack
6.2. Quicknet LineJack
6.3. VoiceTronix products
7. Setup
7.1. Simple communication: IP to IP
7.2. Using names
7.3. Internet calling using a WINS server
7.4. ILS server
7.5. A big problem: the masquering.
7.6. Open Source applications
7.7. Setting up a gatekeeper
7.8. Setting up a gateway
7.9. Compatibility Matrix
8. Communications using PSTN line
8.1. Overview
8.2. Scenario
8.3. What can be changed in this configuration?
9. Bandwidth consideration
10. Glossary
11. Useful links
11.1. Open software link
11.2. Commercial link

Thanks to Fatamorgana Computersfor hardware equipment and experimental opportunity.

Thanks to Linux Documentation Projectfor publishing and uploading my document in a very quickly fashion.

Thanks to David Pricefor his support.

Here we see some important info about VoIP, needed to understand it.

Now we have the raw data and we want to encapsulate it into TCP/IP stack. We follow the structure:

VoIP data packets
     RTP
     UDP
     IP  
   I,II layers

VoIP data packets live in RTP (Real-Time Transport Protocol) packets which are inside UDP-IP packets.

Firstly, VoIP doesn't use TCP because it is too heavy for real time applications, so instead a UDP (datagram) is used.

Secondly, UDP has no control over the order in which packets arrive at the destination or how long it takes them to get there (datagram concept). Both of these are very important to overall voice quality (how well you can understand what the other person is saying) and conversation quality (how easy it is to carry out a conversation). RTP solves the problem enabling the receiver to put the packets back into the correct order and not wait too long for packets that have either lost their way or are taking too long to arrive (we don't need every single voice packet, but we need a continuous flow of many of them and ordered).

                Real Time Transport Protocol
 0                   1                   2                   3 
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|V=2|P|X| CC  |M|      PT       |        sequence number        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         timestamp                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            synchronization source (SSRC) identifier           |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
|             contributing source (CSRC) identifiers            |
|                              ....                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Where:

For a complete description of RTP protocol and all its applications see relative RFCs 1889and 1890.

We said many times that VoIP applications require a real-time data streaming cause we expect an interactive data voice exchange.

Unfortunately, TCP/IP cannot guarantee this kind of purpose, it just make a "best effort" to do it. So we need to introduce tricks and policies that could manage the packet flow in EVERY router we cross.

So here are:

For an exhaustive information about QoS see Differentiated Servicesat IETF.

We can choose what O.S. to use:

Under Win9x we have Microsoft Netmeeting, Internet Phone, DialPad or others or Internet Switchboard (from Quicknet web site) for Quicknet cards.

Warning!!: Latest Quicknet cards using Swithboard (older version too) NEED to be connected to Internet to get working for managing Microtelco account (not free of charge), so if you plan to remain isolated from Internet you need to install OpenH323 software.

For VoiceTronix cards you can find software at VoiceTronix web site

Under Linux we have free software GnomeMeeting, a clone of Microsoft Netmeeting, while in console mode we use (also free software) applications from OpenH323web site: simph323 or ohphone that can also work with Quicknet accelerating hardware.

Attention: all Openh323 source code has to be compiled in a user directory (if not it is necessary to change some environment variable). You are warned that compiling time could be very high and you could need a lot of RAM to make it in a decent time.

To manage gateway feature (join TCP/IP VoIP to PSTN lines) you need some kind of software like this:

  • Internet SwitchBoard(only when connected to Internet) for Windows systems also acting as a h323 terminal;

  • PSTNGw for Linux and Windows systems you download from OpenH323.

Here we see how to configure special hardware card in Linux and Windows environment.

As we saw, Quicknet Phonejack is a sound card with VoIP accelerating capability. It supports:

Quicknet PhoneJack is a ISA (or PCI) card to install into your Pc box. It can work without an IRQ.

Under Windows you have to install:

all downloadable from Quicknet web site

After Switchboard has been installed, you need to register to Quicknet to obtain full capability of your card.

When you pick up the phone Internet Switchboard wakes up and waits for your calling number (directly entered from your phone), you can:

  1. enter an asterisk, then type an IP number (with asterisks in place of dot) with a # in the end

  2. type directly a PSTN phone number (with international prefix) to call a classic phone user. In this case you need a registration to a gateway manager to which pay for time.

  3. enter directly a quick dial number (up to 2 digits) you have previously stored which make a call (IP or PSTN).

Internet Swichboard is h323 compatible, so if you can use, for example, Microsoft Netmeeting at the other end to talk.

Warning!! Internet Switchboard NEED to be connected to Internet when used with newer Quicknet cards

In place of Internet Switchboard you can use openh323 application openphone(using GUI) or ohphone(command line).

Under Linux you have to install:

  1. Card driver, from Quicknet web site. After downloaded you have to compile it (you must have a /usr/src/linux soft or hard link to your Linux source directory): type make for instructions.

  2. Application openphoneor ohphone.

  3. If you are a developer you can use SDKto create your own application (also for Windows).

This card is very similar to the previous, it supports also gateway feature.

We only notice that we have to downloadPSTNGx application (for Linux and Windows) or we use Internet Switchboard to gateway feature.

  1. First download software here

  2. Untar it

  3. Modify 'src/vpbreglinux.cpp' according to file README

  4. type 'make'

  5. type 'make install'

  6. cd to src

  7. type 'insmod vpb.o'

  8. retrieve (from console of from 'dmesg' output command) major number, say MAJOR

  9. type 'mknod /dev/vpb0 c MAJOR 0' where MAJOR is the above number

  10. cd to unittest and type './echo'

Follow README file for more help.

I personally haven't tested VoiceTronix products so please contact VoiceTronix web sitefor support.

In this chapter we try to setup VoIP system, simple at first, then more and more complex.

As we said, gateway is an entity that can join VoIP to PSTN lines allowing us to made call from Internet to a classic telephone. So, in addition, we need a card that could manage PSTN lines: Quicknet LineJack does it.

From OpenH323 web sitewe download:

  1. driver for Linejack

  2. PSTNGw application to create our gateway.

If executable doesn't work you need to download source code and openh323 library, then install all in a home user directory.

After that you only need to launch PSTNGw to start your H323 gateway.

First Matrix refers to:

 _____________________________________________________________________________________________________________________
|            | Netmeeting |SwitchBoard | Simph323   |  OhPhone   |  LinPhone   |Speak-Freely|HW PhoneJACK|HW LineJACK |
|____________|____________|____________|____________|____________|_____________|____________|____________|____________|
| Netmeeting |      V           V            V            V             X            X             V           V
|____________|____________|____________|____________|____________|_____________|____________|____________|____________|
|SwitchBoard |      V           V            V            V             X            X             V           V
|____________|____________|____________|____________|____________|_____________|____________|____________|____________|
| Simph323   |      V           V            V            V             X            X             X           X
|____________|____________|____________|____________|____________|_____________|____________|____________|____________|
| OhPhone    |      V           V            V            V             X            X             V           V
|____________|____________|____________|____________|____________|_____________|____________|____________|____________|
| LinPhone   |      X           X            X            X             V            X             X           X
|____________|____________|____________|____________|____________|_____________|____________|____________|____________|
|SpeakFreely |      X           X            X            X             X            V             X           X
|____________|____________|____________|____________|____________|_____________|____________|____________|____________|
|HW PhoneJACK|      V           V            X            V             X            X             _           _
|____________|____________|____________|____________|____________|_____________|____________|____________|____________|
|HW LineJACK |      V           V            X            V             X            X             _           _
|____________|____________|____________|____________|____________|_____________|____________|____________|____________|

Second Matrix refers to Gateway softwares that manage LineJACK card.

___________________________________________________________
|              |HW LineJACK GW| SwitchBoard  |   PSTNGW     |
|______________|______________|______________|______________|
|HW LineJACK GW|      _       |       V      |       V      |
|______________|______________|______________|______________|
| SwitchBoard  |      V       |       _      |       _      |
|______________|______________|______________|______________|
|   PSTNGW     |      V       |       _      |       _      |
|______________|______________|______________|______________|

Notation:

  • V : Works

  • X : Doesn't Work

  • -- : Doesn't care

From all we said before we noticed that we still have not solved problems about bandwidth, how to create a real time streaming of data.

We know we couldn't find a solution unless we enable a right real-time manager protocol in each router we cross, so what do we can do?

First we try to use a very (as more as possible) high rate compression algorithms (like LPC10 which only consumes a 2.5 kbps bandwidth, about 313 bytes/s).

Then we starts classify our packets, in TOS field, with the most high priority level, so every router help us having urgently.

Important: all that is not sufficient to guarantee our conversation would always be ok, but without an great infrastructure managing shaping, bandwidth reservation and so on, it is not possible to do it, TCP/IP is not a real time protocol.

A possible solution could be starts with little WAN at guaranteed bandwidth and get larger step by step.

We finally have to notice a thing: also the so called guaranteed services like PSTN line could not manage all clients they have: for example a GSM call is not able to manage more that some hundred or some thousand of clients.

Anyway for a starting service, limited to few users, VoIP can be a valid alternative to classic PSTN service.

PSTN: Public Switched Telephone Network

VoIP: Voice over Internet Protocol

LAN: Local Area Network

WAN: Wide Area Network

TOS: Type Of Service

ISP: Internet Service Provider

RTP: Real Time Protocol

RSVP: ReSerVation Protocol

QoS: Quality of Service