yii chin huang

24
ELECTRONIC BUSINESS CARD OVER THE INTERNET YII CHIN HUANG Universiti Malaysia Sarawak 2000

Upload: others

Post on 14-May-2022

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: YII CHIN HUANG

ELECTRONIC BUSINESS CARD OVER THE INTERNET

YII CHIN HUANG

Universiti Malaysia Sarawak 2000

Borang Penyerahan Tesis Universiti Malaysia Sarawak

R13a

BORANG PENYERAHAN TESIS

ludul Electronic Business Card over the Internet

SESI PENGAJIAN 199798

Saya yn CHIN HUANG (HURUF BESAR)

Mengaku membenarkan tesis ini disimpan di Pusat Khidmat Maklumat Akademik Universiti Malaysia Sarawak dengan syarat-syarat kegunaan seperti berikut

1 Hakmilik kertas projek adalah di bawah nama penulis melainkan penulisan sebagai projek bersama dan dibiayai oleh UNIMAS hakmiliknya adalah kepunyaan UNIMAS

2 Naskhah salinan di dalam bentuk kertas atau mikro hanya boleh dibuat dengan kebenaran bertulis daripada penulis

3 Pusat Khidmat Maklumat Akademik UNlMAS dibenarkan membuat salinan untuk pengajian mereka 4 Kertas projek hanya boleh diterbitkan dengan kebenaran penulis Bayaran royalti adalah mengikut kadar

yang dipersetujui kelak 5 bull Saya membenarkantidak membenarkan Perpustakaan membuat salinan kertas projek ini sebagai bahan

pertukaran di antara institusi pengajian tinggi 6 bullbull Sila tandakan ( )

1c=J SULIT (Mengandungi maklumat yang berdarjah keselamatan atau kepentingan Malaysia seperti yang termaktub di dalam AKTA RAHSIA RASMI 1972)

c=J TERHAD (Mengandungi maklumat TERHAD yang telah ditentukan oleh organisasi badan di mana penyelidikan dijaJankan)

CJ TIDAK TERHAD

Disahkan oleh

Aiamat tetap 227 JJn Stampin Tengab

93250 Kuching Nama Penyelia

Sarawak

Tarikh 19 March 2000 Tarikh

CATATAN Potong yang tidak berkenaan bullbull Jika Kertas Projek ini SULIT atau TERHAD sila Jampirkan sural daripada pihak berkuasal

organisasi berkenaan deogan mcoyertakao sekali tempoh kertas projek Ini perlu dikeJaskan sebagai SUUT alau TERHAD

Tesis ini telah dibaca dan disahkan oleh

318~cfo~Encik N lang Yew Tarikh Penyelia

ELECTRONIC BUSINESS CARD OVER THE INTERNET

YII CHIN HUANG

Tesis Dikemukakan Kepada Fakulti Kejuruteraan Universiti Malaysia Sarawak Sebagai Memenuhi Sebahagian Daripada Syarat

Penganugerahan Sarjana Muda Kejuruteraan Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi)

2000

To my beloved family and friends

ii

ACKNOWLEDMENT

First of all I would like to record my greatest gratitude to supervisor of this

study Mr Ng Liang Yew who has always been understanding open giving priceless

supervision and advice in leading all the way through to complete this study

Besides I would like to express my heartiest thanks to those who have been in

one or another way help and contribute to this study

Thanks to those people who have inspired me directly or indirectly especially

founders of internet and dot com companies with their vision technology pioneering

spirit entrepreneur spirit and shaping the net I appreciate the creation of the internet so

that I can search for my thesis information fast easy and comfortable

Domo Arigato to the CEO amp President Vice President HR Manager Senior

Manager and Researchers at Nippon Telegraph and Telephone (NIT MSC Sdn Bhd

Cyberjaya) (httpwwwnttcomworld) for assuring me a job as a Researcher I could

join NIT -due to the experience and knowledge I gained partly from the study of this

thesis even before my graduation

Finally and as always my beloved father mother sisters brother sister-in-Iaws

for their understanding and never ending support on my projects

III

Abstract

Business cards has exists long since business contacts and communications play

an important role in ensuring a success in business But it seems paper is still the major

medium for printing business cards It might get dirty lost or tomed Printing the card

especially high quality cards is costly When business contacts and network grows it is

hard to manage the cards for searching and keeping them systematically Exchanging

business cards only possible if two persons met

Hence the idea of electronic business card surfaced The product can solve all

these problems and proven to be very interactive and keep the electronic business card

owner in a competitive situation All the e-businesscards will be kept on the server and

could be viewed as web pages from anywhere in the world Then the cards can be

downloaded and be stored in desktop computer The cards would be stored

systematically and electronically with some added features such as direct fax telephone

dialing and conversation chat e-mail and videoconferencing from the software

installed in the desktop itself without having to buy any fax machine or telephone set

Electronic business card take the advantage of the internet as the medium of

exchanging business cards among businessmen and professionals Integrated in a

search engine for Multimedia Super Corridor ( httpwwwcyber-jayacom ) Create a

one stop environment that is suitable for doing e-commerce

Components of Electronic Business Card

bull Voice over Internet Protocol

bull Fax over Internet Protocol

bull Short Messaging System

bull Email

bull Vide9conferencing

bull Chat

IV

bull E-Commerce

bull Global Positioning System

excluded in this thesis

v

Abstrak

Kad perlllagaan telah wujud sekian lama semenjak perhubungan perniagaan

memainkan peranan yang penting dalam menentukan kej ayaan sesebuah perniagaan

Namun kertas masih lagi menjadi bahan utama untuk pencetakan kad perniagaan Ia

mungkin menjadi kotor hilang atau terkoyak Mencetak kad yang bermutu tinggi

memerlukan kos yang tinggi Apabila perhubungan dan rangkaian perniagaan semakin

berkembang adalah sukar untuk mengurus kad-kad tersebut bagi tujuan pencarian

semula dan menyimpan kad-kad tersebut secara sistematik Pertukaran kad hanya

mungkin apabila dua orang bertemu

Maka dengan itu timbullah idea kad perniagaan elektronik Hasilnya nanti dapat

menyelesaikan semua masalah di atas dan terbukti adalah sangat interaktif untuk

meletakkan pemilik kad pad a kedudukan yang berdaya saing Kesemua kad perniagaan

elektronik akan disimpan di dalm pelayan dan dapat dilihat sebagai Ian web dari manashy

mana pelusuk dunia Kemudian kad-kad ini dapat disimpan dalam komputer meja

Kad-kad ini akan disimpan secara sistematik dengan ciri-ciri tambahan seperti faks

dailan dan perbualan secara telefon borak emel dan sidang video daripada perisian

yang dimasukkan ke dalam komputer meja tanpa perlu membeli mesin faks atau set

telefon

Kad perniagaan elektronik menggunakan kelebihan internet sebagai perantara

untuk pertukaran kad perniagaan di antara golongan ahli perniagaan dan ahli

profesional Diintegrasikan bersama enjin pencari untuk Koridor Raya Multimedia (

hUpwwwcyber-javacom ) Ini mewujudkan suatu persekitaran sepusat yang sesuai untuk

menjalankan e-dagang

Komponen utama Kad Perniagaan Elektronik

bull Penghantaran suara secara protokol internet

bull Penghantaran faks secara protokol internet

vi

bull Sistem rnesej ringkas

bull Ernel

bull Sidang video

bull Borak

bull e-dagang

bull sistern kedudukan sedunia

dikecualikan daripada tesis

vii

TABLE OF CONTENTS

CONTENTS PAGES

Dedication ii

Acknowledgment iii

Abstract iv

Abstrak vi

Table of contents vii

List of Tables xii

List of Figures xii

CHAPTER 1 COMPUTER TELEPHONY INTEGRATION (CTI)

11 Introduction to CTI 1

12 CTI with modem or sophisticated DSP card 1

CHAPTER 2 INTERNET PROTOCOL

21 Introduction to Internet Protocol (lP) 2

22 IP Host Addresses and Routing 3

23 IP version 6 4

CHAPTER 3 VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview 5

32 VoIP vs PSTN 5

33 VoIP Hardware 6

34 VoIP Software 7

35 Implementation Issues of VoIP 12

36 VoIP Potential 13

viii

612 Phone Device Class

613 Basic Services

614 Supplementary Services

62 TAPI Phone Numbers

63 TAPI Initialization

64 API Negotiation

65 Making the Call

66 Ending a Call

67 Closing the Line

68 Shutdown

CHAPTER 7 JAVA TELEPHONY APPLICATION

INTERFACE (JTAPI)

71 Java vs C++

72 JTAPI Overview

73 Java Telephony Package Architecture

74 Java Telephony Call Model

~41 Provider Object

742 Call Object

743 Address Object

744 Connection Object

745 Terminal Object

746 TerminalConnection Object

75 JTAPI Core Package Methods

33

33

34

36

41

42

45

50

51

52

PROGRAMMING

53

55

56

57

58

58

58

59

59

59

60

x

751 CallconnectO 60

752 TerminalConnectionanswerO 60

753 ConnectiondisconnectO 60

76 The JTAPI Observer Model 63

77 Application Code Examples 63

771 Outgoing Telephone Call Example 64

772 Incoming Telephone Call Example 67

CHAPTER 8 SHORT MESSAGING SYSTEM (SMS) FROM INTERNET TO

MOBILE

81 SMS Overview 72

82 SMS Implementation Example 72

CHAPTER 9 DISCUSSIONS AND CONCLUSIONS

91 Enumtapi 75

91 TAPI Browser 76

9l Conclusions 77

93 Further Works 79

Appendix 81

References 82

xi

LI T OF TABLES

Table Page

1 T API Support for Windows Platform 35

LIST OF FIGURES

Figure Page

1 Enumtapi 75

XII

CHAPTER 1

COMPUTER TELEPHONY INTEGRATION

11 Introduction

Computer Telephony (CT) is the integration of the computer to the Public

Switched Telephone Network (PSTN) CT can be designed as desktop dialing faxing

and as Voice over Internet Protocol (VoIP) application with call buttons on web pages

It will increase customer service and organizational efficiency by automating and

adding intelligence to the way we communicate with the telephone

12 CII with modem or sophisticated nsp card

Applications connect directly to the PSTN with PC based telephony hardware

cards These hardware cards range from simple voice modems to more sophisticated

Digital Signal Processing (DSP) based solutions such as Dialogic Voice modems

provide a less expensive solution for home users However it is impractical for

commercial solutions whereas a voice modem is restricted with limited number of

phone line connections per server Furthermore voice modems do not support

advanced features such as to accurately recognize the range of tones that may be

required by a CT application [1]

1

CHAPTER 2

INTERNET TRANSFER PROTOCOL

21 Introduction to Internet Protocol (lP)

The IP is a routing protocol designed to route traffic within a network or

between networks IP is designed to remain transparent to the end user application The

transparency is achieved by encapsulation The data sent by the host computer are

encapsulated into IP packets The IP header identifies the address of the receiving host

computer The IP packets and header are further encapsulated into the specific protocol

of the transit network such as X25 or Ethernet LAN After the transit network has

delivered the traffic to an IP router its link control information is stripped away The

gateway then uses the destination address in the datagram header to determine where to

route the traffic Typically it then passes the datagram to a subnetwork by invoking a

subnetwork access protocol This protocol is used to encapsulate the datagram header

and user data into the headers and trailers that are used by the subnetwork This process

is repeated at each gateway until it reached the destination[ 4]

Transmission Control Protocol (TCP) provides a reliable byte stream between

two processes It is reliable and applications are not required to monitor for lost or

corrupted packets TCP is a connection oriented protocol because applications that

communicate via TCP establish a logical connection before any exchange of data can

take place and terminate the connection when the data exchange has been

completed [IS]

User Datagram Protocol (UCP) is a connectionless protocol where data packets

addressed and -delivered individually UDP is not a reliable protocol hence

applications must be prepared to handle the loss of packets[IS]

2

22 IP Host Addresses and Routing

An IP host address is a 32-bit number uniquely identifying an Internet host

According to convention the 4-byte Internet host address is usually written down as a

set of four decimal numbers for example 127001 The Internet host address is

usually divided into two parts the network address and the actual host address The

respective lengths of these two portions of the address vary depending on the most

significant byte in the address( 4)

Class A network addresses are those with the most significant byte between 0

and 127 A Class A address consists of an 8-bit network address and a 24-bit host

address Because addresses beginning with 0 and 127 are reserved there can be a

maximum of 126 class A subnets on an Internet A Class A subnet can contain up to

16777214 hosts Class B network addresses are those with the most significant byte

between 128 and 191 Class B addresses consist of a 16-bit network address and a 16shy

bit host address There can be a maximum of 16383 class B subnets A Class B subnet

may contain up to 65534 hosts A Class C network address is one with the most

significant byte between 192 and 223 This allows a total of 2097152 class C subnets

A Class C subnet may contain up to 254 hosts Class D addresses with most significant

byte between 224 and 255 are reserved for IP multicasting

Once the destination address of a packet is known hosts on an Internet can

route the packet as appropriate Routing involves either forwarding a packet to a

destination that is known to the host or passing it along a default route Larger hosts

maintain dynamically updated routing tables Through these tables the correct route of

packets can be identified and in the case of a network error alternate routes can be

nd

3

23 IP version 6

IP Version 6 (IPv6) is the next generation protocol designed by the Internet

Engineering Task Force (IETF) to replace the current version Internet Protocol IP

Version 4 (IPv4) There is a growing shortage of IPv4 addresses which are needed by

all new machines added to the Internet IPv6 fixes a number of problems in IPv4 such

as the limited number of available IPv4 addresses It also adds many improvements to

IPv4 in areas uch as routing and network autoconfiguration [18]

4

CHAPTER 3

VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview

VoIP is a mean to bypass the long distance charge One can simultaneously talk

fax and receive information from anywhere in the world for the cost of a local phone

call by taking advantage of Transmission Control Protocol (TCP)lP TCPlP makes the

underlying physical connection irrelevant and can run over T1 Integrated Services

Digital Network (ISDN) Frame Relay wireless microwave or satellite links[20]

The most important developments in the VoIP was the adoption of an

interoperability standard H323 an International Telecommunication Union (ITU)

standard for Internet telephony and videoconferencing provides the foundation for an

IP based telephone network H323 provides a standard set of procedures for setting up

voice and video calls over a TCPlP network and allows for the use of multiple codecs

In depth discussion about H323 is available in Chapter 4[20]

32 VoIP vs PSTN

Compared to a real phone line an H323 requires only bandwidth It doesnt

care what kind of circuit is sitting underneath it Let it be T1 xDSL wireless or a dialshy

up Plain Old Telephony Service (POTS) connection A single broadband pipe can

deliver a fairly large number of virtual telephone lines This is a big improvement over

the Public Switched Telephone Network (PSTN) circuit centric mentality where every

service requires its own copper pair to the subscriber [20]

With H323 bandwidth is reduced from 64Kbpseach to lOKbpseach [21]

Once compression is applied voice doesnt require very much bandwidth Then its

5

really a waste to send voice at 64 kbps uncompressed through any network whether it

is the PSTN or the Internet

Internet is unreliable and insecure while analog phone lines very rarely fail

Important point to consider when implementing VoIP

bull Distribute H323 gateways throughout all the networks to avoid creating a situation

where a single hardware outage can affect many other services

bull Gateway software should be smart enough so that it can reroute calls to other

gateways when needed

bull Gateway should route calls over the PSTN when the IP network is unavailable

33 VoIP Hardware

In selecting hardware it will be important to select a platform which is costshy

effective standards compliant and easily serviced It is also important to use

components which offload compression and error correction tasks from the server CPU

to a DSP houses on the gateway Implementations where media processing is done on

the server CPU should be avoided as these systems do not scale well and often

introduce more latency than solutions which offload media processing to a DSP

optimized for the job of compressingdecompressing audio [20]

Gateways are required to adapt traditional analog telephony to the Internet

Within the gateway device there are different types of processors that handle the

conversion from traditional to VoIP DSP handle all of the signal processing activity

including voice compression tone detection and generation echo cancellation and

silence suppression

There are also microprocessors which control the DSP and handle all the H323

taco processing and network management functions Some of the functions in the

micro include routing bil1ing and management both within the micro and in between

6

the micro and the DSP The first thing that happens in the DSP is that an analog voice

signal is received This signal is converted to a Pulse Code Modulation (PCM) digital

stream PCM i the classic process of converting analog telephony to digital As a result

of delay in the network echo and talker overlap occurred Echo is caused by the signal

reflections of the speakers voice from the far end telephone equipment back into the

speakers ear Echo becomes a significant problem when the round trip delay becomes

greater than 50 milliseconds Since echo is perceived as a significant quality problem

VoIP systems must address the need for echo control and implement some means of

echo cancellation[20]

Next the Voice Activity Director (V AD) detects and removes silence In a

typical conversation 50 of the conversation is silence Removing the silence can

improve bandwidth consumption After the tone is routed around the CO DEC the

remaining PCM samples are forwarded to the CODEC Voice codecs (codingdecoding

algorithms) are used to compress voice for packet network transmission Most

CODECs garble signaling tones to the point that they are unrecognizable by the tone

detection devices for which they are intended Therefore the tone is detected and

routed around the CODECs

34 VoIP Software

The software consists of the following major subsystems User Interface Voice

Processing Telephony Signaling Gateway Network Interface Protocols Network

Management Agent and System Services [20]

The User Interface provides tbe traditional user interface functions of a

telephone At a minimum this consists of a keypad for dialing numbers (0-9 ) and

dible indicator for announcing incoming calls to the user On more sophisticated

intcdaces additional keys are provided for features such as mute redial hold transfer

7

conferencing etc A display is also typically provided for displaying user prompts

number diaJed CallerID information for incoming calls etc

The Voice Processing software is composed of the following software modules

bull PCM Interface Unit Receives PCM samples from the analog interface and

forwards then to the appropriate DSP software module for processing It also

forwards processed PCM samples to the analog interface

bull Tone Generator Generates call progress tones to the user and generates in-band

DTMF digits to the network based on key presses relayed from the User Interface

For certain voice codecs the compression algorithm does not permit faithful

transmission of DTMF tones For those algorithms eg G7231 the software

generates an in-band message to the network that is used by the remote gateway to

regenerate the DTMF tone

bull Line Echo Canceller Unit Performs ITU G168 compliant echo cancellation on

sampled full -duplex voice port signals Echo in a telephone network is caused by

signal reflections generated by the hybrid circuit that converts between a 4-wire

circuit (a separate transmit and receive pair) and a 2-wire circuit (a single transmit

and receive pair) These reflections of the speakers voice are heard in the speakers

ear Echo is present even in a conventional circuit switched telephone network ~ -

However it is acceptable because the round trip delays through the network are

smaller than 50 ms and the echo is masked by the normal side tone every telephone

generates Echo becomes a problem in VoIP networks because the round trip delay

through the network is almost always greater than 50 ms Thus echo cancellation

techniques are required ITU standard G168 defines performance requirements that

are currently required for echo cancellers Echo is cancelled toward the packet

Detwork from the telephone network The echo canceller compares the voice data

received from the packet network with voice data being transmitted to the packet

8

network The echo from the telephone network hybrid is removed by a digital filter

on the transmit path into the packet network

bull Voice Activity Detector (V AD) Detects voice activity and activates or deactivates

the transmission of packets in order to optimize bandwidth When activity is not

detected the encoder output will not be transported across the network This

software also measures Idle Noise characteristics of the interface and reports this

information to the Packet Voice Protocol for periodic forwarding to the remote

gateway Idle noise is reproduced by the remote end when there is no voice activity

so that the remote user does not fee l that the line went dead

bull Voice Codec Unit Perfonns packetization of the 64 kbps data stream received

from the user Various compression algorithms exist which have different

performance characteristics G711 PCM which operates at 64 kbps (no

compression) G726 ADPCM which operates at 16 24 32 and 40 kbps G7231

which operates at 53 or 63 kbps and G729 which operates at 8 kbps Typically

voice algorithms that perform greater compression require much more processing

power It should be noted that high fidelity audio quality compression algorithms

can also be used since VoIP is not subject to the 4 kHz bandwidth restrictions found

in the PS1N This would provide better sounding audio than PCM and allow music -

to be faithfully reproduced

bull Packet Playout Unit Performs compensation for network delay network jitter and

dropped packets Many proprietary techniques are used to address these problems

since there are currently no standards in place for packet playout

bull Packet Protocol Encapsulation Unit Performs encapsulation of the packet voice

data destined for the network interface For VoIP this encapsulation is per the Real-

Transport Protocol (RTP) which runs directly on top of UDP

oice Encryption Provides optional encryption of the voice packet data prior to

9

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10

Page 2: YII CHIN HUANG

Borang Penyerahan Tesis Universiti Malaysia Sarawak

R13a

BORANG PENYERAHAN TESIS

ludul Electronic Business Card over the Internet

SESI PENGAJIAN 199798

Saya yn CHIN HUANG (HURUF BESAR)

Mengaku membenarkan tesis ini disimpan di Pusat Khidmat Maklumat Akademik Universiti Malaysia Sarawak dengan syarat-syarat kegunaan seperti berikut

1 Hakmilik kertas projek adalah di bawah nama penulis melainkan penulisan sebagai projek bersama dan dibiayai oleh UNIMAS hakmiliknya adalah kepunyaan UNIMAS

2 Naskhah salinan di dalam bentuk kertas atau mikro hanya boleh dibuat dengan kebenaran bertulis daripada penulis

3 Pusat Khidmat Maklumat Akademik UNlMAS dibenarkan membuat salinan untuk pengajian mereka 4 Kertas projek hanya boleh diterbitkan dengan kebenaran penulis Bayaran royalti adalah mengikut kadar

yang dipersetujui kelak 5 bull Saya membenarkantidak membenarkan Perpustakaan membuat salinan kertas projek ini sebagai bahan

pertukaran di antara institusi pengajian tinggi 6 bullbull Sila tandakan ( )

1c=J SULIT (Mengandungi maklumat yang berdarjah keselamatan atau kepentingan Malaysia seperti yang termaktub di dalam AKTA RAHSIA RASMI 1972)

c=J TERHAD (Mengandungi maklumat TERHAD yang telah ditentukan oleh organisasi badan di mana penyelidikan dijaJankan)

CJ TIDAK TERHAD

Disahkan oleh

Aiamat tetap 227 JJn Stampin Tengab

93250 Kuching Nama Penyelia

Sarawak

Tarikh 19 March 2000 Tarikh

CATATAN Potong yang tidak berkenaan bullbull Jika Kertas Projek ini SULIT atau TERHAD sila Jampirkan sural daripada pihak berkuasal

organisasi berkenaan deogan mcoyertakao sekali tempoh kertas projek Ini perlu dikeJaskan sebagai SUUT alau TERHAD

Tesis ini telah dibaca dan disahkan oleh

318~cfo~Encik N lang Yew Tarikh Penyelia

ELECTRONIC BUSINESS CARD OVER THE INTERNET

YII CHIN HUANG

Tesis Dikemukakan Kepada Fakulti Kejuruteraan Universiti Malaysia Sarawak Sebagai Memenuhi Sebahagian Daripada Syarat

Penganugerahan Sarjana Muda Kejuruteraan Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi)

2000

To my beloved family and friends

ii

ACKNOWLEDMENT

First of all I would like to record my greatest gratitude to supervisor of this

study Mr Ng Liang Yew who has always been understanding open giving priceless

supervision and advice in leading all the way through to complete this study

Besides I would like to express my heartiest thanks to those who have been in

one or another way help and contribute to this study

Thanks to those people who have inspired me directly or indirectly especially

founders of internet and dot com companies with their vision technology pioneering

spirit entrepreneur spirit and shaping the net I appreciate the creation of the internet so

that I can search for my thesis information fast easy and comfortable

Domo Arigato to the CEO amp President Vice President HR Manager Senior

Manager and Researchers at Nippon Telegraph and Telephone (NIT MSC Sdn Bhd

Cyberjaya) (httpwwwnttcomworld) for assuring me a job as a Researcher I could

join NIT -due to the experience and knowledge I gained partly from the study of this

thesis even before my graduation

Finally and as always my beloved father mother sisters brother sister-in-Iaws

for their understanding and never ending support on my projects

III

Abstract

Business cards has exists long since business contacts and communications play

an important role in ensuring a success in business But it seems paper is still the major

medium for printing business cards It might get dirty lost or tomed Printing the card

especially high quality cards is costly When business contacts and network grows it is

hard to manage the cards for searching and keeping them systematically Exchanging

business cards only possible if two persons met

Hence the idea of electronic business card surfaced The product can solve all

these problems and proven to be very interactive and keep the electronic business card

owner in a competitive situation All the e-businesscards will be kept on the server and

could be viewed as web pages from anywhere in the world Then the cards can be

downloaded and be stored in desktop computer The cards would be stored

systematically and electronically with some added features such as direct fax telephone

dialing and conversation chat e-mail and videoconferencing from the software

installed in the desktop itself without having to buy any fax machine or telephone set

Electronic business card take the advantage of the internet as the medium of

exchanging business cards among businessmen and professionals Integrated in a

search engine for Multimedia Super Corridor ( httpwwwcyber-jayacom ) Create a

one stop environment that is suitable for doing e-commerce

Components of Electronic Business Card

bull Voice over Internet Protocol

bull Fax over Internet Protocol

bull Short Messaging System

bull Email

bull Vide9conferencing

bull Chat

IV

bull E-Commerce

bull Global Positioning System

excluded in this thesis

v

Abstrak

Kad perlllagaan telah wujud sekian lama semenjak perhubungan perniagaan

memainkan peranan yang penting dalam menentukan kej ayaan sesebuah perniagaan

Namun kertas masih lagi menjadi bahan utama untuk pencetakan kad perniagaan Ia

mungkin menjadi kotor hilang atau terkoyak Mencetak kad yang bermutu tinggi

memerlukan kos yang tinggi Apabila perhubungan dan rangkaian perniagaan semakin

berkembang adalah sukar untuk mengurus kad-kad tersebut bagi tujuan pencarian

semula dan menyimpan kad-kad tersebut secara sistematik Pertukaran kad hanya

mungkin apabila dua orang bertemu

Maka dengan itu timbullah idea kad perniagaan elektronik Hasilnya nanti dapat

menyelesaikan semua masalah di atas dan terbukti adalah sangat interaktif untuk

meletakkan pemilik kad pad a kedudukan yang berdaya saing Kesemua kad perniagaan

elektronik akan disimpan di dalm pelayan dan dapat dilihat sebagai Ian web dari manashy

mana pelusuk dunia Kemudian kad-kad ini dapat disimpan dalam komputer meja

Kad-kad ini akan disimpan secara sistematik dengan ciri-ciri tambahan seperti faks

dailan dan perbualan secara telefon borak emel dan sidang video daripada perisian

yang dimasukkan ke dalam komputer meja tanpa perlu membeli mesin faks atau set

telefon

Kad perniagaan elektronik menggunakan kelebihan internet sebagai perantara

untuk pertukaran kad perniagaan di antara golongan ahli perniagaan dan ahli

profesional Diintegrasikan bersama enjin pencari untuk Koridor Raya Multimedia (

hUpwwwcyber-javacom ) Ini mewujudkan suatu persekitaran sepusat yang sesuai untuk

menjalankan e-dagang

Komponen utama Kad Perniagaan Elektronik

bull Penghantaran suara secara protokol internet

bull Penghantaran faks secara protokol internet

vi

bull Sistem rnesej ringkas

bull Ernel

bull Sidang video

bull Borak

bull e-dagang

bull sistern kedudukan sedunia

dikecualikan daripada tesis

vii

TABLE OF CONTENTS

CONTENTS PAGES

Dedication ii

Acknowledgment iii

Abstract iv

Abstrak vi

Table of contents vii

List of Tables xii

List of Figures xii

CHAPTER 1 COMPUTER TELEPHONY INTEGRATION (CTI)

11 Introduction to CTI 1

12 CTI with modem or sophisticated DSP card 1

CHAPTER 2 INTERNET PROTOCOL

21 Introduction to Internet Protocol (lP) 2

22 IP Host Addresses and Routing 3

23 IP version 6 4

CHAPTER 3 VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview 5

32 VoIP vs PSTN 5

33 VoIP Hardware 6

34 VoIP Software 7

35 Implementation Issues of VoIP 12

36 VoIP Potential 13

viii

612 Phone Device Class

613 Basic Services

614 Supplementary Services

62 TAPI Phone Numbers

63 TAPI Initialization

64 API Negotiation

65 Making the Call

66 Ending a Call

67 Closing the Line

68 Shutdown

CHAPTER 7 JAVA TELEPHONY APPLICATION

INTERFACE (JTAPI)

71 Java vs C++

72 JTAPI Overview

73 Java Telephony Package Architecture

74 Java Telephony Call Model

~41 Provider Object

742 Call Object

743 Address Object

744 Connection Object

745 Terminal Object

746 TerminalConnection Object

75 JTAPI Core Package Methods

33

33

34

36

41

42

45

50

51

52

PROGRAMMING

53

55

56

57

58

58

58

59

59

59

60

x

751 CallconnectO 60

752 TerminalConnectionanswerO 60

753 ConnectiondisconnectO 60

76 The JTAPI Observer Model 63

77 Application Code Examples 63

771 Outgoing Telephone Call Example 64

772 Incoming Telephone Call Example 67

CHAPTER 8 SHORT MESSAGING SYSTEM (SMS) FROM INTERNET TO

MOBILE

81 SMS Overview 72

82 SMS Implementation Example 72

CHAPTER 9 DISCUSSIONS AND CONCLUSIONS

91 Enumtapi 75

91 TAPI Browser 76

9l Conclusions 77

93 Further Works 79

Appendix 81

References 82

xi

LI T OF TABLES

Table Page

1 T API Support for Windows Platform 35

LIST OF FIGURES

Figure Page

1 Enumtapi 75

XII

CHAPTER 1

COMPUTER TELEPHONY INTEGRATION

11 Introduction

Computer Telephony (CT) is the integration of the computer to the Public

Switched Telephone Network (PSTN) CT can be designed as desktop dialing faxing

and as Voice over Internet Protocol (VoIP) application with call buttons on web pages

It will increase customer service and organizational efficiency by automating and

adding intelligence to the way we communicate with the telephone

12 CII with modem or sophisticated nsp card

Applications connect directly to the PSTN with PC based telephony hardware

cards These hardware cards range from simple voice modems to more sophisticated

Digital Signal Processing (DSP) based solutions such as Dialogic Voice modems

provide a less expensive solution for home users However it is impractical for

commercial solutions whereas a voice modem is restricted with limited number of

phone line connections per server Furthermore voice modems do not support

advanced features such as to accurately recognize the range of tones that may be

required by a CT application [1]

1

CHAPTER 2

INTERNET TRANSFER PROTOCOL

21 Introduction to Internet Protocol (lP)

The IP is a routing protocol designed to route traffic within a network or

between networks IP is designed to remain transparent to the end user application The

transparency is achieved by encapsulation The data sent by the host computer are

encapsulated into IP packets The IP header identifies the address of the receiving host

computer The IP packets and header are further encapsulated into the specific protocol

of the transit network such as X25 or Ethernet LAN After the transit network has

delivered the traffic to an IP router its link control information is stripped away The

gateway then uses the destination address in the datagram header to determine where to

route the traffic Typically it then passes the datagram to a subnetwork by invoking a

subnetwork access protocol This protocol is used to encapsulate the datagram header

and user data into the headers and trailers that are used by the subnetwork This process

is repeated at each gateway until it reached the destination[ 4]

Transmission Control Protocol (TCP) provides a reliable byte stream between

two processes It is reliable and applications are not required to monitor for lost or

corrupted packets TCP is a connection oriented protocol because applications that

communicate via TCP establish a logical connection before any exchange of data can

take place and terminate the connection when the data exchange has been

completed [IS]

User Datagram Protocol (UCP) is a connectionless protocol where data packets

addressed and -delivered individually UDP is not a reliable protocol hence

applications must be prepared to handle the loss of packets[IS]

2

22 IP Host Addresses and Routing

An IP host address is a 32-bit number uniquely identifying an Internet host

According to convention the 4-byte Internet host address is usually written down as a

set of four decimal numbers for example 127001 The Internet host address is

usually divided into two parts the network address and the actual host address The

respective lengths of these two portions of the address vary depending on the most

significant byte in the address( 4)

Class A network addresses are those with the most significant byte between 0

and 127 A Class A address consists of an 8-bit network address and a 24-bit host

address Because addresses beginning with 0 and 127 are reserved there can be a

maximum of 126 class A subnets on an Internet A Class A subnet can contain up to

16777214 hosts Class B network addresses are those with the most significant byte

between 128 and 191 Class B addresses consist of a 16-bit network address and a 16shy

bit host address There can be a maximum of 16383 class B subnets A Class B subnet

may contain up to 65534 hosts A Class C network address is one with the most

significant byte between 192 and 223 This allows a total of 2097152 class C subnets

A Class C subnet may contain up to 254 hosts Class D addresses with most significant

byte between 224 and 255 are reserved for IP multicasting

Once the destination address of a packet is known hosts on an Internet can

route the packet as appropriate Routing involves either forwarding a packet to a

destination that is known to the host or passing it along a default route Larger hosts

maintain dynamically updated routing tables Through these tables the correct route of

packets can be identified and in the case of a network error alternate routes can be

nd

3

23 IP version 6

IP Version 6 (IPv6) is the next generation protocol designed by the Internet

Engineering Task Force (IETF) to replace the current version Internet Protocol IP

Version 4 (IPv4) There is a growing shortage of IPv4 addresses which are needed by

all new machines added to the Internet IPv6 fixes a number of problems in IPv4 such

as the limited number of available IPv4 addresses It also adds many improvements to

IPv4 in areas uch as routing and network autoconfiguration [18]

4

CHAPTER 3

VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview

VoIP is a mean to bypass the long distance charge One can simultaneously talk

fax and receive information from anywhere in the world for the cost of a local phone

call by taking advantage of Transmission Control Protocol (TCP)lP TCPlP makes the

underlying physical connection irrelevant and can run over T1 Integrated Services

Digital Network (ISDN) Frame Relay wireless microwave or satellite links[20]

The most important developments in the VoIP was the adoption of an

interoperability standard H323 an International Telecommunication Union (ITU)

standard for Internet telephony and videoconferencing provides the foundation for an

IP based telephone network H323 provides a standard set of procedures for setting up

voice and video calls over a TCPlP network and allows for the use of multiple codecs

In depth discussion about H323 is available in Chapter 4[20]

32 VoIP vs PSTN

Compared to a real phone line an H323 requires only bandwidth It doesnt

care what kind of circuit is sitting underneath it Let it be T1 xDSL wireless or a dialshy

up Plain Old Telephony Service (POTS) connection A single broadband pipe can

deliver a fairly large number of virtual telephone lines This is a big improvement over

the Public Switched Telephone Network (PSTN) circuit centric mentality where every

service requires its own copper pair to the subscriber [20]

With H323 bandwidth is reduced from 64Kbpseach to lOKbpseach [21]

Once compression is applied voice doesnt require very much bandwidth Then its

5

really a waste to send voice at 64 kbps uncompressed through any network whether it

is the PSTN or the Internet

Internet is unreliable and insecure while analog phone lines very rarely fail

Important point to consider when implementing VoIP

bull Distribute H323 gateways throughout all the networks to avoid creating a situation

