APPLETPHONE
(A VOICE OVER IP SYSTEM)

BY

SEENA JOSEPH. P
03PCR21

A Project work submitted to
The Avinashilingam Institute for Home Science and Higher Education
for Women- Deemed University,Coimbatore – 641 043
in partial fulfillment of the requirements for the degree of

MASTER OF COMPUTER SCIENCE
COIMBATORE
May 2005

CERTIFICATE

                          		This is to certify that this Project entitled “APPLETPHONE ” done by SEENA JOSEPH. P  (03PCR21) has been submitted to Avinashilingam Institute for Home Science and Higher Education for Women – Deemed University, Coimbatore-43 in partial fulfillment of the requirement for the award of the degree of Master of Computer Science. This Project has not formed the basis for the award of any Degree / Diploma/Associate ship/ Fellowship or similar title to any candidate of any University.

                             		Certified as a bonafide record of the work submitted for the Viva Voce held on__________2005

Head of the Department								Guide

Internal Examiner							External Examiner

DECLARATION

                                      I here by declare that this project work entitled “APPLETPHONE ” is a record of original work done by me under the guidance of Mrs. G. GEETHA, BE, M.TECH, Lecturer, Department of Computer Science, Avinashilingam Deemed University and the project work has not formed the basis for the award of any Degree/Diploma/Associate ship/Fellowship or similar title to any candidate of any university.

Internal Guide 					Signature of the Candidate

ACKNOWLEDGEMENT

I would like to express my sincere thanks to god almighty, for his constant love and grace that he has showered upon me.

I am very grateful to Dr.K.Kulandaivel, M.A., M.A., (Ohio State), Ph.D., (Chennai), Chancellor, Avinashilingam Institute for Home Science and Higher Education for Women – Deemed University, Coimbatore, for his kind patronage and all facilities offered to do this project work.

I heartily thank Dr.Saroja Prabhakaran, M.A., Dip.Ed, (Chennai), Ph.D., (Mother Theresa), Vice Chancellor for providing all facilities necessary for the study.

I express my gratitude to Registrar Dr.Gowri Ramakrishnan, M.Sc (Chennai), M.Phil, Ph.D., (Avinashilingam) for providing all the facilities needed for the project. 
            
I profusely thank Dr. S. Sivakamasunadari M.Sc., (Annamalai), M.Phil., Ph.D (Chennai), Dean Of Sciences, for providing all facilities needed for the project.           
           
           I wish to place on the record my deep sense of gratitude to Tmt.G.Padmavathy M.Sc., M.Phil (Bharathiar), Head of the Department of Computer Science for providing all the facilities for completing the project.

         I am extremely grateful to my project guide Mrs. G. Geetha, BE, M.Tech, Lecturer, Department of Computer Science, Avinashilingam Deemed University for her suggestion and guidance.

           I wish to place on the record my deep sense of gratitude to Tmt.Subashini, Project Coordinator, Department of Computer Science for providing all the facilities for completing the project.

           My sincere thanks to Mr. P.J Thomas, B.Tech, at HCL InfoSystems,  for providing suggestions and guidance.

           I thank all the staff members, Parents, well wishers and all those who in one way or others helped in completing my project successfully.

SYNOPSIS
	
The Project titled AppletPhone is the development of improved Voice Over Internet Protocol (VoIP) transport mechanism and develops JAVA API for telephony signaling. Telephony applications require costly resources to develop, test, and deploy. AppletPhone is the standardized java interface to the Session Initiation Protocol (SIP). SIP is a standard protocol for IP-communication, enabling IP-Telephony gateways, client endpoints, PBXs and other communication systems or devices to communicate with each other.

	Session Initiation Protocol (SIP), an application-layer controls (signaling) protocol for creating, modifying, and terminating sessions with one or more participants. SIP invitations used to create sessions carry session descriptions that allow participants to agree on a set of compatible media types. SIP also provides a registration function that allows users to upload their current locations for use by proxy servers. SIP runs on top of several different transport protocols.

	Currently AppletPhone is able to handle calls, participate in unicast audio sessions, register itself with a registrar server, and display incoming MESSAGE request. TraceViewer is used as an integrated part of AppletPhone for visualizing SIP signaling traces. The Trace Viewer allows you to browse the debug log and message trace using the same UI when this option is used. This process is much helpful if we consider the manual signal tracing.
CONTENTS

1.	INTRODUCTION                   						
	Organization Profile						3
2.	SYSTEM CONFIGURATION						
	Hardware Configuration					5
	Software Configuration					5
3.	SYSTEM STUDY AND ANALYSIS
	Existing System						7
	Proposed System						8
	Feasibility Study						17
4.	SYSTEM DESIGN
	Input Design							19
	Output Design							20
5.	SYSTEM DEVOLOPMENT
	5.1 Module Description						22
6.	TESTING AND IMPLEMENTATION
	Testing								28
	System Implementation					32
7.	CONCLUSION								35
8.	SCOPE FOR FURTHER DEVOLOPMENT			36
9.	BIBLIOGRAPHY							37
10.	  APPENDIX
	Flow Diagrams
	Screen Layouts

