O'Reilly logo

Practical VoIP Using VOCAL by Luan Dang, Cullen Jennings, David Kelly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1. VOCAL: Say, What?

We wrote this book to find a new set of motivated individuals to take our software, twist it into something new, and create their own important breakthroughs. Are you driven by the desire to discover how things work and the challenge to make them work better? If so, this book is for you.

What’s This All About?

This book, along with the http://Vovida.org web site (http://www.vovida.org), provides tools and knowledge to help you build a phone system, find out how it works, and then tinker with it to make it better. The source code and suggested operating system, Linux, are both open source. You can look “under the hood” down to the base code and protocol stack levels and discover not only how the system works, but also how common problems are being worked out in the development environment. We’re hoping that you will be inspired to take this system to another level by implementing a feature or functionality that nobody has ever thought about before.

Maybe you have already devoted your professional career to the telecom field and have suffered through the glacial pace of change that characterizes the Public Switched Telephone Network (PSTN). Here is your opportunity to try out an idea that you can demonstrate after a few days of coding. Maybe you work as a software developer in another sector and have a new idea that would normally be discredited by telecom professionals. Here is your opportunity to prove them wrong. Maybe you have a general interest in technology and thought it would be cool to play around with Voice over IP (VoIP). Our invitation to you, to tinker with this system, is as sincere and open as it is to the professionals.

The software described in this book, the Vovida Open Communication Application Library (VOCAL), is not just another Internet Protocol (IP) softphone that connects to others over the Internet, but a full-blown system complete with call control, operations service support, and features. This system is scalable and limited only by the quantity and quality of the computing hardware and network resources at your disposal.

VOCAL is the software that enables a core network to support VoIP . On a scaled-down, single host in our lab, VOCAL has successfully supported more than 40 calls per second (cps), which translates into supporting about 72,000[2] users, depending on the available memory and the users’ calling frequency. On a distributed network of 31 computers, this same software, downloaded from our community web site, http://www.vovida.org, can support up to 500 cps,[3] which roughly translates into 900,000 users. If you consider that the type of computer used to achieve these results can be purchased for less than $500 per unit (at a retail store in the United States at the end of 2001), you can see that, even with some additional fixed and variable business costs, the per-user cost of running a phone system with VOCAL is pretty attractive.

Voice over IP

For years, software has been available for making “free” long-distance calls between workstations over the Internet. The early versions of this software provided poor quality, but users were willing to suffer packet loss, jitter , and latency in return for bypassing normal long-distance toll charges. Today, users can choose from a large variety of VoIP software packages. Improvements in bandwidth and the processing speeds of home PCs have enabled practical conversations through VoIP devices.

In North America and Europe, the novelty of “free” long-distance calling has withered away with the reduction of toll charges from the major telecom carriers. For example, in the United States, cell phone providers are presently bundling free long-distance calling with their regular services. By itself, a perceived advantage in long-distance charges will not be enough to convince individuals and organizations in these countries to replace their traditional phone systems with IP-based systems. The current belief being expounded by the pundits is that before IP phone systems become widely accepted in developed markets, they are going to require advanced, integrated features of the type that are practically impossible to implement in traditional private branch exchanges (PBXs) and central offices (COs) .

In other regions of the globe, the intersection of costs and features will play an important role in the adoption of VoIP. Some areas suffer from both crippling poverty and extravagant import duties imposed on communication equipment. In these countries, there are service providers who will do everything possible to bring low-cost systems into their market space. In others areas, landlines may be scarce, but capital and technical expertise are available to build new phone systems. Many of these new ventures are looking toward VoIP as a flexible solution that enables deploying phone services to millions of subscribers quickly.

The nature of VoIP, also known as packet telephony, permits the type of advanced features that will win over new users. As anyone who uses the World Wide Web knows, packets running over an IP network can deliver text, pictures, and audio and video content. The PC is becoming a redundant tool for Internet access with the advent of personal digital assistants (PDAs) , cell phones, and other portable devices that provide access to email and other web content. Unlike the PSTN, the Internet is decentralized and permits smart endpoints. Someday, the concept of making a phone call may become obsolete by the concept of simply being in touch with people through a variety of smart IP-based devices.

Advances in packet telephony could also lead to new forms of virtual offices that would seem alien to our current telecommuting practices. Our descendants could know an enhanced mode of long-distance communication in which body language, along with the other 90% of communication that is lost over audio-only devices, is transmitted and received intact. This could make face-to-face meetings a rare novelty. What this might do to city planning, traffic jams, and, indeed, our lifestyles is a worthy subject for another book.