where a single hardware outage can affect many other services

bull Gateway software should be smart enough so that it can reroute calls to other

gateways when needed

bull Gateway should route calls over the PSTN when the IP network is unavailable

33 VoIP Hardware

In selecting hardware it will be important to select a platform which is costshy

effective standards compliant and easily serviced It is also important to use

components which offload compression and error correction tasks from the server CPU

to a DSP houses on the gateway Implementations where media processing is done on

the server CPU should be avoided as these systems do not scale well and often

introduce more latency than solutions which offload media processing to a DSP

optimized for the job of compressingdecompressing audio [20]

Gateways are required to adapt traditional analog telephony to the Internet

Within the gateway device there are different types of processors that handle the

conversion from traditional to VoIP DSP handle all of the signal processing activity

including voice compression tone detection and generation echo cancellation and

silence suppression

There are also microprocessors which control the DSP and handle all the H323

taco processing and network management functions Some of the functions in the

micro include routing bil1ing and management both within the micro and in between

6

the micro and the DSP The first thing that happens in the DSP is that an analog voice

signal is received This signal is converted to a Pulse Code Modulation (PCM) digital

stream PCM i the classic process of converting analog telephony to digital As a result

of delay in the network echo and talker overlap occurred Echo is caused by the signal

reflections of the speakers voice from the far end telephone equipment back into the

speakers ear Echo becomes a significant problem when the round trip delay becomes

greater than 50 milliseconds Since echo is perceived as a significant quality problem

VoIP systems must address the need for echo control and implement some means of

echo cancellation[20]

Next the Voice Activity Director (V AD) detects and removes silence In a

typical conversation 50 of the conversation is silence Removing the silence can

improve bandwidth consumption After the tone is routed around the CO DEC the

remaining PCM samples are forwarded to the CODEC Voice codecs (codingdecoding

algorithms) are used to compress voice for packet network transmission Most

CODECs garble signaling tones to the point that they are unrecognizable by the tone

detection devices for which they are intended Therefore the tone is detected and

routed around the CODECs

34 VoIP Software

The software consists of the following major subsystems User Interface Voice

Processing Telephony Signaling Gateway Network Interface Protocols Network

Management Agent and System Services [20]

The User Interface provides tbe traditional user interface functions of a

telephone At a minimum this consists of a keypad for dialing numbers (0-9 ) and

dible indicator for announcing incoming calls to the user On more sophisticated

intcdaces additional keys are provided for features such as mute redial hold transfer

7

conferencing etc A display is also typically provided for displaying user prompts

number diaJed CallerID information for incoming calls etc

The Voice Processing software is composed of the following software modules

bull PCM Interface Unit Receives PCM samples from the analog interface and

forwards then to the appropriate DSP software module for processing It also

forwards processed PCM samples to the analog interface

bull Tone Generator Generates call progress tones to the user and generates in-band

DTMF digits to the network based on key presses relayed from the User Interface

For certain voice codecs the compression algorithm does not permit faithful

transmission of DTMF tones For those algorithms eg G7231 the software

generates an in-band message to the network that is used by the remote gateway to

regenerate the DTMF tone

bull Line Echo Canceller Unit Performs ITU G168 compliant echo cancellation on

sampled full -duplex voice port signals Echo in a telephone network is caused by

signal reflections generated by the hybrid circuit that converts between a 4-wire

circuit (a separate transmit and receive pair) and a 2-wire circuit (a single transmit

and receive pair) These reflections of the speakers voice are heard in the speakers

ear Echo is present even in a conventional circuit switched telephone network ~ -

However it is acceptable because the round trip delays through the network are

smaller than 50 ms and the echo is masked by the normal side tone every telephone

generates Echo becomes a problem in VoIP networks because the round trip delay

through the network is almost always greater than 50 ms Thus echo cancellation

techniques are required ITU standard G168 defines performance requirements that

are currently required for echo cancellers Echo is cancelled toward the packet

Detwork from the telephone network The echo canceller compares the voice data

received from the packet network with voice data being transmitted to the packet

8

network The echo from the telephone network hybrid is removed by a digital filter

on the transmit path into the packet network

bull Voice Activity Detector (V AD) Detects voice activity and activates or deactivates

the transmission of packets in order to optimize bandwidth When activity is not

detected the encoder output will not be transported across the network This

software also measures Idle Noise characteristics of the interface and reports this

information to the Packet Voice Protocol for periodic forwarding to the remote

gateway Idle noise is reproduced by the remote end when there is no voice activity

so that the remote user does not fee l that the line went dead

bull Voice Codec Unit Perfonns packetization of the 64 kbps data stream received

from the user Various compression algorithms exist which have different

performance characteristics G711 PCM which operates at 64 kbps (no

compression) G726 ADPCM which operates at 16 24 32 and 40 kbps G7231

which operates at 53 or 63 kbps and G729 which operates at 8 kbps Typically

voice algorithms that perform greater compression require much more processing

power It should be noted that high fidelity audio quality compression algorithms

can also be used since VoIP is not subject to the 4 kHz bandwidth restrictions found

in the PS1N This would provide better sounding audio than PCM and allow music -

to be faithfully reproduced

bull Packet Playout Unit Performs compensation for network delay network jitter and

dropped packets Many proprietary techniques are used to address these problems

since there are currently no standards in place for packet playout

bull Packet Protocol Encapsulation Unit Performs encapsulation of the packet voice

data destined for the network interface For VoIP this encapsulation is per the Real-

Transport Protocol (RTP) which runs directly on top of UDP

oice Encryption Provides optional encryption of the voice packet data prior to

9

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10

Page 3: YII CHIN HUANG

Tesis ini telah dibaca dan disahkan oleh

318~cfo~Encik N lang Yew Tarikh Penyelia

ELECTRONIC BUSINESS CARD OVER THE INTERNET

YII CHIN HUANG

Tesis Dikemukakan Kepada Fakulti Kejuruteraan Universiti Malaysia Sarawak Sebagai Memenuhi Sebahagian Daripada Syarat

Penganugerahan Sarjana Muda Kejuruteraan Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi)

2000

To my beloved family and friends

ii

ACKNOWLEDMENT

First of all I would like to record my greatest gratitude to supervisor of this

study Mr Ng Liang Yew who has always been understanding open giving priceless

supervision and advice in leading all the way through to complete this study

Besides I would like to express my heartiest thanks to those who have been in

one or another way help and contribute to this study

Thanks to those people who have inspired me directly or indirectly especially

founders of internet and dot com companies with their vision technology pioneering

spirit entrepreneur spirit and shaping the net I appreciate the creation of the internet so

that I can search for my thesis information fast easy and comfortable

Domo Arigato to the CEO amp President Vice President HR Manager Senior

Manager and Researchers at Nippon Telegraph and Telephone (NIT MSC Sdn Bhd

Cyberjaya) (httpwwwnttcomworld) for assuring me a job as a Researcher I could

join NIT -due to the experience and knowledge I gained partly from the study of this

thesis even before my graduation

Finally and as always my beloved father mother sisters brother sister-in-Iaws

for their understanding and never ending support on my projects

III

Abstract

Business cards has exists long since business contacts and communications play

an important role in ensuring a success in business But it seems paper is still the major

medium for printing business cards It might get dirty lost or tomed Printing the card

especially high quality cards is costly When business contacts and network grows it is

hard to manage the cards for searching and keeping them systematically Exchanging

business cards only possible if two persons met

Hence the idea of electronic business card surfaced The product can solve all

these problems and proven to be very interactive and keep the electronic business card

owner in a competitive situation All the e-businesscards will be kept on the server and

could be viewed as web pages from anywhere in the world Then the cards can be

downloaded and be stored in desktop computer The cards would be stored

systematically and electronically with some added features such as direct fax telephone

dialing and conversation chat e-mail and videoconferencing from the software

installed in the desktop itself without having to buy any fax machine or telephone set

Electronic business card take the advantage of the internet as the medium of

exchanging business cards among businessmen and professionals Integrated in a

search engine for Multimedia Super Corridor ( httpwwwcyber-jayacom ) Create a

one stop environment that is suitable for doing e-commerce

Components of Electronic Business Card

bull Voice over Internet Protocol

bull Fax over Internet Protocol

bull Short Messaging System

bull Email

bull Vide9conferencing

bull Chat

IV

bull E-Commerce

bull Global Positioning System

excluded in this thesis

v

Abstrak

Kad perlllagaan telah wujud sekian lama semenjak perhubungan perniagaan

memainkan peranan yang penting dalam menentukan kej ayaan sesebuah perniagaan

Namun kertas masih lagi menjadi bahan utama untuk pencetakan kad perniagaan Ia

mungkin menjadi kotor hilang atau terkoyak Mencetak kad yang bermutu tinggi

memerlukan kos yang tinggi Apabila perhubungan dan rangkaian perniagaan semakin

berkembang adalah sukar untuk mengurus kad-kad tersebut bagi tujuan pencarian

semula dan menyimpan kad-kad tersebut secara sistematik Pertukaran kad hanya

mungkin apabila dua orang bertemu

Maka dengan itu timbullah idea kad perniagaan elektronik Hasilnya nanti dapat

menyelesaikan semua masalah di atas dan terbukti adalah sangat interaktif untuk

meletakkan pemilik kad pad a kedudukan yang berdaya saing Kesemua kad perniagaan

elektronik akan disimpan di dalm pelayan dan dapat dilihat sebagai Ian web dari manashy

mana pelusuk dunia Kemudian kad-kad ini dapat disimpan dalam komputer meja

Kad-kad ini akan disimpan secara sistematik dengan ciri-ciri tambahan seperti faks

dailan dan perbualan secara telefon borak emel dan sidang video daripada perisian

yang dimasukkan ke dalam komputer meja tanpa perlu membeli mesin faks atau set

telefon

Kad perniagaan elektronik menggunakan kelebihan internet sebagai perantara

untuk pertukaran kad perniagaan di antara golongan ahli perniagaan dan ahli

profesional Diintegrasikan bersama enjin pencari untuk Koridor Raya Multimedia (

hUpwwwcyber-javacom ) Ini mewujudkan suatu persekitaran sepusat yang sesuai untuk

menjalankan e-dagang

Komponen utama Kad Perniagaan Elektronik

bull Penghantaran suara secara protokol internet

bull Penghantaran faks secara protokol internet

vi

bull Sistem rnesej ringkas

bull Ernel

bull Sidang video

bull Borak

bull e-dagang

bull sistern kedudukan sedunia

dikecualikan daripada tesis

vii

TABLE OF CONTENTS

CONTENTS PAGES

Dedication ii

Acknowledgment iii

Abstract iv

Abstrak vi

Table of contents vii

List of Tables xii

List of Figures xii

CHAPTER 1 COMPUTER TELEPHONY INTEGRATION (CTI)

11 Introduction to CTI 1

12 CTI with modem or sophisticated DSP card 1

CHAPTER 2 INTERNET PROTOCOL

21 Introduction to Internet Protocol (lP) 2

22 IP Host Addresses and Routing 3

23 IP version 6 4

CHAPTER 3 VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview 5

32 VoIP vs PSTN 5

33 VoIP Hardware 6

34 VoIP Software 7

35 Implementation Issues of VoIP 12

36 VoIP Potential 13

viii

612 Phone Device Class

613 Basic Services

614 Supplementary Services

62 TAPI Phone Numbers

63 TAPI Initialization

64 API Negotiation

65 Making the Call

66 Ending a Call

67 Closing the Line

68 Shutdown

CHAPTER 7 JAVA TELEPHONY APPLICATION

INTERFACE (JTAPI)

71 Java vs C++

72 JTAPI Overview

73 Java Telephony Package Architecture

74 Java Telephony Call Model

~41 Provider Object

742 Call Object

743 Address Object

744 Connection Object

745 Terminal Object

746 TerminalConnection Object

75 JTAPI Core Package Methods

33

33

34

36

41

42

45

50

51

52

PROGRAMMING

53

55

56

57

58

58

58

59

59

59

60

x

751 CallconnectO 60

752 TerminalConnectionanswerO 60

753 ConnectiondisconnectO 60

76 The JTAPI Observer Model 63

77 Application Code Examples 63

771 Outgoing Telephone Call Example 64

772 Incoming Telephone Call Example 67

CHAPTER 8 SHORT MESSAGING SYSTEM (SMS) FROM INTERNET TO

MOBILE

81 SMS Overview 72

82 SMS Implementation Example 72

CHAPTER 9 DISCUSSIONS AND CONCLUSIONS

91 Enumtapi 75

91 TAPI Browser 76

9l Conclusions 77

93 Further Works 79

Appendix 81

References 82

xi

LI T OF TABLES

Table Page

1 T API Support for Windows Platform 35

LIST OF FIGURES

Figure Page

1 Enumtapi 75

XII

CHAPTER 1

COMPUTER TELEPHONY INTEGRATION

11 Introduction

Computer Telephony (CT) is the integration of the computer to the Public

Switched Telephone Network (PSTN) CT can be designed as desktop dialing faxing

and as Voice over Internet Protocol (VoIP) application with call buttons on web pages

It will increase customer service and organizational efficiency by automating and

adding intelligence to the way we communicate with the telephone

12 CII with modem or sophisticated nsp card

Applications connect directly to the PSTN with PC based telephony hardware

cards These hardware cards range from simple voice modems to more sophisticated

Digital Signal Processing (DSP) based solutions such as Dialogic Voice modems

provide a less expensive solution for home users However it is impractical for

commercial solutions whereas a voice modem is restricted with limited number of

phone line connections per server Furthermore voice modems do not support

advanced features such as to accurately recognize the range of tones that may be

required by a CT application [1]

1

CHAPTER 2

INTERNET TRANSFER PROTOCOL

21 Introduction to Internet Protocol (lP)

The IP is a routing protocol designed to route traffic within a network or

between networks IP is designed to remain transparent to the end user application The

transparency is achieved by encapsulation The data sent by the host computer are

encapsulated into IP packets The IP header identifies the address of the receiving host

computer The IP packets and header are further encapsulated into the specific protocol

of the transit network such as X25 or Ethernet LAN After the transit network has

delivered the traffic to an IP router its link control information is stripped away The

gateway then uses the destination address in the datagram header to determine where to

route the traffic Typically it then passes the datagram to a subnetwork by invoking a

subnetwork access protocol This protocol is used to encapsulate the datagram header

and user data into the headers and trailers that are used by the subnetwork This process

is repeated at each gateway until it reached the destination[ 4]

Transmission Control Protocol (TCP) provides a reliable byte stream between

two processes It is reliable and applications are not required to monitor for lost or

corrupted packets TCP is a connection oriented protocol because applications that

communicate via TCP establish a logical connection before any exchange of data can

take place and terminate the connection when the data exchange has been

completed [IS]

User Datagram Protocol (UCP) is a connectionless protocol where data packets

addressed and -delivered individually UDP is not a reliable protocol hence

applications must be prepared to handle the loss of packets[IS]

2

22 IP Host Addresses and Routing

An IP host address is a 32-bit number uniquely identifying an Internet host

According to convention the 4-byte Internet host address is usually written down as a

set of four decimal numbers for example 127001 The Internet host address is

usually divided into two parts the network address and the actual host address The

respective lengths of these two portions of the address vary depending on the most

significant byte in the address( 4)

Class A network addresses are those with the most significant byte between 0

and 127 A Class A address consists of an 8-bit network address and a 24-bit host

address Because addresses beginning with 0 and 127 are reserved there can be a

maximum of 126 class A subnets on an Internet A Class A subnet can contain up to

16777214 hosts Class B network addresses are those with the most significant byte

between 128 and 191 Class B addresses consist of a 16-bit network address and a 16shy

bit host address There can be a maximum of 16383 class B subnets A Class B subnet

may contain up to 65534 hosts A Class C network address is one with the most

significant byte between 192 and 223 This allows a total of 2097152 class C subnets

A Class C subnet may contain up to 254 hosts Class D addresses with most significant

byte between 224 and 255 are reserved for IP multicasting

Once the destination address of a packet is known hosts on an Internet can

route the packet as appropriate Routing involves either forwarding a packet to a

destination that is known to the host or passing it along a default route Larger hosts

maintain dynamically updated routing tables Through these tables the correct route of

packets can be identified and in the case of a network error alternate routes can be

nd

3

23 IP version 6

IP Version 6 (IPv6) is the next generation protocol designed by the Internet

Engineering Task Force (IETF) to replace the current version Internet Protocol IP

Version 4 (IPv4) There is a growing shortage of IPv4 addresses which are needed by

all new machines added to the Internet IPv6 fixes a number of problems in IPv4 such

as the limited number of available IPv4 addresses It also adds many improvements to

IPv4 in areas uch as routing and network autoconfiguration [18]

4

CHAPTER 3

VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview

VoIP is a mean to bypass the long distance charge One can simultaneously talk

fax and receive information from anywhere in the world for the cost of a local phone

call by taking advantage of Transmission Control Protocol (TCP)lP TCPlP makes the

underlying physical connection irrelevant and can run over T1 Integrated Services

Digital Network (ISDN) Frame Relay wireless microwave or satellite links[20]

The most important developments in the VoIP was the adoption of an

interoperability standard H323 an International Telecommunication Union (ITU)

standard for Internet telephony and videoconferencing provides the foundation for an

IP based telephone network H323 provides a standard set of procedures for setting up

voice and video calls over a TCPlP network and allows for the use of multiple codecs

In depth discussion about H323 is available in Chapter 4[20]

32 VoIP vs PSTN

Compared to a real phone line an H323 requires only bandwidth It doesnt

care what kind of circuit is sitting underneath it Let it be T1 xDSL wireless or a dialshy

up Plain Old Telephony Service (POTS) connection A single broadband pipe can

deliver a fairly large number of virtual telephone lines This is a big improvement over

the Public Switched Telephone Network (PSTN) circuit centric mentality where every

service requires its own copper pair to the subscriber [20]

With H323 bandwidth is reduced from 64Kbpseach to lOKbpseach [21]

Once compression is applied voice doesnt require very much bandwidth Then its

5

really a waste to send voice at 64 kbps uncompressed through any network whether it

is the PSTN or the Internet

Internet is unreliable and insecure while analog phone lines very rarely fail

Important point to consider when implementing VoIP

bull Distribute H323 gateways throughout all the networks to avoid creating a situation

where a single hardware outage can affect many other services

bull Gateway software should be smart enough so that it can reroute calls to other

gateways when needed

bull Gateway should route calls over the PSTN when the IP network is unavailable

33 VoIP Hardware

In selecting hardware it will be important to select a platform which is costshy

effective standards compliant and easily serviced It is also important to use

components which offload compression and error correction tasks from the server CPU

to a DSP houses on the gateway Implementations where media processing is done on

the server CPU should be avoided as these systems do not scale well and often

introduce more latency than solutions which offload media processing to a DSP

optimized for the job of compressingdecompressing audio [20]

Gateways are required to adapt traditional analog telephony to the Internet

Within the gateway device there are different types of processors that handle the

conversion from traditional to VoIP DSP handle all of the signal processing activity

including voice compression tone detection and generation echo cancellation and

silence suppression

There are also microprocessors which control the DSP and handle all the H323

taco processing and network management functions Some of the functions in the

micro include routing bil1ing and management both within the micro and in between

6

the micro and the DSP The first thing that happens in the DSP is that an analog voice

signal is received This signal is converted to a Pulse Code Modulation (PCM) digital

stream PCM i the classic process of converting analog telephony to digital As a result

of delay in the network echo and talker overlap occurred Echo is caused by the signal

reflections of the speakers voice from the far end telephone equipment back into the

speakers ear Echo becomes a significant problem when the round trip delay becomes

greater than 50 milliseconds Since echo is perceived as a significant quality problem

VoIP systems must address the need for echo control and implement some means of

echo cancellation[20]

Next the Voice Activity Director (V AD) detects and removes silence In a

typical conversation 50 of the conversation is silence Removing the silence can

improve bandwidth consumption After the tone is routed around the CO DEC the

remaining PCM samples are forwarded to the CODEC Voice codecs (codingdecoding

algorithms) are used to compress voice for packet network transmission Most

CODECs garble signaling tones to the point that they are unrecognizable by the tone

detection devices for which they are intended Therefore the tone is detected and

routed around the CODECs

34 VoIP Software

The software consists of the following major subsystems User Interface Voice

Processing Telephony Signaling Gateway Network Interface Protocols Network

Management Agent and System Services [20]

The User Interface provides tbe traditional user interface functions of a

telephone At a minimum this consists of a keypad for dialing numbers (0-9 ) and

dible indicator for announcing incoming calls to the user On more sophisticated

intcdaces additional keys are provided for features such as mute redial hold transfer

7

conferencing etc A display is also typically provided for displaying user prompts

number diaJed CallerID information for incoming calls etc

The Voice Processing software is composed of the following software modules

bull PCM Interface Unit Receives PCM samples from the analog interface and

forwards then to the appropriate DSP software module for processing It also

forwards processed PCM samples to the analog interface

bull Tone Generator Generates call progress tones to the user and generates in-band

DTMF digits to the network based on key presses relayed from the User Interface

For certain voice codecs the compression algorithm does not permit faithful

transmission of DTMF tones For those algorithms eg G7231 the software

generates an in-band message to the network that is used by the remote gateway to

regenerate the DTMF tone

bull Line Echo Canceller Unit Performs ITU G168 compliant echo cancellation on

sampled full -duplex voice port signals Echo in a telephone network is caused by

signal reflections generated by the hybrid circuit that converts between a 4-wire

circuit (a separate transmit and receive pair) and a 2-wire circuit (a single transmit

and receive pair) These reflections of the speakers voice are heard in the speakers

ear Echo is present even in a conventional circuit switched telephone network ~ -

However it is acceptable because the round trip delays through the network are

smaller than 50 ms and the echo is masked by the normal side tone every telephone

generates Echo becomes a problem in VoIP networks because the round trip delay

through the network is almost always greater than 50 ms Thus echo cancellation

techniques are required ITU standard G168 defines performance requirements that

are currently required for echo cancellers Echo is cancelled toward the packet

Detwork from the telephone network The echo canceller compares the voice data

received from the packet network with voice data being transmitted to the packet

8

network The echo from the telephone network hybrid is removed by a digital filter

on the transmit path into the packet network

bull Voice Activity Detector (V AD) Detects voice activity and activates or deactivates

the transmission of packets in order to optimize bandwidth When activity is not

detected the encoder output will not be transported across the network This

software also measures Idle Noise characteristics of the interface and reports this

information to the Packet Voice Protocol for periodic forwarding to the remote

gateway Idle noise is reproduced by the remote end when there is no voice activity

so that the remote user does not fee l that the line went dead

bull Voice Codec Unit Perfonns packetization of the 64 kbps data stream received

from the user Various compression algorithms exist which have different

performance characteristics G711 PCM which operates at 64 kbps (no

compression) G726 ADPCM which operates at 16 24 32 and 40 kbps G7231

which operates at 53 or 63 kbps and G729 which operates at 8 kbps Typically

voice algorithms that perform greater compression require much more processing

power It should be noted that high fidelity audio quality compression algorithms

can also be used since VoIP is not subject to the 4 kHz bandwidth restrictions found

in the PS1N This would provide better sounding audio than PCM and allow music -

to be faithfully reproduced

bull Packet Playout Unit Performs compensation for network delay network jitter and

dropped packets Many proprietary techniques are used to address these problems

since there are currently no standards in place for packet playout

bull Packet Protocol Encapsulation Unit Performs encapsulation of the packet voice

data destined for the network interface For VoIP this encapsulation is per the Real-

Transport Protocol (RTP) which runs directly on top of UDP

oice Encryption Provides optional encryption of the voice packet data prior to

9

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10

Page 4: YII CHIN HUANG

ELECTRONIC BUSINESS CARD OVER THE INTERNET

YII CHIN HUANG

Tesis Dikemukakan Kepada Fakulti Kejuruteraan Universiti Malaysia Sarawak Sebagai Memenuhi Sebahagian Daripada Syarat

Penganugerahan Sarjana Muda Kejuruteraan Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi)

2000

To my beloved family and friends

ii

ACKNOWLEDMENT

First of all I would like to record my greatest gratitude to supervisor of this

study Mr Ng Liang Yew who has always been understanding open giving priceless

supervision and advice in leading all the way through to complete this study

Besides I would like to express my heartiest thanks to those who have been in

one or another way help and contribute to this study

Thanks to those people who have inspired me directly or indirectly especially

founders of internet and dot com companies with their vision technology pioneering

spirit entrepreneur spirit and shaping the net I appreciate the creation of the internet so

that I can search for my thesis information fast easy and comfortable

Domo Arigato to the CEO amp President Vice President HR Manager Senior

Manager and Researchers at Nippon Telegraph and Telephone (NIT MSC Sdn Bhd

Cyberjaya) (httpwwwnttcomworld) for assuring me a job as a Researcher I could

join NIT -due to the experience and knowledge I gained partly from the study of this

thesis even before my graduation

Finally and as always my beloved father mother sisters brother sister-in-Iaws

for their understanding and never ending support on my projects

III

Abstract

Business cards has exists long since business contacts and communications play

an important role in ensuring a success in business But it seems paper is still the major

medium for printing business cards It might get dirty lost or tomed Printing the card

especially high quality cards is costly When business contacts and network grows it is

hard to manage the cards for searching and keeping them systematically Exchanging

business cards only possible if two persons met

Hence the idea of electronic business card surfaced The product can solve all

these problems and proven to be very interactive and keep the electronic business card

owner in a competitive situation All the e-businesscards will be kept on the server and

could be viewed as web pages from anywhere in the world Then the cards can be

downloaded and be stored in desktop computer The cards would be stored

systematically and electronically with some added features such as direct fax telephone

dialing and conversation chat e-mail and videoconferencing from the software

installed in the desktop itself without having to buy any fax machine or telephone set

Electronic business card take the advantage of the internet as the medium of

exchanging business cards among businessmen and professionals Integrated in a

search engine for Multimedia Super Corridor ( httpwwwcyber-jayacom ) Create a

one stop environment that is suitable for doing e-commerce

Components of Electronic Business Card

bull Voice over Internet Protocol

bull Fax over Internet Protocol

bull Short Messaging System

bull Email

bull Vide9conferencing

bull Chat

IV

bull E-Commerce

bull Global Positioning System

excluded in this thesis

v

Abstrak

Kad perlllagaan telah wujud sekian lama semenjak perhubungan perniagaan

memainkan peranan yang penting dalam menentukan kej ayaan sesebuah perniagaan

Namun kertas masih lagi menjadi bahan utama untuk pencetakan kad perniagaan Ia

mungkin menjadi kotor hilang atau terkoyak Mencetak kad yang bermutu tinggi

memerlukan kos yang tinggi Apabila perhubungan dan rangkaian perniagaan semakin

berkembang adalah sukar untuk mengurus kad-kad tersebut bagi tujuan pencarian

semula dan menyimpan kad-kad tersebut secara sistematik Pertukaran kad hanya

mungkin apabila dua orang bertemu

Maka dengan itu timbullah idea kad perniagaan elektronik Hasilnya nanti dapat

menyelesaikan semua masalah di atas dan terbukti adalah sangat interaktif untuk

meletakkan pemilik kad pad a kedudukan yang berdaya saing Kesemua kad perniagaan

elektronik akan disimpan di dalm pelayan dan dapat dilihat sebagai Ian web dari manashy

mana pelusuk dunia Kemudian kad-kad ini dapat disimpan dalam komputer meja

Kad-kad ini akan disimpan secara sistematik dengan ciri-ciri tambahan seperti faks

dailan dan perbualan secara telefon borak emel dan sidang video daripada perisian

yang dimasukkan ke dalam komputer meja tanpa perlu membeli mesin faks atau set

telefon

Kad perniagaan elektronik menggunakan kelebihan internet sebagai perantara

untuk pertukaran kad perniagaan di antara golongan ahli perniagaan dan ahli

profesional Diintegrasikan bersama enjin pencari untuk Koridor Raya Multimedia (

hUpwwwcyber-javacom ) Ini mewujudkan suatu persekitaran sepusat yang sesuai untuk

menjalankan e-dagang

Komponen utama Kad Perniagaan Elektronik

bull Penghantaran suara secara protokol internet

bull Penghantaran faks secara protokol internet

vi

bull Sistem rnesej ringkas

bull Ernel

bull Sidang video

bull Borak

bull e-dagang

bull sistern kedudukan sedunia

dikecualikan daripada tesis

vii

TABLE OF CONTENTS

CONTENTS PAGES

Dedication ii

Acknowledgment iii

Abstract iv

Abstrak vi

Table of contents vii

List of Tables xii

List of Figures xii

CHAPTER 1 COMPUTER TELEPHONY INTEGRATION (CTI)

11 Introduction to CTI 1

12 CTI with modem or sophisticated DSP card 1

CHAPTER 2 INTERNET PROTOCOL

21 Introduction to Internet Protocol (lP) 2

22 IP Host Addresses and Routing 3

23 IP version 6 4

CHAPTER 3 VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview 5

32 VoIP vs PSTN 5

33 VoIP Hardware 6

34 VoIP Software 7

35 Implementation Issues of VoIP 12

36 VoIP Potential 13

viii

612 Phone Device Class

613 Basic Services

614 Supplementary Services

62 TAPI Phone Numbers

63 TAPI Initialization

64 API Negotiation

65 Making the Call

66 Ending a Call

67 Closing the Line

68 Shutdown

CHAPTER 7 JAVA TELEPHONY APPLICATION

INTERFACE (JTAPI)

71 Java vs C++

72 JTAPI Overview

73 Java Telephony Package Architecture

74 Java Telephony Call Model

~41 Provider Object

742 Call Object

743 Address Object

744 Connection Object

745 Terminal Object

746 TerminalConnection Object

75 JTAPI Core Package Methods

33

33

34

36

41

42

45

50

51

52

PROGRAMMING

53

55

56

57

58

58

58

59

59

59

60

x

751 CallconnectO 60

752 TerminalConnectionanswerO 60

753 ConnectiondisconnectO 60

76 The JTAPI Observer Model 63

77 Application Code Examples 63

771 Outgoing Telephone Call Example 64

772 Incoming Telephone Call Example 67

CHAPTER 8 SHORT MESSAGING SYSTEM (SMS) FROM INTERNET TO

MOBILE

81 SMS Overview 72

82 SMS Implementation Example 72

CHAPTER 9 DISCUSSIONS AND CONCLUSIONS

91 Enumtapi 75

91 TAPI Browser 76

9l Conclusions 77

93 Further Works 79

Appendix 81

References 82

xi

LI T OF TABLES

Table Page

1 T API Support for Windows Platform 35

LIST OF FIGURES

Figure Page

1 Enumtapi 75

XII

CHAPTER 1

COMPUTER TELEPHONY INTEGRATION

11 Introduction

Computer Telephony (CT) is the integration of the computer to the Public

Switched Telephone Network (PSTN) CT can be designed as desktop dialing faxing

and as Voice over Internet Protocol (VoIP) application with call buttons on web pages

It will increase customer service and organizational efficiency by automating and

adding intelligence to the way we communicate with the telephone

12 CII with modem or sophisticated nsp card

Applications connect directly to the PSTN with PC based telephony hardware

cards These hardware cards range from simple voice modems to more sophisticated

Digital Signal Processing (DSP) based solutions such as Dialogic Voice modems

provide a less expensive solution for home users However it is impractical for

commercial solutions whereas a voice modem is restricted with limited number of

phone line connections per server Furthermore voice modems do not support

advanced features such as to accurately recognize the range of tones that may be

required by a CT application [1]

1

CHAPTER 2

INTERNET TRANSFER PROTOCOL

21 Introduction to Internet Protocol (lP)

The IP is a routing protocol designed to route traffic within a network or

between networks IP is designed to remain transparent to the end user application The

transparency is achieved by encapsulation The data sent by the host computer are

encapsulated into IP packets The IP header identifies the address of the receiving host

computer The IP packets and header are further encapsulated into the specific protocol

of the transit network such as X25 or Ethernet LAN After the transit network has

delivered the traffic to an IP router its link control information is stripped away The

gateway then uses the destination address in the datagram header to determine where to

route the traffic Typically it then passes the datagram to a subnetwork by invoking a

subnetwork access protocol This protocol is used to encapsulate the datagram header

and user data into the headers and trailers that are used by the subnetwork This process

is repeated at each gateway until it reached the destination[ 4]

Transmission Control Protocol (TCP) provides a reliable byte stream between

two processes It is reliable and applications are not required to monitor for lost or

corrupted packets TCP is a connection oriented protocol because applications that

communicate via TCP establish a logical connection before any exchange of data can

take place and terminate the connection when the data exchange has been

completed [IS]

User Datagram Protocol (UCP) is a connectionless protocol where data packets

addressed and -delivered individually UDP is not a reliable protocol hence

applications must be prepared to handle the loss of packets[IS]

2

22 IP Host Addresses and Routing

An IP host address is a 32-bit number uniquely identifying an Internet host

According to convention the 4-byte Internet host address is usually written down as a

set of four decimal numbers for example 127001 The Internet host address is

usually divided into two parts the network address and the actual host address The

respective lengths of these two portions of the address vary depending on the most

significant byte in the address( 4)

Class A network addresses are those with the most significant byte between 0

and 127 A Class A address consists of an 8-bit network address and a 24-bit host

address Because addresses beginning with 0 and 127 are reserved there can be a

maximum of 126 class A subnets on an Internet A Class A subnet can contain up to

16777214 hosts Class B network addresses are those with the most significant byte

between 128 and 191 Class B addresses consist of a 16-bit network address and a 16shy

bit host address There can be a maximum of 16383 class B subnets A Class B subnet

may contain up to 65534 hosts A Class C network address is one with the most

significant byte between 192 and 223 This allows a total of 2097152 class C subnets

A Class C subnet may contain up to 254 hosts Class D addresses with most significant

byte between 224 and 255 are reserved for IP multicasting

Once the destination address of a packet is known hosts on an Internet can

route the packet as appropriate Routing involves either forwarding a packet to a

destination that is known to the host or passing it along a default route Larger hosts

maintain dynamically updated routing tables Through these tables the correct route of

packets can be identified and in the case of a network error alternate routes can be

nd

3

23 IP version 6

IP Version 6 (IPv6) is the next generation protocol designed by the Internet

Engineering Task Force (IETF) to replace the current version Internet Protocol IP

Version 4 (IPv4) There is a growing shortage of IPv4 addresses which are needed by

all new machines added to the Internet IPv6 fixes a number of problems in IPv4 such

as the limited number of available IPv4 addresses It also adds many improvements to

IPv4 in areas uch as routing and network autoconfiguration [18]

4

CHAPTER 3

VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview

VoIP is a mean to bypass the long distance charge One can simultaneously talk

fax and receive information from anywhere in the world for the cost of a local phone

call by taking advantage of Transmission Control Protocol (TCP)lP TCPlP makes the

underlying physical connection irrelevant and can run over T1 Integrated Services

Digital Network (ISDN) Frame Relay wireless microwave or satellite links[20]

The most important developments in the VoIP was the adoption of an

interoperability standard H323 an International Telecommunication Union (ITU)

standard for Internet telephony and videoconferencing provides the foundation for an

IP based telephone network H323 provides a standard set of procedures for setting up

voice and video calls over a TCPlP network and allows for the use of multiple codecs

In depth discussion about H323 is available in Chapter 4[20]

32 VoIP vs PSTN