1. INTRODUCTION
	
One of the leading tendencies in telecommunication development is joining of this scientific and technical sphere together with information science. It became possible due to the fact that a computer does not just operate with the data but it can transfer and receive them as well. So, in this context the network is considered to be some universal medium for spreading of information. 

	Rapid growth of mobile Internet and other mobile services result in increasing demand for higher data transmission capacity. The 3G mobile communications systems are designed to meet this demand. The infrastructure of 3G systems is based on “All IP-networks”. This means that all mobile services, data, video, voice etc. will be transferred via the Internet Protocol, IP. The mobile phones will use Voice over IP, and in 3G networks, voice is initially expected to be the major service. Hence Voice over IP will be a very important field of competence for operators to cover. Voice over IP is designed for system engineers, core network planners, network purchasers, managers, transmission engineers, routing/switching staff or others who need to understand the technology and applications of IP-telephony.

	AppletPhone is the standardized Java interface to the Session Initiation Protocol (SIP) for desktop and server applications. AppletPhone enables transaction stateless, transaction stateful and dialog stateful control over the protocol. SIP is a standard protocol for IP-communication. SIP supports five facets of establishing and terminating multimedia communications these include:- 
User location: determination of the end system to be used for                communication.
User capabilities: determination of media and media parameters to be used.
User availability: determination of the willingness of the called party to engage in communications.
Call setup: “ringing", establishment of call parameters at both called and calling party.
Call handling: including transfer and termination of calls.

	TraceViewer is used as an integrated part of AppletPhone for visualizing SIP signaling traces. In some cases, it may be useful for proxies in the SIP signaling path to see all the messaging between the endpoints for the duration of the session.   The Trace Viewer allows browsing the debug log and messaging trace using the same UI when this option is used. 

1.1 ORGANIZATION PROFILE
		
HCL Info systems Ltd., (HCL Insys) is India’s premier information technology company for last 27 years with its in-depth expertise in developing solutions spanning diverse technologies, HCL Insys aims to propel its course on it the high-growth path of ‘Total Technology Integration’ Leveraging its expertise in total technology solutions and services.  HCL Insys offers value-added services in key areas such as SAP implementation, software application, network consultancy & management and range of support services.

	To serve the two ends of the market spectrum - enterprise solution and PCs - HCL Insys has made significant strategic infrastructure in the Professional Services Organisation (PSO), the Support Service Organization (SSO) and in its manufacturing plants at Noida and Pondicherry. The approach is to view hardware as one of the key components of the total solution. The build-up of the services business (both of PSO & DSO) would enable HCL Insys to offer complete solutions and will also raise manufacturing volumes to internationally competitive levels. HCL Infosystems has to its claim several technology pioneering initiatives. Some of them are:
•	Country's first DeskTop PC- BusyBee in 1985
•	Country's first branded home PC- Beanstalk in 1995
•	Country's first Pentium 4 based PC at sub 40k price point
•	Country's first Media Center PC
	HCL Insys Manufacturing facilities are ISO 9001 - 2000 & ISO 14001 certified and adhere to stringent quality standard and global processes. (With the largest installed PC based in the country). HCL Insys aims ‘Infiniti’ line of business products is incorporated with leading edge products from world leaders computing such as INTEL. As Customers need mature, the IT industry has witnessed a continual evolution through a progressively finer segmentation of markets. HCL has set-up overseas in the US, UK, Singapore, Malaysia, Australia. HCL Infosystems' portfolio of products covers the entire spectrum of the information technology needs of its customers.

2. SYSTEM CONFIGURATION

2.1 Hardware Configuration

Central Processor			:		Pentium IV
Operation Speed			:		188 MHz

Memory
RAM					:		156 MB
Cache Memory			:		516 KB

Disk Storage
Floppy Drive			:		1.44 MB
Hard Disk Drive			:		20 GB

Peripherals
Keyboard				:		ACER
Mouse				:		Logitech
Monitor				:		Samtron 56V

2.2 Software Configuration

	Language				: Java Version 2
	Platform 				: Windows 2000
	Software Platform			: J2SE(Java2 Standard Edition)

2.2.1 About Windows 2000

	Windows NT has been with us for almost eight years, and as the product has matured, Microsoft has added more features in an effort to address users' needs and administrator’s requirements. With Windows 2000, they have made considerable enhancements to the product line. Windows 2000 Professional is the preferred 32bit desktop environment, providing a combination of Windows 98 usability and Windows NT 4 reliability. New features include support for power management and plug and play (a great bonus for portable users), and support for new file system features, including EFS. Windows 2000 Server has been created in three different flavors, each with features appropriate to the target audience. All share the same core features as Windows 2000 Professional, but then add additional features.
	
2.2.2 About Java Version 2

Some features that made JAVA the basis of the system is:
•	Simple
•	Object- oriented
•	Robust
•	Virus proof
•	Secure
•	Multithreaded
•	Dynamic
•	Portable
•	Distributed/network oriented
•	All common networking operations are built-in to Java Libraries
3. SYSTEM STUDY AND ANALYSIS