Where do you get the ideas to build this new world? Here’s a hint: you don’t get them from the “martini lunch” crowd down at the golf club. You get them from insightful individuals who are inspired to think outside of the box. These are the pioneers: people like Linus Torvalds who wrote a new operating system called Linux that can run on home PCs and compete with Microsoft Windows for market share, and Richard Stallman who created the recursively named GNU’s Not Unix (GNU) open source license, also known as a copyleft agreement, that defines the legal basis for many open source projects. Already, VoIP has benefited from the insightful contributions of legions of developers, and we’re hoping that we can recruit you to help us take this development further.

Open Source

Open source is a large topic, covered in a number of books, such as O’Reilly’s Open Sources: Voices from the Open Source Revolution. The concept behind open source software has been around a lot longer than the notion of proprietary intellectual property. One widely touted example is the common law, where the most brilliant lawyers in the country can make revolutionary arguments to the Supreme Court without retaining the rights to their content. Once these arguments have been presented in court, they become part of the public record and can be viewed and used by anyone.

Of the thousands of open source projects scattered throughout the Internet, a large number are end-user applications, utilities, and other small packages intended to run on a single host. Some of these projects began life as castoffs set adrift by software companies that were either unable or unwilling to continue supporting them. Others originated as skunkworks or bootleg projects, put together by professional developers and students in their spare time, which then grew in popularity through word of mouth. Some of these projects, such as the Linux operating system, the Apache web server, and VOCAL, acquired funding and support from the biggest companies in the industry. Today, if you were to visit the LinuxWorld (http://www.linuxworld.com) and ApacheCon (http://www.apachecon.com) trade shows, you would discover a whole world of open source development and its derivative products.

Anyone who has a late-model computer and access to the Internet can download most open source projects and try them out at home. What you’ll find with many of these projects is that they appear unfinished and not anything like the sleek, shrink-wrapped products that populate the shelves at your local computer software store. Indeed, most of these projects were never intended for home use. There is no 1-800 help line and no salesperson will call, mostly because there aren’t any salespeople on staff to follow up on the downloads. There are exceptions, such as Red Hat Linux (http://www.redhat.com), that provide user support, but as a rule, open source projects were intended to express ideas, to implement standards, and to provide building blocks for others to transform the code into hobby projects or commercial-grade solutions.

Many have asked what motivates developers to contribute to the open source movement. According to a study completed by Karim Lakhani and Eric von Hipple (http://web.mit.edu/evhippel/www/opensource.PDF), it is the satisfaction gained by solving problems along with signaling a sense of relevance to one’s peers that keeps these projects flourishing. Another important reason is that the code has been worked on and tested by hundreds of developers. These projects are robust and feature-rich, because those who have new ideas and the inclination to implement them have been welcomed with open arms. Developers who contribute to the open source VoIP space find themselves acting as catalysts for new ideas on the bleeding edge of the technology curve.

VOCAL

The V in VOCAL refers to the name of our Silicon Valley start-up, Vovida Networks, which existed as an independent company from its first day early in 1999 until its acquisition, by Cisco Systems, in November 2000. Vovida was a made-up name that combined the first two letters of the words voice, video, and data into a unique expression representing our aspiration toward building communication products and working with new technologies. Vovida was a good name for a startup company because it was distinctive, easy to say, and easy to remember. Vovida also sounds like the well-known cheese, “Velveeta,” which has led to endless cheese jokes. In fact, all of our projects have been code named after different cheeses.

VOCAL has an Open Source Initiative (OSI, http://www.opensource.org)-approved open source license that is similar to the license that governs the Berkeley Software Development (BSD) flavor of the Unix operating system. Unlike the GNU Public License, which requires code changes to remain open source, VOCAL’s license makes the code free: free of cost, free of obligation, and free of the copyright restrictions that govern proprietary software. If you want to take our code, change it, and build the changes into your own proprietary project, go for it! There are no port fees, no royalties due upon your production release, and no obligation to contribute your enhancements back to the common code base. The VOCAL code is open source with no strings attached.

The http://Vovida.org web site hosts VOCAL along with a variety of open source protocol stacks, applications, and other software projects that are available for downloading. By writing this book, we’re hoping to encourage more people to check out our software and improve their understanding of VoIP technology.

The business model

Whenever we discuss our work with friends, neighbors, and industry colleagues, the same question always arises: “What’s your business model: how do you make your money?” Currently, we are paid employees of Cisco Systems, Inc., which supports our work as part of a corporate strategy to accelerate the adoption of VoIP. http://Vovida.org is helping Cisco achieve that objective by providing open source software based on open communication standards.

One of the legacies of the Internet is its list of open standards expressed as requests for comments (RFCs) on the Internet Engineering Task Force (IETF )’s web site, http://www.ietf.org. To quote the IETF’s definition offered in RFC 2026 (http://www.ietf.org/rfc/rfc2026.txt):

In general, an Internet Standard is a specification that is stable and well-understood, is technically competent, has multiple, independent, and interoperable implementations with substantial operational experience, enjoys significant public support, and is recognizably useful in some or all parts of the Internet.

An example of a well-known Internet Standard is the Internet Protocol (RFC 791), which, combined with the Transmission Control Protocol (TCP, RFC 793 ), has become the de facto means for transmitting data between diverse systems. While some might argue that it is not as secure as other protocols, TCP/IP has gained a large install base through its simplicity and adherence to an open set of standards.

In general, open standards have enabled interoperability between equipment manufactured by partners and rivals to the benefit of all users. At Vovida, we incorporated open standards in communication both with outside devices and between the call control components found within the system. In addition, by open sourcing the code, we have enabled a community of developers to contribute their enhancements to the code base and potentially to the standard itself. Even though the developers in the community are not obliged to contribute anything back to the code base, a growing number have been sending us bug fixes, patches, applications and protocol stacks for the benefit of everyone. This has made working on VOCAL and http://Vovida.org truly gratifying.

We have set out to provide software that could be used by outside developers for a wide variety of implementations. Just as interoperability fueled the growth of TCP/IP, we required interoperability to fuel the growth of our community. Our success depended on building an interoperable system that had the ability to support not only equipment from a wide variety of vendors, but also, as you will see, equipment based upon several different communication protocols.

Gaining acceptance

How does a new company begin an open source project so that it can quickly gain a wide following? The first thing to consider is the machine type and operating system. When IBM introduced its PC in the early 1980s with off-the-shelf components, it set a standard for bringing the adoption curve forward so that the mainstream felt comfortable with grasping the technology while it was still relatively new. Nobody was going to be interested in a project that ran only on a platform that required a significant investment; we chose to work with standard, run-of-the-mill Intel-based PCs.

As for the operating system, our development team had two simple design goals from the outset of our project. First, we wanted a high-quality core platform, one that was reliable, scalable, and stable. Second, we needed it to be inexpensive to allow as many outside developers as possible to join our community. With this in mind, we immediately ruled out Microsoft Windows NT and all other “flavors” of Unix due to their prohibitive costs. We could have chosen FreeBSD, and while it would have met our core needs, we saw the increasing popularity of Linux as an attractive benefit to our project and, therefore, selected Linux as our initial development platform.

Using Linux as our development and product platform has been rewarding. Linux has proven itself to be an extremely stable platform for many mission-critical applications. We expect that many new VoIP applications will be built on top of Linux in coming years, since Linux not only provides an inexpensive, reliable, and stable platform for development, but also provides an excellent development environment with freely available tools.

As VOCAL has grown, it has been ported to additional platforms. In 2000, we ported VOCAL to Sun Solaris to support an early customer trial, and recently, some members of the community have reported success running VOCAL on FreeBSD. Version 1.3.0 of VOCAL also provides a Session Initiation Protocol (SIP) stack that runs on Microsoft Windows 2000 .

The following sections briefly describe the VoIP signaling protocols and the architecture of VOCAL. If you prefer, you can skip ahead to Chapter 2 and begin your installation without reading the rest of this chapter. However, if you would like to know more about how the system operates, please continue reading.



[2] Using a common set of assumptions whereby an average call lasts for 3 minutes and 10% of the users in a subscriber base are making calls at the same time, if the system provides 40 calls per second (cps):

Good luck! Hope to see you on our mailing lists soon.

40 cps * 60 seconds per minute * 3 minutes per average call = 7,200 active calls

Assuming that 10% of the users are making a call at the same time during a busy hour, this means:

7,200 / 0.10 = 72,000 users

[3] Refer to the VOCAL home page on http://Vovida.org for documentation and an executable, 500cps.cxx, which you can download and run on your host.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required