Compared to a real phone line an H323 requires only bandwidth It doesnt

care what kind of circuit is sitting underneath it Let it be T1 xDSL wireless or a dialshy

up Plain Old Telephony Service (POTS) connection A single broadband pipe can

deliver a fairly large number of virtual telephone lines This is a big improvement over

the Public Switched Telephone Network (PSTN) circuit centric mentality where every

service requires its own copper pair to the subscriber [20]

With H323 bandwidth is reduced from 64Kbpseach to lOKbpseach [21]

Once compression is applied voice doesnt require very much bandwidth Then its

5

really a waste to send voice at 64 kbps uncompressed through any network whether it

is the PSTN or the Internet

Internet is unreliable and insecure while analog phone lines very rarely fail

Important point to consider when implementing VoIP

bull Distribute H323 gateways throughout all the networks to avoid creating a situation

where a single hardware outage can affect many other services

bull Gateway software should be smart enough so that it can reroute calls to other

gateways when needed

bull Gateway should route calls over the PSTN when the IP network is unavailable

33 VoIP Hardware

In selecting hardware it will be important to select a platform which is costshy

effective standards compliant and easily serviced It is also important to use

components which offload compression and error correction tasks from the server CPU

to a DSP houses on the gateway Implementations where media processing is done on

the server CPU should be avoided as these systems do not scale well and often

introduce more latency than solutions which offload media processing to a DSP

optimized for the job of compressingdecompressing audio [20]

Gateways are required to adapt traditional analog telephony to the Internet

Within the gateway device there are different types of processors that handle the

conversion from traditional to VoIP DSP handle all of the signal processing activity

including voice compression tone detection and generation echo cancellation and

silence suppression

There are also microprocessors which control the DSP and handle all the H323

taco processing and network management functions Some of the functions in the

micro include routing bil1ing and management both within the micro and in between

6

the micro and the DSP The first thing that happens in the DSP is that an analog voice

signal is received This signal is converted to a Pulse Code Modulation (PCM) digital

stream PCM i the classic process of converting analog telephony to digital As a result

of delay in the network echo and talker overlap occurred Echo is caused by the signal

reflections of the speakers voice from the far end telephone equipment back into the

speakers ear Echo becomes a significant problem when the round trip delay becomes

greater than 50 milliseconds Since echo is perceived as a significant quality problem

VoIP systems must address the need for echo control and implement some means of

echo cancellation[20]

Next the Voice Activity Director (V AD) detects and removes silence In a

typical conversation 50 of the conversation is silence Removing the silence can

improve bandwidth consumption After the tone is routed around the CO DEC the

remaining PCM samples are forwarded to the CODEC Voice codecs (codingdecoding

algorithms) are used to compress voice for packet network transmission Most

CODECs garble signaling tones to the point that they are unrecognizable by the tone

detection devices for which they are intended Therefore the tone is detected and

routed around the CODECs

34 VoIP Software

The software consists of the following major subsystems User Interface Voice

Processing Telephony Signaling Gateway Network Interface Protocols Network

Management Agent and System Services [20]

The User Interface provides tbe traditional user interface functions of a

telephone At a minimum this consists of a keypad for dialing numbers (0-9 ) and

dible indicator for announcing incoming calls to the user On more sophisticated

intcdaces additional keys are provided for features such as mute redial hold transfer

7

conferencing etc A display is also typically provided for displaying user prompts

number diaJed CallerID information for incoming calls etc

The Voice Processing software is composed of the following software modules

bull PCM Interface Unit Receives PCM samples from the analog interface and

forwards then to the appropriate DSP software module for processing It also

forwards processed PCM samples to the analog interface

bull Tone Generator Generates call progress tones to the user and generates in-band

DTMF digits to the network based on key presses relayed from the User Interface

For certain voice codecs the compression algorithm does not permit faithful

transmission of DTMF tones For those algorithms eg G7231 the software

generates an in-band message to the network that is used by the remote gateway to

regenerate the DTMF tone

bull Line Echo Canceller Unit Performs ITU G168 compliant echo cancellation on

sampled full -duplex voice port signals Echo in a telephone network is caused by

signal reflections generated by the hybrid circuit that converts between a 4-wire

circuit (a separate transmit and receive pair) and a 2-wire circuit (a single transmit

and receive pair) These reflections of the speakers voice are heard in the speakers

ear Echo is present even in a conventional circuit switched telephone network ~ -

However it is acceptable because the round trip delays through the network are

smaller than 50 ms and the echo is masked by the normal side tone every telephone

generates Echo becomes a problem in VoIP networks because the round trip delay

through the network is almost always greater than 50 ms Thus echo cancellation

techniques are required ITU standard G168 defines performance requirements that

are currently required for echo cancellers Echo is cancelled toward the packet

Detwork from the telephone network The echo canceller compares the voice data

received from the packet network with voice data being transmitted to the packet

8

network The echo from the telephone network hybrid is removed by a digital filter

on the transmit path into the packet network

bull Voice Activity Detector (V AD) Detects voice activity and activates or deactivates

the transmission of packets in order to optimize bandwidth When activity is not

detected the encoder output will not be transported across the network This

software also measures Idle Noise characteristics of the interface and reports this

information to the Packet Voice Protocol for periodic forwarding to the remote

gateway Idle noise is reproduced by the remote end when there is no voice activity

so that the remote user does not fee l that the line went dead

bull Voice Codec Unit Perfonns packetization of the 64 kbps data stream received

from the user Various compression algorithms exist which have different

performance characteristics G711 PCM which operates at 64 kbps (no

compression) G726 ADPCM which operates at 16 24 32 and 40 kbps G7231

which operates at 53 or 63 kbps and G729 which operates at 8 kbps Typically

voice algorithms that perform greater compression require much more processing

power It should be noted that high fidelity audio quality compression algorithms

can also be used since VoIP is not subject to the 4 kHz bandwidth restrictions found

in the PS1N This would provide better sounding audio than PCM and allow music -

to be faithfully reproduced

bull Packet Playout Unit Performs compensation for network delay network jitter and

dropped packets Many proprietary techniques are used to address these problems

since there are currently no standards in place for packet playout

bull Packet Protocol Encapsulation Unit Performs encapsulation of the packet voice

data destined for the network interface For VoIP this encapsulation is per the Real-

Transport Protocol (RTP) which runs directly on top of UDP

oice Encryption Provides optional encryption of the voice packet data prior to

9

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10

Page 5: YII CHIN HUANG

To my beloved family and friends

ii

ACKNOWLEDMENT

First of all I would like to record my greatest gratitude to supervisor of this

study Mr Ng Liang Yew who has always been understanding open giving priceless

supervision and advice in leading all the way through to complete this study

Besides I would like to express my heartiest thanks to those who have been in

one or another way help and contribute to this study

Thanks to those people who have inspired me directly or indirectly especially

founders of internet and dot com companies with their vision technology pioneering

spirit entrepreneur spirit and shaping the net I appreciate the creation of the internet so

that I can search for my thesis information fast easy and comfortable

Domo Arigato to the CEO amp President Vice President HR Manager Senior

Manager and Researchers at Nippon Telegraph and Telephone (NIT MSC Sdn Bhd

Cyberjaya) (httpwwwnttcomworld) for assuring me a job as a Researcher I could

join NIT -due to the experience and knowledge I gained partly from the study of this

thesis even before my graduation

Finally and as always my beloved father mother sisters brother sister-in-Iaws

for their understanding and never ending support on my projects

III

Abstract

Business cards has exists long since business contacts and communications play

an important role in ensuring a success in business But it seems paper is still the major

medium for printing business cards It might get dirty lost or tomed Printing the card

especially high quality cards is costly When business contacts and network grows it is

hard to manage the cards for searching and keeping them systematically Exchanging

business cards only possible if two persons met

Hence the idea of electronic business card surfaced The product can solve all

these problems and proven to be very interactive and keep the electronic business card

owner in a competitive situation All the e-businesscards will be kept on the server and

could be viewed as web pages from anywhere in the world Then the cards can be

downloaded and be stored in desktop computer The cards would be stored

systematically and electronically with some added features such as direct fax telephone

dialing and conversation chat e-mail and videoconferencing from the software

installed in the desktop itself without having to buy any fax machine or telephone set

Electronic business card take the advantage of the internet as the medium of

exchanging business cards among businessmen and professionals Integrated in a

search engine for Multimedia Super Corridor ( httpwwwcyber-jayacom ) Create a

one stop environment that is suitable for doing e-commerce

Components of Electronic Business Card

bull Voice over Internet Protocol

bull Fax over Internet Protocol

bull Short Messaging System

bull Email

bull Vide9conferencing

bull Chat

IV

bull E-Commerce

bull Global Positioning System

excluded in this thesis

v

Abstrak

Kad perlllagaan telah wujud sekian lama semenjak perhubungan perniagaan

memainkan peranan yang penting dalam menentukan kej ayaan sesebuah perniagaan

Namun kertas masih lagi menjadi bahan utama untuk pencetakan kad perniagaan Ia

mungkin menjadi kotor hilang atau terkoyak Mencetak kad yang bermutu tinggi

memerlukan kos yang tinggi Apabila perhubungan dan rangkaian perniagaan semakin

berkembang adalah sukar untuk mengurus kad-kad tersebut bagi tujuan pencarian

semula dan menyimpan kad-kad tersebut secara sistematik Pertukaran kad hanya

mungkin apabila dua orang bertemu

Maka dengan itu timbullah idea kad perniagaan elektronik Hasilnya nanti dapat

menyelesaikan semua masalah di atas dan terbukti adalah sangat interaktif untuk

meletakkan pemilik kad pad a kedudukan yang berdaya saing Kesemua kad perniagaan

elektronik akan disimpan di dalm pelayan dan dapat dilihat sebagai Ian web dari manashy

mana pelusuk dunia Kemudian kad-kad ini dapat disimpan dalam komputer meja

Kad-kad ini akan disimpan secara sistematik dengan ciri-ciri tambahan seperti faks

dailan dan perbualan secara telefon borak emel dan sidang video daripada perisian

yang dimasukkan ke dalam komputer meja tanpa perlu membeli mesin faks atau set

telefon

Kad perniagaan elektronik menggunakan kelebihan internet sebagai perantara

untuk pertukaran kad perniagaan di antara golongan ahli perniagaan dan ahli

profesional Diintegrasikan bersama enjin pencari untuk Koridor Raya Multimedia (

hUpwwwcyber-javacom ) Ini mewujudkan suatu persekitaran sepusat yang sesuai untuk

menjalankan e-dagang

Komponen utama Kad Perniagaan Elektronik

bull Penghantaran suara secara protokol internet

bull Penghantaran faks secara protokol internet

vi

bull Sistem rnesej ringkas

bull Ernel

bull Sidang video

bull Borak

bull e-dagang

bull sistern kedudukan sedunia

dikecualikan daripada tesis

vii

TABLE OF CONTENTS

CONTENTS PAGES

Dedication ii

Acknowledgment iii

Abstract iv

Abstrak vi

Table of contents vii

List of Tables xii

List of Figures xii

CHAPTER 1 COMPUTER TELEPHONY INTEGRATION (CTI)

11 Introduction to CTI 1

12 CTI with modem or sophisticated DSP card 1

CHAPTER 2 INTERNET PROTOCOL

21 Introduction to Internet Protocol (lP) 2

22 IP Host Addresses and Routing 3

23 IP version 6 4

CHAPTER 3 VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview 5

32 VoIP vs PSTN 5

33 VoIP Hardware 6

34 VoIP Software 7

35 Implementation Issues of VoIP 12

36 VoIP Potential 13

viii

612 Phone Device Class

613 Basic Services

614 Supplementary Services

62 TAPI Phone Numbers

63 TAPI Initialization

64 API Negotiation

65 Making the Call

66 Ending a Call

67 Closing the Line

68 Shutdown

CHAPTER 7 JAVA TELEPHONY APPLICATION

INTERFACE (JTAPI)

71 Java vs C++

72 JTAPI Overview

73 Java Telephony Package Architecture

74 Java Telephony Call Model

~41 Provider Object

742 Call Object

743 Address Object

744 Connection Object

745 Terminal Object

746 TerminalConnection Object

75 JTAPI Core Package Methods

33

33

34

36

41

42

45

50

51

52

PROGRAMMING

53

55

56

57

58

58

58

59

59

59

60

x

751 CallconnectO 60

752 TerminalConnectionanswerO 60

753 ConnectiondisconnectO 60

76 The JTAPI Observer Model 63

77 Application Code Examples 63

771 Outgoing Telephone Call Example 64

772 Incoming Telephone Call Example 67

CHAPTER 8 SHORT MESSAGING SYSTEM (SMS) FROM INTERNET TO

MOBILE

81 SMS Overview 72

82 SMS Implementation Example 72

CHAPTER 9 DISCUSSIONS AND CONCLUSIONS

91 Enumtapi 75

91 TAPI Browser 76

9l Conclusions 77

93 Further Works 79

Appendix 81

References 82

xi

LI T OF TABLES

Table Page

1 T API Support for Windows Platform 35

LIST OF FIGURES

Figure Page

1 Enumtapi 75

XII

CHAPTER 1

COMPUTER TELEPHONY INTEGRATION

11 Introduction

Computer Telephony (CT) is the integration of the computer to the Public

Switched Telephone Network (PSTN) CT can be designed as desktop dialing faxing

and as Voice over Internet Protocol (VoIP) application with call buttons on web pages

It will increase customer service and organizational efficiency by automating and

adding intelligence to the way we communicate with the telephone

12 CII with modem or sophisticated nsp card

Applications connect directly to the PSTN with PC based telephony hardware

cards These hardware cards range from simple voice modems to more sophisticated

Digital Signal Processing (DSP) based solutions such as Dialogic Voice modems

provide a less expensive solution for home users However it is impractical for

commercial solutions whereas a voice modem is restricted with limited number of

phone line connections per server Furthermore voice modems do not support

advanced features such as to accurately recognize the range of tones that may be

required by a CT application [1]

1

CHAPTER 2

INTERNET TRANSFER PROTOCOL

21 Introduction to Internet Protocol (lP)

The IP is a routing protocol designed to route traffic within a network or

between networks IP is designed to remain transparent to the end user application The

transparency is achieved by encapsulation The data sent by the host computer are

encapsulated into IP packets The IP header identifies the address of the receiving host

computer The IP packets and header are further encapsulated into the specific protocol

of the transit network such as X25 or Ethernet LAN After the transit network has

delivered the traffic to an IP router its link control information is stripped away The

gateway then uses the destination address in the datagram header to determine where to

route the traffic Typically it then passes the datagram to a subnetwork by invoking a

subnetwork access protocol This protocol is used to encapsulate the datagram header

and user data into the headers and trailers that are used by the subnetwork This process

is repeated at each gateway until it reached the destination[ 4]

Transmission Control Protocol (TCP) provides a reliable byte stream between

two processes It is reliable and applications are not required to monitor for lost or

corrupted packets TCP is a connection oriented protocol because applications that

communicate via TCP establish a logical connection before any exchange of data can

take place and terminate the connection when the data exchange has been

completed [IS]

User Datagram Protocol (UCP) is a connectionless protocol where data packets

addressed and -delivered individually UDP is not a reliable protocol hence

applications must be prepared to handle the loss of packets[IS]

2

22 IP Host Addresses and Routing

An IP host address is a 32-bit number uniquely identifying an Internet host

According to convention the 4-byte Internet host address is usually written down as a

set of four decimal numbers for example 127001 The Internet host address is

usually divided into two parts the network address and the actual host address The

respective lengths of these two portions of the address vary depending on the most

significant byte in the address( 4)

Class A network addresses are those with the most significant byte between 0

and 127 A Class A address consists of an 8-bit network address and a 24-bit host

address Because addresses beginning with 0 and 127 are reserved there can be a

maximum of 126 class A subnets on an Internet A Class A subnet can contain up to

16777214 hosts Class B network addresses are those with the most significant byte

between 128 and 191 Class B addresses consist of a 16-bit network address and a 16shy

bit host address There can be a maximum of 16383 class B subnets A Class B subnet

may contain up to 65534 hosts A Class C network address is one with the most

significant byte between 192 and 223 This allows a total of 2097152 class C subnets

A Class C subnet may contain up to 254 hosts Class D addresses with most significant

byte between 224 and 255 are reserved for IP multicasting

Once the destination address of a packet is known hosts on an Internet can

route the packet as appropriate Routing involves either forwarding a packet to a

destination that is known to the host or passing it along a default route Larger hosts

maintain dynamically updated routing tables Through these tables the correct route of

packets can be identified and in the case of a network error alternate routes can be

nd

3

23 IP version 6

IP Version 6 (IPv6) is the next generation protocol designed by the Internet

Engineering Task Force (IETF) to replace the current version Internet Protocol IP

Version 4 (IPv4) There is a growing shortage of IPv4 addresses which are needed by

all new machines added to the Internet IPv6 fixes a number of problems in IPv4 such

as the limited number of available IPv4 addresses It also adds many improvements to

IPv4 in areas uch as routing and network autoconfiguration [18]

4

CHAPTER 3

VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview

VoIP is a mean to bypass the long distance charge One can simultaneously talk

fax and receive information from anywhere in the world for the cost of a local phone

call by taking advantage of Transmission Control Protocol (TCP)lP TCPlP makes the

underlying physical connection irrelevant and can run over T1 Integrated Services

Digital Network (ISDN) Frame Relay wireless microwave or satellite links[20]

The most important developments in the VoIP was the adoption of an

interoperability standard H323 an International Telecommunication Union (ITU)

standard for Internet telephony and videoconferencing provides the foundation for an

IP based telephone network H323 provides a standard set of procedures for setting up

voice and video calls over a TCPlP network and allows for the use of multiple codecs

In depth discussion about H323 is available in Chapter 4[20]

32 VoIP vs PSTN

Compared to a real phone line an H323 requires only bandwidth It doesnt

care what kind of circuit is sitting underneath it Let it be T1 xDSL wireless or a dialshy

up Plain Old Telephony Service (POTS) connection A single broadband pipe can

deliver a fairly large number of virtual telephone lines This is a big improvement over

the Public Switched Telephone Network (PSTN) circuit centric mentality where every

service requires its own copper pair to the subscriber [20]

With H323 bandwidth is reduced from 64Kbpseach to lOKbpseach [21]

Once compression is applied voice doesnt require very much bandwidth Then its

5

really a waste to send voice at 64 kbps uncompressed through any network whether it

is the PSTN or the Internet

Internet is unreliable and insecure while analog phone lines very rarely fail

Important point to consider when implementing VoIP

bull Distribute H323 gateways throughout all the networks to avoid creating a situation

where a single hardware outage can affect many other services

bull Gateway software should be smart enough so that it can reroute calls to other

gateways when needed

bull Gateway should route calls over the PSTN when the IP network is unavailable

33 VoIP Hardware

In selecting hardware it will be important to select a platform which is costshy

effective standards compliant and easily serviced It is also important to use

components which offload compression and error correction tasks from the server CPU

to a DSP houses on the gateway Implementations where media processing is done on

the server CPU should be avoided as these systems do not scale well and often

introduce more latency than solutions which offload media processing to a DSP

optimized for the job of compressingdecompressing audio [20]

Gateways are required to adapt traditional analog telephony to the Internet

Within the gateway device there are different types of processors that handle the

conversion from traditional to VoIP DSP handle all of the signal processing activity

including voice compression tone detection and generation echo cancellation and

silence suppression

There are also microprocessors which control the DSP and handle all the H323

taco processing and network management functions Some of the functions in the

micro include routing bil1ing and management both within the micro and in between

6

the micro and the DSP The first thing that happens in the DSP is that an analog voice

signal is received This signal is converted to a Pulse Code Modulation (PCM) digital

stream PCM i the classic process of converting analog telephony to digital As a result

of delay in the network echo and talker overlap occurred Echo is caused by the signal

reflections of the speakers voice from the far end telephone equipment back into the

speakers ear Echo becomes a significant problem when the round trip delay becomes

greater than 50 milliseconds Since echo is perceived as a significant quality problem

VoIP systems must address the need for echo control and implement some means of

echo cancellation[20]

Next the Voice Activity Director (V AD) detects and removes silence In a

typical conversation 50 of the conversation is silence Removing the silence can

improve bandwidth consumption After the tone is routed around the CO DEC the

remaining PCM samples are forwarded to the CODEC Voice codecs (codingdecoding

algorithms) are used to compress voice for packet network transmission Most

CODECs garble signaling tones to the point that they are unrecognizable by the tone

detection devices for which they are intended Therefore the tone is detected and

routed around the CODECs

34 VoIP Software

The software consists of the following major subsystems User Interface Voice

Processing Telephony Signaling Gateway Network Interface Protocols Network

Management Agent and System Services [20]

The User Interface provides tbe traditional user interface functions of a

telephone At a minimum this consists of a keypad for dialing numbers (0-9 ) and

dible indicator for announcing incoming calls to the user On more sophisticated

intcdaces additional keys are provided for features such as mute redial hold transfer

7

conferencing etc A display is also typically provided for displaying user prompts

number diaJed CallerID information for incoming calls etc

The Voice Processing software is composed of the following software modules

bull PCM Interface Unit Receives PCM samples from the analog interface and

forwards then to the appropriate DSP software module for processing It also

forwards processed PCM samples to the analog interface

bull Tone Generator Generates call progress tones to the user and generates in-band

DTMF digits to the network based on key presses relayed from the User Interface

For certain voice codecs the compression algorithm does not permit faithful

transmission of DTMF tones For those algorithms eg G7231 the software

generates an in-band message to the network that is used by the remote gateway to

regenerate the DTMF tone

bull Line Echo Canceller Unit Performs ITU G168 compliant echo cancellation on

sampled full -duplex voice port signals Echo in a telephone network is caused by

signal reflections generated by the hybrid circuit that converts between a 4-wire

circuit (a separate transmit and receive pair) and a 2-wire circuit (a single transmit

and receive pair) These reflections of the speakers voice are heard in the speakers

ear Echo is present even in a conventional circuit switched telephone network ~ -

However it is acceptable because the round trip delays through the network are

smaller than 50 ms and the echo is masked by the normal side tone every telephone

generates Echo becomes a problem in VoIP networks because the round trip delay

through the network is almost always greater than 50 ms Thus echo cancellation

techniques are required ITU standard G168 defines performance requirements that

are currently required for echo cancellers Echo is cancelled toward the packet

Detwork from the telephone network The echo canceller compares the voice data

received from the packet network with voice data being transmitted to the packet

8

network The echo from the telephone network hybrid is removed by a digital filter

on the transmit path into the packet network

bull Voice Activity Detector (V AD) Detects voice activity and activates or deactivates

the transmission of packets in order to optimize bandwidth When activity is not

detected the encoder output will not be transported across the network This

software also measures Idle Noise characteristics of the interface and reports this

information to the Packet Voice Protocol for periodic forwarding to the remote

gateway Idle noise is reproduced by the remote end when there is no voice activity

so that the remote user does not fee l that the line went dead

bull Voice Codec Unit Perfonns packetization of the 64 kbps data stream received

from the user Various compression algorithms exist which have different

performance characteristics G711 PCM which operates at 64 kbps (no

compression) G726 ADPCM which operates at 16 24 32 and 40 kbps G7231

which operates at 53 or 63 kbps and G729 which operates at 8 kbps Typically

voice algorithms that perform greater compression require much more processing

power It should be noted that high fidelity audio quality compression algorithms

can also be used since VoIP is not subject to the 4 kHz bandwidth restrictions found

in the PS1N This would provide better sounding audio than PCM and allow music -

to be faithfully reproduced

bull Packet Playout Unit Performs compensation for network delay network jitter and

dropped packets Many proprietary techniques are used to address these problems

since there are currently no standards in place for packet playout

bull Packet Protocol Encapsulation Unit Performs encapsulation of the packet voice

data destined for the network interface For VoIP this encapsulation is per the Real-

Transport Protocol (RTP) which runs directly on top of UDP

oice Encryption Provides optional encryption of the voice packet data prior to

9

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10

Page 6: YII CHIN HUANG

ACKNOWLEDMENT

First of all I would like to record my greatest gratitude to supervisor of this

study Mr Ng Liang Yew who has always been understanding open giving priceless

supervision and advice in leading all the way through to complete this study

Besides I would like to express my heartiest thanks to those who have been in

one or another way help and contribute to this study

Thanks to those people who have inspired me directly or indirectly especially

founders of internet and dot com companies with their vision technology pioneering

spirit entrepreneur spirit and shaping the net I appreciate the creation of the internet so

that I can search for my thesis information fast easy and comfortable

Domo Arigato to the CEO amp President Vice President HR Manager Senior

Manager and Researchers at Nippon Telegraph and Telephone (NIT MSC Sdn Bhd

Cyberjaya) (httpwwwnttcomworld) for assuring me a job as a Researcher I could

join NIT -due to the experience and knowledge I gained partly from the study of this

thesis even before my graduation

Finally and as always my beloved father mother sisters brother sister-in-Iaws

for their understanding and never ending support on my projects

III

Abstract

Business cards has exists long since business contacts and communications play

an important role in ensuring a success in business But it seems paper is still the major

medium for printing business cards It might get dirty lost or tomed Printing the card

especially high quality cards is costly When business contacts and network grows it is

hard to manage the cards for searching and keeping them systematically Exchanging

business cards only possible if two persons met

Hence the idea of electronic business card surfaced The product can solve all

these problems and proven to be very interactive and keep the electronic business card

owner in a competitive situation All the e-businesscards will be kept on the server and

could be viewed as web pages from anywhere in the world Then the cards can be

downloaded and be stored in desktop computer The cards would be stored

systematically and electronically with some added features such as direct fax telephone

dialing and conversation chat e-mail and videoconferencing from the software

installed in the desktop itself without having to buy any fax machine or telephone set

Electronic business card take the advantage of the internet as the medium of

exchanging business cards among businessmen and professionals Integrated in a

search engine for Multimedia Super Corridor ( httpwwwcyber-jayacom ) Create a

one stop environment that is suitable for doing e-commerce

Components of Electronic Business Card

bull Voice over Internet Protocol

bull Fax over Internet Protocol

bull Short Messaging System

bull Email

bull Vide9conferencing

bull Chat

IV

bull E-Commerce

bull Global Positioning System

excluded in this thesis

v

Abstrak

Kad perlllagaan telah wujud sekian lama semenjak perhubungan perniagaan

memainkan peranan yang penting dalam menentukan kej ayaan sesebuah perniagaan

Namun kertas masih lagi menjadi bahan utama untuk pencetakan kad perniagaan Ia

mungkin menjadi kotor hilang atau terkoyak Mencetak kad yang bermutu tinggi

memerlukan kos yang tinggi Apabila perhubungan dan rangkaian perniagaan semakin

berkembang adalah sukar untuk mengurus kad-kad tersebut bagi tujuan pencarian

semula dan menyimpan kad-kad tersebut secara sistematik Pertukaran kad hanya

mungkin apabila dua orang bertemu

Maka dengan itu timbullah idea kad perniagaan elektronik Hasilnya nanti dapat

menyelesaikan semua masalah di atas dan terbukti adalah sangat interaktif untuk

meletakkan pemilik kad pad a kedudukan yang berdaya saing Kesemua kad perniagaan

elektronik akan disimpan di dalm pelayan dan dapat dilihat sebagai Ian web dari manashy

mana pelusuk dunia Kemudian kad-kad ini dapat disimpan dalam komputer meja

Kad-kad ini akan disimpan secara sistematik dengan ciri-ciri tambahan seperti faks

dailan dan perbualan secara telefon borak emel dan sidang video daripada perisian

yang dimasukkan ke dalam komputer meja tanpa perlu membeli mesin faks atau set

telefon

Kad perniagaan elektronik menggunakan kelebihan internet sebagai perantara

untuk pertukaran kad perniagaan di antara golongan ahli perniagaan dan ahli

profesional Diintegrasikan bersama enjin pencari untuk Koridor Raya Multimedia (

hUpwwwcyber-javacom ) Ini mewujudkan suatu persekitaran sepusat yang sesuai untuk

menjalankan e-dagang

Komponen utama Kad Perniagaan Elektronik

bull Penghantaran suara secara protokol internet

bull Penghantaran faks secara protokol internet

vi

bull Sistem rnesej ringkas

bull Ernel

bull Sidang video

bull Borak

bull e-dagang

bull sistern kedudukan sedunia

dikecualikan daripada tesis

vii

TABLE OF CONTENTS

CONTENTS PAGES

Dedication ii

Acknowledgment iii

Abstract iv

Abstrak vi

Table of contents vii

List of Tables xii

List of Figures xii

CHAPTER 1 COMPUTER TELEPHONY INTEGRATION (CTI)

11 Introduction to CTI 1

12 CTI with modem or sophisticated DSP card 1

CHAPTER 2 INTERNET PROTOCOL

21 Introduction to Internet Protocol (lP) 2

22 IP Host Addresses and Routing 3

23 IP version 6 4

CHAPTER 3 VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview 5

32 VoIP vs PSTN 5

33 VoIP Hardware 6

34 VoIP Software 7

35 Implementation Issues of VoIP 12

36 VoIP Potential 13

viii

612 Phone Device Class

613 Basic Services

614 Supplementary Services

62 TAPI Phone Numbers

63 TAPI Initialization

64 API Negotiation

65 Making the Call

66 Ending a Call

67 Closing the Line

68 Shutdown

CHAPTER 7 JAVA TELEPHONY APPLICATION

INTERFACE (JTAPI)

71 Java vs C++

72 JTAPI Overview

73 Java Telephony Package Architecture

74 Java Telephony Call Model

~41 Provider Object

742 Call Object

743 Address Object

744 Connection Object

745 Terminal Object

746 TerminalConnection Object

75 JTAPI Core Package Methods

33

33

34

36

41

42

45

50

51

52

PROGRAMMING

53

55

56

57

58

58

58

59

59

59

60

x

751 CallconnectO 60

752 TerminalConnectionanswerO 60

753 ConnectiondisconnectO 60

76 The JTAPI Observer Model 63

77 Application Code Examples 63

771 Outgoing Telephone Call Example 64

772 Incoming Telephone Call Example 67

CHAPTER 8 SHORT MESSAGING SYSTEM (SMS) FROM INTERNET TO

MOBILE

81 SMS Overview 72

82 SMS Implementation Example 72

CHAPTER 9 DISCUSSIONS AND CONCLUSIONS

91 Enumtapi 75

91 TAPI Browser 76

9l Conclusions 77

93 Further Works 79

Appendix 81

References 82

xi

LI T OF TABLES

Table Page

1 T API Support for Windows Platform 35

LIST OF FIGURES

Figure Page

1 Enumtapi 75

XII

CHAPTER 1

COMPUTER TELEPHONY INTEGRATION

11 Introduction

Computer Telephony (CT) is the integration of the computer to the Public

Switched Telephone Network (PSTN) CT can be designed as desktop dialing faxing

and as Voice over Internet Protocol (VoIP) application with call buttons on web pages

It will increase customer service and organizational efficiency by automating and

adding intelligence to the way we communicate with the telephone

12 CII with modem or sophisticated nsp card

Applications connect directly to the PSTN with PC based telephony hardware

cards These hardware cards range from simple voice modems to more sophisticated

Digital Signal Processing (DSP) based solutions such as Dialogic Voice modems

provide a less expensive solution for home users However it is impractical for

commercial solutions whereas a voice modem is restricted with limited number of

phone line connections per server Furthermore voice modems do not support

advanced features such as to accurately recognize the range of tones that may be

required by a CT application [1]

1

CHAPTER 2

INTERNET TRANSFER PROTOCOL

21 Introduction to Internet Protocol (lP)

The IP is a routing protocol designed to route traffic within a network or

between networks IP is designed to remain transparent to the end user application The

transparency is achieved by encapsulation The data sent by the host computer are

encapsulated into IP packets The IP header identifies the address of the receiving host

computer The IP packets and header are further encapsulated into the specific protocol

of the transit network such as X25 or Ethernet LAN After the transit network has

delivered the traffic to an IP router its link control information is stripped away The

gateway then uses the destination address in the datagram header to determine where to

route the traffic Typically it then passes the datagram to a subnetwork by invoking a

subnetwork access protocol This protocol is used to encapsulate the datagram header

and user data into the headers and trailers that are used by the subnetwork This process

is repeated at each gateway until it reached the destination[ 4]

Transmission Control Protocol (TCP) provides a reliable byte stream between

two processes It is reliable and applications are not required to monitor for lost or

corrupted packets TCP is a connection oriented protocol because applications that

communicate via TCP establish a logical connection before any exchange of data can

take place and terminate the connection when the data exchange has been

completed [IS]

User Datagram Protocol (UCP) is a connectionless protocol where data packets

addressed and -delivered individually UDP is not a reliable protocol hence

applications must be prepared to handle the loss of packets[IS]

2

22 IP Host Addresses and Routing

An IP host address is a 32-bit number uniquely identifying an Internet host

According to convention the 4-byte Internet host address is usually written down as a

set of four decimal numbers for example 127001 The Internet host address is

usually divided into two parts the network address and the actual host address The

respective lengths of these two portions of the address vary depending on the most

significant byte in the address( 4)

Class A network addresses are those with the most significant byte between 0

and 127 A Class A address consists of an 8-bit network address and a 24-bit host

address Because addresses beginning with 0 and 127 are reserved there can be a

maximum of 126 class A subnets on an Internet A Class A subnet can contain up to

16777214 hosts Class B network addresses are those with the most significant byte

between 128 and 191 Class B addresses consist of a 16-bit network address and a 16shy

bit host address There can be a maximum of 16383 class B subnets A Class B subnet

may contain up to 65534 hosts A Class C network address is one with the most

significant byte between 192 and 223 This allows a total of 2097152 class C subnets

A Class C subnet may contain up to 254 hosts Class D addresses with most significant

byte between 224 and 255 are reserved for IP multicasting

Once the destination address of a packet is known hosts on an Internet can

route the packet as appropriate Routing involves either forwarding a packet to a

destination that is known to the host or passing it along a default route Larger hosts

maintain dynamically updated routing tables Through these tables the correct route of

packets can be identified and in the case of a network error alternate routes can be

nd

3

23 IP version 6

IP Version 6 (IPv6) is the next generation protocol designed by the Internet

Engineering Task Force (IETF) to replace the current version Internet Protocol IP

Version 4 (IPv4) There is a growing shortage of IPv4 addresses which are needed by

all new machines added to the Internet IPv6 fixes a number of problems in IPv4 such

as the limited number of available IPv4 addresses It also adds many improvements to

IPv4 in areas uch as routing and network autoconfiguration [18]

4

CHAPTER 3

VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview

VoIP is a mean to bypass the long distance charge One can simultaneously talk

fax and receive information from anywhere in the world for the cost of a local phone

call by taking advantage of Transmission Control Protocol (TCP)lP TCPlP makes the

underlying physical connection irrelevant and can run over T1 Integrated Services

Digital Network (ISDN) Frame Relay wireless microwave or satellite links[20]

The most important developments in the VoIP was the adoption of an

interoperability standard H323 an International Telecommunication Union (ITU)

standard for Internet telephony and videoconferencing provides the foundation for an

IP based telephone network H323 provides a standard set of procedures for setting up

voice and video calls over a TCPlP network and allows for the use of multiple codecs

In depth discussion about H323 is available in Chapter 4[20]

32 VoIP vs PSTN