3.1 Existing System 

	Public Switched Telephone Network is the commonly used communication system for the last few decades. The dependency on this system for effective communication is not decreased but this has got some inherent drawbacks.

Drawbacks

Although the PSTN is effective and does a good job at what it was built to do (that is, switch voice calls), many business drivers are striving to change it to a new network, whereby voice is an application on top of a data network. This is happening for several reasons:

•	Data has overtaken voice as the primary traffic on many networks built for voice. Data is now running on top of networks that were built to carry voice efficiently. Data has different characteristics, however, such as a variable use of bandwidth and a need for higher bandwidth. Soon, voice networks will run on top of networks built with a data-centric approach. Traffic will then be differentiated based upon application instead of physical circuits. New technologies (such as Fast Ethernet, Gigabit Ethernet, and Optical Networking) will be used to deploy the high-speed networks that needed to carry all this additional data. 
•	The PSTN cannot create and deploy features quickly enough.
•	Data/Voice/Video (D/V/V) cannot converge on the PSTN as currently built. With only an analog line to most homes, you cannot have data access (Internet access), phone access, and video access across one 56-kbps modem. High-speed broadband access, such as digital subscriber line (DSL), cable, or wireless, is needed to enable this convergence.
•	The architecture built for voice is not flexible enough to carry data.
•	It is also important to note that circuit-switched calls require a permanent 64-kbps dedicated circuit between the two telephones. Whether the caller or the person called is talking, any other party cannot use the 64-kbps connection. This means that the telephone company cannot use this bandwidth for any other purpose and must bill the parties for consuming its resources. Data networking, on the other hand, has the capability to use bandwidth only when it is required. This difference, although seemingly small, is a major benefit of packet-based voice networking.

3.2 Proposed System

Aim:
•	To facilitate the development of improved VoIP transport mechanisms and Develop JAVA API for telephony signaling. 
•	Research up loadable service scripts for IP Telephony service creation. 
•	Research the application of SIP Signaling to presence / location tracking and device control and its relationship to pervasive computing. 
•	Research the application of SIP Signaling for health care and emergency First Responder applications 
•	Model and evaluate the integration of Internet Telephony signaling mechanisms with adaptive traffic engineering mechanisms. 
•	Expedite the development of programmable telephony services. 
SIP, Session Initiation Protocol: The following terms have special significance for SIP.

Call: A call is an informal term that refers to some communication between peers, generally set up for the purposes of a multimedia conversation.

Client: A client is any network element that sends SIP requests and receives SIP responses.  Clients may or may not interact directly with a human user.  User agent clients and proxies are clients.

Dialog: A dialog is a peer-to-peer SIP relationship between two UAs that persists for some time.  A dialog is established by SIP messages, such as a 2xx response to an INVITE request. A dialog is identified by a call identifier, local tag and a remote tag.  

Final Response: A response that terminates a SIP transaction, as opposed to a provisional response that does not.  All 2xx, 3xx, 4xx, 5xx and 6xx responses are final.

Header: A header is a component of a SIP message that conveys information about the message.  It is structured as a sequence of header fields.

Message: Data sent between SIP elements as part of the protocol. SIP messages are either requests or responses.

Method: The method is the primary function that a request is meant to invoke on a server.  The method is carried in the request message itself.  Example methods are INVITE and BYE.
      
Initiator, Calling Party, Caller: The party initiating a session (and dialog) with an INVITE request.  A caller retains this role from the time it sends the initial INVITE that established a dialog until the termination of that dialog.

Invitation: An INVITE request.

Invitee, Invited User, Called Party, Callee: The party that receives an INVITE request for the purpose of establishing a new session. A callee retains this role from the time it receives the INVITE until the termination of the dialog established by that INVITE.

Address-of-Record: An address-of-record (AOR) is a SIP or SIPS URI that points to a domain with a location service that can map the URI to another URI where the user might be available. Typically, the location service is populated through registrations.  An AOR is frequently thought of as the "public address" of the user.

Proxy, Proxy Server: An intermediary entity that acts as both a server and a client for the purpose of making requests on behalf of other clients.  A proxy server primarily plays the role of routing, which means its job is to ensure that a request is sent to another entity "closer" to the targeted user.  Proxies are also useful for enforcing policy (for example, making sure a user is allowed to make a call).  A proxy interprets, and, if necessary, rewrites specific parts of a request message before forwarding it.

Registrar: A registrar is a server that accepts REGISTER requests and places the information it receives in those requests into the location service for the domain it handles.

Regular Transaction: A regular transaction is any transaction with a method other than INVITE, ACK, or CANCEL.

Request: A SIP message sent from a client to a server, for the purpose of invoking a particular operation.

Response: A SIP message sent from a server to a client, for indicating the status of a request sent from the client to the server.

Ringback: Ringback is the signaling tone produced by the calling         party's application indicating that a called party is being alerted (ringing).

Route Set: A route set is a collection of ordered SIP or SIPS URI, which represent a list of proxies that must be traversed when sending a particular request.  A route set can be learned, through headers like Record-Route, or it can be configured.

