Software Architecture Design

There are 11 Java objects, each of which can be catagorized as either a client-server component, a protocol message handler or a GUI component. The following is the descriptions of those objects.


Simphony Object

This is the main class of Simphony which needs to be started from the shell. The Simphony process serves both as a server and a client, using multiple threads. Therefore it is the only process the user needs to start and is meant to be running in the background permanently on the user's desktop computer.

The server components are instantiated as follows: When Simphony is started, it first spawns a "SipServer" object as a background thread. This SipServer object serves as a simple SIP server, accepting the initial socket connection request for all incoming calls. There is only one instance of SipServer per given Simphony instance. For each new call, SipServer in turn spawns a UAServer thread object and hands over the connection management. It is this UAServer object from this point on that handles the SIP transaction with the client. There can be multiple instances of UAServer objects as Simphony wants to allow the user to handle multiple calls at a given time. (currently this does not work well because of media device contention.)

The foreground process serves as a client, presenting the user with a GUI of the main menu. Upon user selecting an option from the menu, an appropriate dialog box will pop up, allowing the user to enter whatever information is necessary to perfrom the specified tasks. Currently implemented menu options and the corresponding GUI objects that are created by the main menu are as follows:

  1. Call Box - to make an outgoing call --> CallerDialog
  2. Media Agents - to set media agents --> MediaDialog
  3. Call Forwarding - to register for redirection --> RegisterDialog
  4. directory (speed dial - not implemented yet)
  5. help (not implemented yet)


CallerDialog Object

The CallerDialog object is a GUI component which is instantiated by the Simphony object when the user selects the "Call Box" option from the main menu. It allows the user to enter the necessary information to place an outgoing call. Once the user starts an invitation by clicking on the Call button, it spawns an inner class thread to handle the SIP transaction.

This inner class thread object effectively serves as a "user agent client", handling the SIP transaction with the server on the terminating host. This thread implmentation within the CallerDialog object allows the user to interact with Simphony while the call is progressing. For instance, this allows the user to cancel the call while the phone is ringing on the callee's host. In this case the BYE message will be sent to the server, ohterwise the INVITE message will be resend every 5 second until a final response message is received. Any type of final response from the server will be acknowledged by sending the ACK message to the server.

The CallerDialog object also instantiates a SIP object and a SDP object. These objects construct SIP message headers and SDP descriptions respectively using the session/call information entered by the user. The client uses the methods provided these two objects to construct, send, receive and parse the SIP and SDP messages.


SipServer Object

SipServer is a thread object that is spawned by the main Simphony object at startup. There will be only one instance of SipServer per given Simphony instance. It serves as a very simple SIP server or a front-end to the UAServer (user agent server) by accepting the initial socket connection request for all incoming calls on a predefind port 5060. It spawns a UAServer thread for each incoming call, passing the socket handle.


UAServer Object

This object represents the user agent server and is implemented as a thread that is spawned by the SipServer object every time there is an incoming call. The life of this server thread is only for the duration of a single call and ends at the termination of the call.

Once a valid INVITE message is received, the server implements the Finger protocol on the local port 79 to see if the callee is currently logged on. If not, it responds to the client with the "604 Does not exist anywhere" response message. It also checks if the user has set the call forwading feature. In this case, the server responds with the "302 Moved temporarily" response message with a Location header indicating the new terminating address where the call should be redirected to.

Once the callee has been found to be logged in the machine, the server plays the telephone ring audio file and pops up the CalleeDialog box displaying the information on the incoming call. The telephone ring will be played for each INVITE message received, which is repeated every 5 second until the user responds to the call either by accepting or rejecting the call. The list of supported SIP response messages include:

The server object also reads SDP messages using the SDP object methods and uses the connection description value as the destination ip address for the media session it will be starting. The SIP Implementation section also explains the scheme.


CalleeDialog Object

The CalleeDialog object is created by the UAServer object to provide a GUI for the incoming call. For each incoming call this dialog box is displayed to the user with information such as caller's identity, originating address, subject, priority, and connection type. In case of a multicast session it also displays the session name and description. It also provides the user with an option to either accept or reject the incoming call by clicking on a button. This user's action causes an appropriate method on the UAServer object to be invoked, which will then send the corresponding SIP response message to the client.


SIP Object

The SIP object encapsulates SIP message contents and provides methods to construct, send, receive and parse SIP messages over the given TCP/IP connection. It is used by both the client (the inner thread object within the CallerDialog object) and server (the UAServer object). The client construct a SIP object based on the user input collected from the CallerDialog box. The server constructs it by reading an INVITE message from the socket input stream. For the list of SIP message headers and status codes Simphony supports, please refer to the SIP Implementation section.


SDP Object

The SDP object encapsulates SDP description contents and provides methods to construct, send, receive and parse SDP messages over the given TCP/IP connection. It is used by both the client and server. The client construct a SDP object based on the user input collected from both the CallerDialog and MediaDialog boxes. The server constructs a SDP object from the SDP descriptions read from the given socket input stream following an INVITE message. For the list of session description Simphony currently supports, please refer to the SIP Implementation section.


Media Object

The Media object stores information about a media agent and provides the methods to access the data and to start the executable. Currently the only information the user is allowed to define is the name of the executable and the pathname of of the directory containing the executable. Other attributes such as port number, transport, and format are predefined based on the media type.


MediaDialog Object

This dialog box allows users to define media agents they want to use during session. There can be up to three media agents, one for each media type, namely, audio, video, and application. The user enters the name of the media agent's executable name and the absolute pathname of the directory where the executable resides. For each media agent the user enters a corresponding Media object will be created.


ConfDialog Object

This is a dialog box to allow the user to enter conference session description such as session name, information, and most importantly multicast address. It is invoked from the CallerDialog box when the user selects conference as the type of call s/he wishes to make. The information is cached in Simphony until the user explicitly clears them.


RegisterDialog Object

The RegisterDialog box is created and/or displayed when the user clicks on the Call Forwarding option from the main menu. The dialog box allows the user to register for call forwarding by entering the user id and the host address where calls should be redirected to. This information is cached in the Simphony object as static variables. As long as these fields are set, all calls with matching callee id will be redirected to the specified address. To turn off the call forwarding feature, the user must clears(unset) the data from this dialog box,

Back to the Main page
Last updated: August 19th, 1998