Compared to a real phone line an H323 requires only bandwidth It doesnt

care what kind of circuit is sitting underneath it Let it be T1 xDSL wireless or a dialshy

up Plain Old Telephony Service (POTS) connection A single broadband pipe can

deliver a fairly large number of virtual telephone lines This is a big improvement over

the Public Switched Telephone Network (PSTN) circuit centric mentality where every

service requires its own copper pair to the subscriber [20]

With H323 bandwidth is reduced from 64Kbpseach to lOKbpseach [21]

Once compression is applied voice doesnt require very much bandwidth Then its

5

really a waste to send voice at 64 kbps uncompressed through any network whether it

is the PSTN or the Internet

Internet is unreliable and insecure while analog phone lines very rarely fail

Important point to consider when implementing VoIP

bull Distribute H323 gateways throughout all the networks to avoid creating a situation

where a single hardware outage can affect many other services

bull Gateway software should be smart enough so that it can reroute calls to other

gateways when needed

bull Gateway should route calls over the PSTN when the IP network is unavailable

33 VoIP Hardware

In selecting hardware it will be important to select a platform which is costshy

effective standards compliant and easily serviced It is also important to use

components which offload compression and error correction tasks from the server CPU

to a DSP houses on the gateway Implementations where media processing is done on

the server CPU should be avoided as these systems do not scale well and often

introduce more latency than solutions which offload media processing to a DSP

optimized for the job of compressingdecompressing audio [20]

Gateways are required to adapt traditional analog telephony to the Internet

Within the gateway device there are different types of processors that handle the

conversion from traditional to VoIP DSP handle all of the signal processing activity

including voice compression tone detection and generation echo cancellation and

silence suppression

There are also microprocessors which control the DSP and handle all the H323

taco processing and network management functions Some of the functions in the

micro include routing bil1ing and management both within the micro and in between

6

the micro and the DSP The first thing that happens in the DSP is that an analog voice

signal is received This signal is converted to a Pulse Code Modulation (PCM) digital

stream PCM i the classic process of converting analog telephony to digital As a result

of delay in the network echo and talker overlap occurred Echo is caused by the signal

reflections of the speakers voice from the far end telephone equipment back into the

speakers ear Echo becomes a significant problem when the round trip delay becomes

greater than 50 milliseconds Since echo is perceived as a significant quality problem

VoIP systems must address the need for echo control and implement some means of

echo cancellation[20]

Next the Voice Activity Director (V AD) detects and removes silence In a

typical conversation 50 of the conversation is silence Removing the silence can

improve bandwidth consumption After the tone is routed around the CO DEC the

remaining PCM samples are forwarded to the CODEC Voice codecs (codingdecoding

algorithms) are used to compress voice for packet network transmission Most

CODECs garble signaling tones to the point that they are unrecognizable by the tone

detection devices for which they are intended Therefore the tone is detected and

routed around the CODECs

34 VoIP Software

The software consists of the following major subsystems User Interface Voice

Processing Telephony Signaling Gateway Network Interface Protocols Network

Management Agent and System Services [20]

The User Interface provides tbe traditional user interface functions of a

telephone At a minimum this consists of a keypad for dialing numbers (0-9 ) and

dible indicator for announcing incoming calls to the user On more sophisticated

intcdaces additional keys are provided for features such as mute redial hold transfer

7

conferencing etc A display is also typically provided for displaying user prompts

number diaJed CallerID information for incoming calls etc

The Voice Processing software is composed of the following software modules

bull PCM Interface Unit Receives PCM samples from the analog interface and

forwards then to the appropriate DSP software module for processing It also

forwards processed PCM samples to the analog interface

bull Tone Generator Generates call progress tones to the user and generates in-band

DTMF digits to the network based on key presses relayed from the User Interface

For certain voice codecs the compression algorithm does not permit faithful

transmission of DTMF tones For those algorithms eg G7231 the software

generates an in-band message to the network that is used by the remote gateway to

regenerate the DTMF tone

bull Line Echo Canceller Unit Performs ITU G168 compliant echo cancellation on

sampled full -duplex voice port signals Echo in a telephone network is caused by

signal reflections generated by the hybrid circuit that converts between a 4-wire

circuit (a separate transmit and receive pair) and a 2-wire circuit (a single transmit

and receive pair) These reflections of the speakers voice are heard in the speakers

ear Echo is present even in a conventional circuit switched telephone network ~ -

However it is acceptable because the round trip delays through the network are

smaller than 50 ms and the echo is masked by the normal side tone every telephone

generates Echo becomes a problem in VoIP networks because the round trip delay

through the network is almost always greater than 50 ms Thus echo cancellation

techniques are required ITU standard G168 defines performance requirements that

are currently required for echo cancellers Echo is cancelled toward the packet

Detwork from the telephone network The echo canceller compares the voice data

received from the packet network with voice data being transmitted to the packet

8

network The echo from the telephone network hybrid is removed by a digital filter

on the transmit path into the packet network

bull Voice Activity Detector (V AD) Detects voice activity and activates or deactivates

the transmission of packets in order to optimize bandwidth When activity is not

detected the encoder output will not be transported across the network This

software also measures Idle Noise characteristics of the interface and reports this

information to the Packet Voice Protocol for periodic forwarding to the remote

gateway Idle noise is reproduced by the remote end when there is no voice activity

so that the remote user does not fee l that the line went dead

bull Voice Codec Unit Perfonns packetization of the 64 kbps data stream received

from the user Various compression algorithms exist which have different

performance characteristics G711 PCM which operates at 64 kbps (no

compression) G726 ADPCM which operates at 16 24 32 and 40 kbps G7231

which operates at 53 or 63 kbps and G729 which operates at 8 kbps Typically

voice algorithms that perform greater compression require much more processing

power It should be noted that high fidelity audio quality compression algorithms

can also be used since VoIP is not subject to the 4 kHz bandwidth restrictions found

in the PS1N This would provide better sounding audio than PCM and allow music -

to be faithfully reproduced

bull Packet Playout Unit Performs compensation for network delay network jitter and

dropped packets Many proprietary techniques are used to address these problems

since there are currently no standards in place for packet playout

bull Packet Protocol Encapsulation Unit Performs encapsulation of the packet voice

data destined for the network interface For VoIP this encapsulation is per the Real-

Transport Protocol (RTP) which runs directly on top of UDP

oice Encryption Provides optional encryption of the voice packet data prior to

9

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10

Page 7: YII CHIN HUANG

Abstract

Business cards has exists long since business contacts and communications play

an important role in ensuring a success in business But it seems paper is still the major

medium for printing business cards It might get dirty lost or tomed Printing the card

especially high quality cards is costly When business contacts and network grows it is

hard to manage the cards for searching and keeping them systematically Exchanging

business cards only possible if two persons met

Hence the idea of electronic business card surfaced The product can solve all

these problems and proven to be very interactive and keep the electronic business card

owner in a competitive situation All the e-businesscards will be kept on the server and

could be viewed as web pages from anywhere in the world Then the cards can be

downloaded and be stored in desktop computer The cards would be stored

systematically and electronically with some added features such as direct fax telephone

dialing and conversation chat e-mail and videoconferencing from the software

installed in the desktop itself without having to buy any fax machine or telephone set

Electronic business card take the advantage of the internet as the medium of

exchanging business cards among businessmen and professionals Integrated in a

search engine for Multimedia Super Corridor ( httpwwwcyber-jayacom ) Create a

one stop environment that is suitable for doing e-commerce

Components of Electronic Business Card

bull Voice over Internet Protocol

bull Fax over Internet Protocol

bull Short Messaging System

bull Email

bull Vide9conferencing

bull Chat

IV

bull E-Commerce

bull Global Positioning System

excluded in this thesis

v

Abstrak

Kad perlllagaan telah wujud sekian lama semenjak perhubungan perniagaan

memainkan peranan yang penting dalam menentukan kej ayaan sesebuah perniagaan

Namun kertas masih lagi menjadi bahan utama untuk pencetakan kad perniagaan Ia

mungkin menjadi kotor hilang atau terkoyak Mencetak kad yang bermutu tinggi

memerlukan kos yang tinggi Apabila perhubungan dan rangkaian perniagaan semakin

berkembang adalah sukar untuk mengurus kad-kad tersebut bagi tujuan pencarian

semula dan menyimpan kad-kad tersebut secara sistematik Pertukaran kad hanya

mungkin apabila dua orang bertemu

Maka dengan itu timbullah idea kad perniagaan elektronik Hasilnya nanti dapat

menyelesaikan semua masalah di atas dan terbukti adalah sangat interaktif untuk

meletakkan pemilik kad pad a kedudukan yang berdaya saing Kesemua kad perniagaan

elektronik akan disimpan di dalm pelayan dan dapat dilihat sebagai Ian web dari manashy

mana pelusuk dunia Kemudian kad-kad ini dapat disimpan dalam komputer meja

Kad-kad ini akan disimpan secara sistematik dengan ciri-ciri tambahan seperti faks

dailan dan perbualan secara telefon borak emel dan sidang video daripada perisian

yang dimasukkan ke dalam komputer meja tanpa perlu membeli mesin faks atau set

telefon

Kad perniagaan elektronik menggunakan kelebihan internet sebagai perantara

untuk pertukaran kad perniagaan di antara golongan ahli perniagaan dan ahli

profesional Diintegrasikan bersama enjin pencari untuk Koridor Raya Multimedia (

hUpwwwcyber-javacom ) Ini mewujudkan suatu persekitaran sepusat yang sesuai untuk

menjalankan e-dagang

Komponen utama Kad Perniagaan Elektronik

bull Penghantaran suara secara protokol internet

bull Penghantaran faks secara protokol internet

vi

bull Sistem rnesej ringkas

bull Ernel

bull Sidang video

bull Borak

bull e-dagang

bull sistern kedudukan sedunia

dikecualikan daripada tesis

vii

TABLE OF CONTENTS

CONTENTS PAGES

Dedication ii

Acknowledgment iii

Abstract iv

Abstrak vi

Table of contents vii

List of Tables xii

List of Figures xii

CHAPTER 1 COMPUTER TELEPHONY INTEGRATION (CTI)

11 Introduction to CTI 1

12 CTI with modem or sophisticated DSP card 1

CHAPTER 2 INTERNET PROTOCOL

21 Introduction to Internet Protocol (lP) 2

22 IP Host Addresses and Routing 3

23 IP version 6 4

CHAPTER 3 VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview 5

32 VoIP vs PSTN 5

33 VoIP Hardware 6

34 VoIP Software 7

35 Implementation Issues of VoIP 12

36 VoIP Potential 13

viii

612 Phone Device Class

613 Basic Services

614 Supplementary Services

62 TAPI Phone Numbers

63 TAPI Initialization

64 API Negotiation

65 Making the Call

66 Ending a Call

67 Closing the Line

68 Shutdown

CHAPTER 7 JAVA TELEPHONY APPLICATION

INTERFACE (JTAPI)

71 Java vs C++

72 JTAPI Overview

73 Java Telephony Package Architecture

74 Java Telephony Call Model

~41 Provider Object

742 Call Object

743 Address Object

744 Connection Object

745 Terminal Object

746 TerminalConnection Object

75 JTAPI Core Package Methods

33

33

34

36

41

42

45

50

51

52

PROGRAMMING

53

55

56

57

58

58

58

59

59

59

60

x

751 CallconnectO 60

752 TerminalConnectionanswerO 60

753 ConnectiondisconnectO 60

76 The JTAPI Observer Model 63

77 Application Code Examples 63

771 Outgoing Telephone Call Example 64

772 Incoming Telephone Call Example 67

CHAPTER 8 SHORT MESSAGING SYSTEM (SMS) FROM INTERNET TO

MOBILE

81 SMS Overview 72

82 SMS Implementation Example 72

CHAPTER 9 DISCUSSIONS AND CONCLUSIONS

91 Enumtapi 75

91 TAPI Browser 76

9l Conclusions 77

93 Further Works 79

Appendix 81

References 82

xi

LI T OF TABLES

Table Page

1 T API Support for Windows Platform 35

LIST OF FIGURES

Figure Page

1 Enumtapi 75

XII

CHAPTER 1

COMPUTER TELEPHONY INTEGRATION

11 Introduction

Computer Telephony (CT) is the integration of the computer to the Public

Switched Telephone Network (PSTN) CT can be designed as desktop dialing faxing

and as Voice over Internet Protocol (VoIP) application with call buttons on web pages

It will increase customer service and organizational efficiency by automating and

adding intelligence to the way we communicate with the telephone

12 CII with modem or sophisticated nsp card

Applications connect directly to the PSTN with PC based telephony hardware

cards These hardware cards range from simple voice modems to more sophisticated

Digital Signal Processing (DSP) based solutions such as Dialogic Voice modems

provide a less expensive solution for home users However it is impractical for

commercial solutions whereas a voice modem is restricted with limited number of

phone line connections per server Furthermore voice modems do not support

advanced features such as to accurately recognize the range of tones that may be

required by a CT application [1]

1

CHAPTER 2

INTERNET TRANSFER PROTOCOL

21 Introduction to Internet Protocol (lP)

The IP is a routing protocol designed to route traffic within a network or

between networks IP is designed to remain transparent to the end user application The

transparency is achieved by encapsulation The data sent by the host computer are

encapsulated into IP packets The IP header identifies the address of the receiving host

computer The IP packets and header are further encapsulated into the specific protocol

of the transit network such as X25 or Ethernet LAN After the transit network has

delivered the traffic to an IP router its link control information is stripped away The

gateway then uses the destination address in the datagram header to determine where to

route the traffic Typically it then passes the datagram to a subnetwork by invoking a

subnetwork access protocol This protocol is used to encapsulate the datagram header

and user data into the headers and trailers that are used by the subnetwork This process

is repeated at each gateway until it reached the destination[ 4]

Transmission Control Protocol (TCP) provides a reliable byte stream between

two processes It is reliable and applications are not required to monitor for lost or

corrupted packets TCP is a connection oriented protocol because applications that

communicate via TCP establish a logical connection before any exchange of data can

take place and terminate the connection when the data exchange has been

completed [IS]

User Datagram Protocol (UCP) is a connectionless protocol where data packets

addressed and -delivered individually UDP is not a reliable protocol hence

applications must be prepared to handle the loss of packets[IS]

2

22 IP Host Addresses and Routing

An IP host address is a 32-bit number uniquely identifying an Internet host

According to convention the 4-byte Internet host address is usually written down as a

set of four decimal numbers for example 127001 The Internet host address is

usually divided into two parts the network address and the actual host address The

respective lengths of these two portions of the address vary depending on the most

significant byte in the address( 4)

Class A network addresses are those with the most significant byte between 0

and 127 A Class A address consists of an 8-bit network address and a 24-bit host

address Because addresses beginning with 0 and 127 are reserved there can be a

maximum of 126 class A subnets on an Internet A Class A subnet can contain up to

16777214 hosts Class B network addresses are those with the most significant byte

between 128 and 191 Class B addresses consist of a 16-bit network address and a 16shy

bit host address There can be a maximum of 16383 class B subnets A Class B subnet

may contain up to 65534 hosts A Class C network address is one with the most

significant byte between 192 and 223 This allows a total of 2097152 class C subnets

A Class C subnet may contain up to 254 hosts Class D addresses with most significant

byte between 224 and 255 are reserved for IP multicasting

Once the destination address of a packet is known hosts on an Internet can

route the packet as appropriate Routing involves either forwarding a packet to a

destination that is known to the host or passing it along a default route Larger hosts

maintain dynamically updated routing tables Through these tables the correct route of

packets can be identified and in the case of a network error alternate routes can be

nd

3

23 IP version 6

IP Version 6 (IPv6) is the next generation protocol designed by the Internet

Engineering Task Force (IETF) to replace the current version Internet Protocol IP

Version 4 (IPv4) There is a growing shortage of IPv4 addresses which are needed by

all new machines added to the Internet IPv6 fixes a number of problems in IPv4 such

as the limited number of available IPv4 addresses It also adds many improvements to

IPv4 in areas uch as routing and network autoconfiguration [18]

4

CHAPTER 3

VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview

VoIP is a mean to bypass the long distance charge One can simultaneously talk

fax and receive information from anywhere in the world for the cost of a local phone

call by taking advantage of Transmission Control Protocol (TCP)lP TCPlP makes the

underlying physical connection irrelevant and can run over T1 Integrated Services

Digital Network (ISDN) Frame Relay wireless microwave or satellite links[20]

The most important developments in the VoIP was the adoption of an

interoperability standard H323 an International Telecommunication Union (ITU)

standard for Internet telephony and videoconferencing provides the foundation for an

IP based telephone network H323 provides a standard set of procedures for setting up

voice and video calls over a TCPlP network and allows for the use of multiple codecs

In depth discussion about H323 is available in Chapter 4[20]

32 VoIP vs PSTN

Compared to a real phone line an H323 requires only bandwidth It doesnt

care what kind of circuit is sitting underneath it Let it be T1 xDSL wireless or a dialshy

up Plain Old Telephony Service (POTS) connection A single broadband pipe can

deliver a fairly large number of virtual telephone lines This is a big improvement over

the Public Switched Telephone Network (PSTN) circuit centric mentality where every

service requires its own copper pair to the subscriber [20]

With H323 bandwidth is reduced from 64Kbpseach to lOKbpseach [21]

Once compression is applied voice doesnt require very much bandwidth Then its

5

really a waste to send voice at 64 kbps uncompressed through any network whether it

is the PSTN or the Internet

Internet is unreliable and insecure while analog phone lines very rarely fail

Important point to consider when implementing VoIP

bull Distribute H323 gateways throughout all the networks to avoid creating a situation

where a single hardware outage can affect many other services

bull Gateway software should be smart enough so that it can reroute calls to other

gateways when needed

bull Gateway should route calls over the PSTN when the IP network is unavailable

33 VoIP Hardware

In selecting hardware it will be important to select a platform which is costshy

effective standards compliant and easily serviced It is also important to use

components which offload compression and error correction tasks from the server CPU

to a DSP houses on the gateway Implementations where media processing is done on

the server CPU should be avoided as these systems do not scale well and often

introduce more latency than solutions which offload media processing to a DSP

optimized for the job of compressingdecompressing audio [20]

Gateways are required to adapt traditional analog telephony to the Internet

Within the gateway device there are different types of processors that handle the

conversion from traditional to VoIP DSP handle all of the signal processing activity

including voice compression tone detection and generation echo cancellation and

silence suppression

There are also microprocessors which control the DSP and handle all the H323

taco processing and network management functions Some of the functions in the

micro include routing bil1ing and management both within the micro and in between

6

the micro and the DSP The first thing that happens in the DSP is that an analog voice

signal is received This signal is converted to a Pulse Code Modulation (PCM) digital

stream PCM i the classic process of converting analog telephony to digital As a result

of delay in the network echo and talker overlap occurred Echo is caused by the signal

reflections of the speakers voice from the far end telephone equipment back into the

speakers ear Echo becomes a significant problem when the round trip delay becomes

greater than 50 milliseconds Since echo is perceived as a significant quality problem

VoIP systems must address the need for echo control and implement some means of

echo cancellation[20]

Next the Voice Activity Director (V AD) detects and removes silence In a

typical conversation 50 of the conversation is silence Removing the silence can

improve bandwidth consumption After the tone is routed around the CO DEC the

remaining PCM samples are forwarded to the CODEC Voice codecs (codingdecoding

algorithms) are used to compress voice for packet network transmission Most

CODECs garble signaling tones to the point that they are unrecognizable by the tone

detection devices for which they are intended Therefore the tone is detected and

routed around the CODECs

34 VoIP Software

The software consists of the following major subsystems User Interface Voice

Processing Telephony Signaling Gateway Network Interface Protocols Network

Management Agent and System Services [20]

The User Interface provides tbe traditional user interface functions of a

telephone At a minimum this consists of a keypad for dialing numbers (0-9 ) and

dible indicator for announcing incoming calls to the user On more sophisticated

intcdaces additional keys are provided for features such as mute redial hold transfer

7

conferencing etc A display is also typically provided for displaying user prompts

number diaJed CallerID information for incoming calls etc

The Voice Processing software is composed of the following software modules

bull PCM Interface Unit Receives PCM samples from the analog interface and

forwards then to the appropriate DSP software module for processing It also

forwards processed PCM samples to the analog interface

bull Tone Generator Generates call progress tones to the user and generates in-band

DTMF digits to the network based on key presses relayed from the User Interface

For certain voice codecs the compression algorithm does not permit faithful

transmission of DTMF tones For those algorithms eg G7231 the software

generates an in-band message to the network that is used by the remote gateway to

regenerate the DTMF tone

bull Line Echo Canceller Unit Performs ITU G168 compliant echo cancellation on

sampled full -duplex voice port signals Echo in a telephone network is caused by

signal reflections generated by the hybrid circuit that converts between a 4-wire

circuit (a separate transmit and receive pair) and a 2-wire circuit (a single transmit

and receive pair) These reflections of the speakers voice are heard in the speakers

ear Echo is present even in a conventional circuit switched telephone network ~ -

However it is acceptable because the round trip delays through the network are

smaller than 50 ms and the echo is masked by the normal side tone every telephone

generates Echo becomes a problem in VoIP networks because the round trip delay

through the network is almost always greater than 50 ms Thus echo cancellation

techniques are required ITU standard G168 defines performance requirements that

are currently required for echo cancellers Echo is cancelled toward the packet

Detwork from the telephone network The echo canceller compares the voice data

received from the packet network with voice data being transmitted to the packet

8

network The echo from the telephone network hybrid is removed by a digital filter

on the transmit path into the packet network

bull Voice Activity Detector (V AD) Detects voice activity and activates or deactivates

the transmission of packets in order to optimize bandwidth When activity is not

detected the encoder output will not be transported across the network This

software also measures Idle Noise characteristics of the interface and reports this

information to the Packet Voice Protocol for periodic forwarding to the remote

gateway Idle noise is reproduced by the remote end when there is no voice activity

so that the remote user does not fee l that the line went dead

bull Voice Codec Unit Perfonns packetization of the 64 kbps data stream received

from the user Various compression algorithms exist which have different

performance characteristics G711 PCM which operates at 64 kbps (no

compression) G726 ADPCM which operates at 16 24 32 and 40 kbps G7231

which operates at 53 or 63 kbps and G729 which operates at 8 kbps Typically

voice algorithms that perform greater compression require much more processing

power It should be noted that high fidelity audio quality compression algorithms

can also be used since VoIP is not subject to the 4 kHz bandwidth restrictions found

in the PS1N This would provide better sounding audio than PCM and allow music -

to be faithfully reproduced

bull Packet Playout Unit Performs compensation for network delay network jitter and

dropped packets Many proprietary techniques are used to address these problems

since there are currently no standards in place for packet playout

bull Packet Protocol Encapsulation Unit Performs encapsulation of the packet voice

data destined for the network interface For VoIP this encapsulation is per the Real-

Transport Protocol (RTP) which runs directly on top of UDP

oice Encryption Provides optional encryption of the voice packet data prior to

9

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10

Page 8: YII CHIN HUANG

bull E-Commerce

bull Global Positioning System

excluded in this thesis

v

Abstrak

Kad perlllagaan telah wujud sekian lama semenjak perhubungan perniagaan

memainkan peranan yang penting dalam menentukan kej ayaan sesebuah perniagaan

Namun kertas masih lagi menjadi bahan utama untuk pencetakan kad perniagaan Ia

mungkin menjadi kotor hilang atau terkoyak Mencetak kad yang bermutu tinggi

memerlukan kos yang tinggi Apabila perhubungan dan rangkaian perniagaan semakin

berkembang adalah sukar untuk mengurus kad-kad tersebut bagi tujuan pencarian

semula dan menyimpan kad-kad tersebut secara sistematik Pertukaran kad hanya

mungkin apabila dua orang bertemu

Maka dengan itu timbullah idea kad perniagaan elektronik Hasilnya nanti dapat

menyelesaikan semua masalah di atas dan terbukti adalah sangat interaktif untuk

meletakkan pemilik kad pad a kedudukan yang berdaya saing Kesemua kad perniagaan

elektronik akan disimpan di dalm pelayan dan dapat dilihat sebagai Ian web dari manashy

mana pelusuk dunia Kemudian kad-kad ini dapat disimpan dalam komputer meja

Kad-kad ini akan disimpan secara sistematik dengan ciri-ciri tambahan seperti faks

dailan dan perbualan secara telefon borak emel dan sidang video daripada perisian

yang dimasukkan ke dalam komputer meja tanpa perlu membeli mesin faks atau set

telefon

Kad perniagaan elektronik menggunakan kelebihan internet sebagai perantara

untuk pertukaran kad perniagaan di antara golongan ahli perniagaan dan ahli

profesional Diintegrasikan bersama enjin pencari untuk Koridor Raya Multimedia (

hUpwwwcyber-javacom ) Ini mewujudkan suatu persekitaran sepusat yang sesuai untuk

menjalankan e-dagang

Komponen utama Kad Perniagaan Elektronik

bull Penghantaran suara secara protokol internet

bull Penghantaran faks secara protokol internet

vi

bull Sistem rnesej ringkas

bull Ernel

bull Sidang video

bull Borak

bull e-dagang

bull sistern kedudukan sedunia

dikecualikan daripada tesis

vii

TABLE OF CONTENTS

CONTENTS PAGES

Dedication ii

Acknowledgment iii

Abstract iv

Abstrak vi

Table of contents vii

List of Tables xii

List of Figures xii

CHAPTER 1 COMPUTER TELEPHONY INTEGRATION (CTI)

11 Introduction to CTI 1

12 CTI with modem or sophisticated DSP card 1

CHAPTER 2 INTERNET PROTOCOL

21 Introduction to Internet Protocol (lP) 2

22 IP Host Addresses and Routing 3

23 IP version 6 4

CHAPTER 3 VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview 5

32 VoIP vs PSTN 5

33 VoIP Hardware 6

34 VoIP Software 7

35 Implementation Issues of VoIP 12

36 VoIP Potential 13

viii

612 Phone Device Class

613 Basic Services

614 Supplementary Services

62 TAPI Phone Numbers

63 TAPI Initialization

64 API Negotiation

65 Making the Call

66 Ending a Call

67 Closing the Line

68 Shutdown

CHAPTER 7 JAVA TELEPHONY APPLICATION

INTERFACE (JTAPI)

71 Java vs C++

72 JTAPI Overview

73 Java Telephony Package Architecture

74 Java Telephony Call Model

~41 Provider Object

742 Call Object

743 Address Object

744 Connection Object

745 Terminal Object

746 TerminalConnection Object

75 JTAPI Core Package Methods

33

33

34

36

41

42

45

50

51

52

PROGRAMMING

53

55

56

57

58

58

58

59

59

59

60

x

751 CallconnectO 60

752 TerminalConnectionanswerO 60

753 ConnectiondisconnectO 60

76 The JTAPI Observer Model 63

77 Application Code Examples 63

771 Outgoing Telephone Call Example 64

772 Incoming Telephone Call Example 67

CHAPTER 8 SHORT MESSAGING SYSTEM (SMS) FROM INTERNET TO

MOBILE

81 SMS Overview 72

82 SMS Implementation Example 72

CHAPTER 9 DISCUSSIONS AND CONCLUSIONS

91 Enumtapi 75

91 TAPI Browser 76

9l Conclusions 77

93 Further Works 79

Appendix 81

References 82

xi

LI T OF TABLES

Table Page

1 T API Support for Windows Platform 35

LIST OF FIGURES

Figure Page

1 Enumtapi 75

XII

CHAPTER 1

COMPUTER TELEPHONY INTEGRATION

11 Introduction

Computer Telephony (CT) is the integration of the computer to the Public

Switched Telephone Network (PSTN) CT can be designed as desktop dialing faxing

and as Voice over Internet Protocol (VoIP) application with call buttons on web pages

It will increase customer service and organizational efficiency by automating and

adding intelligence to the way we communicate with the telephone

12 CII with modem or sophisticated nsp card

Applications connect directly to the PSTN with PC based telephony hardware

cards These hardware cards range from simple voice modems to more sophisticated

Digital Signal Processing (DSP) based solutions such as Dialogic Voice modems

provide a less expensive solution for home users However it is impractical for

commercial solutions whereas a voice modem is restricted with limited number of

phone line connections per server Furthermore voice modems do not support

advanced features such as to accurately recognize the range of tones that may be

required by a CT application [1]

1

CHAPTER 2

INTERNET TRANSFER PROTOCOL

21 Introduction to Internet Protocol (lP)

The IP is a routing protocol designed to route traffic within a network or

between networks IP is designed to remain transparent to the end user application The

transparency is achieved by encapsulation The data sent by the host computer are

encapsulated into IP packets The IP header identifies the address of the receiving host

computer The IP packets and header are further encapsulated into the specific protocol

of the transit network such as X25 or Ethernet LAN After the transit network has

delivered the traffic to an IP router its link control information is stripped away The

gateway then uses the destination address in the datagram header to determine where to

route the traffic Typically it then passes the datagram to a subnetwork by invoking a

subnetwork access protocol This protocol is used to encapsulate the datagram header

and user data into the headers and trailers that are used by the subnetwork This process

is repeated at each gateway until it reached the destination[ 4]

Transmission Control Protocol (TCP) provides a reliable byte stream between

two processes It is reliable and applications are not required to monitor for lost or

corrupted packets TCP is a connection oriented protocol because applications that

communicate via TCP establish a logical connection before any exchange of data can

take place and terminate the connection when the data exchange has been

completed [IS]

User Datagram Protocol (UCP) is a connectionless protocol where data packets

addressed and -delivered individually UDP is not a reliable protocol hence

applications must be prepared to handle the loss of packets[IS]

2

22 IP Host Addresses and Routing

An IP host address is a 32-bit number uniquely identifying an Internet host

According to convention the 4-byte Internet host address is usually written down as a

set of four decimal numbers for example 127001 The Internet host address is

usually divided into two parts the network address and the actual host address The

respective lengths of these two portions of the address vary depending on the most

significant byte in the address( 4)

Class A network addresses are those with the most significant byte between 0

and 127 A Class A address consists of an 8-bit network address and a 24-bit host

address Because addresses beginning with 0 and 127 are reserved there can be a

maximum of 126 class A subnets on an Internet A Class A subnet can contain up to

16777214 hosts Class B network addresses are those with the most significant byte

between 128 and 191 Class B addresses consist of a 16-bit network address and a 16shy

bit host address There can be a maximum of 16383 class B subnets A Class B subnet

may contain up to 65534 hosts A Class C network address is one with the most

significant byte between 192 and 223 This allows a total of 2097152 class C subnets

A Class C subnet may contain up to 254 hosts Class D addresses with most significant

byte between 224 and 255 are reserved for IP multicasting

Once the destination address of a packet is known hosts on an Internet can

route the packet as appropriate Routing involves either forwarding a packet to a

destination that is known to the host or passing it along a default route Larger hosts

maintain dynamically updated routing tables Through these tables the correct route of

packets can be identified and in the case of a network error alternate routes can be

nd

3

23 IP version 6

IP Version 6 (IPv6) is the next generation protocol designed by the Internet

Engineering Task Force (IETF) to replace the current version Internet Protocol IP

Version 4 (IPv4) There is a growing shortage of IPv4 addresses which are needed by

all new machines added to the Internet IPv6 fixes a number of problems in IPv4 such

as the limited number of available IPv4 addresses It also adds many improvements to

IPv4 in areas uch as routing and network autoconfiguration [18]

4

CHAPTER 3

VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview

VoIP is a mean to bypass the long distance charge One can simultaneously talk

fax and receive information from anywhere in the world for the cost of a local phone

call by taking advantage of Transmission Control Protocol (TCP)lP TCPlP makes the

underlying physical connection irrelevant and can run over T1 Integrated Services

Digital Network (ISDN) Frame Relay wireless microwave or satellite links[20]

The most important developments in the VoIP was the adoption of an

interoperability standard H323 an International Telecommunication Union (ITU)

standard for Internet telephony and videoconferencing provides the foundation for an

IP based telephone network H323 provides a standard set of procedures for setting up

voice and video calls over a TCPlP network and allows for the use of multiple codecs

In depth discussion about H323 is available in Chapter 4[20]

32 VoIP vs PSTN

Compared to a real phone line an H323 requires only bandwidth It doesnt

care what kind of circuit is sitting underneath it Let it be T1 xDSL wireless or a dialshy

up Plain Old Telephony Service (POTS) connection A single broadband pipe can

deliver a fairly large number of virtual telephone lines This is a big improvement over

the Public Switched Telephone Network (PSTN) circuit centric mentality where every

service requires its own copper pair to the subscriber [20]

With H323 bandwidth is reduced from 64Kbpseach to lOKbpseach [21]

Once compression is applied voice doesnt require very much bandwidth Then its

5

really a waste to send voice at 64 kbps uncompressed through any network whether it

is the PSTN or the Internet

Internet is unreliable and insecure while analog phone lines very rarely fail

Important point to consider when implementing VoIP

bull Distribute H323 gateways throughout all the networks to avoid creating a situation

where a single hardware outage can affect many other services

bull Gateway software should be smart enough so that it can reroute calls to other

gateways when needed

bull Gateway should route calls over the PSTN when the IP network is unavailable

33 VoIP Hardware

In selecting hardware it will be important to select a platform which is costshy

effective standards compliant and easily serviced It is also important to use

components which offload compression and error correction tasks from the server CPU

to a DSP houses on the gateway Implementations where media processing is done on

the server CPU should be avoided as these systems do not scale well and often

introduce more latency than solutions which offload media processing to a DSP

optimized for the job of compressingdecompressing audio [20]

Gateways are required to adapt traditional analog telephony to the Internet

Within the gateway device there are different types of processors that handle the

conversion from traditional to VoIP DSP handle all of the signal processing activity

including voice compression tone detection and generation echo cancellation and

silence suppression

There are also microprocessors which control the DSP and handle all the H323

taco processing and network management functions Some of the functions in the

micro include routing bil1ing and management both within the micro and in between

6

the micro and the DSP The first thing that happens in the DSP is that an analog voice

signal is received This signal is converted to a Pulse Code Modulation (PCM) digital

stream PCM i the classic process of converting analog telephony to digital As a result

of delay in the network echo and talker overlap occurred Echo is caused by the signal

reflections of the speakers voice from the far end telephone equipment back into the

speakers ear Echo becomes a significant problem when the round trip delay becomes

greater than 50 milliseconds Since echo is perceived as a significant quality problem

VoIP systems must address the need for echo control and implement some means of

echo cancellation[20]

Next the Voice Activity Director (V AD) detects and removes silence In a

typical conversation 50 of the conversation is silence Removing the silence can

improve bandwidth consumption After the tone is routed around the CO DEC the

remaining PCM samples are forwarded to the CODEC Voice codecs (codingdecoding

algorithms) are used to compress voice for packet network transmission Most

CODECs garble signaling tones to the point that they are unrecognizable by the tone

detection devices for which they are intended Therefore the tone is detected and

routed around the CODECs

34 VoIP Software

The software consists of the following major subsystems User Interface Voice

Processing Telephony Signaling Gateway Network Interface Protocols Network

Management Agent and System Services [20]

The User Interface provides tbe traditional user interface functions of a

telephone At a minimum this consists of a keypad for dialing numbers (0-9 ) and

dible indicator for announcing incoming calls to the user On more sophisticated

intcdaces additional keys are provided for features such as mute redial hold transfer

7