Back-to-Back User Agent: A back-to-back user agent (B2BUA) is a         logical entity that receives a request and processes it as a user agent server (UAS).  In order to determine how the request should be answered, it acts as a user agent client (UAC) and generates requests.  Unlike a proxy server, it maintains dialog state and must participate in all requests sent on the dialogs
it has established. Since it is a concatenation of a UAC and UAS, no explicit definitions are needed for its behavior.

Server: A server is a network element that receives requests in order to service them and sends back responses to those requests. Examples of servers are proxies, user agent servers, redirect servers, and registrars.

Sequential Search: In a sequential search, a proxy server attempts each contact address in sequence, proceeding to the next one only after the previous has generated a final response.  A 2xx    or 6xx class final response always terminates a sequential search.

Session: From the SDP specification: "A multimedia session is a set of multimedia senders and receivers and the data streams flowing from senders to receivers.  A multimedia conference is an example of a multimedia session." (RFC 2327 [1]) (A session as defined for SDP can comprise one or more RTP sessions.)  As defined, a callee can be invited several times, by different calls, to the same session.  If SDP is used, a session is defined by the concatenation of the SDP user name, session id, network type, address type, and address elements in the origin field.

SIP Transaction: A SIP transaction occurs between a client and a         server and comprises all messages from the first request sent from the client to the server up to a final (non-1xx) response sent from the server to the client.  If the request is INVITE and the final response is a non-2xx, the transaction also includes an ACK to the response.  The ACK for a 2xx response to an INVITE request is a separate transaction.

User Agent Client (UAC): A user agent client is a logical entity that creates a new request, and then uses the client transaction state machinery to send it.  The role of UAC lasts only for the duration of that transaction.  In other words, if a piece of software initiates a request, it acts as a UAC for the duration of that transaction.  If it receives a request later, it assumes the role of a user agent server for the processing of that transaction.

User Agent Server (UAS): A user agent server is a logical entity that generates a response to a SIP request.  The response accepts, rejects, or redirects the request.  This role lasts only for the duration of that transaction.  In other words, if a piece of software responds to a request, it acts as a UAS for the duration of that transaction.  If it generates a request later, it assumes the role of a user agent client for the processing of that transaction.

User Agent (UA): A logical entity that can act as both a user agent client and user agent server

Message Body Type: The Internet media type of the message body must be given by the Content-Type header field.  If the body has undergone any encoding such as compression, then this MUST be indicated by the Content-   Encoding header field; otherwise, Content-Encoding MUST be omitted. If applicable, the character set of the message body is indicated as part of the Content-Type header-field value. The "multipart" MIME type defined in RFC 2046 [11] MAY be used within the body of the message.  Implementations that send requests containing multipart message bodies MUST send a session description as a non-multipart message body if the remote implementation requests this through an Accept header field that does not contain multipart. SIP messages MAY contain binary bodies or body parts. When the sender provides no explicit charset parameter, media subtypes of the "text" type are defined to have a default charset value of “UTF-8".

Request Message Types: the core SIP protocol defines the following request messages
• INVITE
– Invites a participant to a session
• BYE
– Ends a client’s participation in a session
• CANCEL
– Terminates a transaction
• OPTIONS
– Queries a participant about their media capabilities
• ACK
– For reliability and call acceptance (3- way handshake)
• REGISTER
–	Informs a SIP server about the location of a user

Overview

	SIP offers a discovery capability.  If a user wants to initiate a   session with another user, SIP must discover the current host(s) at which the destination user is reachable.  This discovery process is frequently accomplished by SIP network elements such as proxy servers and redirect servers which are responsible for receiving a request, determining where to send it based on knowledge of the location of the user, and then sending it there.  To do this, SIP network elements consult an abstract service known as a location service, which provides address bindings for a particular domain.  These address bindings map an incoming SIP or SIPS URI, Ultimately; a proxy will consult a location service that maps a received URI to the user agent(s) at which the desired recipient is currently residing.

   	Registration creates bindings in a location service for a particular   domain that associates an address-of-record URI with one or more contact addresses.  Thus, when a proxy for that domain receives a request whose Request-URI matches the address-of-record, the proxy will forward the request to the contact addresses registered to that address-of-record.  Generally, it only makes sense to register an address-of-record at a domain's location service when requests for that address-of-record would be routed to that domain.  In most cases, this means that the domain of the registration will need to match the domain in the URI of the address-of-record.

   	There are many ways by which the contents of the location service can be established.  One way is administratively. However, SIP provides a mechanism for a UA to create a binding explicitly.  This mechanism is known as registration. Registration entails sending a REGISTER request to a special type of UAS known as a registrar.  A registrar acts as the front end to the   location service for a domain, reading and writing mappings based on the contents of REGISTER requests.  A proxy server that is responsible for routing requests for that domain then typically consults this location service.

A brief description of AppletPhone's Working

