ISDN Server Project Report

Introduction

  This is a report for the continuing work of  ISDN project .

Overview

   ISDN server is implemented to accept control commands, translate them into appropriate Q931 messages, and
then send the Q931 messages to ISDN network to make or answer calls.  ISDN  server also knows how and when
to bring up, close, and config the media agent.  A Java version of ISDN client is written.  It has a GUI for user
to make calls and answer calls.  It also generates ring tones for incoming calls and brings up the media agent.

Definition

    Media Agent:    Program deal with voice, data, or video compression and transmission.  In the project,  NeVot  is
                               used as the media agent for voice transmission.
     PMM :    Control messages for media agent.
 
ISDN Server
 
   After initialization, ISDN server is in an event loop waiting for events.  There are 3 types of events based on where
events come from: events from ISDN network, events from Standard Output, and events from UDP Port 3344(for AT-style
messages).   ISDN  server currently has 2 states : ready and call.  The following describes how ISDN server answers a call, places a call, and terminate a call.
1. While there is an incoming call, ISDN server receives a Call event from ISDN network, and it update the state to call and sends RING to ISDN client.  On the client side, after user presses the connect button, the client sends ATA to ISDN server.  After ISDN server receives ATA from the client,  it sends Connect to ISDN network and start the media agent.  The conversation can then start.  On the client side, if user presses disconnect button, ISDN server receives ATH.  ISDN server then sends Release to ISDN network.  And the call is terminated as well as the media agent, and the state is changed back to ready.
2. On the client side, after user enter the phone number and presses the connect button, ISDN server receives "ATDT phonenumber".
ISDN server then sends Call event to ISDN network.  After the remote user answers the phone,  ISDN server receives Connect event
from the ISDN network.  ISDN server then brings up NeVot.  Conversation starts.  After the callee hangs up the phone, a Release
event is sent to ISDN server, and the ISDN server sends ATH to ISDN client and terminate the NeVot.
 

ISDN Client

  The client is written in Java, it is composed of a GUI, an AT-style messages receiver and handler.  The client listens to the
port 8899 for incoming AT-styles messages, and then process the messages.  It also composes the AT-style messages, and
send them to ISDN server for initiating a call or accept a call.
 

Media Agent

    The media agent here is NeVot.  The version of NeVot running on ISDN client side read and write data from and to /dev/audio.
The version of NeVot running on ISDN server side can only read and write data from and to one B channel of ISDN. The software uses /dev/isdn/0/te/b1.
 

Multicast Library

   I have developed a multicast library in c after modifying SIP library's codes.
 

ISDN Server Sequence Diagram

    1.  Call made from ISDN server and terminated by the callee
    2.  Call made to ISDN server and terminated by the callee
 
Test Cases

    Before doing tests, bring both ISDN server and ISDN client.
    To bring up ISDN server, type "isdnserver hostname" [hostname is the name where ISDN client resides.  Default is ind.cs.columbia.edu]
    To bring up ISDN client, type "java isdnphone.Isdnphone"
    1. Make a call from ISDN server, and the remote phone rings.  After the call is answered, ISDN server brings up its media
        agent, and ISDN client also brings up its media agent.  Users can then talk.  After callee hangs up the phone, ISDN server
        close its media agent.  User need to manually close the media agent on ISDN client side.
    2. Use a phone to call  the ISDN server (current number is 9610195).  The ISDN client should generate the rings.  User
        press connect button, then ISDN server and client brings up their media agents.  Users can then talk.  After user
        press disconnect button, ISDN server close its media agent.  The caller then hears nothing from the ISDN side.

Future Development

    1.  Implement ISDN server to parse SIP messages
    2.  Implement a NeVot daemon process instead of using the GUI one
    3.  It might be a good idea to separate the logic of dealing with media agent from ISDN server and put them in
         another process.  PMM messages can be used for communication between the two.
    4.  Add logic in NeVot on ISDN side to distinguish busy tone and ringback tone.

Problems

     1. There is a problem in handling a call to an offhook non-ISDN phone.  The scenario is described as below :
          Currently, a call to a busy or non-busy non-isdn phone,  ISDN server receives the same Q931 messages.
          However, the tone played on the caller side is busy tone for a busy callee , ring back tone for a nonbusy callee.
 
 
References

 Download source codes (REAME files are provided for both ISDN client and server for detailed description)