conferencing etc A display is also typically provided for displaying user prompts

number diaJed CallerID information for incoming calls etc

The Voice Processing software is composed of the following software modules

bull PCM Interface Unit Receives PCM samples from the analog interface and

forwards then to the appropriate DSP software module for processing It also

forwards processed PCM samples to the analog interface

bull Tone Generator Generates call progress tones to the user and generates in-band

DTMF digits to the network based on key presses relayed from the User Interface

For certain voice codecs the compression algorithm does not permit faithful

transmission of DTMF tones For those algorithms eg G7231 the software

generates an in-band message to the network that is used by the remote gateway to

regenerate the DTMF tone

bull Line Echo Canceller Unit Performs ITU G168 compliant echo cancellation on

sampled full -duplex voice port signals Echo in a telephone network is caused by

signal reflections generated by the hybrid circuit that converts between a 4-wire

circuit (a separate transmit and receive pair) and a 2-wire circuit (a single transmit

and receive pair) These reflections of the speakers voice are heard in the speakers

ear Echo is present even in a conventional circuit switched telephone network ~ -

However it is acceptable because the round trip delays through the network are

smaller than 50 ms and the echo is masked by the normal side tone every telephone

generates Echo becomes a problem in VoIP networks because the round trip delay

through the network is almost always greater than 50 ms Thus echo cancellation

techniques are required ITU standard G168 defines performance requirements that

are currently required for echo cancellers Echo is cancelled toward the packet

Detwork from the telephone network The echo canceller compares the voice data

received from the packet network with voice data being transmitted to the packet

8

network The echo from the telephone network hybrid is removed by a digital filter

on the transmit path into the packet network

bull Voice Activity Detector (V AD) Detects voice activity and activates or deactivates

the transmission of packets in order to optimize bandwidth When activity is not

detected the encoder output will not be transported across the network This

software also measures Idle Noise characteristics of the interface and reports this

information to the Packet Voice Protocol for periodic forwarding to the remote

gateway Idle noise is reproduced by the remote end when there is no voice activity

so that the remote user does not fee l that the line went dead

bull Voice Codec Unit Perfonns packetization of the 64 kbps data stream received

from the user Various compression algorithms exist which have different

performance characteristics G711 PCM which operates at 64 kbps (no

compression) G726 ADPCM which operates at 16 24 32 and 40 kbps G7231

which operates at 53 or 63 kbps and G729 which operates at 8 kbps Typically

voice algorithms that perform greater compression require much more processing

power It should be noted that high fidelity audio quality compression algorithms

can also be used since VoIP is not subject to the 4 kHz bandwidth restrictions found

in the PS1N This would provide better sounding audio than PCM and allow music -

to be faithfully reproduced

bull Packet Playout Unit Performs compensation for network delay network jitter and

dropped packets Many proprietary techniques are used to address these problems

since there are currently no standards in place for packet playout

bull Packet Protocol Encapsulation Unit Performs encapsulation of the packet voice

data destined for the network interface For VoIP this encapsulation is per the Real-

Transport Protocol (RTP) which runs directly on top of UDP

oice Encryption Provides optional encryption of the voice packet data prior to

9

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10

Page 9: YII CHIN HUANG

Abstrak

Kad perlllagaan telah wujud sekian lama semenjak perhubungan perniagaan

memainkan peranan yang penting dalam menentukan kej ayaan sesebuah perniagaan

Namun kertas masih lagi menjadi bahan utama untuk pencetakan kad perniagaan Ia

mungkin menjadi kotor hilang atau terkoyak Mencetak kad yang bermutu tinggi

memerlukan kos yang tinggi Apabila perhubungan dan rangkaian perniagaan semakin

berkembang adalah sukar untuk mengurus kad-kad tersebut bagi tujuan pencarian

semula dan menyimpan kad-kad tersebut secara sistematik Pertukaran kad hanya

mungkin apabila dua orang bertemu

Maka dengan itu timbullah idea kad perniagaan elektronik Hasilnya nanti dapat

menyelesaikan semua masalah di atas dan terbukti adalah sangat interaktif untuk

meletakkan pemilik kad pad a kedudukan yang berdaya saing Kesemua kad perniagaan

elektronik akan disimpan di dalm pelayan dan dapat dilihat sebagai Ian web dari manashy

mana pelusuk dunia Kemudian kad-kad ini dapat disimpan dalam komputer meja

Kad-kad ini akan disimpan secara sistematik dengan ciri-ciri tambahan seperti faks

dailan dan perbualan secara telefon borak emel dan sidang video daripada perisian

yang dimasukkan ke dalam komputer meja tanpa perlu membeli mesin faks atau set

telefon

Kad perniagaan elektronik menggunakan kelebihan internet sebagai perantara

untuk pertukaran kad perniagaan di antara golongan ahli perniagaan dan ahli

profesional Diintegrasikan bersama enjin pencari untuk Koridor Raya Multimedia (

hUpwwwcyber-javacom ) Ini mewujudkan suatu persekitaran sepusat yang sesuai untuk

menjalankan e-dagang

Komponen utama Kad Perniagaan Elektronik

bull Penghantaran suara secara protokol internet

bull Penghantaran faks secara protokol internet

vi

bull Sistem rnesej ringkas

bull Ernel

bull Sidang video

bull Borak

bull e-dagang

bull sistern kedudukan sedunia

dikecualikan daripada tesis

vii

TABLE OF CONTENTS

CONTENTS PAGES

Dedication ii

Acknowledgment iii

Abstract iv

Abstrak vi

Table of contents vii

List of Tables xii

List of Figures xii

CHAPTER 1 COMPUTER TELEPHONY INTEGRATION (CTI)

11 Introduction to CTI 1

12 CTI with modem or sophisticated DSP card 1

CHAPTER 2 INTERNET PROTOCOL

21 Introduction to Internet Protocol (lP) 2

22 IP Host Addresses and Routing 3

23 IP version 6 4

CHAPTER 3 VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview 5

32 VoIP vs PSTN 5

33 VoIP Hardware 6

34 VoIP Software 7

35 Implementation Issues of VoIP 12

36 VoIP Potential 13

viii

612 Phone Device Class

613 Basic Services

614 Supplementary Services

62 TAPI Phone Numbers

63 TAPI Initialization

64 API Negotiation

65 Making the Call

66 Ending a Call

67 Closing the Line

68 Shutdown

CHAPTER 7 JAVA TELEPHONY APPLICATION

INTERFACE (JTAPI)

71 Java vs C++

72 JTAPI Overview

73 Java Telephony Package Architecture

74 Java Telephony Call Model

~41 Provider Object

742 Call Object

743 Address Object

744 Connection Object

745 Terminal Object

746 TerminalConnection Object

75 JTAPI Core Package Methods

33

33

34

36

41

42

45

50

51

52

PROGRAMMING

53

55

56

57

58

58

58

59

59

59

60

x

751 CallconnectO 60

752 TerminalConnectionanswerO 60

753 ConnectiondisconnectO 60

76 The JTAPI Observer Model 63

77 Application Code Examples 63

771 Outgoing Telephone Call Example 64

772 Incoming Telephone Call Example 67

CHAPTER 8 SHORT MESSAGING SYSTEM (SMS) FROM INTERNET TO

MOBILE

81 SMS Overview 72

82 SMS Implementation Example 72

CHAPTER 9 DISCUSSIONS AND CONCLUSIONS

91 Enumtapi 75

91 TAPI Browser 76

9l Conclusions 77

93 Further Works 79

Appendix 81

References 82

xi

LI T OF TABLES

Table Page

1 T API Support for Windows Platform 35

LIST OF FIGURES

Figure Page

1 Enumtapi 75

XII

CHAPTER 1

COMPUTER TELEPHONY INTEGRATION

11 Introduction

Computer Telephony (CT) is the integration of the computer to the Public

Switched Telephone Network (PSTN) CT can be designed as desktop dialing faxing

and as Voice over Internet Protocol (VoIP) application with call buttons on web pages

It will increase customer service and organizational efficiency by automating and

adding intelligence to the way we communicate with the telephone

12 CII with modem or sophisticated nsp card

Applications connect directly to the PSTN with PC based telephony hardware

cards These hardware cards range from simple voice modems to more sophisticated

Digital Signal Processing (DSP) based solutions such as Dialogic Voice modems

provide a less expensive solution for home users However it is impractical for

commercial solutions whereas a voice modem is restricted with limited number of

phone line connections per server Furthermore voice modems do not support

advanced features such as to accurately recognize the range of tones that may be

required by a CT application [1]

1

CHAPTER 2

INTERNET TRANSFER PROTOCOL

21 Introduction to Internet Protocol (lP)

The IP is a routing protocol designed to route traffic within a network or

between networks IP is designed to remain transparent to the end user application The

transparency is achieved by encapsulation The data sent by the host computer are

encapsulated into IP packets The IP header identifies the address of the receiving host

computer The IP packets and header are further encapsulated into the specific protocol

of the transit network such as X25 or Ethernet LAN After the transit network has

delivered the traffic to an IP router its link control information is stripped away The

gateway then uses the destination address in the datagram header to determine where to

route the traffic Typically it then passes the datagram to a subnetwork by invoking a

subnetwork access protocol This protocol is used to encapsulate the datagram header

and user data into the headers and trailers that are used by the subnetwork This process

is repeated at each gateway until it reached the destination[ 4]

Transmission Control Protocol (TCP) provides a reliable byte stream between

two processes It is reliable and applications are not required to monitor for lost or

corrupted packets TCP is a connection oriented protocol because applications that

communicate via TCP establish a logical connection before any exchange of data can

take place and terminate the connection when the data exchange has been

completed [IS]

User Datagram Protocol (UCP) is a connectionless protocol where data packets

addressed and -delivered individually UDP is not a reliable protocol hence

applications must be prepared to handle the loss of packets[IS]

2

22 IP Host Addresses and Routing

An IP host address is a 32-bit number uniquely identifying an Internet host

According to convention the 4-byte Internet host address is usually written down as a

set of four decimal numbers for example 127001 The Internet host address is

usually divided into two parts the network address and the actual host address The

respective lengths of these two portions of the address vary depending on the most

significant byte in the address( 4)

Class A network addresses are those with the most significant byte between 0

and 127 A Class A address consists of an 8-bit network address and a 24-bit host

address Because addresses beginning with 0 and 127 are reserved there can be a

maximum of 126 class A subnets on an Internet A Class A subnet can contain up to

16777214 hosts Class B network addresses are those with the most significant byte

between 128 and 191 Class B addresses consist of a 16-bit network address and a 16shy

bit host address There can be a maximum of 16383 class B subnets A Class B subnet

may contain up to 65534 hosts A Class C network address is one with the most

significant byte between 192 and 223 This allows a total of 2097152 class C subnets

A Class C subnet may contain up to 254 hosts Class D addresses with most significant

byte between 224 and 255 are reserved for IP multicasting

Once the destination address of a packet is known hosts on an Internet can

route the packet as appropriate Routing involves either forwarding a packet to a

destination that is known to the host or passing it along a default route Larger hosts

maintain dynamically updated routing tables Through these tables the correct route of

packets can be identified and in the case of a network error alternate routes can be

nd

3

23 IP version 6

IP Version 6 (IPv6) is the next generation protocol designed by the Internet

Engineering Task Force (IETF) to replace the current version Internet Protocol IP

Version 4 (IPv4) There is a growing shortage of IPv4 addresses which are needed by

all new machines added to the Internet IPv6 fixes a number of problems in IPv4 such

as the limited number of available IPv4 addresses It also adds many improvements to

IPv4 in areas uch as routing and network autoconfiguration [18]

4

CHAPTER 3

VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview

VoIP is a mean to bypass the long distance charge One can simultaneously talk

fax and receive information from anywhere in the world for the cost of a local phone

call by taking advantage of Transmission Control Protocol (TCP)lP TCPlP makes the

underlying physical connection irrelevant and can run over T1 Integrated Services

Digital Network (ISDN) Frame Relay wireless microwave or satellite links[20]

The most important developments in the VoIP was the adoption of an

interoperability standard H323 an International Telecommunication Union (ITU)

standard for Internet telephony and videoconferencing provides the foundation for an

IP based telephone network H323 provides a standard set of procedures for setting up

voice and video calls over a TCPlP network and allows for the use of multiple codecs

In depth discussion about H323 is available in Chapter 4[20]

32 VoIP vs PSTN

Compared to a real phone line an H323 requires only bandwidth It doesnt

care what kind of circuit is sitting underneath it Let it be T1 xDSL wireless or a dialshy

up Plain Old Telephony Service (POTS) connection A single broadband pipe can

deliver a fairly large number of virtual telephone lines This is a big improvement over

the Public Switched Telephone Network (PSTN) circuit centric mentality where every

service requires its own copper pair to the subscriber [20]

With H323 bandwidth is reduced from 64Kbpseach to lOKbpseach [21]

Once compression is applied voice doesnt require very much bandwidth Then its

5

really a waste to send voice at 64 kbps uncompressed through any network whether it

is the PSTN or the Internet

Internet is unreliable and insecure while analog phone lines very rarely fail

Important point to consider when implementing VoIP

bull Distribute H323 gateways throughout all the networks to avoid creating a situation

where a single hardware outage can affect many other services

bull Gateway software should be smart enough so that it can reroute calls to other

gateways when needed

bull Gateway should route calls over the PSTN when the IP network is unavailable

33 VoIP Hardware

In selecting hardware it will be important to select a platform which is costshy

effective standards compliant and easily serviced It is also important to use

components which offload compression and error correction tasks from the server CPU

to a DSP houses on the gateway Implementations where media processing is done on

the server CPU should be avoided as these systems do not scale well and often

introduce more latency than solutions which offload media processing to a DSP

optimized for the job of compressingdecompressing audio [20]

Gateways are required to adapt traditional analog telephony to the Internet

Within the gateway device there are different types of processors that handle the

conversion from traditional to VoIP DSP handle all of the signal processing activity

including voice compression tone detection and generation echo cancellation and

silence suppression

There are also microprocessors which control the DSP and handle all the H323

taco processing and network management functions Some of the functions in the

micro include routing bil1ing and management both within the micro and in between

6

the micro and the DSP The first thing that happens in the DSP is that an analog voice

signal is received This signal is converted to a Pulse Code Modulation (PCM) digital

stream PCM i the classic process of converting analog telephony to digital As a result

of delay in the network echo and talker overlap occurred Echo is caused by the signal

reflections of the speakers voice from the far end telephone equipment back into the

speakers ear Echo becomes a significant problem when the round trip delay becomes

greater than 50 milliseconds Since echo is perceived as a significant quality problem

VoIP systems must address the need for echo control and implement some means of

echo cancellation[20]

Next the Voice Activity Director (V AD) detects and removes silence In a

typical conversation 50 of the conversation is silence Removing the silence can

improve bandwidth consumption After the tone is routed around the CO DEC the

remaining PCM samples are forwarded to the CODEC Voice codecs (codingdecoding

algorithms) are used to compress voice for packet network transmission Most

CODECs garble signaling tones to the point that they are unrecognizable by the tone

detection devices for which they are intended Therefore the tone is detected and

routed around the CODECs

34 VoIP Software

The software consists of the following major subsystems User Interface Voice

Processing Telephony Signaling Gateway Network Interface Protocols Network

Management Agent and System Services [20]

The User Interface provides tbe traditional user interface functions of a

telephone At a minimum this consists of a keypad for dialing numbers (0-9 ) and

dible indicator for announcing incoming calls to the user On more sophisticated

intcdaces additional keys are provided for features such as mute redial hold transfer

7

conferencing etc A display is also typically provided for displaying user prompts

number diaJed CallerID information for incoming calls etc

The Voice Processing software is composed of the following software modules

bull PCM Interface Unit Receives PCM samples from the analog interface and

forwards then to the appropriate DSP software module for processing It also

forwards processed PCM samples to the analog interface

bull Tone Generator Generates call progress tones to the user and generates in-band

DTMF digits to the network based on key presses relayed from the User Interface

For certain voice codecs the compression algorithm does not permit faithful

transmission of DTMF tones For those algorithms eg G7231 the software

generates an in-band message to the network that is used by the remote gateway to

regenerate the DTMF tone

bull Line Echo Canceller Unit Performs ITU G168 compliant echo cancellation on

sampled full -duplex voice port signals Echo in a telephone network is caused by

signal reflections generated by the hybrid circuit that converts between a 4-wire

circuit (a separate transmit and receive pair) and a 2-wire circuit (a single transmit

and receive pair) These reflections of the speakers voice are heard in the speakers

ear Echo is present even in a conventional circuit switched telephone network ~ -

However it is acceptable because the round trip delays through the network are

smaller than 50 ms and the echo is masked by the normal side tone every telephone

generates Echo becomes a problem in VoIP networks because the round trip delay

through the network is almost always greater than 50 ms Thus echo cancellation

techniques are required ITU standard G168 defines performance requirements that

are currently required for echo cancellers Echo is cancelled toward the packet

Detwork from the telephone network The echo canceller compares the voice data

received from the packet network with voice data being transmitted to the packet

8

network The echo from the telephone network hybrid is removed by a digital filter

on the transmit path into the packet network

bull Voice Activity Detector (V AD) Detects voice activity and activates or deactivates

the transmission of packets in order to optimize bandwidth When activity is not

detected the encoder output will not be transported across the network This

software also measures Idle Noise characteristics of the interface and reports this

information to the Packet Voice Protocol for periodic forwarding to the remote

gateway Idle noise is reproduced by the remote end when there is no voice activity

so that the remote user does not fee l that the line went dead

bull Voice Codec Unit Perfonns packetization of the 64 kbps data stream received

from the user Various compression algorithms exist which have different

performance characteristics G711 PCM which operates at 64 kbps (no

compression) G726 ADPCM which operates at 16 24 32 and 40 kbps G7231

which operates at 53 or 63 kbps and G729 which operates at 8 kbps Typically

voice algorithms that perform greater compression require much more processing

power It should be noted that high fidelity audio quality compression algorithms

can also be used since VoIP is not subject to the 4 kHz bandwidth restrictions found

in the PS1N This would provide better sounding audio than PCM and allow music -

to be faithfully reproduced

bull Packet Playout Unit Performs compensation for network delay network jitter and

dropped packets Many proprietary techniques are used to address these problems

since there are currently no standards in place for packet playout

bull Packet Protocol Encapsulation Unit Performs encapsulation of the packet voice

data destined for the network interface For VoIP this encapsulation is per the Real-

Transport Protocol (RTP) which runs directly on top of UDP

oice Encryption Provides optional encryption of the voice packet data prior to

9

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10

Page 10: YII CHIN HUANG

bull Sistem rnesej ringkas

bull Ernel

bull Sidang video

bull Borak

bull e-dagang

bull sistern kedudukan sedunia

dikecualikan daripada tesis

vii

TABLE OF CONTENTS

CONTENTS PAGES

Dedication ii

Acknowledgment iii

Abstract iv

Abstrak vi

Table of contents vii

List of Tables xii

List of Figures xii

CHAPTER 1 COMPUTER TELEPHONY INTEGRATION (CTI)

11 Introduction to CTI 1

12 CTI with modem or sophisticated DSP card 1

CHAPTER 2 INTERNET PROTOCOL

21 Introduction to Internet Protocol (lP) 2

22 IP Host Addresses and Routing 3

23 IP version 6 4

CHAPTER 3 VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview 5

32 VoIP vs PSTN 5

33 VoIP Hardware 6

34 VoIP Software 7

35 Implementation Issues of VoIP 12

36 VoIP Potential 13

viii

612 Phone Device Class

613 Basic Services

614 Supplementary Services

62 TAPI Phone Numbers

63 TAPI Initialization

64 API Negotiation

65 Making the Call

66 Ending a Call

67 Closing the Line

68 Shutdown

CHAPTER 7 JAVA TELEPHONY APPLICATION

INTERFACE (JTAPI)

71 Java vs C++

72 JTAPI Overview

73 Java Telephony Package Architecture

74 Java Telephony Call Model

~41 Provider Object

742 Call Object

743 Address Object

744 Connection Object

745 Terminal Object

746 TerminalConnection Object

75 JTAPI Core Package Methods

33

33

34

36

41

42

45

50

51

52

PROGRAMMING

53

55

56

57

58

58

58

59

59

59

60

x

751 CallconnectO 60

752 TerminalConnectionanswerO 60

753 ConnectiondisconnectO 60

76 The JTAPI Observer Model 63

77 Application Code Examples 63

771 Outgoing Telephone Call Example 64

772 Incoming Telephone Call Example 67

CHAPTER 8 SHORT MESSAGING SYSTEM (SMS) FROM INTERNET TO

MOBILE

81 SMS Overview 72

82 SMS Implementation Example 72

CHAPTER 9 DISCUSSIONS AND CONCLUSIONS

91 Enumtapi 75

91 TAPI Browser 76

9l Conclusions 77

93 Further Works 79

Appendix 81

References 82

xi

LI T OF TABLES

Table Page

1 T API Support for Windows Platform 35

LIST OF FIGURES

Figure Page

1 Enumtapi 75

XII

CHAPTER 1

COMPUTER TELEPHONY INTEGRATION

11 Introduction

Computer Telephony (CT) is the integration of the computer to the Public

Switched Telephone Network (PSTN) CT can be designed as desktop dialing faxing

and as Voice over Internet Protocol (VoIP) application with call buttons on web pages

It will increase customer service and organizational efficiency by automating and

adding intelligence to the way we communicate with the telephone

12 CII with modem or sophisticated nsp card

Applications connect directly to the PSTN with PC based telephony hardware

cards These hardware cards range from simple voice modems to more sophisticated

Digital Signal Processing (DSP) based solutions such as Dialogic Voice modems

provide a less expensive solution for home users However it is impractical for

commercial solutions whereas a voice modem is restricted with limited number of

phone line connections per server Furthermore voice modems do not support

advanced features such as to accurately recognize the range of tones that may be

required by a CT application [1]

1

CHAPTER 2

INTERNET TRANSFER PROTOCOL

21 Introduction to Internet Protocol (lP)

The IP is a routing protocol designed to route traffic within a network or

between networks IP is designed to remain transparent to the end user application The

transparency is achieved by encapsulation The data sent by the host computer are

encapsulated into IP packets The IP header identifies the address of the receiving host

computer The IP packets and header are further encapsulated into the specific protocol

of the transit network such as X25 or Ethernet LAN After the transit network has

delivered the traffic to an IP router its link control information is stripped away The

gateway then uses the destination address in the datagram header to determine where to

route the traffic Typically it then passes the datagram to a subnetwork by invoking a

subnetwork access protocol This protocol is used to encapsulate the datagram header

and user data into the headers and trailers that are used by the subnetwork This process

is repeated at each gateway until it reached the destination[ 4]

Transmission Control Protocol (TCP) provides a reliable byte stream between

two processes It is reliable and applications are not required to monitor for lost or

corrupted packets TCP is a connection oriented protocol because applications that

communicate via TCP establish a logical connection before any exchange of data can

take place and terminate the connection when the data exchange has been

completed [IS]

User Datagram Protocol (UCP) is a connectionless protocol where data packets

addressed and -delivered individually UDP is not a reliable protocol hence

applications must be prepared to handle the loss of packets[IS]

2

22 IP Host Addresses and Routing

An IP host address is a 32-bit number uniquely identifying an Internet host

According to convention the 4-byte Internet host address is usually written down as a

set of four decimal numbers for example 127001 The Internet host address is

usually divided into two parts the network address and the actual host address The

respective lengths of these two portions of the address vary depending on the most

significant byte in the address( 4)

Class A network addresses are those with the most significant byte between 0

and 127 A Class A address consists of an 8-bit network address and a 24-bit host

address Because addresses beginning with 0 and 127 are reserved there can be a

maximum of 126 class A subnets on an Internet A Class A subnet can contain up to

16777214 hosts Class B network addresses are those with the most significant byte

between 128 and 191 Class B addresses consist of a 16-bit network address and a 16shy

bit host address There can be a maximum of 16383 class B subnets A Class B subnet

may contain up to 65534 hosts A Class C network address is one with the most

significant byte between 192 and 223 This allows a total of 2097152 class C subnets

A Class C subnet may contain up to 254 hosts Class D addresses with most significant

byte between 224 and 255 are reserved for IP multicasting

Once the destination address of a packet is known hosts on an Internet can

route the packet as appropriate Routing involves either forwarding a packet to a

destination that is known to the host or passing it along a default route Larger hosts

maintain dynamically updated routing tables Through these tables the correct route of

packets can be identified and in the case of a network error alternate routes can be

nd

3

23 IP version 6

IP Version 6 (IPv6) is the next generation protocol designed by the Internet

Engineering Task Force (IETF) to replace the current version Internet Protocol IP

Version 4 (IPv4) There is a growing shortage of IPv4 addresses which are needed by

all new machines added to the Internet IPv6 fixes a number of problems in IPv4 such

as the limited number of available IPv4 addresses It also adds many improvements to

IPv4 in areas uch as routing and network autoconfiguration [18]

4

CHAPTER 3

VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview

VoIP is a mean to bypass the long distance charge One can simultaneously talk

fax and receive information from anywhere in the world for the cost of a local phone

call by taking advantage of Transmission Control Protocol (TCP)lP TCPlP makes the

underlying physical connection irrelevant and can run over T1 Integrated Services

Digital Network (ISDN) Frame Relay wireless microwave or satellite links[20]

The most important developments in the VoIP was the adoption of an

interoperability standard H323 an International Telecommunication Union (ITU)

standard for Internet telephony and videoconferencing provides the foundation for an

IP based telephone network H323 provides a standard set of procedures for setting up

voice and video calls over a TCPlP network and allows for the use of multiple codecs

In depth discussion about H323 is available in Chapter 4[20]

32 VoIP vs PSTN

Compared to a real phone line an H323 requires only bandwidth It doesnt

care what kind of circuit is sitting underneath it Let it be T1 xDSL wireless or a dialshy

up Plain Old Telephony Service (POTS) connection A single broadband pipe can

deliver a fairly large number of virtual telephone lines This is a big improvement over

the Public Switched Telephone Network (PSTN) circuit centric mentality where every

service requires its own copper pair to the subscriber [20]

With H323 bandwidth is reduced from 64Kbpseach to lOKbpseach [21]

Once compression is applied voice doesnt require very much bandwidth Then its

5

really a waste to send voice at 64 kbps uncompressed through any network whether it

is the PSTN or the Internet

Internet is unreliable and insecure while analog phone lines very rarely fail

Important point to consider when implementing VoIP

bull Distribute H323 gateways throughout all the networks to avoid creating a situation

where a single hardware outage can affect many other services

bull Gateway software should be smart enough so that it can reroute calls to other

gateways when needed

bull Gateway should route calls over the PSTN when the IP network is unavailable

33 VoIP Hardware

In selecting hardware it will be important to select a platform which is costshy

effective standards compliant and easily serviced It is also important to use

components which offload compression and error correction tasks from the server CPU

to a DSP houses on the gateway Implementations where media processing is done on

the server CPU should be avoided as these systems do not scale well and often

introduce more latency than solutions which offload media processing to a DSP

optimized for the job of compressingdecompressing audio [20]

Gateways are required to adapt traditional analog telephony to the Internet

Within the gateway device there are different types of processors that handle the

conversion from traditional to VoIP DSP handle all of the signal processing activity

including voice compression tone detection and generation echo cancellation and

silence suppression

There are also microprocessors which control the DSP and handle all the H323

taco processing and network management functions Some of the functions in the

micro include routing bil1ing and management both within the micro and in between

6

the micro and the DSP The first thing that happens in the DSP is that an analog voice

signal is received This signal is converted to a Pulse Code Modulation (PCM) digital

stream PCM i the classic process of converting analog telephony to digital As a result

of delay in the network echo and talker overlap occurred Echo is caused by the signal

reflections of the speakers voice from the far end telephone equipment back into the

speakers ear Echo becomes a significant problem when the round trip delay becomes

greater than 50 milliseconds Since echo is perceived as a significant quality problem

VoIP systems must address the need for echo control and implement some means of

echo cancellation[20]

Next the Voice Activity Director (V AD) detects and removes silence In a

typical conversation 50 of the conversation is silence Removing the silence can

improve bandwidth consumption After the tone is routed around the CO DEC the

remaining PCM samples are forwarded to the CODEC Voice codecs (codingdecoding

algorithms) are used to compress voice for packet network transmission Most

CODECs garble signaling tones to the point that they are unrecognizable by the tone

detection devices for which they are intended Therefore the tone is detected and

routed around the CODECs

34 VoIP Software

The software consists of the following major subsystems User Interface Voice

Processing Telephony Signaling Gateway Network Interface Protocols Network

Management Agent and System Services [20]

The User Interface provides tbe traditional user interface functions of a

telephone At a minimum this consists of a keypad for dialing numbers (0-9 ) and

dible indicator for announcing incoming calls to the user On more sophisticated

intcdaces additional keys are provided for features such as mute redial hold transfer

7

conferencing etc A display is also typically provided for displaying user prompts

number diaJed CallerID information for incoming calls etc

The Voice Processing software is composed of the following software modules

bull PCM Interface Unit Receives PCM samples from the analog interface and

forwards then to the appropriate DSP software module for processing It also

forwards processed PCM samples to the analog interface

bull Tone Generator Generates call progress tones to the user and generates in-band

DTMF digits to the network based on key presses relayed from the User Interface

For certain voice codecs the compression algorithm does not permit faithful

transmission of DTMF tones For those algorithms eg G7231 the software

generates an in-band message to the network that is used by the remote gateway to

regenerate the DTMF tone

bull Line Echo Canceller Unit Performs ITU G168 compliant echo cancellation on

sampled full -duplex voice port signals Echo in a telephone network is caused by

signal reflections generated by the hybrid circuit that converts between a 4-wire

circuit (a separate transmit and receive pair) and a 2-wire circuit (a single transmit

and receive pair) These reflections of the speakers voice are heard in the speakers

ear Echo is present even in a conventional circuit switched telephone network ~ -

However it is acceptable because the round trip delays through the network are

smaller than 50 ms and the echo is masked by the normal side tone every telephone

generates Echo becomes a problem in VoIP networks because the round trip delay

through the network is almost always greater than 50 ms Thus echo cancellation

techniques are required ITU standard G168 defines performance requirements that

are currently required for echo cancellers Echo is cancelled toward the packet

Detwork from the telephone network The echo canceller compares the voice data

received from the packet network with voice data being transmitted to the packet

8

network The echo from the telephone network hybrid is removed by a digital filter

on the transmit path into the packet network

bull Voice Activity Detector (V AD) Detects voice activity and activates or deactivates

the transmission of packets in order to optimize bandwidth When activity is not

detected the encoder output will not be transported across the network This

software also measures Idle Noise characteristics of the interface and reports this

information to the Packet Voice Protocol for periodic forwarding to the remote

gateway Idle noise is reproduced by the remote end when there is no voice activity

so that the remote user does not fee l that the line went dead

bull Voice Codec Unit Perfonns packetization of the 64 kbps data stream received

from the user Various compression algorithms exist which have different

performance characteristics G711 PCM which operates at 64 kbps (no

compression) G726 ADPCM which operates at 16 24 32 and 40 kbps G7231

which operates at 53 or 63 kbps and G729 which operates at 8 kbps Typically

voice algorithms that perform greater compression require much more processing

power It should be noted that high fidelity audio quality compression algorithms

can also be used since VoIP is not subject to the 4 kHz bandwidth restrictions found

in the PS1N This would provide better sounding audio than PCM and allow music -

to be faithfully reproduced

bull Packet Playout Unit Performs compensation for network delay network jitter and

dropped packets Many proprietary techniques are used to address these problems

since there are currently no standards in place for packet playout

bull Packet Protocol Encapsulation Unit Performs encapsulation of the packet voice

data destined for the network interface For VoIP this encapsulation is per the Real-

Transport Protocol (RTP) which runs directly on top of UDP

oice Encryption Provides optional encryption of the voice packet data prior to

9

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10

Page 11: YII CHIN HUANG

TABLE OF CONTENTS

CONTENTS PAGES

Dedication ii

Acknowledgment iii

Abstract iv

Abstrak vi

Table of contents vii

List of Tables xii

List of Figures xii

CHAPTER 1 COMPUTER TELEPHONY INTEGRATION (CTI)

11 Introduction to CTI 1

12 CTI with modem or sophisticated DSP card 1

CHAPTER 2 INTERNET PROTOCOL

21 Introduction to Internet Protocol (lP) 2

22 IP Host Addresses and Routing 3

23 IP version 6 4

CHAPTER 3 VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview 5

32 VoIP vs PSTN 5

33 VoIP Hardware 6

34 VoIP Software 7

35 Implementation Issues of VoIP 12

36 VoIP Potential 13

viii

612 Phone Device Class

613 Basic Services

614 Supplementary Services

62 TAPI Phone Numbers

63 TAPI Initialization

64 API Negotiation

65 Making the Call

66 Ending a Call

67 Closing the Line

68 Shutdown

CHAPTER 7 JAVA TELEPHONY APPLICATION

INTERFACE (JTAPI)

71 Java vs C++

72 JTAPI Overview

73 Java Telephony Package Architecture

74 Java Telephony Call Model

~41 Provider Object

742 Call Object

743 Address Object

744 Connection Object

745 Terminal Object

746 TerminalConnection Object

75 JTAPI Core Package Methods

33

33

34

36

41

42

45

50

51

52

PROGRAMMING

53

55

56

57

58

58

58

59

59

59

60

x

751 CallconnectO 60

752 TerminalConnectionanswerO 60

753 ConnectiondisconnectO 60

76 The JTAPI Observer Model 63

77 Application Code Examples 63

771 Outgoing Telephone Call Example 64

772 Incoming Telephone Call Example 67

CHAPTER 8 SHORT MESSAGING SYSTEM (SMS) FROM INTERNET TO

MOBILE

81 SMS Overview 72

82 SMS Implementation Example 72

CHAPTER 9 DISCUSSIONS AND CONCLUSIONS

91 Enumtapi 75

91 TAPI Browser 76

9l Conclusions 77

93 Further Works 79

Appendix 81

References 82

xi

LI T OF TABLES

Table Page

1 T API Support for Windows Platform 35

LIST OF FIGURES

Figure Page

1 Enumtapi 75

XII

CHAPTER 1

COMPUTER TELEPHONY INTEGRATION

11 Introduction

Computer Telephony (CT) is the integration of the computer to the Public

Switched Telephone Network (PSTN) CT can be designed as desktop dialing faxing

and as Voice over Internet Protocol (VoIP) application with call buttons on web pages

It will increase customer service and organizational efficiency by automating and

adding intelligence to the way we communicate with the telephone

12 CII with modem or sophisticated nsp card

Applications connect directly to the PSTN with PC based telephony hardware

cards These hardware cards range from simple voice modems to more sophisticated

Digital Signal Processing (DSP) based solutions such as Dialogic Voice modems

provide a less expensive solution for home users However it is impractical for

commercial solutions whereas a voice modem is restricted with limited number of

phone line connections per server Furthermore voice modems do not support

advanced features such as to accurately recognize the range of tones that may be

required by a CT application [1]

1

CHAPTER 2

INTERNET TRANSFER PROTOCOL

21 Introduction to Internet Protocol (lP)

The IP is a routing protocol designed to route traffic within a network or

between networks IP is designed to remain transparent to the end user application The

transparency is achieved by encapsulation The data sent by the host computer are

