Voice Over Internet Protocol
Part One – How & Why?
Part Two – Why Linux
Part ONE
Voice Over IP is a new communication means that let you telephone with Internet at almost null cost. How this is possible, what systems are used, what is the standard, all is available these days if you google.
The past – More than 30 years ago Internet didn’t exist. Interactive communications were only made by telephone at PSTN line cost. Data exchange was expansive (for a long distance) and no one had been thinking to video interactions (there was only television that is not interactive, as known).
Yesterday – Few years ago we saw appearing some interesting things: PCs to large masses, new technologies to communicate like cellular phones and finally the great net: Internet; people begun to communicate with new services like email, chat, etc. and business reborned with the web allowing people buy with a “click”.
Today – Today we can see a real revolution in communication world: everybody begins to use PCs and Internet for job and free time to communicate each other, to exchange data (like images, sounds, documents) and, sometimes, to talk each other using applications like Netmeeting or Internet Phone. Particularly starts to diffusing a common idea that could be the future and that can allow real-time vocal communication: VoIP.
The future – We cannot know what is the future, but we can try to image it with many computers, Internet almost everywhere at high speed and people talking (audio and video) in a real time fashion. We only need to know what will be the means to do this: UMTS, VoIP (with video extension) or other? Anyway we can notice that Internet has grown very much in the last years, it is free (at least as international means) and could be the right communication media for future.
Overview
What is VoIP?
VoIP stands for ‘V’oice ‘o’ver ‘I’nternet ‘P’rotocol. As the term says VoIP tries to let go voice (mainly human) through IP packets and, in definitive through Internet. VoIP can use accelerating hardware to achieve this purpose and can also be used in a PC environment.
How does it work?
Many years ago we discovered that sending a signal to a remote destination could have be done also in a digital fashion: before sending it we have to digitalize it with an ADC (analog to digital converter), transmit it, and at the end transform it again in analog format with DAC (digital to analog converter) to use it.
VoIP works like that, digitalizing voice in data packets, sending them and reconverting them in voice at destination.
Digital format can be better controlled: we can compress it, route it, convert it to a new better format, and so on; also we saw that digital signal is more noise tolerant than the analog one (see GSM vs TACS).
TCP/IP networks are made of IP packets containing a header (to control communication) and a payload to transport data: VoIP use it to go across the network and come to destination.
Voice (source) – - ADC – - – - Internet – - – DAC – - Voice (dest)
What is the advantages using VoIP rather PSTN?
When you are using PSTN line, you typically pay for time used to a PSTN line manager company: more time you stay at phone and more you’ll pay. In addition you couldn’t talk with other that one person at a time.
In opposite with VoIP mechanism you can talk all the time with every person you want (the needed is that other person is also connected to Internet at the same time), as far as you want (money independent) and, in addition, you can talk with many people at the same time.
If you’re still not persuaded you can consider that, at the same time, you can exchange data with people are you talking with, sending images, graphs and videos.
Then, why everybody doesn’t use it yet?
Unfortunately we have to report some problem with the integration between VoIP architecture and Internet. As you can easy imagine, voice data communication must be a real time stream (you couldn’t speak, wait for many seconds, then hear other side answering): this is in contrast with the Internet heterogeneous architecture that can be made of many routers (machines that route packets), about 20-30 or more and can have a very high round trip time (RTT), so we need to modify something to get it properly working.
In next sections we’ll try to understand how to solve this great problem. In general we know that is very difficult to guarantee a bandwidth in Internet for VoIP application. The comprehensive understanding of the architecture requires not only tons of pages but patience to read as well – and that is beyond the scope of this article.
Requirement
Hardware requirement
To create a little VoIP system you need the following hardware:
- PC 386 or more
- Sound card, full duplex capable
- A network card or connection to internet or other kind of interface to allow communication between 2 PCs
- All that has to be present twice to simulate a standard communication.The tools above are the minimal requirement for a VoIP connection: next we’ll see that we should (and in Internet we must) use more hardware to do the same in a real situation. Sound card has to be full duplex unless we couldn’t hear anything while speaking!As additional you can use hardware cardsable to manage data stream in a compressed format.
Hardware accelerating cards
We can use special cards with hardware accelerating capability readily available in the market.
Quicknet PhoneJack is a sound card that can use standard algorithms to compress audio stream like G723.1 down to 4.1 Kbps rate. It can be connected directly to a phone (POTS port) or a couple mic-speaker. It has a ISA or PCI connector bus. It works like PhoneJack with some addition features
Hardware gateway cards
Quicknet LineJack and VoiceTronix cards can be connected to a PSTN line allowing VoIP gateway feature.
Then you’ll need a software to manage it.
Software requirement
Under Linux we have free software GnomeMeeting, a clone of Microsoft Netmeeting, while in console mode we use (also free software) applications from OpenH323 web site: simph323 or ohphone that can also work with Quicknet accelerating hardware.
Gateway software
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.
Gatekeeper software
You can choose as gatekeeper: Opengatekeeper, you can download from opengatekeeper web site for Linux and Win9x. Openh323 Gatekeeper (GK) from here.
Cards setup
Here we see how to configure special hardware card in Linux and Windows environment.
Quicknet PhoneJack
As we saw, Quicknet Phonejack is a sound card with VoIP accelerating capability. It supports: 711 normal and mu/A-law, G.728-9, G.723.1 (TrueSpeech) and LPC10. Phone connector (to allow calling directly from your phone) or Mic & speaker jacks. Quicknet PhoneJack is a ISA (or PCI) card to install into your Pc box. It can work without an IRQ.
Software installation
Under Windows you have to install:
Card driver
Internet Switchboard application (working only with Internet, using newer Quicknet cards) 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:
Enter an asterisk, then type an IP number (with asterisks in place of dot) with a # in the end 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.
Or 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. In place of Internet Switchboard you can use openh323 application openphone (using GUI) or ohphone (command line).
Under Linux you have to install:
- 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.
- Application openphone or ohphone.
- If you are a developer you can use SDK to create your own application (also for Windows).
- Settings
With Internet Switchboard (and with other application) you can:
- Change compression algorithm preferred
- Tune jitter delay
- Adjust volume
- Adjust echo cancellation level.
VoiceTronix products
- First download software here
- Untar it
- Modify ’src/vpbreglinux.cpp’ according to file README
- type ‘make’
- type ‘make install’
- cd to src
- type ‘insmod vpb.o’
- retrieve (from console of from ‘dmesg’ output command) major number, say MAJOR
- type ‘mknod /dev/vpb0 c MAJOR 0′ where MAJOR is the above number
- cd to unittest and type ‘./echo’
- Follow README file for more help.
Setup
In this chapter we try to setup VoIP system, simple at first, then more and more complex.
Simple communication: IP to IP
A (Sound card) B (Sound card)
192.168.1.1 – – – 168.1.2
192.168.1.1 >->-> 192.168.1.2 (and viceversa.)
A and B should have:
- An application like Microsoft Netmeeting, Internet Switchboard, Openh323 (under Windows environment) or Ohphone, Gnomemeeting (under Linux), installed and properly configured.
- A network card or other kind of TCP/IP interface to talk each other.
- In this kind of view A can make a H323 call to B (if B has server side application active) using B IP address. Then B can answer to it if it wants. After accepting call, VoIP data packets start to flow.
7.2 Using names
Under Microsoft Windows a NetBIOS name can be used instead of an IP address.
A – – – B
192.168.1.1 – – – 192.168.1.2
John Alice
John calls Alice:
This is possible cause John call request to Alice is converted to IP calling by the NetBIOS protocol. The above 2 examples are very easy to implement but aren’t scalable.
In a more big view such as Internet it is impossible to use direct calling cause, usually, the callers don’t know the destination IP address. Furthermore NetBIOS naming feature cannot work cause it uses broadcast messages, which typically don’t pass ISP routers . You can also use DNS to solve name in IP address: for example you can call ‘’ box.domain.com‘’.
Internet calling using a WINS server
The NetBIOS name calling idea can be implemented also in a Internet environment, using a WINS server: NetBIOS clients can be configured to use a WINS server to resolve names. PCs using the same WINS server will be able to make direct calling between them. WINS server hasn’t very high performance cause it use NetBIOS feature and should only be used for joining few subnets.
ILS server
ILS is a kind of server which allows you to solve your name during an H323 calling: when you start VoIP application you first register to ILS server using a name, then everyone will be able to see you using that name (if he uses same Server ILS!).
A big problem: the masquering.
A problem of few IPs is commonly solved using the so called masquering (also NAT, network address translation): there is only 1 IP public address (that Internet can directly “see”), the others machines are “masqueraded” using all this IP.
A – - – - – - – - -| | – - – - – - – - – U1
B – - – - – - – - -| | – - – - – - – - – U2
D – - – - – - – - -|>>> – - – C – - – - – – | – - – - – - – - – U3
E – - – - – - – - -| | – - – - – - – - – U4
F – - – - – - – - -| | – - – - – - – - – U5
This doesn’t work
In the example A,B up to F can navigate, pinging, using mail and news services with Internet people, but they CANNOT make a VoIP call. This because H323 protocol send IP address at application level, so the answer will never arrive to source (that is using any private IP address).
Solutions:
There is a Linux module that modifies H323 packets avoiding this problem. You can download the module here. To install it you have to copy it to source directory specified, modify Makefile and go compiling and installing module with “modprobe ip_masq_h323″.
Gnomemeeting
Gnomemeeting is an application using GUI interface to make call using VoIP. It is very simple to use and allows you to use ILS server, chat and other things.
Setting up a gatekeeper
You can also experiment gatekeeper feature
Example
(Terminal H323) A – - -
\
(Terminal H323) B – - – D (Gatekeeper)
/
(Terminal H323) C – - -
Gatekeeper configuration
Hosts A,B and C have gatekeeper setting to point to D. At start time each host tells D own address and own name (also with aliases) which could be used by a caller to reach it.
When a terminal asks D for an host, D answers with right IP address, so communication can be established. We have to notice that the Gatekeeper is able only to solve name in IP address, it couldn’t join hosts that aren’t reachable each other (at IP level), in other words it couldn’t act as a NAT router.
You can find gatekeeper code here: openh323 library is also required. Program has only to be launch with -d (as daemon) or -x (execute) parameter. In addition you can use a config file (.ini) you find here.
Setting up a gateway 1
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 site we download:
- Driver for Linejack
- 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.
Communications using PSTN line
Overview – VoIP becomes very interesting when you start to use PSTN lines to call other people in the world, directly to their home telephone.
Scenario
A typical application is like that:
Calling Home — (PSTN) – PC-1 — (Internet) – PC-2 — (PSTN) – Called Home
Home Telephone1 make calls to PC1 phone number (using PSTN line, I mean classic traditional hard telephone line). PC1 answer to it. Home telephone1 must tell PC1 what gateway use (PC2 in this case) by giving the IP address (from DTMF keyboard) and/or what number call (in this case Home telephone2). After that PC1 will start to make an H323 call to PC2, then it will pass Home telephone2 to PC2 to make it call it throught PSTN line. Home telephone2 answers to call and communication between Home telephone1 and Home telephone2 begins.
What can be changed in this configuration?
You may use a PBX to select many lines to access many PC1 gateway (for example one to call within your state, one to go accross Europe, and so on…): typically you don’t have to change this, cause cost is always the same. You can select (after called your PC1 gateway) every PC2 you want (for example a PC2 living in England to call an English person so that you’d pay only intra-country costs). So your decision will be taken considering PSTN line costs. In fact what VoIP does is the convert this:
Bandwidth consideration
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 a 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.
PART TWO
In the last but not the least as ever; WHY Linux?
Building this kind of network has pretty more advantages over older tradition PSTN network. The moment you think about building this network its already been 50% done. Surprised? Yes, because you already have an Ethernet network running among your corporate offices. All you need is to hookup some boxes and make your fingers dance on the keyboard.
Basic Features
Calls can be recorded, forwarded, conferenced, parked, call-waiting, voice-mail. It is MUST.
Hardware Cost
Cost is the First thing I would like to mention. The hardware you need for your traditional network is average 4 times costly than this VoIP network. PBX, Hard Phones, PSTN Lines and some hidden charges.
Distance cost
Call your friend in America at the same rate as you do to your Assistant sitting next door. No additional international charges.
Maintenance Cost
Monthly or Yearly cost is cut down by 75%. You can hire (although you need to hire more people) team of three instead of paying your venders.
No Contracts
Again! Enjoy the freedom of being out of the contract boundary
No Shipping Involved
Imagine! your main corporate building is based on 4 heavy private branch exchanges and one of them fries out in beginning of night when everybody has gone for the day. 25% of your employee will not be able to get through their clients, managers will not be able to locate their workers, customers will not be able to make their venders. The whole system is messed up for UNKOWN period of time because someone has just told you that new PBX will be shipped next day and will take 2 more days to reach and one day to be replaced. If you are Time conscious person, you can calculate hours.
No Stocking Needed
Well, if you are really very organized and far seeing person. You might have had two of your PBX in stock already depreciating them for nothing. You may NOT need them for may be years. And of course you bought them brand new and spent money on them.
Linux Loves Crap
You can put your VoIP server right from 386 piece of crap to Sharp Blade Server in production depending upon the need. Linux can easily manage older hardware instead of throwing them out the window.
Clustering feature
You can make a cluster of your heavily used servers for your back-log, tracking, and recorded calls for immediate availability in no minute reducing down time to 00.001 Percent.
Log saving/recording
Calls can be recorded for a customer amount of time and can be stored in dataware house for future referral.
Reliable
Linux is extremely reliable OS among the race in the market. Its global Truth.
Unlimited extension lines
Older telephonic systems had some limitations in number of extensions being distributed. Not every needy person could have an extension at his desk. Using VoIP you can hook as many extensions as you need and want without further investment.
Old / New Hardware Compatibility
Target is transparent from the caller. He could be over IP Phone, PC Phone, Cordless Phone or even Cell Phone.
Easily Availability
Requirement is easily available in the market at a very low comparative cost.
Highly Customizable
Can be extremely customized upon your need using a number of techniques and scripts.
Easy to change on finger tips
Configuration can be changed in seconds. For example greetings, recordings, IVR, promos, holds, seasonal messages, marketing tools, company introduction, upcoming events. Etc.
Overhead billing cost
You can save a huge amount from PSTN line long distance bills as well as maintenance charges.
Cable Structure
No Separate RJ-11 Cable structure is required.
These are theoretical facts and figures. Once you see it, you’re gona believe it
Ooopps.. looks my dialup is dropped
… connecting again !!!!!!!!!!


