27
Next-Gen VoIP Services and Applications Using SIP and Java This Guide has been sponsored by Visit techguide.com The Technology Guide Series This Guide has been sponsored by

Voice Over IP SIP

Embed Size (px)

Citation preview

Page 1: Voice Over IP SIP

Next-Gen VoIPServices andApplications UsingSIP and Java

This Guide has been sponsored by

Visit techguide.comThe

Technology Guide

Series

This Guide has been sponsored by

Page 2: Voice Over IP SIP

Don’t let our sexy curves and cool colors fool you.

The internet-age Pingtel xpressa™ phone, and its virtually

limitless Java™ repertoire of revenue-enhancing possibilities, such

as hosted IP voice services, is a very serious money maker indeed.

To learn about the opportunities the world’s most intelligent phone

can bring you, go to www.pingtel.com/mintmoney.

Or send an e-mail to us at [email protected]

and we’ll get back to you

For Service Providers,

it’s a mini branch

of the U.S. Mint.

Page 3: Voice Over IP SIP

TECHNOLOGY GUIDE2

Table of ContentsAbstract 4

Introduction 4

Architecture Models 6

Technology Enablers for Next Generation Voice Services and Applications 16

Next Generation IP Voice Services and Applications 29

Summary 33

Glossary 34

Appendix A: Session Initiation Protocol (SIP) Concepts and Operation 38

Editorial Writing TeamATG’s Technology Guides and White Papers are produced according to astructured methodology and proven process. Our editorial writing teamhas years of experience in IT and communications technologies, and ishighly conversant in today’s emerging technologies.

The Guide format and main text of this Guide are the property of TheApplied Technologies Group, Inc. and is made available upon these termsand conditions. The Applied Technologies Group reserves all rights herein.Reproduction in whole or in part of the main text is only permitted withthe written consent of The Applied Technologies Group. The main textshall be treated at all times as a proprietary document for internal useonly. The main text may not be duplicated in any way, except in the formof brief excerpts or quotations for the purpose of review. In addition, theinformation contained herein may not be duplicated in other books,databases or any other medium. Making copies of this Guide, or anyportion for any purpose other than your own, is a violation of UnitedStates Copyright Laws. The information contained in this Guide isbelieved to be reliable but cannot be guaranteed to be complete orcorrect. Any case studies or glossaries contained in this Guide or anyGuide are excluded from this copyright.

Copyright © 2001 by The Applied Technologies Group, Inc. 209 West Central Street, Suite 301, Natick, MA 01760Tel: (508) 651-1155, Fax: (508) 651-1171 E-mail: [email protected], Web site: http://www.techguide.com

techguide.com

Visit our Web site to read, download,

and print all the Technology Guides

in this series.

Visit our Web site to read, download,

and print all the Technology Guides

in this series.

techguide.com

Software ApplicationsNetwork ManagementEnterprise SolutionsNetwork Technology

TelecommunicationsConvergence/CTIInternetSecurity

Over 100 Technology Guides in the Following Categories:

Over 100 Technology Guides in the Following Categories:

Page 4: Voice Over IP SIP

caller ID, etc.), cannot provide the types of featuresthat are needed by a contemporary business in theage of e-commerce. The traditional businesstelephony solutions are complicated, for both theservice administrators and the users. Because of thedaunting complexity of PBX and CLASS/Centrexuser-interfaces, users typically know and use only afraction of the total feature set.

Now imagine telephony services in the contextof the current business need. The users would stilllike to use a phone for making and receiving callsand playing voice-mail messages. However, theywould also like to have the phone applianceintegrated with a browser-based PC for managingphone books and seamlessly interfacing with otherapplications, such as customer relationshipmanagement (CRM), sales force automation (SFA),supply chain management (SCM), time accounting,etc. In other words, perform tasks most suitablefor the PC on the PC and those most suitable forthe telephone using a phone appliance and havethe two devices seamlessly integrated.

Today’s telephone just cannot deal with this newbusiness imperative.

In contrast, the Internet and Web-basedcommunications have revolutionized the businessenvironment and user personal life-styles by theirinexpensive, standards-based innovations. We alreadyhave data, multimedia, video, and music applicationson the Internet. The Internet is already serving as theunderpinning of critical business and IT solutions.Just in the last few years alone the Internet and theWeb have generated more innovations thantraditional telephony has produced in its entirehistory. The next frontier for the Web is to apply thesame degree of innovation to telephony.

Most market surveys have verified that IPtelephony is already supplementing traditionaltelephony and it is expected that the IP telephonyarchitecture will ultimately replace the traditionaltelephony model.

AbstractThis Technology Guide explains the unique

benefits of using the Web architectural model withSIP and Java as the enabling technologies for nextgeneration IP voice services and applications.

Using the Web as a reference model for rapidinnovation, the Guide contrasts the limitations ofcircuit-switched telephony and first generationVoIP architectures with the Web model. Itsummarizes limitations of centralized-processingmodels such as traditional telephony, MGCP, andMegaco as compared to peer-to-peer models such asSIP and H.323.

This Technology Guide explains in more detailthe unique benefits of using SIP for call controland Java for making phones intelligent. SIP iscompared with H.323 in terms of innovation,scalability, simplicity, ease of deployment, andstandardization. The guide also includes anexplanation of SIP concepts and operation. Adescription of Java features supporting new voice-services and applications is also included.

The Guide concludes with examples of newvoice-services and applications made possibleexclusively by SIP and Java.

IntroductionTraditional telephony has hit a wall in terms of