Currently AppletPhone is able to handle calls, participate in unicast audio/text sessions, register itself with a registrar server, and display incoming MESSAGE request. To call someone it is need to enter his or her SIP URL in the top left corner field of the AppletPhone (the only editable field actually) and press Dial. 
Examples of correct addresses are: 
sip:emil_ivov@iptel.org
emil_ivov@yahoo.com
sip:emil_ivov@130.79.90.142:5060
Use Answer and Hangup to respectively answer and end calls. Registration status as well as the address, port and transport you are currently using is shown in the AppletPhone's status bar.

3.3 Feasibility Study

After the initial investigation the feasibility study is carried out to determine whether the proposed system id developed according to its workability, and impact on the organization with the available resources. Mainly there are three types of feasibility study. Three key considerations are involved in the feasibility.

•	Technical feasibility
•	Economical feasibility
•	Operational feasibility

The proposed system must be evaluated from a technical viewpoint first, and if technically feasible its impact on the organization must be assessed. If compatible, behavioral system can be devised. Then they must be tested for economical feasibility.

Technical feasibility

The assessment of technical feasibility must be based on an outline design of system requirements in terms of input, output, files, programs, and procedures. This can be qualified in terms of volumes of data, trends, frequency of updating, cycles of activity etc, in order to give an introduction of technical system. The proposed system is technically feasible because it provides technical guarantee of accuracy, reliability, ease of access, and data security.

Economical feasibility

Justification of any capital outlay is that it will reduce expenditure or improve the quality of service or goods, which in turn may be expected to provide increased profits. The technique of cost benefit analysis is often used a basis for assessing economic feasibility. The proposed system is economically feasible since it can be developed at a reasonable cost with the available hardware, software and manpower.

Operational Feasibility

The purpose of the operational feasibility study is to determine whether the new system will be used if it is developed and implemented. Also, it has to be determined whether there will be resistance from users that will be undermining the possible benefits. The proposed project is beneficial because it can be turned into a system that will meet the organization’s operating requirements. Since the request has been from the management as well as from the user, it does not have any operational barriers, so it is operationally feasible. 

4. SYSTEM DESIGN

	System design can be defined as a transition from a user’s view to the view of programmers and database personnel. Design is the only way where requirements are actually translated into finished software products or system. It is the phase in which the detailed design of the system selected in the study phase is accomplished.

The process of design involves conceiving and planning out in mind and making a drawing pattern or sketch off. The design is concerned with identifying software components, the general modular structure of the software, the function provided by the software and the internal data stream and stores. In the input design, user’s originated inputs are converted to computer-based format. In output design, the emphasis is given to producing a hard copy of the information requested for display the output on the CRT screen.

4.1	Input Design

Input design is the process of converting user-originated inputs to a computer-based format. Input design is an important part of development process since inaccurate input data are the most common cause of errors in data processing. Erroneous entries can be controlled by input design. Thus a detailed study has to be done to identify the inputs that are required for the various processes which are to be carefully analyzed and care has to be taken to avoid recurring of the same inputs.
It consists of developing specifications and procedures for entering data into a system and must be in a simple format. The goal of input data design is to make data entry easy, logical and error-free. The system is a menu-driven one. This simplifies computer data access or data entry. The design of the input covers all phases of input from the creation of initial data to actual entering of data to the system for processing.

In this project major inputs are SIP URLs of caller and callee and audio input to be transmitted to other end of communication. Through the GUI of the system SIP URLs are entered and microphone is used to record the audio data into sound card of PC.

4.2	Output Design

Outputs are the most important and direct source of information to the clients. Output design generally refers to the results and information that are generated by the system. For many end-users, output is the main reason for developing the system and the basis on which they will evaluate the usefulness of the application. Output means not just reports; these are generated from stored or calculated values.

The analysis of the objective of a system leads to determination of its outputs. The output from a system is the justification for its existence.  If the outputs are inadequate in any way, the system itself is inadequate. The basic requirements of output are that it should be accurate, timely and appropriate, in terms of contents, medium and layout for its intended purpose. Hence it is necessary to design the output so that the objectives of the system are met in the best possible manner.

	In this system AppletPhone the major output is received in the form of sound from any other remote or local system. Hence headset with the microphone is the main input and output device in this system. TraceViewer shows the signaling traces of communication in a GUI with SIP URL of caller, duration of call, packet size and the method of call. All the GUIs are designed with Java Swing components because they are more lightweight components than AWT components and they provide more attractive look and feel to the system.	

5. SYSTEM DEVELOPMENT

5.1 Module Description 
•	Graphical User Interface Module: -
This module is used to create the look and feel to the application. The technology used for this module is java Applet technology. Both awt and swing components are used to create the GUI model to give more attraction to the application user interface. Almost All the GUIs are designed with Java Swing components because they are more lightweight components than AWT components and they provide more attractive look and feel to the system. Important GUIs are given in Appendix II.