encapsulated into IP packets The IP header identifies the address of the receiving host

computer The IP packets and header are further encapsulated into the specific protocol

of the transit network such as X25 or Ethernet LAN After the transit network has

delivered the traffic to an IP router its link control information is stripped away The

gateway then uses the destination address in the datagram header to determine where to

route the traffic Typically it then passes the datagram to a subnetwork by invoking a

subnetwork access protocol This protocol is used to encapsulate the datagram header

and user data into the headers and trailers that are used by the subnetwork This process

is repeated at each gateway until it reached the destination[ 4]

Transmission Control Protocol (TCP) provides a reliable byte stream between

two processes It is reliable and applications are not required to monitor for lost or

corrupted packets TCP is a connection oriented protocol because applications that

communicate via TCP establish a logical connection before any exchange of data can

take place and terminate the connection when the data exchange has been

completed [IS]

User Datagram Protocol (UCP) is a connectionless protocol where data packets

addressed and -delivered individually UDP is not a reliable protocol hence

applications must be prepared to handle the loss of packets[IS]

2

22 IP Host Addresses and Routing

An IP host address is a 32-bit number uniquely identifying an Internet host

According to convention the 4-byte Internet host address is usually written down as a

set of four decimal numbers for example 127001 The Internet host address is

usually divided into two parts the network address and the actual host address The

respective lengths of these two portions of the address vary depending on the most

significant byte in the address( 4)

Class A network addresses are those with the most significant byte between 0

and 127 A Class A address consists of an 8-bit network address and a 24-bit host

address Because addresses beginning with 0 and 127 are reserved there can be a

maximum of 126 class A subnets on an Internet A Class A subnet can contain up to

16777214 hosts Class B network addresses are those with the most significant byte

between 128 and 191 Class B addresses consist of a 16-bit network address and a 16shy

bit host address There can be a maximum of 16383 class B subnets A Class B subnet

may contain up to 65534 hosts A Class C network address is one with the most

significant byte between 192 and 223 This allows a total of 2097152 class C subnets

A Class C subnet may contain up to 254 hosts Class D addresses with most significant

byte between 224 and 255 are reserved for IP multicasting

Once the destination address of a packet is known hosts on an Internet can

route the packet as appropriate Routing involves either forwarding a packet to a

destination that is known to the host or passing it along a default route Larger hosts

maintain dynamically updated routing tables Through these tables the correct route of

packets can be identified and in the case of a network error alternate routes can be

nd

3

23 IP version 6

IP Version 6 (IPv6) is the next generation protocol designed by the Internet

Engineering Task Force (IETF) to replace the current version Internet Protocol IP

Version 4 (IPv4) There is a growing shortage of IPv4 addresses which are needed by

all new machines added to the Internet IPv6 fixes a number of problems in IPv4 such

as the limited number of available IPv4 addresses It also adds many improvements to

IPv4 in areas uch as routing and network autoconfiguration [18]

4

CHAPTER 3

VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview

VoIP is a mean to bypass the long distance charge One can simultaneously talk

fax and receive information from anywhere in the world for the cost of a local phone

call by taking advantage of Transmission Control Protocol (TCP)lP TCPlP makes the

underlying physical connection irrelevant and can run over T1 Integrated Services

Digital Network (ISDN) Frame Relay wireless microwave or satellite links[20]

The most important developments in the VoIP was the adoption of an

interoperability standard H323 an International Telecommunication Union (ITU)

standard for Internet telephony and videoconferencing provides the foundation for an

IP based telephone network H323 provides a standard set of procedures for setting up

voice and video calls over a TCPlP network and allows for the use of multiple codecs

In depth discussion about H323 is available in Chapter 4[20]

32 VoIP vs PSTN

Compared to a real phone line an H323 requires only bandwidth It doesnt

care what kind of circuit is sitting underneath it Let it be T1 xDSL wireless or a dialshy

up Plain Old Telephony Service (POTS) connection A single broadband pipe can

deliver a fairly large number of virtual telephone lines This is a big improvement over

the Public Switched Telephone Network (PSTN) circuit centric mentality where every

service requires its own copper pair to the subscriber [20]

With H323 bandwidth is reduced from 64Kbpseach to lOKbpseach [21]

Once compression is applied voice doesnt require very much bandwidth Then its

5

really a waste to send voice at 64 kbps uncompressed through any network whether it

is the PSTN or the Internet

Internet is unreliable and insecure while analog phone lines very rarely fail

Important point to consider when implementing VoIP

bull Distribute H323 gateways throughout all the networks to avoid creating a situation

where a single hardware outage can affect many other services

bull Gateway software should be smart enough so that it can reroute calls to other

gateways when needed

bull Gateway should route calls over the PSTN when the IP network is unavailable

33 VoIP Hardware

In selecting hardware it will be important to select a platform which is costshy

effective standards compliant and easily serviced It is also important to use

components which offload compression and error correction tasks from the server CPU

to a DSP houses on the gateway Implementations where media processing is done on

the server CPU should be avoided as these systems do not scale well and often

introduce more latency than solutions which offload media processing to a DSP

optimized for the job of compressingdecompressing audio [20]

Gateways are required to adapt traditional analog telephony to the Internet

Within the gateway device there are different types of processors that handle the

conversion from traditional to VoIP DSP handle all of the signal processing activity

including voice compression tone detection and generation echo cancellation and

silence suppression

There are also microprocessors which control the DSP and handle all the H323

taco processing and network management functions Some of the functions in the

micro include routing bil1ing and management both within the micro and in between

6

the micro and the DSP The first thing that happens in the DSP is that an analog voice

signal is received This signal is converted to a Pulse Code Modulation (PCM) digital

stream PCM i the classic process of converting analog telephony to digital As a result

of delay in the network echo and talker overlap occurred Echo is caused by the signal

reflections of the speakers voice from the far end telephone equipment back into the

speakers ear Echo becomes a significant problem when the round trip delay becomes

greater than 50 milliseconds Since echo is perceived as a significant quality problem

VoIP systems must address the need for echo control and implement some means of

echo cancellation[20]

Next the Voice Activity Director (V AD) detects and removes silence In a

typical conversation 50 of the conversation is silence Removing the silence can

improve bandwidth consumption After the tone is routed around the CO DEC the

remaining PCM samples are forwarded to the CODEC Voice codecs (codingdecoding

algorithms) are used to compress voice for packet network transmission Most

CODECs garble signaling tones to the point that they are unrecognizable by the tone

detection devices for which they are intended Therefore the tone is detected and

routed around the CODECs

34 VoIP Software

The software consists of the following major subsystems User Interface Voice

Processing Telephony Signaling Gateway Network Interface Protocols Network

Management Agent and System Services [20]

The User Interface provides tbe traditional user interface functions of a

telephone At a minimum this consists of a keypad for dialing numbers (0-9 ) and

dible indicator for announcing incoming calls to the user On more sophisticated

intcdaces additional keys are provided for features such as mute redial hold transfer

7

conferencing etc A display is also typically provided for displaying user prompts

number diaJed CallerID information for incoming calls etc

The Voice Processing software is composed of the following software modules

bull PCM Interface Unit Receives PCM samples from the analog interface and

forwards then to the appropriate DSP software module for processing It also

forwards processed PCM samples to the analog interface

bull Tone Generator Generates call progress tones to the user and generates in-band

DTMF digits to the network based on key presses relayed from the User Interface

For certain voice codecs the compression algorithm does not permit faithful

transmission of DTMF tones For those algorithms eg G7231 the software

generates an in-band message to the network that is used by the remote gateway to

regenerate the DTMF tone

bull Line Echo Canceller Unit Performs ITU G168 compliant echo cancellation on

sampled full -duplex voice port signals Echo in a telephone network is caused by

signal reflections generated by the hybrid circuit that converts between a 4-wire

circuit (a separate transmit and receive pair) and a 2-wire circuit (a single transmit

and receive pair) These reflections of the speakers voice are heard in the speakers

ear Echo is present even in a conventional circuit switched telephone network ~ -

However it is acceptable because the round trip delays through the network are

smaller than 50 ms and the echo is masked by the normal side tone every telephone

generates Echo becomes a problem in VoIP networks because the round trip delay

through the network is almost always greater than 50 ms Thus echo cancellation

techniques are required ITU standard G168 defines performance requirements that

are currently required for echo cancellers Echo is cancelled toward the packet

Detwork from the telephone network The echo canceller compares the voice data

received from the packet network with voice data being transmitted to the packet

8

network The echo from the telephone network hybrid is removed by a digital filter

on the transmit path into the packet network

bull Voice Activity Detector (V AD) Detects voice activity and activates or deactivates

the transmission of packets in order to optimize bandwidth When activity is not

detected the encoder output will not be transported across the network This

software also measures Idle Noise characteristics of the interface and reports this

information to the Packet Voice Protocol for periodic forwarding to the remote

gateway Idle noise is reproduced by the remote end when there is no voice activity

so that the remote user does not fee l that the line went dead

bull Voice Codec Unit Perfonns packetization of the 64 kbps data stream received

from the user Various compression algorithms exist which have different

performance characteristics G711 PCM which operates at 64 kbps (no

compression) G726 ADPCM which operates at 16 24 32 and 40 kbps G7231

which operates at 53 or 63 kbps and G729 which operates at 8 kbps Typically

voice algorithms that perform greater compression require much more processing

power It should be noted that high fidelity audio quality compression algorithms

can also be used since VoIP is not subject to the 4 kHz bandwidth restrictions found

in the PS1N This would provide better sounding audio than PCM and allow music -

to be faithfully reproduced

bull Packet Playout Unit Performs compensation for network delay network jitter and

dropped packets Many proprietary techniques are used to address these problems

since there are currently no standards in place for packet playout

bull Packet Protocol Encapsulation Unit Performs encapsulation of the packet voice

data destined for the network interface For VoIP this encapsulation is per the Real-

Transport Protocol (RTP) which runs directly on top of UDP

oice Encryption Provides optional encryption of the voice packet data prior to

9

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10

Page 12: YII CHIN HUANG

612 Phone Device Class

613 Basic Services

614 Supplementary Services

62 TAPI Phone Numbers

63 TAPI Initialization

64 API Negotiation

65 Making the Call

66 Ending a Call

67 Closing the Line

68 Shutdown

CHAPTER 7 JAVA TELEPHONY APPLICATION

INTERFACE (JTAPI)

71 Java vs C++

72 JTAPI Overview

73 Java Telephony Package Architecture

74 Java Telephony Call Model

~41 Provider Object

742 Call Object

743 Address Object

744 Connection Object

745 Terminal Object

746 TerminalConnection Object

75 JTAPI Core Package Methods

33

33

34

36

41

42

45

50

51

52

PROGRAMMING

53

55

56

57

58

58

58

59

59

59

60

x

751 CallconnectO 60

752 TerminalConnectionanswerO 60

753 ConnectiondisconnectO 60

76 The JTAPI Observer Model 63

77 Application Code Examples 63

771 Outgoing Telephone Call Example 64

772 Incoming Telephone Call Example 67

CHAPTER 8 SHORT MESSAGING SYSTEM (SMS) FROM INTERNET TO

MOBILE

81 SMS Overview 72

82 SMS Implementation Example 72

CHAPTER 9 DISCUSSIONS AND CONCLUSIONS

91 Enumtapi 75

91 TAPI Browser 76

9l Conclusions 77

93 Further Works 79

Appendix 81

References 82

xi

LI T OF TABLES

Table Page

1 T API Support for Windows Platform 35

LIST OF FIGURES

Figure Page

1 Enumtapi 75

XII

CHAPTER 1

COMPUTER TELEPHONY INTEGRATION

11 Introduction

Computer Telephony (CT) is the integration of the computer to the Public

Switched Telephone Network (PSTN) CT can be designed as desktop dialing faxing

and as Voice over Internet Protocol (VoIP) application with call buttons on web pages

It will increase customer service and organizational efficiency by automating and

adding intelligence to the way we communicate with the telephone

12 CII with modem or sophisticated nsp card

Applications connect directly to the PSTN with PC based telephony hardware

cards These hardware cards range from simple voice modems to more sophisticated

Digital Signal Processing (DSP) based solutions such as Dialogic Voice modems

provide a less expensive solution for home users However it is impractical for

commercial solutions whereas a voice modem is restricted with limited number of

phone line connections per server Furthermore voice modems do not support

advanced features such as to accurately recognize the range of tones that may be

required by a CT application [1]

1

CHAPTER 2

INTERNET TRANSFER PROTOCOL

21 Introduction to Internet Protocol (lP)

The IP is a routing protocol designed to route traffic within a network or

between networks IP is designed to remain transparent to the end user application The

transparency is achieved by encapsulation The data sent by the host computer are

encapsulated into IP packets The IP header identifies the address of the receiving host

computer The IP packets and header are further encapsulated into the specific protocol

of the transit network such as X25 or Ethernet LAN After the transit network has

delivered the traffic to an IP router its link control information is stripped away The

gateway then uses the destination address in the datagram header to determine where to

route the traffic Typically it then passes the datagram to a subnetwork by invoking a

subnetwork access protocol This protocol is used to encapsulate the datagram header

and user data into the headers and trailers that are used by the subnetwork This process

is repeated at each gateway until it reached the destination[ 4]

Transmission Control Protocol (TCP) provides a reliable byte stream between

two processes It is reliable and applications are not required to monitor for lost or

corrupted packets TCP is a connection oriented protocol because applications that

communicate via TCP establish a logical connection before any exchange of data can

take place and terminate the connection when the data exchange has been

completed [IS]

User Datagram Protocol (UCP) is a connectionless protocol where data packets

addressed and -delivered individually UDP is not a reliable protocol hence

applications must be prepared to handle the loss of packets[IS]

2

22 IP Host Addresses and Routing

An IP host address is a 32-bit number uniquely identifying an Internet host

According to convention the 4-byte Internet host address is usually written down as a

set of four decimal numbers for example 127001 The Internet host address is

usually divided into two parts the network address and the actual host address The

respective lengths of these two portions of the address vary depending on the most

significant byte in the address( 4)

Class A network addresses are those with the most significant byte between 0

and 127 A Class A address consists of an 8-bit network address and a 24-bit host

address Because addresses beginning with 0 and 127 are reserved there can be a

maximum of 126 class A subnets on an Internet A Class A subnet can contain up to

16777214 hosts Class B network addresses are those with the most significant byte

between 128 and 191 Class B addresses consist of a 16-bit network address and a 16shy

bit host address There can be a maximum of 16383 class B subnets A Class B subnet

may contain up to 65534 hosts A Class C network address is one with the most

significant byte between 192 and 223 This allows a total of 2097152 class C subnets

A Class C subnet may contain up to 254 hosts Class D addresses with most significant

byte between 224 and 255 are reserved for IP multicasting

Once the destination address of a packet is known hosts on an Internet can

route the packet as appropriate Routing involves either forwarding a packet to a

destination that is known to the host or passing it along a default route Larger hosts

maintain dynamically updated routing tables Through these tables the correct route of

packets can be identified and in the case of a network error alternate routes can be

nd

3

23 IP version 6

IP Version 6 (IPv6) is the next generation protocol designed by the Internet

Engineering Task Force (IETF) to replace the current version Internet Protocol IP

Version 4 (IPv4) There is a growing shortage of IPv4 addresses which are needed by

all new machines added to the Internet IPv6 fixes a number of problems in IPv4 such

as the limited number of available IPv4 addresses It also adds many improvements to

IPv4 in areas uch as routing and network autoconfiguration [18]

4

CHAPTER 3

VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview

VoIP is a mean to bypass the long distance charge One can simultaneously talk

fax and receive information from anywhere in the world for the cost of a local phone

call by taking advantage of Transmission Control Protocol (TCP)lP TCPlP makes the

underlying physical connection irrelevant and can run over T1 Integrated Services

Digital Network (ISDN) Frame Relay wireless microwave or satellite links[20]

The most important developments in the VoIP was the adoption of an

interoperability standard H323 an International Telecommunication Union (ITU)

standard for Internet telephony and videoconferencing provides the foundation for an

IP based telephone network H323 provides a standard set of procedures for setting up

voice and video calls over a TCPlP network and allows for the use of multiple codecs

In depth discussion about H323 is available in Chapter 4[20]

32 VoIP vs PSTN

Compared to a real phone line an H323 requires only bandwidth It doesnt

care what kind of circuit is sitting underneath it Let it be T1 xDSL wireless or a dialshy

up Plain Old Telephony Service (POTS) connection A single broadband pipe can

deliver a fairly large number of virtual telephone lines This is a big improvement over

the Public Switched Telephone Network (PSTN) circuit centric mentality where every

service requires its own copper pair to the subscriber [20]

With H323 bandwidth is reduced from 64Kbpseach to lOKbpseach [21]

Once compression is applied voice doesnt require very much bandwidth Then its

5

really a waste to send voice at 64 kbps uncompressed through any network whether it

is the PSTN or the Internet

Internet is unreliable and insecure while analog phone lines very rarely fail

Important point to consider when implementing VoIP

bull Distribute H323 gateways throughout all the networks to avoid creating a situation

where a single hardware outage can affect many other services

bull Gateway software should be smart enough so that it can reroute calls to other

gateways when needed

bull Gateway should route calls over the PSTN when the IP network is unavailable

33 VoIP Hardware

In selecting hardware it will be important to select a platform which is costshy

effective standards compliant and easily serviced It is also important to use

components which offload compression and error correction tasks from the server CPU

to a DSP houses on the gateway Implementations where media processing is done on

the server CPU should be avoided as these systems do not scale well and often

introduce more latency than solutions which offload media processing to a DSP

optimized for the job of compressingdecompressing audio [20]

Gateways are required to adapt traditional analog telephony to the Internet

Within the gateway device there are different types of processors that handle the

conversion from traditional to VoIP DSP handle all of the signal processing activity

including voice compression tone detection and generation echo cancellation and

silence suppression

There are also microprocessors which control the DSP and handle all the H323

taco processing and network management functions Some of the functions in the

micro include routing bil1ing and management both within the micro and in between

6

the micro and the DSP The first thing that happens in the DSP is that an analog voice

signal is received This signal is converted to a Pulse Code Modulation (PCM) digital

stream PCM i the classic process of converting analog telephony to digital As a result

of delay in the network echo and talker overlap occurred Echo is caused by the signal

reflections of the speakers voice from the far end telephone equipment back into the

speakers ear Echo becomes a significant problem when the round trip delay becomes

greater than 50 milliseconds Since echo is perceived as a significant quality problem

VoIP systems must address the need for echo control and implement some means of

echo cancellation[20]

Next the Voice Activity Director (V AD) detects and removes silence In a

typical conversation 50 of the conversation is silence Removing the silence can

improve bandwidth consumption After the tone is routed around the CO DEC the

remaining PCM samples are forwarded to the CODEC Voice codecs (codingdecoding

algorithms) are used to compress voice for packet network transmission Most

CODECs garble signaling tones to the point that they are unrecognizable by the tone

detection devices for which they are intended Therefore the tone is detected and

routed around the CODECs

34 VoIP Software

The software consists of the following major subsystems User Interface Voice

Processing Telephony Signaling Gateway Network Interface Protocols Network

Management Agent and System Services [20]

The User Interface provides tbe traditional user interface functions of a

telephone At a minimum this consists of a keypad for dialing numbers (0-9 ) and

dible indicator for announcing incoming calls to the user On more sophisticated

intcdaces additional keys are provided for features such as mute redial hold transfer

7

conferencing etc A display is also typically provided for displaying user prompts

number diaJed CallerID information for incoming calls etc

The Voice Processing software is composed of the following software modules

bull PCM Interface Unit Receives PCM samples from the analog interface and

forwards then to the appropriate DSP software module for processing It also

forwards processed PCM samples to the analog interface

bull Tone Generator Generates call progress tones to the user and generates in-band

DTMF digits to the network based on key presses relayed from the User Interface

For certain voice codecs the compression algorithm does not permit faithful

transmission of DTMF tones For those algorithms eg G7231 the software

generates an in-band message to the network that is used by the remote gateway to

regenerate the DTMF tone

bull Line Echo Canceller Unit Performs ITU G168 compliant echo cancellation on

sampled full -duplex voice port signals Echo in a telephone network is caused by

signal reflections generated by the hybrid circuit that converts between a 4-wire

circuit (a separate transmit and receive pair) and a 2-wire circuit (a single transmit

and receive pair) These reflections of the speakers voice are heard in the speakers

ear Echo is present even in a conventional circuit switched telephone network ~ -

However it is acceptable because the round trip delays through the network are

smaller than 50 ms and the echo is masked by the normal side tone every telephone

generates Echo becomes a problem in VoIP networks because the round trip delay

through the network is almost always greater than 50 ms Thus echo cancellation

techniques are required ITU standard G168 defines performance requirements that

are currently required for echo cancellers Echo is cancelled toward the packet

Detwork from the telephone network The echo canceller compares the voice data

received from the packet network with voice data being transmitted to the packet

8

network The echo from the telephone network hybrid is removed by a digital filter

on the transmit path into the packet network

bull Voice Activity Detector (V AD) Detects voice activity and activates or deactivates

the transmission of packets in order to optimize bandwidth When activity is not

detected the encoder output will not be transported across the network This

software also measures Idle Noise characteristics of the interface and reports this

information to the Packet Voice Protocol for periodic forwarding to the remote

gateway Idle noise is reproduced by the remote end when there is no voice activity

so that the remote user does not fee l that the line went dead

bull Voice Codec Unit Perfonns packetization of the 64 kbps data stream received

from the user Various compression algorithms exist which have different

performance characteristics G711 PCM which operates at 64 kbps (no

compression) G726 ADPCM which operates at 16 24 32 and 40 kbps G7231

which operates at 53 or 63 kbps and G729 which operates at 8 kbps Typically

voice algorithms that perform greater compression require much more processing

power It should be noted that high fidelity audio quality compression algorithms

can also be used since VoIP is not subject to the 4 kHz bandwidth restrictions found

in the PS1N This would provide better sounding audio than PCM and allow music -

to be faithfully reproduced

bull Packet Playout Unit Performs compensation for network delay network jitter and

dropped packets Many proprietary techniques are used to address these problems

since there are currently no standards in place for packet playout

bull Packet Protocol Encapsulation Unit Performs encapsulation of the packet voice

data destined for the network interface For VoIP this encapsulation is per the Real-

Transport Protocol (RTP) which runs directly on top of UDP

oice Encryption Provides optional encryption of the voice packet data prior to

9

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10

Page 13: YII CHIN HUANG

751 CallconnectO 60

752 TerminalConnectionanswerO 60

753 ConnectiondisconnectO 60

76 The JTAPI Observer Model 63

77 Application Code Examples 63

771 Outgoing Telephone Call Example 64

772 Incoming Telephone Call Example 67

CHAPTER 8 SHORT MESSAGING SYSTEM (SMS) FROM INTERNET TO

MOBILE

81 SMS Overview 72

82 SMS Implementation Example 72

CHAPTER 9 DISCUSSIONS AND CONCLUSIONS

91 Enumtapi 75

91 TAPI Browser 76

9l Conclusions 77

93 Further Works 79

Appendix 81

References 82

xi

LI T OF TABLES

Table Page

1 T API Support for Windows Platform 35

LIST OF FIGURES

Figure Page

1 Enumtapi 75

XII

CHAPTER 1

COMPUTER TELEPHONY INTEGRATION

11 Introduction

Computer Telephony (CT) is the integration of the computer to the Public

Switched Telephone Network (PSTN) CT can be designed as desktop dialing faxing

and as Voice over Internet Protocol (VoIP) application with call buttons on web pages

It will increase customer service and organizational efficiency by automating and

adding intelligence to the way we communicate with the telephone

12 CII with modem or sophisticated nsp card

Applications connect directly to the PSTN with PC based telephony hardware

cards These hardware cards range from simple voice modems to more sophisticated

Digital Signal Processing (DSP) based solutions such as Dialogic Voice modems

provide a less expensive solution for home users However it is impractical for

commercial solutions whereas a voice modem is restricted with limited number of

phone line connections per server Furthermore voice modems do not support

advanced features such as to accurately recognize the range of tones that may be

required by a CT application [1]

1

CHAPTER 2

INTERNET TRANSFER PROTOCOL

21 Introduction to Internet Protocol (lP)

The IP is a routing protocol designed to route traffic within a network or

between networks IP is designed to remain transparent to the end user application The

transparency is achieved by encapsulation The data sent by the host computer are

encapsulated into IP packets The IP header identifies the address of the receiving host

computer The IP packets and header are further encapsulated into the specific protocol

of the transit network such as X25 or Ethernet LAN After the transit network has

delivered the traffic to an IP router its link control information is stripped away The

gateway then uses the destination address in the datagram header to determine where to

route the traffic Typically it then passes the datagram to a subnetwork by invoking a

subnetwork access protocol This protocol is used to encapsulate the datagram header

and user data into the headers and trailers that are used by the subnetwork This process

is repeated at each gateway until it reached the destination[ 4]

Transmission Control Protocol (TCP) provides a reliable byte stream between

two processes It is reliable and applications are not required to monitor for lost or

corrupted packets TCP is a connection oriented protocol because applications that

communicate via TCP establish a logical connection before any exchange of data can

take place and terminate the connection when the data exchange has been

completed [IS]

User Datagram Protocol (UCP) is a connectionless protocol where data packets

addressed and -delivered individually UDP is not a reliable protocol hence

applications must be prepared to handle the loss of packets[IS]

2

22 IP Host Addresses and Routing

An IP host address is a 32-bit number uniquely identifying an Internet host

According to convention the 4-byte Internet host address is usually written down as a

set of four decimal numbers for example 127001 The Internet host address is

usually divided into two parts the network address and the actual host address The

respective lengths of these two portions of the address vary depending on the most

significant byte in the address( 4)

Class A network addresses are those with the most significant byte between 0

and 127 A Class A address consists of an 8-bit network address and a 24-bit host

address Because addresses beginning with 0 and 127 are reserved there can be a

maximum of 126 class A subnets on an Internet A Class A subnet can contain up to

16777214 hosts Class B network addresses are those with the most significant byte

between 128 and 191 Class B addresses consist of a 16-bit network address and a 16shy

bit host address There can be a maximum of 16383 class B subnets A Class B subnet

may contain up to 65534 hosts A Class C network address is one with the most

significant byte between 192 and 223 This allows a total of 2097152 class C subnets

A Class C subnet may contain up to 254 hosts Class D addresses with most significant

byte between 224 and 255 are reserved for IP multicasting

Once the destination address of a packet is known hosts on an Internet can

route the packet as appropriate Routing involves either forwarding a packet to a

destination that is known to the host or passing it along a default route Larger hosts

maintain dynamically updated routing tables Through these tables the correct route of

packets can be identified and in the case of a network error alternate routes can be

nd

3

23 IP version 6

IP Version 6 (IPv6) is the next generation protocol designed by the Internet

Engineering Task Force (IETF) to replace the current version Internet Protocol IP

Version 4 (IPv4) There is a growing shortage of IPv4 addresses which are needed by

all new machines added to the Internet IPv6 fixes a number of problems in IPv4 such

as the limited number of available IPv4 addresses It also adds many improvements to

IPv4 in areas uch as routing and network autoconfiguration [18]

4

CHAPTER 3

VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview

VoIP is a mean to bypass the long distance charge One can simultaneously talk

fax and receive information from anywhere in the world for the cost of a local phone

call by taking advantage of Transmission Control Protocol (TCP)lP TCPlP makes the

underlying physical connection irrelevant and can run over T1 Integrated Services

Digital Network (ISDN) Frame Relay wireless microwave or satellite links[20]

The most important developments in the VoIP was the adoption of an

interoperability standard H323 an International Telecommunication Union (ITU)

standard for Internet telephony and videoconferencing provides the foundation for an

IP based telephone network H323 provides a standard set of procedures for setting up

voice and video calls over a TCPlP network and allows for the use of multiple codecs

In depth discussion about H323 is available in Chapter 4[20]

32 VoIP vs PSTN

Compared to a real phone line an H323 requires only bandwidth It doesnt

care what kind of circuit is sitting underneath it Let it be T1 xDSL wireless or a dialshy

up Plain Old Telephony Service (POTS) connection A single broadband pipe can

deliver a fairly large number of virtual telephone lines This is a big improvement over

the Public Switched Telephone Network (PSTN) circuit centric mentality where every

service requires its own copper pair to the subscriber [20]

With H323 bandwidth is reduced from 64Kbpseach to lOKbpseach [21]

Once compression is applied voice doesnt require very much bandwidth Then its

5

really a waste to send voice at 64 kbps uncompressed through any network whether it

is the PSTN or the Internet

Internet is unreliable and insecure while analog phone lines very rarely fail

Important point to consider when implementing VoIP

bull Distribute H323 gateways throughout all the networks to avoid creating a situation

where a single hardware outage can affect many other services

bull Gateway software should be smart enough so that it can reroute calls to other

gateways when needed

bull Gateway should route calls over the PSTN when the IP network is unavailable

33 VoIP Hardware

In selecting hardware it will be important to select a platform which is costshy

effective standards compliant and easily serviced It is also important to use

components which offload compression and error correction tasks from the server CPU

to a DSP houses on the gateway Implementations where media processing is done on

the server CPU should be avoided as these systems do not scale well and often

introduce more latency than solutions which offload media processing to a DSP

optimized for the job of compressingdecompressing audio [20]

Gateways are required to adapt traditional analog telephony to the Internet

Within the gateway device there are different types of processors that handle the

conversion from traditional to VoIP DSP handle all of the signal processing activity

including voice compression tone detection and generation echo cancellation and

silence suppression

There are also microprocessors which control the DSP and handle all the H323

taco processing and network management functions Some of the functions in the

micro include routing bil1ing and management both within the micro and in between

6

the micro and the DSP The first thing that happens in the DSP is that an analog voice

signal is received This signal is converted to a Pulse Code Modulation (PCM) digital

stream PCM i the classic process of converting analog telephony to digital As a result

of delay in the network echo and talker overlap occurred Echo is caused by the signal

reflections of the speakers voice from the far end telephone equipment back into the

speakers ear Echo becomes a significant problem when the round trip delay becomes

greater than 50 milliseconds Since echo is perceived as a significant quality problem

VoIP systems must address the need for echo control and implement some means of

echo cancellation[20]

Next the Voice Activity Director (V AD) detects and removes silence In a

typical conversation 50 of the conversation is silence Removing the silence can

improve bandwidth consumption After the tone is routed around the CO DEC the

remaining PCM samples are forwarded to the CODEC Voice codecs (codingdecoding

algorithms) are used to compress voice for packet network transmission Most

CODECs garble signaling tones to the point that they are unrecognizable by the tone

detection devices for which they are intended Therefore the tone is detected and

routed around the CODECs

34 VoIP Software

The software consists of the following major subsystems User Interface Voice

Processing Telephony Signaling Gateway Network Interface Protocols Network

Management Agent and System Services [20]

The User Interface provides tbe traditional user interface functions of a

telephone At a minimum this consists of a keypad for dialing numbers (0-9 ) and

dible indicator for announcing incoming calls to the user On more sophisticated

intcdaces additional keys are provided for features such as mute redial hold transfer

7

conferencing etc A display is also typically provided for displaying user prompts

number diaJed CallerID information for incoming calls etc

The Voice Processing software is composed of the following software modules

bull PCM Interface Unit Receives PCM samples from the analog interface and

forwards then to the appropriate DSP software module for processing It also

forwards processed PCM samples to the analog interface

bull Tone Generator Generates call progress tones to the user and generates in-band

DTMF digits to the network based on key presses relayed from the User Interface

For certain voice codecs the compression algorithm does not permit faithful

transmission of DTMF tones For those algorithms eg G7231 the software

generates an in-band message to the network that is used by the remote gateway to

regenerate the DTMF tone

bull Line Echo Canceller Unit Performs ITU G168 compliant echo cancellation on

sampled full -duplex voice port signals Echo in a telephone network is caused by

signal reflections generated by the hybrid circuit that converts between a 4-wire

circuit (a separate transmit and receive pair) and a 2-wire circuit (a single transmit

and receive pair) These reflections of the speakers voice are heard in the speakers

ear Echo is present even in a conventional circuit switched telephone network ~ -

However it is acceptable because the round trip delays through the network are

smaller than 50 ms and the echo is masked by the normal side tone every telephone

generates Echo becomes a problem in VoIP networks because the round trip delay

through the network is almost always greater than 50 ms Thus echo cancellation

techniques are required ITU standard G168 defines performance requirements that

are currently required for echo cancellers Echo is cancelled toward the packet

Detwork from the telephone network The echo canceller compares the voice data

received from the packet network with voice data being transmitted to the packet

8

network The echo from the telephone network hybrid is removed by a digital filter

on the transmit path into the packet network

bull Voice Activity Detector (V AD) Detects voice activity and activates or deactivates

the transmission of packets in order to optimize bandwidth When activity is not

detected the encoder output will not be transported across the network This

software also measures Idle Noise characteristics of the interface and reports this

information to the Packet Voice Protocol for periodic forwarding to the remote

gateway Idle noise is reproduced by the remote end when there is no voice activity

so that the remote user does not fee l that the line went dead

bull Voice Codec Unit Perfonns packetization of the 64 kbps data stream received

from the user Various compression algorithms exist which have different

performance characteristics G711 PCM which operates at 64 kbps (no

compression) G726 ADPCM which operates at 16 24 32 and 40 kbps G7231

which operates at 53 or 63 kbps and G729 which operates at 8 kbps Typically

voice algorithms that perform greater compression require much more processing

power It should be noted that high fidelity audio quality compression algorithms

can also be used since VoIP is not subject to the 4 kHz bandwidth restrictions found

in the PS1N This would provide better sounding audio than PCM and allow music -

to be faithfully reproduced

bull Packet Playout Unit Performs compensation for network delay network jitter and

dropped packets Many proprietary techniques are used to address these problems

since there are currently no standards in place for packet playout

bull Packet Protocol Encapsulation Unit Performs encapsulation of the packet voice

data destined for the network interface For VoIP this encapsulation is per the Real-

Transport Protocol (RTP) which runs directly on top of UDP

oice Encryption Provides optional encryption of the voice packet data prior to

9

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10

Page 14: YII CHIN HUANG

LI T OF TABLES

Table Page

1 T API Support for Windows Platform 35

LIST OF FIGURES

Figure Page

1 Enumtapi 75

XII

CHAPTER 1

COMPUTER TELEPHONY INTEGRATION

11 Introduction

Computer Telephony (CT) is the integration of the computer to the Public

Switched Telephone Network (PSTN) CT can be designed as desktop dialing faxing

and as Voice over Internet Protocol (VoIP) application with call buttons on web pages

It will increase customer service and organizational efficiency by automating and

adding intelligence to the way we communicate with the telephone

12 CII with modem or sophisticated nsp card

Applications connect directly to the PSTN with PC based telephony hardware

cards These hardware cards range from simple voice modems to more sophisticated

Digital Signal Processing (DSP) based solutions such as Dialogic Voice modems

provide a less expensive solution for home users However it is impractical for

commercial solutions whereas a voice modem is restricted with limited number of

phone line connections per server Furthermore voice modems do not support

advanced features such as to accurately recognize the range of tones that may be

required by a CT application [1]

1

CHAPTER 2

INTERNET TRANSFER PROTOCOL

21 Introduction to Internet Protocol (lP)

The IP is a routing protocol designed to route traffic within a network or