innovation, ease of use, and cost reduction. Thecore components of traditional telephony — the terminal (telephone), PBX, the central officeswitch, and the switching network — are strugglingand failing to keep up with the rate of innovationson the Internet. The archaic telephony frameworkwith PBXs and Custom Local Area Signaling Services(CLASS) switches providing Centrex and enhancedresidential services (call waiting, call forwarding,

Next-Gen VoIP Services and Applications Using SIP and Java 54 TECHNOLOGY GUIDE

Page 5: Voice Over IP SIP

Both models have all of their intelligence in acentralized switch or server, which performs all ofthe telephony functions such as call setup, callforwarding, conference calling, etc. All requests,responses, and state changes must be processedby the central switch/server with the end-stationbeing a dumb terminal.

The following are the salient characteristics ofthe traditional telephony environment:

• Archaic, Host-to-Dumb Terminal Architecture:Voice service architecture has not changed forgenerations. Today, PBX and Centrex servicesare delivered using switches that contain allapplication intelligence — just as mainframesand minicomputers did for IBM 3270 or VT100terminals in old computer systems.

• Dumb Terminal — The Telephone: Voiceservice delivery assumes a dumb terminal intelephony parlance — the telephone. The end-

Figure 1B: First-generation

IP telephony architectures

"call manager"

IP Centrex

Softswitch"gatekeeper"

LAN PBX

Next-Gen VoIP Services and Applications Using SIP and Java 7

This Technology Guide explains the architectureof the new IP telephony model using SessionInitiation Protocol (SIP) and Java. The Guide alsodemonstrates the power of SIP and Java in termsof scalability, ease of use, and innovative servicesand applications.

Architecture ModelsCircuit-Switched and First-Generation IPTelephony Architectures

The traditional telephony architecture is basedon a centralized processing model. First generationIP telephony architecture uses a Media GatewayControl Protocol (MGCP), Megaco, or vendorproprietary protocols such as Cisco’s Skinny ClientControl Protocol (SCCP), which also are centralizedarchitectures similar to the traditional telephony.

Figure 1A: Traditional circuit-switched

telephony architectures

Centrex

CLASS 5

switch

PBX

6 TECHNOLOGY GUIDE

Page 6: Voice Over IP SIP

Web ArchitectureThe Web represents the most successful

application architecture in history. The Webfeatures many intelligent servers locatedeverywhere on the network and an intelligent,browser-based client device (a PC or a low costInternet appliance). It is the client device, not theserver, that both initiates and controls allcommunications with the server. When a usersimply clicks on an icon to access an application,the browser pulls content in the form of HTMLand applications (Java, Java script, Flash, Active X,etc.) from the server and runs them on the PC.

There is a complete disaggregation of services inthe Web model. Not only do the services comefrom different servers, they may be provided bydifferent and multiple service providers. Some ofthe examples (shown in figure 2) include Yahoofor news; Amazon for shopping; MSN for instantmessaging; ASP services (such as Corio) forcustomer relationship management (CRM), salesforce automation (SFA), enterprise resourceplanning (ERP); and MP3.com for music. Anenterprise can outsource as few or as manyservices as suits its business model.

Key characteristics of the Web architectureinclude:

• Intelligent end devices (clients)

• Distributed, intelligent servers (no centralswitch or server for services)

• An open architecture leading to innovation,rapid application development, and lower costs

Next-Gen VoIP Services and Applications Using SIP and Java 9

user interface for these services on the dumbtelephone requires non-intuitive flashsequences and star codes. No options exist formaking telephony features easier to use andincreasing user productivity.

• Hardware Specific Software: The voice featuresreside in software that is usually hardware-specific and/or proprietary. This environmentrequires highly-specialized software engineersthat are expensive and hard to find. Evensimple software modifications require theextensive regression testing of featureinteraction.

• Limited Next-Generation Platforms: Next-generation voice service platforms still fall shortof business needs. Most first-generation IPtelephony systems, for both service providersand enterprises, do exploit IP for transport andsome feature a Java or XML softwareenvironment. However, this “open”environment is not easily made extensible byanyone other than the vendor or possibly aservice provider; certainly not the enterprise oran independent software vender with a greatidea. These systems, consequently, stillperpetuate the same 1960’s host-terminalarchitecture with a dumb telephone as theendpoint:

• The IP PBX is a host computer with all thesmarts driving dumb IP phones.

• VoIP gateways, softswitches, and theirfeature servers are merely physicallydistributed mainframes talking to dumbterminals.

8 TECHNOLOGY GUIDE

Page 7: Voice Over IP SIP

voice-world are solely defined and developed byPBX and CLASS switch manufacturers, just asmainframe applications were defined by thevendors.

The PBX and CLASS switch vendors, their ideas,their bureaucratic practices, and their businessmotivations have held innovation in the voice-world hostage. Voice features reside in software onthe switch that is hardware-specific and vendor-specific. It is a proprietary environment that is notopenly extensible. Even modest new functionsrequire the onerous regression testing of featureinteraction.

The centralized, closed-software environmentoffers no way for enterprises to add their owninnovations or enhancements to telephonyfeatures, let alone individual users or softwaredevelopers with really good ideas. Some featuresare impossible to implement because of the dumb-telephone as the endpoint. Consequently,innovation is and will remain dead, especiallywhen compared to the revolutions on the Web.

WebInnovation on the Web occurs at the edges of

the network, where anyone — businesses andindividuals can create Web sites that areimmediately open for other users to interact with.On the Web, in contrast to traditional telephony, anew page or “feature” can be created in a fewminutes. More importantly, the Web page can beconceived, created, delivered and personalized byanyone — yahoo, e-bay, GE, a company, anindividual, their kids or their grandparents. Severalmillion Web sites are in existence today, up from afew thousand in 1993. These sites satisfyeveryone’s personal and business needs for news,buying, entertainment, chat, sports, sex, etc.regardless of gender, race, religion, ethnicbackground, industry and occupation.

Amazon.com would not have happened if theworld needed to rely on the data communications

Next-Gen VoIP Services and Applications Using SIP and Java 11

Comparing the Architectures The Web has revolutionized the world of

business. It has enabled a whole new businessparadigm in the form of e-business, portals, e-tailers, and collaborative applications. The Webhas enabled businesses to reach business partnersand customers worldwide with a click of themouse. Telephony services must changedramatically to become a functional member ofthis business revolution. However, given theirlimitations, it is virtually impossible for the currenttelephony architectures to satisfy emergingrequirements.

InnovationTraditional and First-Generation IP Telephony

The telephone was invented more than 125years ago. Since then it has enabled people to talkand do only a handful of other things, like usevoice mail. All of the features and services in the

Figure 2: Web application architecture

Intelligent servers

Intelligent clients

CRM/SFA

MP3.com

doubleclick.com

Virtualcart.com

MSN InstantMessenger

amazon.com

yahoo.com

MP3

Java

Flash

Active X

HTML

Cookies

10 TECHNOLOGY GUIDE

Page 8: Voice Over IP SIP

browser’s graphical user interface means that usersdo not have to memorize features as in the worldof telephony. The use of any Web site is anintuitive discovery process, performed simply bypointing and clicking at images and words.

Scalability and CapacityTraditional and First Generation IP Telephony

In the telephony world, big centralized boxeshave all the smarts. Whenever the telephone, the“terminal” in the parlance of telephone equipmentvendors, sends a flash sequence or * code, it’s thePBX or CLASS switch that figures out what itmeans. The PBX or the switch also must activelymanage each and every call. Consequently, it justdoes not scale. Support for just one more usermay end-up requiring a hugely expensivereplacement or addition.

WebA Web site, however, can support millions of

users. Scalability is achieved not only through theconnection-less nature of IP and by adding moreand bigger servers to the Web site. Scalability isalso achieved by exploiting an intelligent endpoint— the browser-based PC. In fact, it’s the browsersoftware that interprets Web objects and puts aWeb page together.

For example, in accessing a typical e-commercesite, it’s the browser, not a server, that:

• Retrieves and displays the source HTML pageand embedded product images individually

• Retrieves and runs a Java applet, Java script,Flash, Active X or other applicationcomponents

• Retrieves and displays a dynamic advertisementfrom DoubleClick.com

• Retrieves shopping cart services from aShoppingCart.com

Next-Gen VoIP Services and Applications Using SIP and Java 13

vendors such as Alcatel, Cisco, Lucent, or Nortel toinvent the “service” and add the features to arouter or a switch.

Ease of UseTraditional and First-Generation IP Telephony

For most telephone users, cryptic impossible-to-remember flash sequences and * codes are theinterface to thousands of PBX and CLASS features.For the fortunate few with block characterdisplays, even IBM 3270 and VT100 terminalsappear attractive.

Users don’t know what voice features exist andif they do, they do not know how to use them.While most voice service platforms such as PBXand CLASS switches offer hundreds or thousandsof features (300-400 features in a typical PBX,3000-4000 in a CLASS 5 switch), most userstypically don’t know any more than just a few —transfer, hold, last number redial. In researchconducted by WorldCom, 9 out of 10 executivescould not even transfer a call without resorting tothe “help scream” — “Do I dial ‘flash’ first andthen the number, or the other way around?” Tryingto set-up just a 3-party conference call over a PBXis even a bigger nightmare. It’s no wonder that theassisted conference calling businesses of AT&T,Sprint and WorldCom are so big and profitable.For many, the most difficult part of changing jobsis learning a new phone system. “What do I dialto get an outside line?” Consequently, for the vastmajority, ignorance is bliss, yet very expensive inuser productivity.

WebOn the Web, millions of sites with billions,

perhaps trillions, of pages can be easily navigatedby pointing and clicking at pictures or wordsdisplayed on an intelligent, browser-based PC.

In contrast to telephony feature usage, anyonefrom kids to their great grandparents can easilydiscover and use any site on the Web. The

12 TECHNOLOGY GUIDE

Page 9: Voice Over IP SIP

An enterprise has the option of providing PBXservices locally through a premises-based systemdevice or these could be outsourced to a network-based service. The outsourced service not onlyeliminates capital costs but may actually providericher services than those available from a PBX.

The figure also shows some illustrative servicessuch as unified messaging, presence messaging,instant messaging, and CRM integration, all of whichcan be provided by separate service providersoffering best-of-breed solutions for an enterprise’s oreven an individual user’s specific requirements.

PCs and other phones are simply resources onthe network that provide services to users. In thismodel, the PC may provide services for the phonesuch as integration with the desktop applicationsor the phone may provide services for the PC suchas causing the phone to ring and automatingconference calls in Microsoft Outlook.

Figure 3: Web architecture for next-generation

voice services and applications

Intelligent servers

Intelligent clients

Audio

Auctions

IP PBX

PSTNgateways

CRM/SFA

Presence & IM

Unified Messaging

Phone-to-phonedata & app exchange Java

HTMLMP3

HostedPBX

service

PC appintegration

Next-Gen VoIP Services and Applications Using SIP and Java 15

• Stores cookies to identify users and maintainstates

• Encrypts credit card numbers

ManageabilityTraditional and First-Generation IP Telephony

An expert — the equivalent of the proverbialrocket scientist — must perform all maintenanceand management tasks for the PBX or the switch.Tools for managing moves/adds/changes tend tobe horrendous and, consequently, administratorslearn only the basic coping skills. This makes itextremely costly to administer the switch.According to some estimates it can cost as muchas $300-$500 per PBX move/add/change. For aCentrex line, it can take weeks for a change to beimplemented by the telephone company.

WebSelf-service by users is the normal operative

model here — for registration, buying things,personalizing info, etc.

Every office device including printers, copiers,and now intelligent IP phones have a built-in Webserver that enables remote configuration over thenet via browser interface.

Every office device and home appliance isbecoming more intelligent and capable of runningautomated diagnostics, reporting the findings, andordering replacements before service is disrupted.

Exploiting the Web Architecture for NextGeneration Voice Services and Applications

Figure 3 shows what telephony would look likeif migrated to a Web-like architecture. In thismodel, services and applications are resources onthe network and are accessed and controlled bythe phone and not by a central-switch or agatekeeper. Nor does a central-switch orgatekeeper control what the phone can do.

14 TECHNOLOGY GUIDE

Page 10: Voice Over IP SIP

Phone Intelligence TechnologyAn ability to support small footprint applications

is the key for incorporating intelligence in phones.A powerful yet easy to use programming languageused widely for Web-enabling Internet appliancesis required. In addition to rich functionality fortraditional Web applications, features developedspecifically for telephony and security aremandatory. Lastly, the language must already beused by hundreds of thousands of programmersworldwide in order for innovation to happenrapidly.

Extensible, Scalable Call Control ProtocolA call control protocol is used for call related

functions such as setting up, monitoring, andterminating calls. However, in the new IPtelephony model, the call control protocol mustdiffer from traditional telephony and the firstgeneration IP telephony protocols. For maximumscalability, the new call control protocol mustsupport peer-to-peer communications wherebytwo or more phones can set up and communicatedirectly without requiring anything more thanlocations services from a call control server. Inaddition, the protocol must allow the peer-to-peerexchange of applications and data in addition tovoice communications.

The call control protocol must support a widerange of environments — from home-office to thelargest enterprise and from the smallest to thelargest services provider. Thus, the protocol mustbe highly scalable as well as cost effective in adiverse range of configurations. Since it is notpossible to predict all future applications of IPtelephony, the protocol must also be extensible inorder to accommodate unforeseen requirements.

Next-Gen VoIP Services and Applications Using SIP and Java 17

Technology Enablers forNext Generation VoiceServices and Applications

Clearly, while the model in figure 3 is quitepedestrian in the Web world, it is quiterevolutionary in the context of traditionaltelephony. The components needed to implementthis model for telephony are as follows:

Intelligent ServersThese are distributed resources that interact with

intelligent clients (PCs and phones). In terms ofhardware and software, these servers are standardUnix, Linux, and Microsoft Windows platforms.Compared to traditional PBXs, these servers offerchoices of multiple vendors and competitivepricing with an open applications developmentenvironment.

Intelligent PhonesThese phones should provide much more than

incoming call ringing. In order to maintain theirindependence from a central switch, they mustalso provide local capabilities such as call hold,transfer, forwarding, redial, caller ID, multi-partyconferencing, and many other traditionaltelephony features.

The intelligent phones should be thin-clientcomputing devices that can interoperate with PCsand servers on the network. These devices mustsupport dynamic loading and management ofapplications such as Java applets. For ease of use,they should incorporate functions such asgraphical and audio helpers to ease the use oftraditional and next generation applications.

16 TECHNOLOGY GUIDE

Page 11: Voice Over IP SIP

H.323, the older of the protocols, was originallydesigned for video conferencing over the LAN.Since then it has been morphed and used tosupport voice and video over then WAN as well.SIP, however, was designed from the beginning formultimedia sessions and conferences over theWAN. Because of these differences in their designobjectives, SIP offers numerous compellingadvantages in the areas of extensibility, scalability,and ease of deployment over H.323.

Today there are more products availablesupporting H.323 than SIP. However, since itsintroduction, SIP is rapidly becoming the preferredprotocol. A January 2001 survey of Voice over IPvendors in Network World found that while 75%of the vendors offered products based on one ofthe four H.323 versions, an approximately equalnumber of them were already planning to offerSIP-based products by June 2001. However, themore telling statistic was that less than 25% of thevendors were planning to upgrade their productsfrom H.323 Version 2 to Version 3 and even fewerto Version 4, the latest version of H.323. Accordingto the same survey, most vendors expected H.323to become a legacy protocol. In contrast, the listof vendors supporting or planning to support SIPis growing rapidly. Service providers embracingSIP include WorldCom, Level 3, Net2Phone, Telia,Webley, Ibasis, LipStream, and TalkingNets as ofMarch 2001 with many more anticipated.

The reasons for the rapid ascendancy of SIPbecome obvious when we compare it with H.323in the areas of innovation, scalability, ease ofdeployment, manageability, and the standardizationprocess. Appendix A provides additional details onSIP concepts, definitions, and operation.

Next-Gen VoIP Services and Applications Using SIP and Java 19

SIP (Session Initiation Protocol) — TheCall Control Protocol

SIP introduces the benefits of the Webarchitecture to IP telephony. It provides apowerful, extensible, scalable, and easy-to-deployprotocol for call control and media exchange.

Several standards are available for building IPtelephony solutions. These include the SessionInitiation Protocol (SIP) from the IETF; ITU-TH.323, an ITU-T umbrella standard; MediaGateway Control Protocol (MGCP) from IETF;Media Gateway Control (Megaco), a joint protocolby IETF and ITU-T; and proprietary protocols suchas Cisco’s Skinny Client Control Protocol (SCCP). A high-level comparison of these protocols isincluded in table 1.

Table1: IP Telephony standards

SIP H.323 MGCP MEGACO PRO-

PRIETARY

Architectural Peer-to-peer Peer-to-peer Master/ Master/ Master/Model slave slave slave

Media types Voice, video, Voice, video, Voice Voice, Voicedata limited data video

Network Intra, Extra, Intra, Extra, Intranet Intranet Intranetscope and Internet and Internet only only only

Extensibility High Low Medium Medium Low

Scalability High Medium Low Low Low

Ease of High Low Medium Medium Mediumdeployment

Standardization IETF ITU-T IETF IETF and NoneITU-T

Why SIPOf the protocols listed in table 1, only SIP and

H.323 are peer-to-peer protocols. MGCP, Megacoand Cisco’s proprietary SCCP represent the oldcentralized model and suffer from this model’slimitations discussed earlier. Thus, the real choicefor a protocol with Web-like benefits comes downto one of the peer-to-peer protocols — H.323 orSIP.

18 TECHNOLOGY GUIDE

Page 12: Voice Over IP SIP

protocols within H.323. These include Registration,Admission and Status (RAS), Q.931 for call control,and H.245 for transmission of non-telephonysignals on the line. As shown in the tables, SIP hasa total of 5 methods (commands) and 8 responsesand H.323 has 21 commands/messages across thethree protocols. SIP can be implemented as astateless protocol and does not need to maintainany call states, which further increases scalabilityof SIP. SIP also shows a substantially higherefficiency than H.323 during call set-up by usingapproximately 50% fewer messages. Figures 4 and5 show call set-up messages for H.323 and SIP,respectively. While H.323 requires a total 13message exchanges, SIP requires only 7exchanges.

SIP Methods and Response Codes

Table 2: SIP methods

SIP METHODS

INVITE User or service is being invited to participate in a session.ACK Client has received a final response to an INVITE request.OPTIONS Server being queried about capabilities.BYE User agent client indicates to server to release the call.CANCEL Cancels a pending request.REGISTER Client registers address with a SIP server.

Table 3: SIP response codes

SIP RESPONSE CODES

1xx Informational: Request received, continuing to process request.2xx Success: Action successfully received, understood and accepted.3xx Redirection: Further action required to complete request.4xx Client Error: Request contains bad syntax or cannot be executed

at server.5xx Server Error: Server failed to execute an apparently valid request.6xx Global Failure: Request cannot be executed at any server.

Next-Gen VoIP Services and Applications Using SIP and Java 21

InnovationSIP enables new services and applications not

possible with H.323 (or other IP telephonyprotocols) and easily empowers service providers,application developers, and enterprises to createunique, differentiated services and applications.For example, SIP uses a simple text-basedencapsulation (based on the Internet standardMIME) which enables it to transmit data andapplication programs with the voice call, making iteasy to send business cards, photos, and/or MP3encoded information during a call.

SIP also supports third-party call control throughsimple applications to modify SIP messages andenable functions such as sending office calls to ahome phone after 5:00 PM or forwarding videocalls to a PC. Lastly, SIP envisions the need toaccommodate extensions — new protocol headers,methods, bodies and parameters, to implementnew and innovative applications. By design not allproducts are required to support these extensions(just the endpoints) servers or phones that want touse them.

ScalabilityBeing peer-to-peer protocols, both SIP and

H.323 eliminate the need for central servers tocontrol everything. Peer-to-peer protocols reducecosts of network and server infrastructureequipment necessary to support a user populationof a given size.

Within peer-to-peer protocols, SIP is a muchmore efficient and less complex protocol,therefore, more scalable than H.323. H.323 isactually an umbrella specification that includesseveral protocols from other ITU-T standards.Tables 2 – 4 cover three categories of such

20 TECHNOLOGY GUIDE

Page 13: Voice Over IP SIP

Table 6: H323/H.248 commands and responses

H.248

Command/Message FunctionMaster-Slave Determination Determines which terminal is the master and

which is the slave. Possible replies:Acknowledge, Reject, Release (in case of atime out).

Terminal Capability Set Contains information about a terminal’scapability to transmit and receive multimediastreams. Possible replies: Acknowledge,Reject, Release.

Open Logical Channel Opens a logical channel for transport ofaudiovisual and data information. Possiblereplies: Acknowledge, Reject, Confirm.

Close Logical Channel Closes a logical channel between twoendpoints. Possible replies: Acknowledge.

Request Mode Used by a receive terminal to requestparticular modes of transmission from atransit terminal. General mode types includeVideoMode, AudioMode, DataMode, andEncryption Mode. Possible replies:Acknowledge, Reject, Release.

Send Terminal Capability Set Commands the far-end terminal to indicate itstransmit and receive capabilities by sendingone or more Terminal Capability Sets.

End Session Command Indicates the end of the H.245 session. Aftertransmission, the terminal will not send anymore H.245 messages.

Ease of DeploymentDeploying and supporting SIP is similar to

HTTP. It uses standard protocols and functions,which already exist in the current IP networks andare well understood by system administrators andtechnical support personnel. SIP has the followingHTTP characteristics:

• Standard Internet addressing: SIP usesstandard IP addressing format for both namesand addresses, e.g., sip:[email protected] sip:[email protected]

• Clear text protocol: SIP uses clear text for itsprotocol encapsulation unlike H.323, whichuses binary encoding, making SIP easier todiagnose and troubleshoot.

Next-Gen VoIP Services and Applications Using SIP and Java 23

H.323 Commands/Messages

Table 4: H.323 RAS commands and responses

RAS

Command/Message FunctionRegistrationRequest (RRQ) Request from a terminal or gateway to register

with a gatekeeper. Gatekeeper either confirmsor rejects (RCF or RRJ)

AdmissionRequest (ARQ) Request for access to packet network fromterminal to gatekeeper. Gatekeeper eitherconfirms or rejects (ACF or ARJ)

BandwidthRequest (BRQ) Request for changed bandwidth allocation,from terminal to gatekeeper. Gatekeeper eitherconfirms or rejects (BCF or BRJ)

DisengageRequest (DRQ) If sent from endpoint to gatekeeper, DRQinforms gatekeeper that endpoint is beingdropped; if sent from gatekeeper to endpoint,DRQ call to be dropped. Gatekeeper eitherconfirms or rejects (DCF or DRJ). If DRQ sentby gatekeeper, endpoint must reply with DCF.

InfoRequest(IRQ) Request for status information fromgatekeeper to terminal.

InfoRequestResponse (IRR) Response to IRQ. May be sent unsolicited byterminal to gatekeeper at predetermined intervals.

RAS Timers and Request Recommended default timeout values forin Progress (RIP) response to RAS messages and subsequent

retry counts if response is not received.

Table 5: H.323/Q.931 commands and responses

Q.931

Command/Message FunctionAltering Called user has been alerted —”phone is ringing”.

Sent by called user.Call Proceeding Requested call establishment has been initiated and

no more call establishment information will beaccepted. Sent by called user.

Connect Acceptance of call by called entity. Sent from calledentity to calling entity.

Setup Indicates a calling H.323 entity’s desire to set up aconnection to the called entity.

Release Complete Indicates release of call if H.225.0 (0.931) callsignaling channel is open. Afterwards, call referencevalue can be reused. Sent by a terminal

Status Responds to an unknown call signaling message orto a Status Inquiry message. Provides call stateinformation.

Status Inquiry Requests call status. Can be sent by endpoint orgatekeeper to another endpoint.

22 TECHNOLOGY GUIDE

Page 14: Voice Over IP SIP

StandardizationThe ITU-T, organized under the auspices of the

United Nations, defines traditional telephony andH.323 standards. It is a slow moving body with ahighly political process. Participation in ITU-Tactivities is limited to paid members. Most of

Figure 5: H.323 Call set-up sequence

Endpoint 1 Gatekeeper Endpoint 2

AdmissionRequest

AdmissionConfirm

Setup

Call Proceeding

Admission Request

Admission Confirm

Altering Connecting

Terminal Capability SetMaster/Slave Determination

Terminal Capability Set + AckMaster/Slave Determination + Ack

Terminal Capability Set AckMaster/Slave Determination Ack

Open Logical Channel + Ack

Open Logical Channel

Open Logical Channel Ack

Media (RTP)

Close Logical ChannelEnd Session Command

Close Logical Channel + AckEnd Session Command

Release Complete

Disengage Request

Disengage Confirm

Disengage Request

Disengage Confirm

Endpoint 1 Gatekeeper Endpoint 2

1

2

3

45

6

7

8

9

10

11

12

13

RAS 0.931 H.245

Next-Gen VoIP Services and Applications Using SIP and Java 25

• Simple error messages: SIP uses familiar error-messages with prefixes such as 10x, 20x, etc.

• Leverages other Internet protocols: SIP usesother familiar Internet protocols such as MIMEand Session Description Protocol (SDP), againeliminating the need for new technical trainingor expertise.

Figure 4: SIP Operation in Proxy Mode

Site 1

Endpoint 1@Site 1

Site 2

LocationServer

Client 2@Site 2

Proxy

Endpoint 2

INVITEEndpoint 2

@Site 2

Client 2@Site 2

INVITEEndpoint 2

@Site 2

100 Trying

200 OK100 Trying

200 OK

Ack

Ack

1 2

3

4

5

6

7

24 TECHNOLOGY GUIDE

Page 15: Voice Over IP SIP

can run on minimalist appliances. Simple Javaapplets can be developed in anywhere from a fewminutes to a few hours. Key features of Javainclude:

Network OrientationJava applications, called applets, run on thin-

clients. Java applets are network-aware and canopen and access objects across the Internet viaURLs. The Remote Method Invocation (RMI)feature of Java allows the building of distributedapplications. RMI-based applications can connectto other Java applications as well as legacyapplications.

Java Naming and Directory Interface (JNDI)provides a unified interface to multipleheterogeneous naming and directory servicesincluding LDAP directories. JNDI enables seamlessconnectivity to these services. Developers canbuild powerful and portable directory-enabled Javaapplications using this industry-standard interface.

Java Database Connector (JDBC) is an applicationprogramming interface (API) that provides cross-DBMS connectivity to a wide range of SQLdatabases. Using JDBC, an application can establishconnectivity with nearly any enterprise or serviceprovider database from a Java-enabled phone.

Java also features specifications and supportsproducts which can automate the process ofdistributing new versions of applications over thenetwork. This includes Java ManagementExtensions (JMX), the specification, and JavaDynamic Management Kit (JDMK), Sun’s productwhich implements this specification.

Powerful APIs for Telephony and Speech ApplicationsJava has two APIs specially designed for

telephony and speech applications:

• Java Telephony API (JTAPI) defines interface toaccess the following functional areas: callcontrol, telephone physical device control,

Next-Gen VoIP Services and Applications Using SIP and Java 27

ITU-T documents are written using very denselanguage, which make it virtually impossible forthe uninitiated to fathom their intent. Most ITU-Tstandards tend to be very complex. For example,H.323 specification with its co-requisite protocolsruns some 700 pages compared to about 150pages for SIP. The ITU-T specifications are notfreely available and have to be purchased. As ofFebruary 2001, you could not even buy the H.323specifications from the ITU-T bookstore becauseITU-T still had not made them available forpurchase.

In contrast, the Internet standardization process isgeared toward rapid innovation. It has an open anddemocratic process which draws architects from theindustry, academia, government, and individualswho are experts in specific technology areas. AllInternet specifications are available for free toanyone and can be simply downloaded from theInternet. Lastly, the Internet standardization isrooted in the “proof-of-concept”, i.e., there mustexist a prototype implementation for a standard toachieve approved status. The standard documentsoften include model codes to document thestandard. Additionally, almost always, the actualcode to implement a prototype is available on theInternet for free download and use.

Java — the Applications EngineA key element of the proposed architecture for

the next-generation IP voice services andapplications is an intelligent phone. Java is theideal application engine technology for intelligentphones. Java has already proven itself as one ofthe most innovative technologies fueling theInternet innovations and Java applications that areat the core of the contemporary Web-pages.

Java applications do not reside permanently onthin-clients, thus, do not consume any resourceson the phone when not needed. They are typicallydesigned with very small footprints so that they

26 TECHNOLOGY GUIDE

Page 16: Voice Over IP SIP

processor that is running Java runtime environment.Consequently, a Java applet written for an IP phoneappliance can run without modification on a PC-based softphone supporting Java.

Ease of Development Sun makes developing applications quick and

easy with great tools in their Java DevelopmentKit. In addition, Java is supported by numeroustools, components, and applications that areavailable from many vendors. In fact, many areavailable for free on the Internet. These toolsinclude application and user interface (UI)components, authoring and workflow tools, andintegrated development environments. A widevariety of Java training options ranging fromclassrooms to web-based are also available. Lastly,due to Java’s tremendous popularity, Java softwareengineers are readily available on permanent orcontract basis to assist in development.

Next Generation IP VoiceServices and Applications

SIP and Java also enable a whole newgeneration of applications which are impossiblewith other telephony architectures. Theseapplications can generally be divided into threecategories:

• Personal productivity applications

• Occupation specific and industry specificapplications

• Web-telephony integration (WTI) applications

Listed below are a few examples of each.

Next-Gen VoIP Services and Applications Using SIP and Java 29

media services, and telephony administrativeservices. JTAPI functions can be used with bothwired and wireless phones and its corefunctions can be extended to build applicationssuch as call logging and tracking, auto-dialing,screen-based telephone applications, callrouting applications, automated attendants,interactive Voice Response (IVR) systems callmanagement center, voicemail, etc.

• Java Sound API (JSAPI) allows developers toincorporate speech technology into userinterface for their Java applets and applications.This API specifies a cross-platform interface tosupport command and control recognizers,dictation systems and speech synthesizers.

SecurityJava has a built-in security framework or

“sandbox” that can protect basic phone operationlike making and receiving calls from rogue ormisbehaving applets. Java enables the constructionof virus-free, tamper-free appliances like phones. Italso incorporates authentication techniques basedon public-key encryption. Java’s security featuresalso allow enterprises to control access toresources via policy-based permissions.

Support for a Wide Variety of Devices and UserInterfaces

Java applets can run on virtually any platformdue to their platform independence. A Java appletcan be written once and run on virtually anyoperating system including cell phone OS, HP UX,IBM AIX, Palm OS, Sun Solaris, VxWorks, MicrosoftWindows, and various other varieties of Unix andLinux systems. To enable a Java application toexecute anywhere on the network, the Javacompiler generates an architecture-neutral object fileand the compiled code is executable on any

28 TECHNOLOGY GUIDE

Page 17: Voice Over IP SIP

Automated conference calling — create conferencecall appointments in Microsoft Outlook. Theapplication would automatically set-up theconference call at the specified time.

Distinctive rings — play unique rings from anysound file based on caller ID or personal directoryinformation. Separate rings could be set up for aboss, spouse, kids, or anyone else.

Industry and Occupation-SpecificApplicationsTelecommuters — get all office telephonyfunctionality at home — extension dialing, calltransfer, intranet intercom, call billing, etc.

Consultants — start the “clock” automatically fortime accounting or billing when picking up thephone or dialing the number of a client usingcaller ID or contact database information.

Sales reps — integrate voice and data informationcollected during a call with sales force automationapplications such as ACT or Goldmine, or an ASPlike sales.com.

Public relations — click-to-dial personalized andup-to-date press, analyst and vendor contact lists,and track and report time on the phone by clientusing a public relations ASP like mediamap.com.

Web-Telephony Integration (WTI)Applications:Auction site for purchasing agents of electroniccomponents — create a live audio auction forexcess DRAM inventory and use the “heat” of areal-time event to pump-up prices and theauctioneer’s commission. Use Java applets on the

Next-Gen VoIP Services and Applications Using SIP and Java 31

Personal Productivity ApplicationsElectronic business cards — send an enrichedelectronic virtual business card (vCard) includingphoto and audio file automatically with every callas caller ID information (or selectively during themiddle of call). This information can be addedinto any personal contact database such asMicrosoft Outlook, or a corporate CRM, or aSupply Chain Management (SCM) database withthe push of a button.

Presence and instant messaging — use an instantmessenger service to determine whengeographically distributed colleagues are availablefor a quick conference call with a customer.Simply click or automatically “camp on” your“buddy list” to create the conference call.

Call filters — have every call from that veryimportant customer ring at every phone —business phone, cell phone, home phone, vacationphone, etc. The call will get completed to the firstdevice from where the user picks up the call.

Phone book — use multiple phone books —corporate, personal, Internet, etc., on the phoneand simply point to an entry to make the call. Thephone books can be synchronized with the dataon a PC or any server.

Personalized music on-hold — play personalizedannouncements or music from a favorite MP3recording or Internet radio station while callers areon hold.

Voice tag elimination — deliver customizedmessages to people trying to contact busy contactsand eliminate phone tag.

30 TECHNOLOGY GUIDE

Page 18: Voice Over IP SIP

SummaryThe Web has revolutionized the world of

business. Traditional telephony, however, cannotfulfill the needs of the emergent e-business model.The traditional telephony model is constrained byan inflexible and inefficient architecture based oncentralized processing and the dumb terminal.This environment inhibits innovation, is nearlyimpossible to use, and simply perpetuates the old,cumbersome, and limited functionality services.

IP telephony needs to embrace the Webarchitectural model in order to achieve rapid andcost effective innovation. Old definitions of“enhanced” services and features do not comeanywhere near even the simplest applications madepossible by technologies such as SIP and Java.

SIP, coupled with Java, can bring the samerevolutionary innovations and mindset to theworld of IP telephony that the Web has brought toIT and the data world.

Next-Gen VoIP Services and Applications Using SIP and Java 33

phone to manage the bidding process and to trackwho “raised a hand” to bid first, etc.

Virtual call center ASP — support the integratedvoice and data requirements of call center agentsworking from their homes.

Airlines reservations — use a Java applet tovisually display interactive voice response (IVR)options rather than forcing users to wait throughvery long recorded instructions and go throughmulti-level menus requiring the use of a telephonekeypad.

32 TECHNOLOGY GUIDE

Page 19: Voice Over IP SIP

IVR: Interactive Voice Response, a system used forgenerating voice prompts and menus and foraccepting and processing user responses.

JTAPI: Java Telephony API, an extension to Java thatprovides telephony functions such as call control.

JSAPI: Java Speech API, an extension to Java thatprovides functions for controlling dictationsystems and speech synthesizers

JNDI: Java Naming and Directory Interface, anextension to Java that provides a unifiedinterface to multiple naming and directoryservices.

Megaco: Media Gateway Control, a VoIP protocol jointlydeveloped by ITU-T and IETF. It uses softswitchesand gatekeepers for central control of calls andconferences.

MGCP: Media Gateway Control Protocol, a VoIP protocoldeveloped by and IETF. It uses softswitches andgatekeepers for central control of calls andconferences.

MIME: Multipurpose Internet Mail Extensions, anInternet standard used for encapsulating e-mailmessages in clear text.

PBX: Private Branch Exchange, a customer premisebased telephone switch for intra-campus andoutside telephone calls.

PSTN: Public switched Telephone Network, a generalreference to telephone networks using circuitswitching and time division multiplexing.

Q.931: An ITU-T Call control protocol for ISDN, also usedin H.323. It defines procedures for setting up andclearing calls.

Next-Gen VoIP Services and Applications Using SIP and Java 35

API: Application Programming Interface, a set ofprogramming functions and calls supported by alanguage or a software product. APIs are used bysoftware developers to develop programs in aspecific language or to enhance or extend thecapabilities of a product.

ASN.1: Abstract Syntax Notation 1, an object-orientedlanguage used by various architectures such asOSI, ITU-T, and SNMP to define objects includingdata structures.

ASP: Application Services Provider, a service providerthat provides applications over a network with ausage-based fee.

CLASS: Custom Local Area Signaling Services, servicessuch as caller ID and ring back provided by atelephone company. Devices in the telephonecentral office that provide such services arecalled CLASS switches.

CPU: Central Processing Unit, the arithmetic and logicunit in a computer. Examples include the IntelPentium family, the AMD Atheon, and the IBMRISC processors.

CRM: Customer Relationship Management software,used with application such as ACT or Goldmine tokeep track of customer contacts and salesinformation.

H.323: An ITU-T specification for multimediaconferences over IP for LAN attached stations. Itis a peer-to-peer protocol as opposed to MGCPand Megaco which require central control

HTTP: Hyper Text Transfer Protocol, used for encodingand transferring Web objects from Web serversto Web browsers.

GLOSSARY34

Page 20: Voice Over IP SIP

SIP: Session Initiation Protocol, IETF standard forpeer-to-peer multimedia sessions and IPtelephony. An alternative to the ITU-T H.323protocol.

VoIP: Voice over IP, a general reference to severaltechnologies and protocols that allow voicetelephony implementation over IP networks.Examples of components and technologies thatenable VoIP include codecs, IP PBXs,softswitches, gateways, H.323, SIP, MGCP, andMegaco.

Next-Gen VoIP Services and Applications Using SIP and Java 37

RAS: Registration, Admission, and Status, a componentof H.323, defines procedures whereby users canregister themselves with a gatekeeper as apreliminary step to setting up a call.

RMI: Remote Method Invocation, a component part ofJava, allows building of distributed applicationsthat can connect to other Java applications aswell as legacy applications.

RTCP: RTP Control Protocol, control protocol for RTPthat allows multimedia session partners tomonitor the quality of their sessions.

RTP: Real-time Transport Protocol, an IP standard forencapsulating multimedia streams fortransmission over IP networks. It includesinformation such as packet timestamps to helpimplement quality of service for a session.

SCCP: Skinny Client Control Protocol, a Cisco proprietaryprotocol for voice over IP that uses centralcontrol with gatekeeper-like functions.

SCM: Supply Chain Management, used in reference toapplication programs used for managingpurchases and suppliers.

SDP: Session Description Protocol, an IETF standard toadvertise multimedia conferences. SDP isintended for describing multimedia sessions forthe purposes of session announcement, sessioninvitation, and other forms of multimedia sessioninitiation.

SFA: Sales Force Automation, used in references toapplication programs used for managing salesactivities such as capturing customer contactinformation, generating contracts, and generatingorder forms.

GLOSSARY36

Page 21: Voice Over IP SIP

cases of a multicast conference, a full-meshconference and a two-party “phone call”, as wellas combinations of these. Any number of calls canbe used to create a conference.

CallA call consists of all participants in a conference

invited by a common source. A SIP call isidentified by a globally unique call-ID.

SIP ComponentsUser Agent Clients and Servers

A user agent is a program that runs on a SIPdevice (e.g., the phone). It contains a clientfunction and a server function.

The user agent client (UAC) is a program thatinitiates SIP requests such as initiating a call. AUAC is also known as the calling user agent

A user agent server (UAS) is a program thatreceives SIP requests such as an incoming call andsends back responses to those requests. A UAS isalso known as the called user agent.

Figure 7: SIP clients and servers

SIP Servers:ProxyRedirectLocationRegistrar

User AgentClient

User AgentServer

User AgentClient

User AgentServer

Next-Gen VoIP Services and Applications Using SIP and Java 39

Session Initiation Protocol(SIP) Concepts and Operation

SIP is an Internet protocol defined underRequest for Comment 2543 (RFC 2543). SIP is notjust for voice communications — it supports dataand multimedia in its core specification.

In TCP/IP terminology, as shown in figure 6, SIPis an application level protocol and runs over UDPbut may use TCP. SIP is based on existing andwell-understood Internet protocols and extendsthem to support IP telephony.

SIP Concepts Session

A SIP session is a multimedia session consistingof a set of multimedia senders and receivers andthe data streams flowing from senders to receivers.Session is the basic building block in SIP. All callsand conferences are established by setting upsessions among users.

ConferenceA conference is a multimedia session, identified

by a common session description. A conferencecan have zero or more members and includes the

Figure 6: SIP and other Internet Protocols

Gopher Kerb SMTP Telnet FTP SNMP RPCSIP

TCP UDP

IP

LAN or WAN Interface

APPENDIX A38

Page 22: Voice Over IP SIP

rwhois, LDAP, multicast-based protocols oroperating-system dependent mechanisms toactively determine the end system where a usermight be reachable.

SIP AddressingSIP uses traditional Internet names as addresses,

which consist of a user name and a domain name.This is an important issue because it means thatthe existing Internet naming, addressing, androuting services can process SIP addresses withoutmodifications. Examples of SIP addresses include:

SIP:[email protected]

SIP:[email protected]

SIP:[email protected]

These addresses are similar to HTTP URLaddresses except that they start with SIP instead ofHTTP. The first example shows a user beingidentified via a typical e-mail address. The secondexample shows an address where the IP addressof the destination is known. The last exampleshows how we could use a phone number-likeaddress under SIP.

The major advantages of this addressing schemeare:

• It invents no new directory structure and canbe processed by existing IP servers

• Users can use familiar e-mail or URL addressesto make phone calls and have one less thing toremember, the phone number.

Domain Name Services (DNS)DNS is a standard Internet service to convert

user names, e.g., [email protected] into IPaddresses, e.g., 172.30.10.20, that can be used forfinding user locations and routing calls. BecauseSIP uses standard IP naming and addressing, weare able to use existing, standard DNS services forSIP without any modification.

Next-Gen VoIP Services and Applications Using SIP and Java 41

SIP ServersLocation Server

A location server is used to obtain informationabout a callee’s possible location. A location is theIP address of the domain where a user is located.To locate a user, the name of the user is sent tothe location server and the location server returnszero or multiple locations (IP addresses orfdomains) where a callee may be found. If thecaller already knows the IP address of thedestination server, the caller can directly contactthe callee’s UAS.

Proxy ServersA proxy server is an intermediary program that

acts as both a server and a client for the purposeof making requests on behalf of other clients.Requests are serviced internally by a proxy serveror forwarded, possibly after translation, to otherservers. A proxy interprets and, if necessary,rewrites a request message before forwarding it.

Redirect ServerA redirect server is a server that accepts a SIP

request, maps the address into zero or more newaddresses and returns these addresses to the client.Unlike a proxy server, it does not initiate its ownSIP requests. Unlike a user agent server, it doesnot accept calls.

RegistrarA Registrar is a server that accepts REGISTER

requests. A client uses the REGISTER request to leta proxy or redirect server know the locationwhere the client can be reached. It provides ameans whereby users can register their locationswith a SIP server dynamically. As users move todifferent locations, they can register their newlocations with the local location server.

To supplement information obtained throughuser registrations, a location server may also useone or more TCP/IP protocols, such as finger,

APPENDIX A40

Page 23: Voice Over IP SIP

When the callee sends a response to the INVITErequest agreeing to participate in the call, thecaller sends an ACK to confirm callee’s response.

Call Setup Using A Proxy ServerTo initiate a SIP call, a caller first locates the

appropriate proxy server and then sends a SIPinvitation request to the proxy server. The locationof the proxy server is locally configured on theuser station. The proxy server can also bediscovered automatically by the caller using avariety of mechanisms such as DHCP options, DNSSRV and others. Instead of directly sending the callto the intended callee, the proxy server mayredirect the SIP request or trigger a chain of newSIP requests to other proxies or location servers.

Figure 5 shows detailed flows for SIP call setupusing a proxy server and are describe below:

1. Endpoint1@Site1 sends an INVITE request forEndpoint2@Site2 to the proxy server.

2. The proxy server contacts the location servicefor Endpoint2.

3. The proxy server receives a more preciselocation for Endpoint2 as Client2@Site2 fromthe location server.

4. The proxy server issues an INVITE request tothe address(es) returned by the locationservice. The INVITE request carries a Call-ID.

(Upon receiving the INVITE request, the calleduser-agent alerts the user by generating aphone ring).

5. The called user agent returns a 100 Tryingresponse indicating that it is processing theINVITE request.

6. The called user agent returns a 200 OKresponse to indicate successful processing ofthe INVITE request.

Next-Gen VoIP Services and Applications Using SIP and Java 43

SIP MessagesSIP messages include SIP methods and

responses to the methods. These are listed intables 5 and 6.

SIP Message Encapsulation — MIME Multipurpose Internet Mail Extensions (MIME) is

the Internet standard for describing different typesof content on the Internet, including video andimage types. It is already used by HTTP forcomposing Web pages and by e-mail systems forencoding e-mail messages. SIP uses this well-established standard for encoding information,eliminating the need for inventing a newtechnique for encoding voice and multimedia overthe Internet.

SIP Call SetupSIP is inherently capable of carrying voice,

video, and multimedia calls. In the examplesbelow, the setup flows remain the sameirrespective of the type of the call. In thesescenarios a call set up is illustrated where a callerknows the name but not the IP address of acallee, necessitating the use of a SIP server. If thecaller knew the IP address of the callee, the callerwould not need services from the SIP servers.With a callee’s destination IP address known, thecaller’s user agent client only needs to select theprotocol (UDP by default), port (5060 by default)and IP address of the SIP user agent server towhich the INVITE request should be sent.

A successful SIP call setup consists of twomessages, an INVITE followed by an ACK. TheINVITE request asks the callee to join a particularconference or establish a two-party conversation.It also includes information about the media typesand formats that are allowed for the session. If thecallee wishes to accept the call, it responds to theinvitation by returning a similar description listingthe media and format it wishes to use.

APPENDIX A42

Page 24: Voice Over IP SIP

3. The location server returns information that thisclient can be found at Site3.

4. The redirect server forwards precise locationinformation to the calling user agent using a302 Moved Temporarily message: ContactClient2@Site3

5. The calling user agent acknowledges theinformation with ACK

6. The calling user agent sends an INVITE requestdirectly to the called user agent.

7. The called user agent returns a 100 Tryingresponse indicating that it is processing therequest.

8. The called user agent returns a 200 OKresponse to indicate successful processing ofthe INVITE request.

9. The calling user agent sends an ACK tocomplete the handshake. The call is in nowplace.

Next-Gen VoIP Services and Applications Using SIP and Java 45

7. The calling user agent sends an ACK tocomplete the handshake. The call is now inplace.

Call Setup Using Redirect ServerAgain we assume that the IP address of the

caller is not known to the caller’s agent, thereby,necessitating services of the local SIP server, aredirect server in this case. The key differencecompared to the proxy server is that the redirectserver cannot initiate an INVITE request.

The flow of requests and responses for figure 8is as follows:

1. Enduser1@Site1 sends an INVITE request to theredirect server for Endpoint2@Site2.

2. The redirect server contacts the location serverfor location information about Endpoint2.

Figure 8: SIP Operation in Redirect Mode

Site 1

Endpoint 1 @Site 1

Site 2

LocationServer

RedirectServer

Site 3

Client 2@Site 3INVITE

Endpoint 2@Site 2

Endpoint 2

302Moved

TemporarilyContact:Client 2@Site 3

Site 3

Ack

INVITEClient 2 @Site 3

100 Trying

200 OK

Ack

APPENDIX A44

Page 25: Voice Over IP SIP

Next-Gen VoIP Services and Applications Using SIP and Java 4746 NOTES

Page 26: Voice Over IP SIP

Telephonic no longer rhymes with moronic.

Pingtel xpressa,™ the world’s first Java™-based IP phone, does just

about anything a clever Java programmer could dream up.

To see what your Java colleagues have taught our phone to do

already, go to www.pingtel.com/payphone now and check out our

App Dev Zone.

A good idea of your own and who knows?

You just might get rich. Or famous. Real fast.For Java Developers,

it’s a pay phone.

Page 27: Voice Over IP SIP

This Technology Guide is one in an ongoing series ofover 100 solutions-focused Guides. These Guides assistIT professionals in making informed business decisionsabout specific aspects of technology development andstrategic deployment.

The Technology Guide Series® offers a broad array oftitles, each presenting objective information and practicalguidance in a non-biased, “easy-to-understand” styleand tone. Our editorial writing team has many years ofexperience in IT and communications technologies, andis highly conversant in today’s emerging technologies.

The Technology Guide Series and techguide.com aresupported by a consortium of leading technologyproviders. The Sponsor has lent its support to produceand publish this Guide.

This Guide, as well as the entire Technology GuideSeries, is made available to view and print at no chargeby visiting techguide.com.

produced and published by

Over 100 Technology Guides in the following categories:

Network Management

Internet

Enterprise Solutions

Network Technology

Software Applications

Security

Convergence/CTI

Telecommunications