•	Media Module: -
This module handles the applications protocol handling; media type data source identification, and Audio streaming functionalities. It handles recording of data/audio data, and conversion of audio data to byte streams and all the media related works, until data packets are transmitted from application layer to network layer. This is the core module of the applet phone application. Application registers an implementation of the SipListener interface to interact with the SIP Stack. Application must register with the SipProvider for all messaging capabilities with the stack. Application requests transactions for stateful messaging; Application sends stateless messages and access stack objects. Application receives messages from the stack as Events via the SipListener interface. The architecture is developed for the J2SE environment therefore is event based utilizing the Listener/ Provider event model. There is a direct reference between the event provider and event consumer. Event consumer must register with the event provider.
•	Events encapsulate incoming Requests and Responses.
•	Event Model is one way that is application doesn’t send out events, it sends out messages.
•	The event model is asynchronous in nature using transactional identifiers to correlate messages.
•	The SipListener represents the event consumer and listens for incoming events that encapsulate messages that may be responses to initiated dialogs or new incoming dialogs.
•	The SipProvider is the event provider who receives messages from the network and passes them to the application as events.

SipStack Interface does the following things:

•	Manages Listening Points and Providers.
•	SipStack associated with an IP address -Can have multiple Listening    points.
•	Application can have multiple SipStacks.
•	Cannot be deleted once created.
•	Instantiated by the SipFactory and initialized with a property set.
•	Defines retransmission settings.
•	 Defines router information.

Stack Properties

IP_ ADDRESS
– Sets the IP Address of the SipStack. This property is mandatory.
STACK_ NAME
– Sets a user-friendly name to identify the underlying stack implementation. This property is mandatory.
OUTBOUND_ PROXY
– Sets the outbound proxy of the SIP Stack.
ROUTER_ PATH
– Sets the fully qualified class path to the application supplied Router object that determines how to route messages before a dialog is established.
EXTENSION_ METHODS
– This configuration value informs the underlying implementation of supported extension methods that create new dialogs.
RETRANSMISSION_ FILTER
–	A helper function for User Agents that enables the stack to handle retransmission of ACK Requests, 1XX and 2XX Responses to INVITE transactions for the application.

SipProvider Interface does the following things:

Register a SipListener to the SipProvider.
– Notifies registered Listener of Events
De- registers a SipListener from the SipProvider.
– Once de- registered, no longer receive Events from SipProvider.
Client and Server Transaction creation methods.
– For sending Request and Response messages state fully.
CallIdHeader creation method.
– Send Requests and Responses stateless.
Listening Point manipulation methods.
– Only one provider per listening point.

SipListener Interface does the following things:

A single SipListener per SipStack which implies a single Listener in the architecture. All SipProviders associated to a Sipstack have the same SipListener. Process Request's either statefully or statelessly dependent on application logic. Process Response's to a recently sent Request state fully. Process Transaction timeouts and retransmits Timer events.

Factories: JAIN SIP defines four different factories each with respective
responsibilities, namely:

SipFactory
– This interface defines methods to create new Stack objects and other factory objects.
AddressFactory
– This interface defines methods to create SipURI’s.
HeaderFactory
– This interface defines methods to create new Headers objects.
MessageFactory
– This interface defines methods to create new Request and Response objects.

•	Router Module: - 
This module is used to establish the connection with remote client. The communication between the host and remote client can be achieved by making use of the java.net package classes. SIP Express Router (SER) is an industrial-strength, VoIP server based on the session initiation protocol. It is engineered to power IP telephony infrastructures up to large scale. The server keeps track of users, sets up VoIP sessions, relays instant messages and creates space for new plug-in applications. 
The SIP Express Router is extremely configurable to allow the creation of various routing and admission policies as well as setting up new and customized services. In this module programs are written to configure with SIP Router.

•	Tracer Viewer Module: -
TraceViewer is used as an integrated part of AppletPhone for visualizing SIP signaling traces. The Trace Viewer allows you to browse the debug log and message trace using the same UI when this option is used. This process is much helpful if we consider the manual signal tracing. And using this utility can also set the log file size restriction. Java Applet collects and visualizes distributed call flow trace files that can take input from an ethereal/stack trace. It is augmented with XML script state information and also enables debugging call flows & test scripts. 
Every message that passing through the stack can be visualized on a java swing GUI. Produce a signaling trace from the discrete event simulation and view the trace using the trace viewer tool. TraceViewer shows the signaling traces of communication in a GUI with SIP URL of caller, duration of call, packet size and the method of call. The "real system" uses the same interfaces as the simulated system so the signaling part of your application will not need to change. The reason why XML is used for creating the scripts are as follows: -

•	XML is hierarchical -good way to represent SIP protocol abstractions
•	Interoperability testing with control
•	Typically components are tested in call flow scenarios
•	Typically operating in an un-controlled environment 

6. TESING AND IMPLEMENTATION

6.1 Testing

	Testing is vital to the success of the system. Errors can be injected at any stage during development. System testing makes a logical assumption that if all the parts of the system are correct, the goal will be successfully achieved. During testing, the program to be tested is executed with set of test data and the output of the program for the test data is evaluated to determine if the program is performing as expected. Testing is the process of executing a program with the intent of finding any errors. A good test of course, has the high probability of finding a yet undiscovered error. A successful testing is the one that uncovers a yet undiscovered error. A test is vital to the success of the system. System test makes a logical assumption that if all parts of the system are correct, then goal will be successfully achieved.