between networks IP is designed to remain transparent to the end user application The

transparency is achieved by encapsulation The data sent by the host computer are

encapsulated into IP packets The IP header identifies the address of the receiving host

computer The IP packets and header are further encapsulated into the specific protocol

of the transit network such as X25 or Ethernet LAN After the transit network has

delivered the traffic to an IP router its link control information is stripped away The

gateway then uses the destination address in the datagram header to determine where to

route the traffic Typically it then passes the datagram to a subnetwork by invoking a

subnetwork access protocol This protocol is used to encapsulate the datagram header

and user data into the headers and trailers that are used by the subnetwork This process

is repeated at each gateway until it reached the destination[ 4]

Transmission Control Protocol (TCP) provides a reliable byte stream between

two processes It is reliable and applications are not required to monitor for lost or

corrupted packets TCP is a connection oriented protocol because applications that

communicate via TCP establish a logical connection before any exchange of data can

take place and terminate the connection when the data exchange has been

completed [IS]

User Datagram Protocol (UCP) is a connectionless protocol where data packets

addressed and -delivered individually UDP is not a reliable protocol hence

applications must be prepared to handle the loss of packets[IS]

2

22 IP Host Addresses and Routing

An IP host address is a 32-bit number uniquely identifying an Internet host

According to convention the 4-byte Internet host address is usually written down as a

set of four decimal numbers for example 127001 The Internet host address is

usually divided into two parts the network address and the actual host address The

respective lengths of these two portions of the address vary depending on the most

significant byte in the address( 4)

Class A network addresses are those with the most significant byte between 0

and 127 A Class A address consists of an 8-bit network address and a 24-bit host

address Because addresses beginning with 0 and 127 are reserved there can be a

maximum of 126 class A subnets on an Internet A Class A subnet can contain up to

16777214 hosts Class B network addresses are those with the most significant byte

between 128 and 191 Class B addresses consist of a 16-bit network address and a 16shy

bit host address There can be a maximum of 16383 class B subnets A Class B subnet

may contain up to 65534 hosts A Class C network address is one with the most

significant byte between 192 and 223 This allows a total of 2097152 class C subnets

A Class C subnet may contain up to 254 hosts Class D addresses with most significant

byte between 224 and 255 are reserved for IP multicasting

Once the destination address of a packet is known hosts on an Internet can

route the packet as appropriate Routing involves either forwarding a packet to a

destination that is known to the host or passing it along a default route Larger hosts

maintain dynamically updated routing tables Through these tables the correct route of

packets can be identified and in the case of a network error alternate routes can be

nd

3

23 IP version 6

IP Version 6 (IPv6) is the next generation protocol designed by the Internet

Engineering Task Force (IETF) to replace the current version Internet Protocol IP

Version 4 (IPv4) There is a growing shortage of IPv4 addresses which are needed by

all new machines added to the Internet IPv6 fixes a number of problems in IPv4 such

as the limited number of available IPv4 addresses It also adds many improvements to

IPv4 in areas uch as routing and network autoconfiguration [18]

4

CHAPTER 3

VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview

VoIP is a mean to bypass the long distance charge One can simultaneously talk

fax and receive information from anywhere in the world for the cost of a local phone

call by taking advantage of Transmission Control Protocol (TCP)lP TCPlP makes the

underlying physical connection irrelevant and can run over T1 Integrated Services

Digital Network (ISDN) Frame Relay wireless microwave or satellite links[20]

The most important developments in the VoIP was the adoption of an

interoperability standard H323 an International Telecommunication Union (ITU)

standard for Internet telephony and videoconferencing provides the foundation for an

IP based telephone network H323 provides a standard set of procedures for setting up

voice and video calls over a TCPlP network and allows for the use of multiple codecs

In depth discussion about H323 is available in Chapter 4[20]

32 VoIP vs PSTN

Compared to a real phone line an H323 requires only bandwidth It doesnt

care what kind of circuit is sitting underneath it Let it be T1 xDSL wireless or a dialshy

up Plain Old Telephony Service (POTS) connection A single broadband pipe can

deliver a fairly large number of virtual telephone lines This is a big improvement over

the Public Switched Telephone Network (PSTN) circuit centric mentality where every

service requires its own copper pair to the subscriber [20]

With H323 bandwidth is reduced from 64Kbpseach to lOKbpseach [21]

Once compression is applied voice doesnt require very much bandwidth Then its

5

really a waste to send voice at 64 kbps uncompressed through any network whether it

is the PSTN or the Internet

Internet is unreliable and insecure while analog phone lines very rarely fail

Important point to consider when implementing VoIP

bull Distribute H323 gateways throughout all the networks to avoid creating a situation

where a single hardware outage can affect many other services

bull Gateway software should be smart enough so that it can reroute calls to other

gateways when needed

bull Gateway should route calls over the PSTN when the IP network is unavailable

33 VoIP Hardware

In selecting hardware it will be important to select a platform which is costshy

effective standards compliant and easily serviced It is also important to use

components which offload compression and error correction tasks from the server CPU

to a DSP houses on the gateway Implementations where media processing is done on

the server CPU should be avoided as these systems do not scale well and often

introduce more latency than solutions which offload media processing to a DSP

optimized for the job of compressingdecompressing audio [20]

Gateways are required to adapt traditional analog telephony to the Internet

Within the gateway device there are different types of processors that handle the

conversion from traditional to VoIP DSP handle all of the signal processing activity

including voice compression tone detection and generation echo cancellation and

silence suppression

There are also microprocessors which control the DSP and handle all the H323

taco processing and network management functions Some of the functions in the

micro include routing bil1ing and management both within the micro and in between

6

the micro and the DSP The first thing that happens in the DSP is that an analog voice

signal is received This signal is converted to a Pulse Code Modulation (PCM) digital

stream PCM i the classic process of converting analog telephony to digital As a result

of delay in the network echo and talker overlap occurred Echo is caused by the signal

reflections of the speakers voice from the far end telephone equipment back into the

speakers ear Echo becomes a significant problem when the round trip delay becomes

greater than 50 milliseconds Since echo is perceived as a significant quality problem

VoIP systems must address the need for echo control and implement some means of

echo cancellation[20]

Next the Voice Activity Director (V AD) detects and removes silence In a

typical conversation 50 of the conversation is silence Removing the silence can

improve bandwidth consumption After the tone is routed around the CO DEC the

remaining PCM samples are forwarded to the CODEC Voice codecs (codingdecoding

algorithms) are used to compress voice for packet network transmission Most

CODECs garble signaling tones to the point that they are unrecognizable by the tone

detection devices for which they are intended Therefore the tone is detected and

routed around the CODECs

34 VoIP Software

The software consists of the following major subsystems User Interface Voice

Processing Telephony Signaling Gateway Network Interface Protocols Network

Management Agent and System Services [20]

The User Interface provides tbe traditional user interface functions of a

telephone At a minimum this consists of a keypad for dialing numbers (0-9 ) and

dible indicator for announcing incoming calls to the user On more sophisticated

intcdaces additional keys are provided for features such as mute redial hold transfer

7

conferencing etc A display is also typically provided for displaying user prompts

number diaJed CallerID information for incoming calls etc

The Voice Processing software is composed of the following software modules

bull PCM Interface Unit Receives PCM samples from the analog interface and

forwards then to the appropriate DSP software module for processing It also

forwards processed PCM samples to the analog interface

bull Tone Generator Generates call progress tones to the user and generates in-band

DTMF digits to the network based on key presses relayed from the User Interface

For certain voice codecs the compression algorithm does not permit faithful

transmission of DTMF tones For those algorithms eg G7231 the software

generates an in-band message to the network that is used by the remote gateway to

regenerate the DTMF tone

bull Line Echo Canceller Unit Performs ITU G168 compliant echo cancellation on

sampled full -duplex voice port signals Echo in a telephone network is caused by

signal reflections generated by the hybrid circuit that converts between a 4-wire

circuit (a separate transmit and receive pair) and a 2-wire circuit (a single transmit

and receive pair) These reflections of the speakers voice are heard in the speakers

ear Echo is present even in a conventional circuit switched telephone network ~ -

However it is acceptable because the round trip delays through the network are

smaller than 50 ms and the echo is masked by the normal side tone every telephone

generates Echo becomes a problem in VoIP networks because the round trip delay

through the network is almost always greater than 50 ms Thus echo cancellation

techniques are required ITU standard G168 defines performance requirements that

are currently required for echo cancellers Echo is cancelled toward the packet

Detwork from the telephone network The echo canceller compares the voice data

received from the packet network with voice data being transmitted to the packet

8

network The echo from the telephone network hybrid is removed by a digital filter

on the transmit path into the packet network

bull Voice Activity Detector (V AD) Detects voice activity and activates or deactivates

the transmission of packets in order to optimize bandwidth When activity is not

detected the encoder output will not be transported across the network This

software also measures Idle Noise characteristics of the interface and reports this

information to the Packet Voice Protocol for periodic forwarding to the remote

gateway Idle noise is reproduced by the remote end when there is no voice activity

so that the remote user does not fee l that the line went dead

bull Voice Codec Unit Perfonns packetization of the 64 kbps data stream received

from the user Various compression algorithms exist which have different

performance characteristics G711 PCM which operates at 64 kbps (no

compression) G726 ADPCM which operates at 16 24 32 and 40 kbps G7231

which operates at 53 or 63 kbps and G729 which operates at 8 kbps Typically

voice algorithms that perform greater compression require much more processing

power It should be noted that high fidelity audio quality compression algorithms

can also be used since VoIP is not subject to the 4 kHz bandwidth restrictions found

in the PS1N This would provide better sounding audio than PCM and allow music -

to be faithfully reproduced

bull Packet Playout Unit Performs compensation for network delay network jitter and

dropped packets Many proprietary techniques are used to address these problems

since there are currently no standards in place for packet playout

bull Packet Protocol Encapsulation Unit Performs encapsulation of the packet voice

data destined for the network interface For VoIP this encapsulation is per the Real-

Transport Protocol (RTP) which runs directly on top of UDP

oice Encryption Provides optional encryption of the voice packet data prior to

9

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10

Page 15: YII CHIN HUANG

CHAPTER 1

COMPUTER TELEPHONY INTEGRATION

11 Introduction

Computer Telephony (CT) is the integration of the computer to the Public

Switched Telephone Network (PSTN) CT can be designed as desktop dialing faxing

and as Voice over Internet Protocol (VoIP) application with call buttons on web pages

It will increase customer service and organizational efficiency by automating and

adding intelligence to the way we communicate with the telephone

12 CII with modem or sophisticated nsp card

Applications connect directly to the PSTN with PC based telephony hardware

cards These hardware cards range from simple voice modems to more sophisticated

Digital Signal Processing (DSP) based solutions such as Dialogic Voice modems

provide a less expensive solution for home users However it is impractical for

commercial solutions whereas a voice modem is restricted with limited number of

phone line connections per server Furthermore voice modems do not support

advanced features such as to accurately recognize the range of tones that may be

required by a CT application [1]

1

CHAPTER 2

INTERNET TRANSFER PROTOCOL

21 Introduction to Internet Protocol (lP)

The IP is a routing protocol designed to route traffic within a network or

between networks IP is designed to remain transparent to the end user application The

transparency is achieved by encapsulation The data sent by the host computer are

encapsulated into IP packets The IP header identifies the address of the receiving host

computer The IP packets and header are further encapsulated into the specific protocol

of the transit network such as X25 or Ethernet LAN After the transit network has

delivered the traffic to an IP router its link control information is stripped away The

gateway then uses the destination address in the datagram header to determine where to

route the traffic Typically it then passes the datagram to a subnetwork by invoking a

subnetwork access protocol This protocol is used to encapsulate the datagram header

and user data into the headers and trailers that are used by the subnetwork This process

is repeated at each gateway until it reached the destination[ 4]

Transmission Control Protocol (TCP) provides a reliable byte stream between

two processes It is reliable and applications are not required to monitor for lost or

corrupted packets TCP is a connection oriented protocol because applications that

communicate via TCP establish a logical connection before any exchange of data can

take place and terminate the connection when the data exchange has been

completed [IS]

User Datagram Protocol (UCP) is a connectionless protocol where data packets

addressed and -delivered individually UDP is not a reliable protocol hence

applications must be prepared to handle the loss of packets[IS]

2

22 IP Host Addresses and Routing

An IP host address is a 32-bit number uniquely identifying an Internet host

According to convention the 4-byte Internet host address is usually written down as a

set of four decimal numbers for example 127001 The Internet host address is

usually divided into two parts the network address and the actual host address The

respective lengths of these two portions of the address vary depending on the most

significant byte in the address( 4)

Class A network addresses are those with the most significant byte between 0

and 127 A Class A address consists of an 8-bit network address and a 24-bit host

address Because addresses beginning with 0 and 127 are reserved there can be a

maximum of 126 class A subnets on an Internet A Class A subnet can contain up to

16777214 hosts Class B network addresses are those with the most significant byte

between 128 and 191 Class B addresses consist of a 16-bit network address and a 16shy

bit host address There can be a maximum of 16383 class B subnets A Class B subnet

may contain up to 65534 hosts A Class C network address is one with the most

significant byte between 192 and 223 This allows a total of 2097152 class C subnets

A Class C subnet may contain up to 254 hosts Class D addresses with most significant

byte between 224 and 255 are reserved for IP multicasting

Once the destination address of a packet is known hosts on an Internet can

route the packet as appropriate Routing involves either forwarding a packet to a

destination that is known to the host or passing it along a default route Larger hosts

maintain dynamically updated routing tables Through these tables the correct route of

packets can be identified and in the case of a network error alternate routes can be

nd

3

23 IP version 6

IP Version 6 (IPv6) is the next generation protocol designed by the Internet

Engineering Task Force (IETF) to replace the current version Internet Protocol IP

Version 4 (IPv4) There is a growing shortage of IPv4 addresses which are needed by

all new machines added to the Internet IPv6 fixes a number of problems in IPv4 such

as the limited number of available IPv4 addresses It also adds many improvements to

IPv4 in areas uch as routing and network autoconfiguration [18]

4

CHAPTER 3

VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview

VoIP is a mean to bypass the long distance charge One can simultaneously talk

fax and receive information from anywhere in the world for the cost of a local phone

call by taking advantage of Transmission Control Protocol (TCP)lP TCPlP makes the

underlying physical connection irrelevant and can run over T1 Integrated Services

Digital Network (ISDN) Frame Relay wireless microwave or satellite links[20]

The most important developments in the VoIP was the adoption of an

interoperability standard H323 an International Telecommunication Union (ITU)

standard for Internet telephony and videoconferencing provides the foundation for an

IP based telephone network H323 provides a standard set of procedures for setting up

voice and video calls over a TCPlP network and allows for the use of multiple codecs

In depth discussion about H323 is available in Chapter 4[20]

32 VoIP vs PSTN

Compared to a real phone line an H323 requires only bandwidth It doesnt

care what kind of circuit is sitting underneath it Let it be T1 xDSL wireless or a dialshy

up Plain Old Telephony Service (POTS) connection A single broadband pipe can

deliver a fairly large number of virtual telephone lines This is a big improvement over

the Public Switched Telephone Network (PSTN) circuit centric mentality where every

service requires its own copper pair to the subscriber [20]

With H323 bandwidth is reduced from 64Kbpseach to lOKbpseach [21]

Once compression is applied voice doesnt require very much bandwidth Then its

5

really a waste to send voice at 64 kbps uncompressed through any network whether it

is the PSTN or the Internet

Internet is unreliable and insecure while analog phone lines very rarely fail

Important point to consider when implementing VoIP

bull Distribute H323 gateways throughout all the networks to avoid creating a situation

where a single hardware outage can affect many other services

bull Gateway software should be smart enough so that it can reroute calls to other

gateways when needed

bull Gateway should route calls over the PSTN when the IP network is unavailable

33 VoIP Hardware

In selecting hardware it will be important to select a platform which is costshy

effective standards compliant and easily serviced It is also important to use

components which offload compression and error correction tasks from the server CPU

to a DSP houses on the gateway Implementations where media processing is done on

the server CPU should be avoided as these systems do not scale well and often

introduce more latency than solutions which offload media processing to a DSP

optimized for the job of compressingdecompressing audio [20]

Gateways are required to adapt traditional analog telephony to the Internet

Within the gateway device there are different types of processors that handle the

conversion from traditional to VoIP DSP handle all of the signal processing activity

including voice compression tone detection and generation echo cancellation and

silence suppression

There are also microprocessors which control the DSP and handle all the H323

taco processing and network management functions Some of the functions in the

micro include routing bil1ing and management both within the micro and in between

6

the micro and the DSP The first thing that happens in the DSP is that an analog voice

signal is received This signal is converted to a Pulse Code Modulation (PCM) digital

stream PCM i the classic process of converting analog telephony to digital As a result

of delay in the network echo and talker overlap occurred Echo is caused by the signal

reflections of the speakers voice from the far end telephone equipment back into the

speakers ear Echo becomes a significant problem when the round trip delay becomes

greater than 50 milliseconds Since echo is perceived as a significant quality problem

VoIP systems must address the need for echo control and implement some means of

echo cancellation[20]

Next the Voice Activity Director (V AD) detects and removes silence In a

typical conversation 50 of the conversation is silence Removing the silence can

improve bandwidth consumption After the tone is routed around the CO DEC the

remaining PCM samples are forwarded to the CODEC Voice codecs (codingdecoding

algorithms) are used to compress voice for packet network transmission Most

CODECs garble signaling tones to the point that they are unrecognizable by the tone

detection devices for which they are intended Therefore the tone is detected and

routed around the CODECs

34 VoIP Software

The software consists of the following major subsystems User Interface Voice

Processing Telephony Signaling Gateway Network Interface Protocols Network

Management Agent and System Services [20]

The User Interface provides tbe traditional user interface functions of a

telephone At a minimum this consists of a keypad for dialing numbers (0-9 ) and

dible indicator for announcing incoming calls to the user On more sophisticated

intcdaces additional keys are provided for features such as mute redial hold transfer

7

conferencing etc A display is also typically provided for displaying user prompts

number diaJed CallerID information for incoming calls etc

The Voice Processing software is composed of the following software modules

bull PCM Interface Unit Receives PCM samples from the analog interface and

forwards then to the appropriate DSP software module for processing It also

forwards processed PCM samples to the analog interface

bull Tone Generator Generates call progress tones to the user and generates in-band

DTMF digits to the network based on key presses relayed from the User Interface

For certain voice codecs the compression algorithm does not permit faithful

transmission of DTMF tones For those algorithms eg G7231 the software

generates an in-band message to the network that is used by the remote gateway to

regenerate the DTMF tone

bull Line Echo Canceller Unit Performs ITU G168 compliant echo cancellation on

sampled full -duplex voice port signals Echo in a telephone network is caused by

signal reflections generated by the hybrid circuit that converts between a 4-wire

circuit (a separate transmit and receive pair) and a 2-wire circuit (a single transmit

and receive pair) These reflections of the speakers voice are heard in the speakers

ear Echo is present even in a conventional circuit switched telephone network ~ -

However it is acceptable because the round trip delays through the network are

smaller than 50 ms and the echo is masked by the normal side tone every telephone

generates Echo becomes a problem in VoIP networks because the round trip delay

through the network is almost always greater than 50 ms Thus echo cancellation

techniques are required ITU standard G168 defines performance requirements that

are currently required for echo cancellers Echo is cancelled toward the packet

Detwork from the telephone network The echo canceller compares the voice data

received from the packet network with voice data being transmitted to the packet

8

network The echo from the telephone network hybrid is removed by a digital filter

on the transmit path into the packet network

bull Voice Activity Detector (V AD) Detects voice activity and activates or deactivates

the transmission of packets in order to optimize bandwidth When activity is not

detected the encoder output will not be transported across the network This

software also measures Idle Noise characteristics of the interface and reports this

information to the Packet Voice Protocol for periodic forwarding to the remote

gateway Idle noise is reproduced by the remote end when there is no voice activity

so that the remote user does not fee l that the line went dead

bull Voice Codec Unit Perfonns packetization of the 64 kbps data stream received

from the user Various compression algorithms exist which have different

performance characteristics G711 PCM which operates at 64 kbps (no

compression) G726 ADPCM which operates at 16 24 32 and 40 kbps G7231

which operates at 53 or 63 kbps and G729 which operates at 8 kbps Typically

voice algorithms that perform greater compression require much more processing

power It should be noted that high fidelity audio quality compression algorithms

can also be used since VoIP is not subject to the 4 kHz bandwidth restrictions found

in the PS1N This would provide better sounding audio than PCM and allow music -

to be faithfully reproduced

bull Packet Playout Unit Performs compensation for network delay network jitter and

dropped packets Many proprietary techniques are used to address these problems

since there are currently no standards in place for packet playout

bull Packet Protocol Encapsulation Unit Performs encapsulation of the packet voice

data destined for the network interface For VoIP this encapsulation is per the Real-

Transport Protocol (RTP) which runs directly on top of UDP

oice Encryption Provides optional encryption of the voice packet data prior to

9

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10

Page 16: YII CHIN HUANG

CHAPTER 2

INTERNET TRANSFER PROTOCOL

21 Introduction to Internet Protocol (lP)

The IP is a routing protocol designed to route traffic within a network or

between networks IP is designed to remain transparent to the end user application The

transparency is achieved by encapsulation The data sent by the host computer are

encapsulated into IP packets The IP header identifies the address of the receiving host

computer The IP packets and header are further encapsulated into the specific protocol

of the transit network such as X25 or Ethernet LAN After the transit network has

delivered the traffic to an IP router its link control information is stripped away The

gateway then uses the destination address in the datagram header to determine where to

route the traffic Typically it then passes the datagram to a subnetwork by invoking a

subnetwork access protocol This protocol is used to encapsulate the datagram header

and user data into the headers and trailers that are used by the subnetwork This process

is repeated at each gateway until it reached the destination[ 4]

Transmission Control Protocol (TCP) provides a reliable byte stream between

two processes It is reliable and applications are not required to monitor for lost or

corrupted packets TCP is a connection oriented protocol because applications that

communicate via TCP establish a logical connection before any exchange of data can

take place and terminate the connection when the data exchange has been

completed [IS]

User Datagram Protocol (UCP) is a connectionless protocol where data packets

addressed and -delivered individually UDP is not a reliable protocol hence

applications must be prepared to handle the loss of packets[IS]

2

22 IP Host Addresses and Routing

An IP host address is a 32-bit number uniquely identifying an Internet host

According to convention the 4-byte Internet host address is usually written down as a

set of four decimal numbers for example 127001 The Internet host address is

usually divided into two parts the network address and the actual host address The

respective lengths of these two portions of the address vary depending on the most

significant byte in the address( 4)

Class A network addresses are those with the most significant byte between 0

and 127 A Class A address consists of an 8-bit network address and a 24-bit host

address Because addresses beginning with 0 and 127 are reserved there can be a

maximum of 126 class A subnets on an Internet A Class A subnet can contain up to

16777214 hosts Class B network addresses are those with the most significant byte

between 128 and 191 Class B addresses consist of a 16-bit network address and a 16shy

bit host address There can be a maximum of 16383 class B subnets A Class B subnet

may contain up to 65534 hosts A Class C network address is one with the most

significant byte between 192 and 223 This allows a total of 2097152 class C subnets

A Class C subnet may contain up to 254 hosts Class D addresses with most significant

byte between 224 and 255 are reserved for IP multicasting

Once the destination address of a packet is known hosts on an Internet can

route the packet as appropriate Routing involves either forwarding a packet to a

destination that is known to the host or passing it along a default route Larger hosts

maintain dynamically updated routing tables Through these tables the correct route of

packets can be identified and in the case of a network error alternate routes can be

nd

3

23 IP version 6

IP Version 6 (IPv6) is the next generation protocol designed by the Internet

Engineering Task Force (IETF) to replace the current version Internet Protocol IP

Version 4 (IPv4) There is a growing shortage of IPv4 addresses which are needed by

all new machines added to the Internet IPv6 fixes a number of problems in IPv4 such

as the limited number of available IPv4 addresses It also adds many improvements to

IPv4 in areas uch as routing and network autoconfiguration [18]

4

CHAPTER 3

VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview

VoIP is a mean to bypass the long distance charge One can simultaneously talk

fax and receive information from anywhere in the world for the cost of a local phone

call by taking advantage of Transmission Control Protocol (TCP)lP TCPlP makes the

underlying physical connection irrelevant and can run over T1 Integrated Services

Digital Network (ISDN) Frame Relay wireless microwave or satellite links[20]

The most important developments in the VoIP was the adoption of an

interoperability standard H323 an International Telecommunication Union (ITU)

standard for Internet telephony and videoconferencing provides the foundation for an

IP based telephone network H323 provides a standard set of procedures for setting up

voice and video calls over a TCPlP network and allows for the use of multiple codecs

In depth discussion about H323 is available in Chapter 4[20]

32 VoIP vs PSTN

Compared to a real phone line an H323 requires only bandwidth It doesnt

care what kind of circuit is sitting underneath it Let it be T1 xDSL wireless or a dialshy

up Plain Old Telephony Service (POTS) connection A single broadband pipe can

deliver a fairly large number of virtual telephone lines This is a big improvement over

the Public Switched Telephone Network (PSTN) circuit centric mentality where every

service requires its own copper pair to the subscriber [20]

With H323 bandwidth is reduced from 64Kbpseach to lOKbpseach [21]

Once compression is applied voice doesnt require very much bandwidth Then its

5

really a waste to send voice at 64 kbps uncompressed through any network whether it

is the PSTN or the Internet

Internet is unreliable and insecure while analog phone lines very rarely fail

Important point to consider when implementing VoIP

bull Distribute H323 gateways throughout all the networks to avoid creating a situation

where a single hardware outage can affect many other services

bull Gateway software should be smart enough so that it can reroute calls to other

gateways when needed

bull Gateway should route calls over the PSTN when the IP network is unavailable

33 VoIP Hardware

In selecting hardware it will be important to select a platform which is costshy

effective standards compliant and easily serviced It is also important to use

components which offload compression and error correction tasks from the server CPU

to a DSP houses on the gateway Implementations where media processing is done on

the server CPU should be avoided as these systems do not scale well and often

introduce more latency than solutions which offload media processing to a DSP

optimized for the job of compressingdecompressing audio [20]

Gateways are required to adapt traditional analog telephony to the Internet

Within the gateway device there are different types of processors that handle the

conversion from traditional to VoIP DSP handle all of the signal processing activity

including voice compression tone detection and generation echo cancellation and

silence suppression

There are also microprocessors which control the DSP and handle all the H323

taco processing and network management functions Some of the functions in the

micro include routing bil1ing and management both within the micro and in between

6

the micro and the DSP The first thing that happens in the DSP is that an analog voice

signal is received This signal is converted to a Pulse Code Modulation (PCM) digital

stream PCM i the classic process of converting analog telephony to digital As a result

of delay in the network echo and talker overlap occurred Echo is caused by the signal

reflections of the speakers voice from the far end telephone equipment back into the

speakers ear Echo becomes a significant problem when the round trip delay becomes

greater than 50 milliseconds Since echo is perceived as a significant quality problem

VoIP systems must address the need for echo control and implement some means of

echo cancellation[20]

Next the Voice Activity Director (V AD) detects and removes silence In a

typical conversation 50 of the conversation is silence Removing the silence can

improve bandwidth consumption After the tone is routed around the CO DEC the

remaining PCM samples are forwarded to the CODEC Voice codecs (codingdecoding

algorithms) are used to compress voice for packet network transmission Most

CODECs garble signaling tones to the point that they are unrecognizable by the tone

detection devices for which they are intended Therefore the tone is detected and

routed around the CODECs

34 VoIP Software

The software consists of the following major subsystems User Interface Voice

Processing Telephony Signaling Gateway Network Interface Protocols Network

Management Agent and System Services [20]

The User Interface provides tbe traditional user interface functions of a

telephone At a minimum this consists of a keypad for dialing numbers (0-9 ) and

dible indicator for announcing incoming calls to the user On more sophisticated

intcdaces additional keys are provided for features such as mute redial hold transfer

7

conferencing etc A display is also typically provided for displaying user prompts

number diaJed CallerID information for incoming calls etc

The Voice Processing software is composed of the following software modules

bull PCM Interface Unit Receives PCM samples from the analog interface and

forwards then to the appropriate DSP software module for processing It also

forwards processed PCM samples to the analog interface

bull Tone Generator Generates call progress tones to the user and generates in-band

DTMF digits to the network based on key presses relayed from the User Interface

For certain voice codecs the compression algorithm does not permit faithful

transmission of DTMF tones For those algorithms eg G7231 the software

generates an in-band message to the network that is used by the remote gateway to

regenerate the DTMF tone

bull Line Echo Canceller Unit Performs ITU G168 compliant echo cancellation on

sampled full -duplex voice port signals Echo in a telephone network is caused by

signal reflections generated by the hybrid circuit that converts between a 4-wire

circuit (a separate transmit and receive pair) and a 2-wire circuit (a single transmit

and receive pair) These reflections of the speakers voice are heard in the speakers

ear Echo is present even in a conventional circuit switched telephone network ~ -

However it is acceptable because the round trip delays through the network are

smaller than 50 ms and the echo is masked by the normal side tone every telephone

generates Echo becomes a problem in VoIP networks because the round trip delay

through the network is almost always greater than 50 ms Thus echo cancellation

techniques are required ITU standard G168 defines performance requirements that

are currently required for echo cancellers Echo is cancelled toward the packet

Detwork from the telephone network The echo canceller compares the voice data

received from the packet network with voice data being transmitted to the packet

8

network The echo from the telephone network hybrid is removed by a digital filter

on the transmit path into the packet network

bull Voice Activity Detector (V AD) Detects voice activity and activates or deactivates

the transmission of packets in order to optimize bandwidth When activity is not

detected the encoder output will not be transported across the network This

software also measures Idle Noise characteristics of the interface and reports this

information to the Packet Voice Protocol for periodic forwarding to the remote

gateway Idle noise is reproduced by the remote end when there is no voice activity

so that the remote user does not fee l that the line went dead

bull Voice Codec Unit Perfonns packetization of the 64 kbps data stream received

from the user Various compression algorithms exist which have different

performance characteristics G711 PCM which operates at 64 kbps (no

compression) G726 ADPCM which operates at 16 24 32 and 40 kbps G7231

which operates at 53 or 63 kbps and G729 which operates at 8 kbps Typically

voice algorithms that perform greater compression require much more processing

power It should be noted that high fidelity audio quality compression algorithms

can also be used since VoIP is not subject to the 4 kHz bandwidth restrictions found

in the PS1N This would provide better sounding audio than PCM and allow music -

to be faithfully reproduced

bull Packet Playout Unit Performs compensation for network delay network jitter and

dropped packets Many proprietary techniques are used to address these problems

since there are currently no standards in place for packet playout

bull Packet Protocol Encapsulation Unit Performs encapsulation of the packet voice

data destined for the network interface For VoIP this encapsulation is per the Real-

Transport Protocol (RTP) which runs directly on top of UDP

oice Encryption Provides optional encryption of the voice packet data prior to

9

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10

Page 17: YII CHIN HUANG

22 IP Host Addresses and Routing

An IP host address is a 32-bit number uniquely identifying an Internet host

According to convention the 4-byte Internet host address is usually written down as a

set of four decimal numbers for example 127001 The Internet host address is

usually divided into two parts the network address and the actual host address The

respective lengths of these two portions of the address vary depending on the most

significant byte in the address( 4)

Class A network addresses are those with the most significant byte between 0

and 127 A Class A address consists of an 8-bit network address and a 24-bit host

address Because addresses beginning with 0 and 127 are reserved there can be a

maximum of 126 class A subnets on an Internet A Class A subnet can contain up to

16777214 hosts Class B network addresses are those with the most significant byte

between 128 and 191 Class B addresses consist of a 16-bit network address and a 16shy

bit host address There can be a maximum of 16383 class B subnets A Class B subnet

may contain up to 65534 hosts A Class C network address is one with the most

significant byte between 192 and 223 This allows a total of 2097152 class C subnets

A Class C subnet may contain up to 254 hosts Class D addresses with most significant

byte between 224 and 255 are reserved for IP multicasting

Once the destination address of a packet is known hosts on an Internet can

route the packet as appropriate Routing involves either forwarding a packet to a

destination that is known to the host or passing it along a default route Larger hosts

maintain dynamically updated routing tables Through these tables the correct route of

packets can be identified and in the case of a network error alternate routes can be

nd

3

23 IP version 6

IP Version 6 (IPv6) is the next generation protocol designed by the Internet

Engineering Task Force (IETF) to replace the current version Internet Protocol IP

Version 4 (IPv4) There is a growing shortage of IPv4 addresses which are needed by

all new machines added to the Internet IPv6 fixes a number of problems in IPv4 such

as the limited number of available IPv4 addresses It also adds many improvements to

IPv4 in areas uch as routing and network autoconfiguration [18]

4

CHAPTER 3

VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview

VoIP is a mean to bypass the long distance charge One can simultaneously talk

fax and receive information from anywhere in the world for the cost of a local phone

call by taking advantage of Transmission Control Protocol (TCP)lP TCPlP makes the

underlying physical connection irrelevant and can run over T1 Integrated Services

Digital Network (ISDN) Frame Relay wireless microwave or satellite links[20]

The most important developments in the VoIP was the adoption of an

interoperability standard H323 an International Telecommunication Union (ITU)

standard for Internet telephony and videoconferencing provides the foundation for an

IP based telephone network H323 provides a standard set of procedures for setting up

voice and video calls over a TCPlP network and allows for the use of multiple codecs

In depth discussion about H323 is available in Chapter 4[20]

32 VoIP vs PSTN

Compared to a real phone line an H323 requires only bandwidth It doesnt

care what kind of circuit is sitting underneath it Let it be T1 xDSL wireless or a dialshy

up Plain Old Telephony Service (POTS) connection A single broadband pipe can

deliver a fairly large number of virtual telephone lines This is a big improvement over

the Public Switched Telephone Network (PSTN) circuit centric mentality where every

service requires its own copper pair to the subscriber [20]

With H323 bandwidth is reduced from 64Kbpseach to lOKbpseach [21]

Once compression is applied voice doesnt require very much bandwidth Then its

5

really a waste to send voice at 64 kbps uncompressed through any network whether it

is the PSTN or the Internet

Internet is unreliable and insecure while analog phone lines very rarely fail

Important point to consider when implementing VoIP

bull Distribute H323 gateways throughout all the networks to avoid creating a situation

where a single hardware outage can affect many other services

bull Gateway software should be smart enough so that it can reroute calls to other

gateways when needed

bull Gateway should route calls over the PSTN when the IP network is unavailable

33 VoIP Hardware

In selecting hardware it will be important to select a platform which is costshy

effective standards compliant and easily serviced It is also important to use

components which offload compression and error correction tasks from the server CPU

to a DSP houses on the gateway Implementations where media processing is done on

the server CPU should be avoided as these systems do not scale well and often

introduce more latency than solutions which offload media processing to a DSP

optimized for the job of compressingdecompressing audio [20]

Gateways are required to adapt traditional analog telephony to the Internet

Within the gateway device there are different types of processors that handle the

conversion from traditional to VoIP DSP handle all of the signal processing activity

including voice compression tone detection and generation echo cancellation and

silence suppression

There are also microprocessors which control the DSP and handle all the H323