Purpose of Testing

Testing is a vital to the success of the system. System testing makes a logical assumption that if all parts of the system are correct, the goal will be successfully achieved. The following points shows how testing is essential:
		
•	Existence of program defects of inadequacies is inferred.
•	Verifies whether the software behaves as intended by its designer
•	Checks conformance with requirement specification/user needs
•	Assesses the operational reliability of the system
•	Tests the performance of the system
•	Reflect the frequencies of actual user inputs
•	Find the fault which caused the output anomaly
•	Detect faults and deficiencies in the requirements
•	Checks whether the software is operationally useful
•	Exercises the program using data like the real data processed by the program
•	Tests the system capabilities
•	Judges whether or not the program is usable in practice

Blackbox testing

Blackbox testing focuses on the basic needs of the software and on the input and output of module. It enables the software engineer to desire sets of input conditions that will truly exercise all fundamental requirements of a program. Blackbox testing is a contemporary approach that is likely to uncover different class of errors. It attempts to find that errors in the following category.
•	Errors in database structure and database access
•	Incorrect and missing functions
•	Performance errors
•	Initialization and Termination errors

Whitebox testing

Whitebox testing is test case design method that controls structure of the procedural design to drive test cases. Using this testing method software engineer can test case that:
		
•	Exercises an logical decision on their ‘true’ or ‘false’ sides
•	Guarantee that all independent paths with an module have been exercised at least once
•	Exercise internal data structure to ensure validity
•	Execute all loops at their boundaries and their operational bounds.

System testing is the stage of implementation, which is aimed at ensuring that the system works accurately and efficiently before live operation commences. Testing is the process of executing the program with the intent of finding errors and missing operations and also a complete verification to determine whether the objectives are met and the user requirements are satisfied. The ultimate aim is quality assurance.

Tests are carried out and the results are compared with the expected document. In the case of erroneous results, debugging is done. Using detailed testing strategies a test plan is carried out on each module. The various tests performed in “AppletPhone” are unit testing, integration testing, validation testing, output testing and user acceptance testing.

Unit Testing

The software units in a system are modules and routines that are assembled and integrated to perform a specific function. Unit testing focuses on modules, independently of one another, to locate errors. This enables to detect errors in coding and logic that are contained within each module. This testing includes entering data and ascertaining if the value matches to the type and size supported by Java.

Integration Testing

Data can be lost across any interface, one module can have an adverse effect on another, sub functions when combined, may not produce the desired major functions. Integration testing is a systematic testing to discover errors associated within the interface. All the modules are combined and tested as a whole. This testing provides the assurance that the application is well-integrated functional unit with a smooth transition of data.

Validation testing

This is where requirements established as a part of software requirement analysis is validated against the software that has been constructed. This test provides the final assurance that the software meets all functional, behavioral and performance requirements. The errors, which are uncovered during the integration testing, are corrected during this phase.

Output Testing

After performing the validation testing, the next step is output testing of the proposed system, since no system could be useful if it does not produce the required output in the specific format. Asking the users abut the format required by them, tests the outputs generated or displayed by the system under consideration. Here, the output format is considered in two ways: one is on screen and another is printed format. The output format on the screen is found to be correct as the format was designed in the system design phase according to the user needs. For the hard copy also, the output comes out as the specified requirements by the user. Hence, output testing does not testing does not result in any correction in the system.

User Acceptance Testing

User acceptance of a system is the key factor for the success of any system. The system under consideration is tested for user acceptance by constantly keeping in touch with the prospective system users at time of developing and making changes wherever required. This is done with regard to the following points:
•	Input screen design
•	Output screen design
•	Online message guide to user
•	Menu driven system

6.2 System Implementation
Implementation is the stage in the project where the theoretical design is turned into a working system and is giving confidence on the new system for the users that it will work efficiently and effectively. It involves careful planning, investigation of the current system and its constraints on implementation, design of methods to achieve the change over, an evaluation of change over methods. Apart from planning major task of preparing the implementation process begins with preparing a plan for the implementation of the system. According to this plan, the activities are to be carried out, discussions made regarding the equipment and resources and the additional equipment has to be acquired to implement the new system.

Implementation is the final and the most important phase. The most critical stage in achieving a successful new system is giving the users confidence that the new system will work and be effective. The system can be implemented only after thorough testing is done and if it is found to be working according to the specification. This method also offers the greatest security since the old system can take over if any errors are found or the new system is unable to handle certain type of transactions.

User Training

After the system is implemented successfully, training of the user is one of the most important subtasks of the developer. For this purpose, user manuals are prepared and handled over to the user to operate the developed system. Thus, the users are trained to operate the developed system. Both the hardware and software securities are made to run the developed systems successfully in future. In order to put new application system into use, the following activities were taken care of:

•	Preparation of user and system documentation
•	Conducting user training with demo
•	Test run for some period to ensure smooth switching over of the system.

The users are trained to use the newly developed functions. User manuals describing the procedures for using the functions listed on the menu are circulated to all the users. It is confirmed that the system is implemented up to the user’s need and expectations.

Security and Maintenance

Maintenance involves the software industry captive, typing up system resources. It means restoring something to its original condition. Maintenance follows conversion to the extent that changes are necessary to maintain satisfactory operations relative to the user’s environment. Maintenance often includes minor enhancements or corrections to problems that surface in the system’s operation. Maintenance is also done based on fixing the problems reported, changing the interface with other software or hardware enhancing the software.

Password protection and simple procedures to prevent the unauthorized access are provided to the users. The system allows the user to enter the system only through proper username and password.

7. CONCLUSION

The third generation communication systems are based on IP networks. That is voice will be transferred via Internet Protocol (IP). AppletPhone is the Java interface to the communication protocol SIP and it is a Voice over IP application, transforming voice into data packets and transmitting them on the same network as emails and files. Session Initiation Protocol (SIP) is a signaling protocol for creating, modifying and destroying dialogs between multiple endpoints. Hence SIP is ideal for building telephony applications and API provides a complete set of functionality for managing calls between users.

Currently AppletPhone is able to handle calls, participate in unicast audio sessions, register itself with a registrar server, and display incoming MESSAGE request. TraceViewer is used as an integrated part of AppletPhone for visualizing SIP signaling traces. The Trace Viewer allows us to browse the debug log and message trace using the same UI when this option is used. TraceViewer shows the signaling traces of communication in a GUI with SIP URL of caller, duration of call, packet size and the method of call. This process is much helpful if we consider the manual signal tracing. Hence it will become an inevitable system in the world of communication.

8. SCOPE FOR FURTHER DEVOLOPMENT

Now AppletPhone is implemented Voice Over Internet Protocol (VOIP) concept and which is capable for PC-to-PC voice communication. Communication is taking place between any two local or remote PCs. At present it is impossible for this system to make a connection with Public Switch Telephone Network. AppletPhone uses SIP URIs to dial to any other user; it cannot dial to PSTN since they are not providing any URIs to their land-phones. In future if telephone providers allot a SIP URI along with the telephone number it will be possible to communicate with those phones. 

Similarly to make land-phone to PC connection using SIP, it is necessary to provide a facility in PSTN phones for dialing to SIP URIs along with the telephone numbers. It will be a necessary thing in the coming world of communication and it will make low cost PC-to-Telephone communication along with PC-to-PC communication.

9. BIBLIOGRAPHY

9.1 Books Referred

1. Herbert Schildt “The Complete Reference Java 2”
    Tata McGraw Hill International Publications, Fifth Edition
2. Roger S. Pressman “Software Engineering”
    Tata McGraw Hill International Publications, 1997, Fifth Edition
4. Alan B. Johnston “SIP: Understanding The Session Initiation Protocol”
    Sun Microsystems
5. Phelim O’Doherty “JAIN SIP Tutorial”
    Sun Microsystems

9.2 Sites Referred

1. http://www.iptel.org/
2. http://www.sipphone.com/
3. http://www.pingtel.com/
4. http://www.sip.com/

10. APPENDIX

Appendix I - Flow Diagrams

Context Level Flow Diagra

User panel to enter the destination IP, Dial, Answer and Hang Up operations

Internet or Intranet Client

Applet Phone Application

System Flow Diagram

SIP communicator with Not Registered Status 

SIP Authentication

Enter Username and Password 

Click Login Button

SIP communicator with Registered As Specified user

Dial User

Enter the SIP address of any other user

Click Dial Button

Yes

Send OK Signal to the Caller through Proxy

Send INVITE signal with ‘from’ and ‘to’ addressees to the Proxy

Forward this to SIP Server

SIP Server Invites Destination user (Alerting at Other end) 

Is Callee Online ?

Return Call Rejected Message

No

Dialing

  A

  A

Caller sends ACK Signal to the Callee

Enters into Connected State

Transmitting Media Streams between Caller and Calle

User clicks Hang-Up Button

Terminates the Connection

End

Configuration Wizard-Flow Diagram

SIP Communicator Configuration Wizard
Shows welcome page

Click Next Button

Enter user name and SIP address

Click Next Button

Enter SIP Server name and SIP address

Click Next Button

Perform Java Media Framework Initialization

Click Next Button

Shows summary information for 
Verification

Click Finish Button

Select IP address to be used

Click Next Button

Configuration Completed

Appendix II - Screen Layouts

1. AppletPhone In Not Registered Status

2. AppletPhone Authentication

3. AppletPhone In Registered Status - Dialing To Other User

4. AppletPhone Connected With Other User

 

5. Configuration Title Of AppletPhone

6. JMF Registry Editor Window

7. Configuration Wizard 

8. Configuration Wizard –Page 2

9. Configuration Wizard –Page 3

10. Configuration Wizard –Page 4

11. Configuration Wizard –Page 5

12. Configuration Wizard –Page 6

13. AppletPhone Proxy Interface

14. TraceViewer Window

15. Sessions Displayer Of TraceViewer