taco processing and network management functions Some of the functions in the

micro include routing bil1ing and management both within the micro and in between

6

the micro and the DSP The first thing that happens in the DSP is that an analog voice

signal is received This signal is converted to a Pulse Code Modulation (PCM) digital

stream PCM i the classic process of converting analog telephony to digital As a result

of delay in the network echo and talker overlap occurred Echo is caused by the signal

reflections of the speakers voice from the far end telephone equipment back into the

speakers ear Echo becomes a significant problem when the round trip delay becomes

greater than 50 milliseconds Since echo is perceived as a significant quality problem

VoIP systems must address the need for echo control and implement some means of

echo cancellation[20]

Next the Voice Activity Director (V AD) detects and removes silence In a

typical conversation 50 of the conversation is silence Removing the silence can

improve bandwidth consumption After the tone is routed around the CO DEC the

remaining PCM samples are forwarded to the CODEC Voice codecs (codingdecoding

algorithms) are used to compress voice for packet network transmission Most

CODECs garble signaling tones to the point that they are unrecognizable by the tone

detection devices for which they are intended Therefore the tone is detected and

routed around the CODECs

34 VoIP Software

The software consists of the following major subsystems User Interface Voice

Processing Telephony Signaling Gateway Network Interface Protocols Network

Management Agent and System Services [20]

The User Interface provides tbe traditional user interface functions of a

telephone At a minimum this consists of a keypad for dialing numbers (0-9 ) and

dible indicator for announcing incoming calls to the user On more sophisticated

intcdaces additional keys are provided for features such as mute redial hold transfer

7

conferencing etc A display is also typically provided for displaying user prompts

number diaJed CallerID information for incoming calls etc

The Voice Processing software is composed of the following software modules

bull PCM Interface Unit Receives PCM samples from the analog interface and

forwards then to the appropriate DSP software module for processing It also

forwards processed PCM samples to the analog interface

bull Tone Generator Generates call progress tones to the user and generates in-band

DTMF digits to the network based on key presses relayed from the User Interface

For certain voice codecs the compression algorithm does not permit faithful

transmission of DTMF tones For those algorithms eg G7231 the software

generates an in-band message to the network that is used by the remote gateway to

regenerate the DTMF tone

bull Line Echo Canceller Unit Performs ITU G168 compliant echo cancellation on

sampled full -duplex voice port signals Echo in a telephone network is caused by

signal reflections generated by the hybrid circuit that converts between a 4-wire

circuit (a separate transmit and receive pair) and a 2-wire circuit (a single transmit

and receive pair) These reflections of the speakers voice are heard in the speakers

ear Echo is present even in a conventional circuit switched telephone network ~ -

However it is acceptable because the round trip delays through the network are

smaller than 50 ms and the echo is masked by the normal side tone every telephone

generates Echo becomes a problem in VoIP networks because the round trip delay

through the network is almost always greater than 50 ms Thus echo cancellation

techniques are required ITU standard G168 defines performance requirements that

are currently required for echo cancellers Echo is cancelled toward the packet

Detwork from the telephone network The echo canceller compares the voice data

received from the packet network with voice data being transmitted to the packet

8

network The echo from the telephone network hybrid is removed by a digital filter

on the transmit path into the packet network

bull Voice Activity Detector (V AD) Detects voice activity and activates or deactivates

the transmission of packets in order to optimize bandwidth When activity is not

detected the encoder output will not be transported across the network This

software also measures Idle Noise characteristics of the interface and reports this

information to the Packet Voice Protocol for periodic forwarding to the remote

gateway Idle noise is reproduced by the remote end when there is no voice activity

so that the remote user does not fee l that the line went dead

bull Voice Codec Unit Perfonns packetization of the 64 kbps data stream received

from the user Various compression algorithms exist which have different

performance characteristics G711 PCM which operates at 64 kbps (no

compression) G726 ADPCM which operates at 16 24 32 and 40 kbps G7231

which operates at 53 or 63 kbps and G729 which operates at 8 kbps Typically

voice algorithms that perform greater compression require much more processing

power It should be noted that high fidelity audio quality compression algorithms

can also be used since VoIP is not subject to the 4 kHz bandwidth restrictions found

in the PS1N This would provide better sounding audio than PCM and allow music -

to be faithfully reproduced

bull Packet Playout Unit Performs compensation for network delay network jitter and

dropped packets Many proprietary techniques are used to address these problems

since there are currently no standards in place for packet playout

bull Packet Protocol Encapsulation Unit Performs encapsulation of the packet voice

data destined for the network interface For VoIP this encapsulation is per the Real-

Transport Protocol (RTP) which runs directly on top of UDP

oice Encryption Provides optional encryption of the voice packet data prior to

9

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10

Page 18: YII CHIN HUANG

23 IP version 6

IP Version 6 (IPv6) is the next generation protocol designed by the Internet

Engineering Task Force (IETF) to replace the current version Internet Protocol IP

Version 4 (IPv4) There is a growing shortage of IPv4 addresses which are needed by

all new machines added to the Internet IPv6 fixes a number of problems in IPv4 such

as the limited number of available IPv4 addresses It also adds many improvements to

IPv4 in areas uch as routing and network autoconfiguration [18]

4

CHAPTER 3

VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview

VoIP is a mean to bypass the long distance charge One can simultaneously talk

fax and receive information from anywhere in the world for the cost of a local phone

call by taking advantage of Transmission Control Protocol (TCP)lP TCPlP makes the

underlying physical connection irrelevant and can run over T1 Integrated Services

Digital Network (ISDN) Frame Relay wireless microwave or satellite links[20]

The most important developments in the VoIP was the adoption of an

interoperability standard H323 an International Telecommunication Union (ITU)

standard for Internet telephony and videoconferencing provides the foundation for an

IP based telephone network H323 provides a standard set of procedures for setting up

voice and video calls over a TCPlP network and allows for the use of multiple codecs

In depth discussion about H323 is available in Chapter 4[20]

32 VoIP vs PSTN

Compared to a real phone line an H323 requires only bandwidth It doesnt

care what kind of circuit is sitting underneath it Let it be T1 xDSL wireless or a dialshy

up Plain Old Telephony Service (POTS) connection A single broadband pipe can

deliver a fairly large number of virtual telephone lines This is a big improvement over

the Public Switched Telephone Network (PSTN) circuit centric mentality where every

service requires its own copper pair to the subscriber [20]

With H323 bandwidth is reduced from 64Kbpseach to lOKbpseach [21]

Once compression is applied voice doesnt require very much bandwidth Then its

5

really a waste to send voice at 64 kbps uncompressed through any network whether it

is the PSTN or the Internet

Internet is unreliable and insecure while analog phone lines very rarely fail

Important point to consider when implementing VoIP

bull Distribute H323 gateways throughout all the networks to avoid creating a situation

where a single hardware outage can affect many other services

bull Gateway software should be smart enough so that it can reroute calls to other

gateways when needed

bull Gateway should route calls over the PSTN when the IP network is unavailable

33 VoIP Hardware

In selecting hardware it will be important to select a platform which is costshy

effective standards compliant and easily serviced It is also important to use

components which offload compression and error correction tasks from the server CPU

to a DSP houses on the gateway Implementations where media processing is done on

the server CPU should be avoided as these systems do not scale well and often

introduce more latency than solutions which offload media processing to a DSP

optimized for the job of compressingdecompressing audio [20]

Gateways are required to adapt traditional analog telephony to the Internet

Within the gateway device there are different types of processors that handle the

conversion from traditional to VoIP DSP handle all of the signal processing activity

including voice compression tone detection and generation echo cancellation and

silence suppression

There are also microprocessors which control the DSP and handle all the H323

taco processing and network management functions Some of the functions in the

micro include routing bil1ing and management both within the micro and in between

6

the micro and the DSP The first thing that happens in the DSP is that an analog voice

signal is received This signal is converted to a Pulse Code Modulation (PCM) digital

stream PCM i the classic process of converting analog telephony to digital As a result

of delay in the network echo and talker overlap occurred Echo is caused by the signal

reflections of the speakers voice from the far end telephone equipment back into the

speakers ear Echo becomes a significant problem when the round trip delay becomes

greater than 50 milliseconds Since echo is perceived as a significant quality problem

VoIP systems must address the need for echo control and implement some means of

echo cancellation[20]

Next the Voice Activity Director (V AD) detects and removes silence In a

typical conversation 50 of the conversation is silence Removing the silence can

improve bandwidth consumption After the tone is routed around the CO DEC the

remaining PCM samples are forwarded to the CODEC Voice codecs (codingdecoding

algorithms) are used to compress voice for packet network transmission Most

CODECs garble signaling tones to the point that they are unrecognizable by the tone

detection devices for which they are intended Therefore the tone is detected and

routed around the CODECs

34 VoIP Software

The software consists of the following major subsystems User Interface Voice

Processing Telephony Signaling Gateway Network Interface Protocols Network

Management Agent and System Services [20]

The User Interface provides tbe traditional user interface functions of a

telephone At a minimum this consists of a keypad for dialing numbers (0-9 ) and

dible indicator for announcing incoming calls to the user On more sophisticated

intcdaces additional keys are provided for features such as mute redial hold transfer

7

conferencing etc A display is also typically provided for displaying user prompts

number diaJed CallerID information for incoming calls etc

The Voice Processing software is composed of the following software modules

bull PCM Interface Unit Receives PCM samples from the analog interface and

forwards then to the appropriate DSP software module for processing It also

forwards processed PCM samples to the analog interface

bull Tone Generator Generates call progress tones to the user and generates in-band

DTMF digits to the network based on key presses relayed from the User Interface

For certain voice codecs the compression algorithm does not permit faithful

transmission of DTMF tones For those algorithms eg G7231 the software

generates an in-band message to the network that is used by the remote gateway to

regenerate the DTMF tone

bull Line Echo Canceller Unit Performs ITU G168 compliant echo cancellation on

sampled full -duplex voice port signals Echo in a telephone network is caused by

signal reflections generated by the hybrid circuit that converts between a 4-wire

circuit (a separate transmit and receive pair) and a 2-wire circuit (a single transmit

and receive pair) These reflections of the speakers voice are heard in the speakers

ear Echo is present even in a conventional circuit switched telephone network ~ -

However it is acceptable because the round trip delays through the network are

smaller than 50 ms and the echo is masked by the normal side tone every telephone

generates Echo becomes a problem in VoIP networks because the round trip delay

through the network is almost always greater than 50 ms Thus echo cancellation

techniques are required ITU standard G168 defines performance requirements that

are currently required for echo cancellers Echo is cancelled toward the packet

Detwork from the telephone network The echo canceller compares the voice data

received from the packet network with voice data being transmitted to the packet

8

network The echo from the telephone network hybrid is removed by a digital filter

on the transmit path into the packet network

bull Voice Activity Detector (V AD) Detects voice activity and activates or deactivates

the transmission of packets in order to optimize bandwidth When activity is not

detected the encoder output will not be transported across the network This

software also measures Idle Noise characteristics of the interface and reports this

information to the Packet Voice Protocol for periodic forwarding to the remote

gateway Idle noise is reproduced by the remote end when there is no voice activity

so that the remote user does not fee l that the line went dead

bull Voice Codec Unit Perfonns packetization of the 64 kbps data stream received

from the user Various compression algorithms exist which have different

performance characteristics G711 PCM which operates at 64 kbps (no

compression) G726 ADPCM which operates at 16 24 32 and 40 kbps G7231

which operates at 53 or 63 kbps and G729 which operates at 8 kbps Typically

voice algorithms that perform greater compression require much more processing

power It should be noted that high fidelity audio quality compression algorithms

can also be used since VoIP is not subject to the 4 kHz bandwidth restrictions found

in the PS1N This would provide better sounding audio than PCM and allow music -

to be faithfully reproduced

bull Packet Playout Unit Performs compensation for network delay network jitter and

dropped packets Many proprietary techniques are used to address these problems

since there are currently no standards in place for packet playout

bull Packet Protocol Encapsulation Unit Performs encapsulation of the packet voice

data destined for the network interface For VoIP this encapsulation is per the Real-

Transport Protocol (RTP) which runs directly on top of UDP

oice Encryption Provides optional encryption of the voice packet data prior to

9

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10

Page 19: YII CHIN HUANG

CHAPTER 3

VOICE OVER INTERNET PROTOCOL (VOIP)

31 VoIP Overview

VoIP is a mean to bypass the long distance charge One can simultaneously talk

fax and receive information from anywhere in the world for the cost of a local phone

call by taking advantage of Transmission Control Protocol (TCP)lP TCPlP makes the

underlying physical connection irrelevant and can run over T1 Integrated Services

Digital Network (ISDN) Frame Relay wireless microwave or satellite links[20]

The most important developments in the VoIP was the adoption of an

interoperability standard H323 an International Telecommunication Union (ITU)

standard for Internet telephony and videoconferencing provides the foundation for an

IP based telephone network H323 provides a standard set of procedures for setting up

voice and video calls over a TCPlP network and allows for the use of multiple codecs

In depth discussion about H323 is available in Chapter 4[20]

32 VoIP vs PSTN

Compared to a real phone line an H323 requires only bandwidth It doesnt

care what kind of circuit is sitting underneath it Let it be T1 xDSL wireless or a dialshy

up Plain Old Telephony Service (POTS) connection A single broadband pipe can

deliver a fairly large number of virtual telephone lines This is a big improvement over

the Public Switched Telephone Network (PSTN) circuit centric mentality where every

service requires its own copper pair to the subscriber [20]

With H323 bandwidth is reduced from 64Kbpseach to lOKbpseach [21]

Once compression is applied voice doesnt require very much bandwidth Then its

5

really a waste to send voice at 64 kbps uncompressed through any network whether it

is the PSTN or the Internet

Internet is unreliable and insecure while analog phone lines very rarely fail

Important point to consider when implementing VoIP

bull Distribute H323 gateways throughout all the networks to avoid creating a situation

where a single hardware outage can affect many other services

bull Gateway software should be smart enough so that it can reroute calls to other

gateways when needed

bull Gateway should route calls over the PSTN when the IP network is unavailable

33 VoIP Hardware

In selecting hardware it will be important to select a platform which is costshy

effective standards compliant and easily serviced It is also important to use

components which offload compression and error correction tasks from the server CPU

to a DSP houses on the gateway Implementations where media processing is done on

the server CPU should be avoided as these systems do not scale well and often

introduce more latency than solutions which offload media processing to a DSP

optimized for the job of compressingdecompressing audio [20]

Gateways are required to adapt traditional analog telephony to the Internet

Within the gateway device there are different types of processors that handle the

conversion from traditional to VoIP DSP handle all of the signal processing activity

including voice compression tone detection and generation echo cancellation and

silence suppression

There are also microprocessors which control the DSP and handle all the H323

taco processing and network management functions Some of the functions in the

micro include routing bil1ing and management both within the micro and in between

6

the micro and the DSP The first thing that happens in the DSP is that an analog voice

signal is received This signal is converted to a Pulse Code Modulation (PCM) digital

stream PCM i the classic process of converting analog telephony to digital As a result

of delay in the network echo and talker overlap occurred Echo is caused by the signal

reflections of the speakers voice from the far end telephone equipment back into the

speakers ear Echo becomes a significant problem when the round trip delay becomes

greater than 50 milliseconds Since echo is perceived as a significant quality problem

VoIP systems must address the need for echo control and implement some means of

echo cancellation[20]

Next the Voice Activity Director (V AD) detects and removes silence In a

typical conversation 50 of the conversation is silence Removing the silence can

improve bandwidth consumption After the tone is routed around the CO DEC the

remaining PCM samples are forwarded to the CODEC Voice codecs (codingdecoding

algorithms) are used to compress voice for packet network transmission Most

CODECs garble signaling tones to the point that they are unrecognizable by the tone

detection devices for which they are intended Therefore the tone is detected and

routed around the CODECs

34 VoIP Software

The software consists of the following major subsystems User Interface Voice

Processing Telephony Signaling Gateway Network Interface Protocols Network

Management Agent and System Services [20]

The User Interface provides tbe traditional user interface functions of a

telephone At a minimum this consists of a keypad for dialing numbers (0-9 ) and

dible indicator for announcing incoming calls to the user On more sophisticated

intcdaces additional keys are provided for features such as mute redial hold transfer

7

conferencing etc A display is also typically provided for displaying user prompts

number diaJed CallerID information for incoming calls etc

The Voice Processing software is composed of the following software modules

bull PCM Interface Unit Receives PCM samples from the analog interface and

forwards then to the appropriate DSP software module for processing It also

forwards processed PCM samples to the analog interface

bull Tone Generator Generates call progress tones to the user and generates in-band

DTMF digits to the network based on key presses relayed from the User Interface

For certain voice codecs the compression algorithm does not permit faithful

transmission of DTMF tones For those algorithms eg G7231 the software

generates an in-band message to the network that is used by the remote gateway to

regenerate the DTMF tone

bull Line Echo Canceller Unit Performs ITU G168 compliant echo cancellation on

sampled full -duplex voice port signals Echo in a telephone network is caused by

signal reflections generated by the hybrid circuit that converts between a 4-wire

circuit (a separate transmit and receive pair) and a 2-wire circuit (a single transmit

and receive pair) These reflections of the speakers voice are heard in the speakers

ear Echo is present even in a conventional circuit switched telephone network ~ -

However it is acceptable because the round trip delays through the network are

smaller than 50 ms and the echo is masked by the normal side tone every telephone

generates Echo becomes a problem in VoIP networks because the round trip delay

through the network is almost always greater than 50 ms Thus echo cancellation

techniques are required ITU standard G168 defines performance requirements that

are currently required for echo cancellers Echo is cancelled toward the packet

Detwork from the telephone network The echo canceller compares the voice data

received from the packet network with voice data being transmitted to the packet

8

network The echo from the telephone network hybrid is removed by a digital filter

on the transmit path into the packet network

bull Voice Activity Detector (V AD) Detects voice activity and activates or deactivates

the transmission of packets in order to optimize bandwidth When activity is not

detected the encoder output will not be transported across the network This

software also measures Idle Noise characteristics of the interface and reports this

information to the Packet Voice Protocol for periodic forwarding to the remote

gateway Idle noise is reproduced by the remote end when there is no voice activity

so that the remote user does not fee l that the line went dead

bull Voice Codec Unit Perfonns packetization of the 64 kbps data stream received

from the user Various compression algorithms exist which have different

performance characteristics G711 PCM which operates at 64 kbps (no

compression) G726 ADPCM which operates at 16 24 32 and 40 kbps G7231

which operates at 53 or 63 kbps and G729 which operates at 8 kbps Typically

voice algorithms that perform greater compression require much more processing

power It should be noted that high fidelity audio quality compression algorithms

can also be used since VoIP is not subject to the 4 kHz bandwidth restrictions found

in the PS1N This would provide better sounding audio than PCM and allow music -

to be faithfully reproduced

bull Packet Playout Unit Performs compensation for network delay network jitter and

dropped packets Many proprietary techniques are used to address these problems

since there are currently no standards in place for packet playout

bull Packet Protocol Encapsulation Unit Performs encapsulation of the packet voice

data destined for the network interface For VoIP this encapsulation is per the Real-

Transport Protocol (RTP) which runs directly on top of UDP

oice Encryption Provides optional encryption of the voice packet data prior to

9

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10

Page 20: YII CHIN HUANG

really a waste to send voice at 64 kbps uncompressed through any network whether it

is the PSTN or the Internet

Internet is unreliable and insecure while analog phone lines very rarely fail

Important point to consider when implementing VoIP

bull Distribute H323 gateways throughout all the networks to avoid creating a situation

where a single hardware outage can affect many other services

bull Gateway software should be smart enough so that it can reroute calls to other

gateways when needed

bull Gateway should route calls over the PSTN when the IP network is unavailable

33 VoIP Hardware

In selecting hardware it will be important to select a platform which is costshy

effective standards compliant and easily serviced It is also important to use

components which offload compression and error correction tasks from the server CPU

to a DSP houses on the gateway Implementations where media processing is done on

the server CPU should be avoided as these systems do not scale well and often

introduce more latency than solutions which offload media processing to a DSP

optimized for the job of compressingdecompressing audio [20]

Gateways are required to adapt traditional analog telephony to the Internet

Within the gateway device there are different types of processors that handle the

conversion from traditional to VoIP DSP handle all of the signal processing activity

including voice compression tone detection and generation echo cancellation and

silence suppression

There are also microprocessors which control the DSP and handle all the H323

taco processing and network management functions Some of the functions in the

micro include routing bil1ing and management both within the micro and in between

6

the micro and the DSP The first thing that happens in the DSP is that an analog voice

signal is received This signal is converted to a Pulse Code Modulation (PCM) digital

stream PCM i the classic process of converting analog telephony to digital As a result

of delay in the network echo and talker overlap occurred Echo is caused by the signal

reflections of the speakers voice from the far end telephone equipment back into the

speakers ear Echo becomes a significant problem when the round trip delay becomes

greater than 50 milliseconds Since echo is perceived as a significant quality problem

VoIP systems must address the need for echo control and implement some means of

echo cancellation[20]

Next the Voice Activity Director (V AD) detects and removes silence In a

typical conversation 50 of the conversation is silence Removing the silence can

improve bandwidth consumption After the tone is routed around the CO DEC the

remaining PCM samples are forwarded to the CODEC Voice codecs (codingdecoding

algorithms) are used to compress voice for packet network transmission Most

CODECs garble signaling tones to the point that they are unrecognizable by the tone

detection devices for which they are intended Therefore the tone is detected and

routed around the CODECs

34 VoIP Software

The software consists of the following major subsystems User Interface Voice

Processing Telephony Signaling Gateway Network Interface Protocols Network

Management Agent and System Services [20]

The User Interface provides tbe traditional user interface functions of a

telephone At a minimum this consists of a keypad for dialing numbers (0-9 ) and

dible indicator for announcing incoming calls to the user On more sophisticated

intcdaces additional keys are provided for features such as mute redial hold transfer

7

conferencing etc A display is also typically provided for displaying user prompts

number diaJed CallerID information for incoming calls etc

The Voice Processing software is composed of the following software modules

bull PCM Interface Unit Receives PCM samples from the analog interface and

forwards then to the appropriate DSP software module for processing It also

forwards processed PCM samples to the analog interface

bull Tone Generator Generates call progress tones to the user and generates in-band

DTMF digits to the network based on key presses relayed from the User Interface

For certain voice codecs the compression algorithm does not permit faithful

transmission of DTMF tones For those algorithms eg G7231 the software

generates an in-band message to the network that is used by the remote gateway to

regenerate the DTMF tone

bull Line Echo Canceller Unit Performs ITU G168 compliant echo cancellation on

sampled full -duplex voice port signals Echo in a telephone network is caused by

signal reflections generated by the hybrid circuit that converts between a 4-wire

circuit (a separate transmit and receive pair) and a 2-wire circuit (a single transmit

and receive pair) These reflections of the speakers voice are heard in the speakers

ear Echo is present even in a conventional circuit switched telephone network ~ -

However it is acceptable because the round trip delays through the network are

smaller than 50 ms and the echo is masked by the normal side tone every telephone

generates Echo becomes a problem in VoIP networks because the round trip delay

through the network is almost always greater than 50 ms Thus echo cancellation

techniques are required ITU standard G168 defines performance requirements that

are currently required for echo cancellers Echo is cancelled toward the packet

Detwork from the telephone network The echo canceller compares the voice data

received from the packet network with voice data being transmitted to the packet

8

network The echo from the telephone network hybrid is removed by a digital filter

on the transmit path into the packet network

bull Voice Activity Detector (V AD) Detects voice activity and activates or deactivates

the transmission of packets in order to optimize bandwidth When activity is not

detected the encoder output will not be transported across the network This

software also measures Idle Noise characteristics of the interface and reports this

information to the Packet Voice Protocol for periodic forwarding to the remote

gateway Idle noise is reproduced by the remote end when there is no voice activity

so that the remote user does not fee l that the line went dead

bull Voice Codec Unit Perfonns packetization of the 64 kbps data stream received

from the user Various compression algorithms exist which have different

performance characteristics G711 PCM which operates at 64 kbps (no

compression) G726 ADPCM which operates at 16 24 32 and 40 kbps G7231

which operates at 53 or 63 kbps and G729 which operates at 8 kbps Typically

voice algorithms that perform greater compression require much more processing

power It should be noted that high fidelity audio quality compression algorithms

can also be used since VoIP is not subject to the 4 kHz bandwidth restrictions found

in the PS1N This would provide better sounding audio than PCM and allow music -

to be faithfully reproduced

bull Packet Playout Unit Performs compensation for network delay network jitter and

dropped packets Many proprietary techniques are used to address these problems

since there are currently no standards in place for packet playout

bull Packet Protocol Encapsulation Unit Performs encapsulation of the packet voice

data destined for the network interface For VoIP this encapsulation is per the Real-

Transport Protocol (RTP) which runs directly on top of UDP

oice Encryption Provides optional encryption of the voice packet data prior to

9

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10

Page 21: YII CHIN HUANG

the micro and the DSP The first thing that happens in the DSP is that an analog voice

signal is received This signal is converted to a Pulse Code Modulation (PCM) digital

stream PCM i the classic process of converting analog telephony to digital As a result

of delay in the network echo and talker overlap occurred Echo is caused by the signal

reflections of the speakers voice from the far end telephone equipment back into the

speakers ear Echo becomes a significant problem when the round trip delay becomes

greater than 50 milliseconds Since echo is perceived as a significant quality problem

VoIP systems must address the need for echo control and implement some means of

echo cancellation[20]

Next the Voice Activity Director (V AD) detects and removes silence In a

typical conversation 50 of the conversation is silence Removing the silence can

improve bandwidth consumption After the tone is routed around the CO DEC the

remaining PCM samples are forwarded to the CODEC Voice codecs (codingdecoding

algorithms) are used to compress voice for packet network transmission Most

CODECs garble signaling tones to the point that they are unrecognizable by the tone

detection devices for which they are intended Therefore the tone is detected and

routed around the CODECs

34 VoIP Software

The software consists of the following major subsystems User Interface Voice

Processing Telephony Signaling Gateway Network Interface Protocols Network

Management Agent and System Services [20]

The User Interface provides tbe traditional user interface functions of a

telephone At a minimum this consists of a keypad for dialing numbers (0-9 ) and

dible indicator for announcing incoming calls to the user On more sophisticated

intcdaces additional keys are provided for features such as mute redial hold transfer

7

conferencing etc A display is also typically provided for displaying user prompts

number diaJed CallerID information for incoming calls etc

The Voice Processing software is composed of the following software modules

bull PCM Interface Unit Receives PCM samples from the analog interface and

forwards then to the appropriate DSP software module for processing It also

forwards processed PCM samples to the analog interface

bull Tone Generator Generates call progress tones to the user and generates in-band

DTMF digits to the network based on key presses relayed from the User Interface

For certain voice codecs the compression algorithm does not permit faithful

transmission of DTMF tones For those algorithms eg G7231 the software

generates an in-band message to the network that is used by the remote gateway to

regenerate the DTMF tone

bull Line Echo Canceller Unit Performs ITU G168 compliant echo cancellation on

sampled full -duplex voice port signals Echo in a telephone network is caused by

signal reflections generated by the hybrid circuit that converts between a 4-wire

circuit (a separate transmit and receive pair) and a 2-wire circuit (a single transmit

and receive pair) These reflections of the speakers voice are heard in the speakers

ear Echo is present even in a conventional circuit switched telephone network ~ -

However it is acceptable because the round trip delays through the network are

smaller than 50 ms and the echo is masked by the normal side tone every telephone

generates Echo becomes a problem in VoIP networks because the round trip delay

through the network is almost always greater than 50 ms Thus echo cancellation

techniques are required ITU standard G168 defines performance requirements that

are currently required for echo cancellers Echo is cancelled toward the packet

Detwork from the telephone network The echo canceller compares the voice data

received from the packet network with voice data being transmitted to the packet

8

network The echo from the telephone network hybrid is removed by a digital filter

on the transmit path into the packet network

bull Voice Activity Detector (V AD) Detects voice activity and activates or deactivates

the transmission of packets in order to optimize bandwidth When activity is not

detected the encoder output will not be transported across the network This

software also measures Idle Noise characteristics of the interface and reports this

information to the Packet Voice Protocol for periodic forwarding to the remote

gateway Idle noise is reproduced by the remote end when there is no voice activity

so that the remote user does not fee l that the line went dead

bull Voice Codec Unit Perfonns packetization of the 64 kbps data stream received

from the user Various compression algorithms exist which have different

performance characteristics G711 PCM which operates at 64 kbps (no

compression) G726 ADPCM which operates at 16 24 32 and 40 kbps G7231

which operates at 53 or 63 kbps and G729 which operates at 8 kbps Typically

voice algorithms that perform greater compression require much more processing

power It should be noted that high fidelity audio quality compression algorithms

can also be used since VoIP is not subject to the 4 kHz bandwidth restrictions found

in the PS1N This would provide better sounding audio than PCM and allow music -

to be faithfully reproduced

bull Packet Playout Unit Performs compensation for network delay network jitter and

dropped packets Many proprietary techniques are used to address these problems

since there are currently no standards in place for packet playout

bull Packet Protocol Encapsulation Unit Performs encapsulation of the packet voice

data destined for the network interface For VoIP this encapsulation is per the Real-

Transport Protocol (RTP) which runs directly on top of UDP

oice Encryption Provides optional encryption of the voice packet data prior to

9

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10

Page 22: YII CHIN HUANG

conferencing etc A display is also typically provided for displaying user prompts

number diaJed CallerID information for incoming calls etc

The Voice Processing software is composed of the following software modules

bull PCM Interface Unit Receives PCM samples from the analog interface and

forwards then to the appropriate DSP software module for processing It also

forwards processed PCM samples to the analog interface

bull Tone Generator Generates call progress tones to the user and generates in-band

DTMF digits to the network based on key presses relayed from the User Interface

For certain voice codecs the compression algorithm does not permit faithful

transmission of DTMF tones For those algorithms eg G7231 the software

generates an in-band message to the network that is used by the remote gateway to

regenerate the DTMF tone

bull Line Echo Canceller Unit Performs ITU G168 compliant echo cancellation on

sampled full -duplex voice port signals Echo in a telephone network is caused by

signal reflections generated by the hybrid circuit that converts between a 4-wire

circuit (a separate transmit and receive pair) and a 2-wire circuit (a single transmit

and receive pair) These reflections of the speakers voice are heard in the speakers

ear Echo is present even in a conventional circuit switched telephone network ~ -

However it is acceptable because the round trip delays through the network are

smaller than 50 ms and the echo is masked by the normal side tone every telephone

generates Echo becomes a problem in VoIP networks because the round trip delay

through the network is almost always greater than 50 ms Thus echo cancellation

techniques are required ITU standard G168 defines performance requirements that

are currently required for echo cancellers Echo is cancelled toward the packet

Detwork from the telephone network The echo canceller compares the voice data

received from the packet network with voice data being transmitted to the packet

8

network The echo from the telephone network hybrid is removed by a digital filter

on the transmit path into the packet network

bull Voice Activity Detector (V AD) Detects voice activity and activates or deactivates

the transmission of packets in order to optimize bandwidth When activity is not

detected the encoder output will not be transported across the network This

software also measures Idle Noise characteristics of the interface and reports this

information to the Packet Voice Protocol for periodic forwarding to the remote

gateway Idle noise is reproduced by the remote end when there is no voice activity

so that the remote user does not fee l that the line went dead

bull Voice Codec Unit Perfonns packetization of the 64 kbps data stream received

from the user Various compression algorithms exist which have different

performance characteristics G711 PCM which operates at 64 kbps (no

compression) G726 ADPCM which operates at 16 24 32 and 40 kbps G7231

which operates at 53 or 63 kbps and G729 which operates at 8 kbps Typically

voice algorithms that perform greater compression require much more processing

power It should be noted that high fidelity audio quality compression algorithms

can also be used since VoIP is not subject to the 4 kHz bandwidth restrictions found

in the PS1N This would provide better sounding audio than PCM and allow music -

to be faithfully reproduced

bull Packet Playout Unit Performs compensation for network delay network jitter and

dropped packets Many proprietary techniques are used to address these problems

since there are currently no standards in place for packet playout

bull Packet Protocol Encapsulation Unit Performs encapsulation of the packet voice

data destined for the network interface For VoIP this encapsulation is per the Real-

Transport Protocol (RTP) which runs directly on top of UDP

oice Encryption Provides optional encryption of the voice packet data prior to

9

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10

Page 23: YII CHIN HUANG

network The echo from the telephone network hybrid is removed by a digital filter

on the transmit path into the packet network

bull Voice Activity Detector (V AD) Detects voice activity and activates or deactivates

the transmission of packets in order to optimize bandwidth When activity is not

detected the encoder output will not be transported across the network This

software also measures Idle Noise characteristics of the interface and reports this

information to the Packet Voice Protocol for periodic forwarding to the remote

gateway Idle noise is reproduced by the remote end when there is no voice activity

so that the remote user does not fee l that the line went dead

bull Voice Codec Unit Perfonns packetization of the 64 kbps data stream received

from the user Various compression algorithms exist which have different

performance characteristics G711 PCM which operates at 64 kbps (no

compression) G726 ADPCM which operates at 16 24 32 and 40 kbps G7231

which operates at 53 or 63 kbps and G729 which operates at 8 kbps Typically

voice algorithms that perform greater compression require much more processing

power It should be noted that high fidelity audio quality compression algorithms

can also be used since VoIP is not subject to the 4 kHz bandwidth restrictions found

in the PS1N This would provide better sounding audio than PCM and allow music -

to be faithfully reproduced

bull Packet Playout Unit Performs compensation for network delay network jitter and

dropped packets Many proprietary techniques are used to address these problems

since there are currently no standards in place for packet playout

bull Packet Protocol Encapsulation Unit Performs encapsulation of the packet voice

data destined for the network interface For VoIP this encapsulation is per the Real-

Transport Protocol (RTP) which runs directly on top of UDP

oice Encryption Provides optional encryption of the voice packet data prior to

9

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10

Page 24: YII CHIN HUANG

transmission over the network to ensure privacy

bull Control Unit Coordinates the exchange of monitor and control information

between the Voice Processing Module and Telephony Signaling and Network

Management modules The information exchanged includes software downline

load configuration data signaling information and status reporting

The Telephony Signaling Gateway (TSG) subsystem performs the functions for

establishing maintaining and terminating a call The TSG consists of the fo llowing

software modules

bull Call Processing Performs the state machine processing for call establishment call

maintenance and call tear down

bull Address Translation and Parsing Performs digit collection and parsing to

determine when a complete number has been dialed and makes this dialed number

available for address translation

bull Network Signaling Performs signaling functions for establishment maintenance

and termination of calls over the IP network

bull H323 Protocols H323 is an ITU standard that describes how multimedia

communications occur between user terminals network equipment and assorted

s~rvilt7S on Local and Wide Area IP networks The following H323 standards are

used for VoIP

bull H225-Call Signaling Protocols Performs signaling for establishment and

termination of call connections based on 0 931

H2AS-Control Protocol Provides capability negotiation between the two endshy

points such as voice compression algorithm to use conferencing requests etc

RAS-Registration Admission and Status (RAS) Protocol Used to convey the

middot__ration admissions bandwidth change and status messages between VoIP

ces and servers called Gatekeepers which provide address translation and

10