INTERNET TELEPHONY (ITX):
DIRECTORY SERVICE
A Design Project Report
Presented to the Engineering Division of the Graduate School
of Cornell University
in Partial Fulfillment of the Requirements for the Degree of
Master of Engineering (Electrical)
by
Char Shing Wilson Ng
Project Advisor: Srinivasan Keshav
Degree Date: August 1999
Abstract
Master of Electrical Engineering Program
Cornell University
Design Project Report
Project title: Internet Telephony (ITX): Directory Service
Author: Char Shing Wilson Ng
Abstract: This report presents the Directory Service, part of the ITX joint project, which aims to provide an IP-Telephony computing architecture to enable the use of Internet for telephony. The core ITX platform consists of four necessary components: Signaling, Data, Gateway, and Directory Service. These core components expose a set of Java APIs on which many different kinds of ITX telephony applications can be developed. Directory Service provides a "phone book" lookup service for all registered users in the ITX network. It dynamically keeps track of each user's currently reachable locations, as well as his/her preset and customized locations, so that he/she can be reached anywhere from the telephone network as well as the Internet. Moreover, it also keeps information about ITX application, such as the Gateway, so that applications can find each other. It is a distributed database system in which multiple client-server components interact and cooperate with each other to provide the illusion of a single centralized directory service. This report examines the requirements of the directory service, evaluates a range of approach and solution, details its design and implementation, and analyzes its performance.
Report Approval by
Project Advisor: __________________________________ Date: _________________
Directory service is one of the core components in the ITX system to provide IP-Telephony computing architecture to enable communication capable devices talking with each other. It is designed and implemented as a distributed database system, in which client API components (encapsulated in ITX-compliant applications) interact and cooperate with the database server component in a coordinate fashion to provide the illusion of a single centralized directory service. The database server component is implemented through extending the BIND implementation, which is already a robust and mature architecture. The client API component is platform-independent to support application interoperability. The client communicator (responsible for communication with the database server) is designed in a flexible way, so that any database server solution can be plugged in and interfaced with the communicator, in order to adapt to any system environment constraints. The directory service achieves: 1) scalability provided by the BIND hierarchical approach; 2) fault tolerant provided by primary-secondary server setup and log-based persistence scheme; 3) data replication provided by zone transfer between primary and secondary; 4) failure detection provided by an efficient resolver mechanism; 5) security and authentication provided by the client API component and the BIND server. Overall, the directory service provides availability and reliability guarantees. The satisfactory performance result is achieved by choosing this implementation choice.
Executive Summary
*Table of Contents
*Project Overview
*Design Problem
*Approach and solution
*Design and Implementation
*Database Schema
*Database Server
*Client API
*Client Communicator
*Results Analysis
*Appendix
*Description of database files used by Directory database server
*Installation instruction on BIND server
*Classes/Methods description - Directory Service Client API
*This joint project (ITX project) is to build a telephony network computing architecture layered over the telephone network and the Internet to enable communication capable devices of any kind (computers, telephones, handheld or mobile PCs, etc.) talking to each other. It allows voice data to be sent between one communication device (such as a telephone or a PC with speaker and microphone) and another communication device. The ITX platform handles all the complexity of the following operations:
In addition, the ITX platform exposes a set of powerful application programming interface (API) by which ITX-compliant IP-Telephony applications can be developed. Application programmers are freed from the above complexity and only need to worry about their business logic at the application layer.
The following four core components in the ITX system are necessary to enable Internet Telephony:
In this ITX project, my responsibility is to design and implement one of the ITX core components: the Directory Service. The directory service is logically running as a centralized entity, but is physically distributed. It is made up of multiple client-server components that interact and cooperate with each other to provide the illusion of a single centralized directory service.
Among all core components, directory service sits at the central piece of the whole project. It consists the centralized database server that stores information about users in the ITX network and provides information retrieval, updates as well as various lookups. Each ITX application contains a directory service client component to interact and exchange information with the database server in a coordinated fashion.
This client-server framework allows a user on his/her ITX application, containing the directory service client component, to transparently locate other users in the ITX network by communicating with the directory server. The directory service layer is completely hidden from the ITX application layer, so that only the signaling layer is responsible for interfacing with the directory service on behalf of the user application. Alternatively, ITX application layer can directly access the functionality of the directory service by getting its handle through the signaling component.
Users of the directory service fall into a wide range. For example, the signaling component that resides in each ITX application directly interfaces with the directory service client component. Specialized server applications such as the gateway server, voice/email server, conferencing server are using directory service, so that they can be located by other user applications using the directory service as well.
Several distributed system properties need to be considered when designing the distributed directory service:
On the other hand, the directory service provides the following application-specific features:
The following three approaches have been considered in designing and implementing the directory service. After evaluating tradeoffs between using different approaches, I decided to choose DNS-based client-server approach. Evaluations on the three approaches are described as follows:
Using this approach to design and implement the directory service results in disadvantages far out-weighting advantages. The advantage is that the implementation can be very flexible, without under the constraints of existing implemented component such as platform dependence, different language implementation, and lack of extensibility. However, implementing the distributed directory service from scratch, especially taking into account different distributed system properties mentioned above, can be a complicated and insurmountable task.
There are wide variety of software tools and components to support implementing this approach. The communication between the client and the server components is HTTP-based. Basically, on the client side, client communicates with the web-based database server by sending HTTP request and receiving HTTP response. Database server processes and translates the request into a series of database transactions to communicate with the local database storage. This is a common and typical approach to provide proprietary data services. However, this approach does not satisfy our requirement of ITX system for the following reasons. First, the latency characteristic of this approach cannot provide certain degree of real-time characteristic guarantee to our system requirement. For example, the signaling component needs to communicate with the directory service component to setup and establish calls. The directory service needs to guarantee efficient response time (low latency guarantee), so that user should not feel any difference in using our ITX system to make calls than using the telephone system. The latency of using the web-based client-server approach can be unpredictably high, which can undermine our overall system's performance to provide consistent real-time guarantee. Second, there is no single software solution to fulfill our system requirement of distributed system properties. The implementation of this approach requires an integration of different software products to work coherently as a single system. Complications arise to evaluate different proprietary software products to the same solutions, and to make decision on choosing the suitable set of integration to fit our requirement. Cost of system updates and maintenance is also comparatively high in terms of the number of proprietary solutions chosen for building our system.
Domain Name System (DNS) is known to be the most successful distributed name service in the Internet. Its main responsibility is to provide name-to-address resolution for the entire Internet, which in other words provides translations between identifiers.
The DNS is distributed in hierarchical nature, instead of being centralized which is prone to central point of failure. It consists of distributed name servers, each being responsible for a sub-tree of name space partitioned into different domains. In other words, DNS is a distributed database system. It has robust and stable implementation architecture called BIND (which stands for Berkeley Internet Name Domain). BIND provides the following characteristics:
BIND is freely distributed and is fully supported by the Internet Software Consortium. It is portable on many different operating system platforms such as Solaris, HPUX, Linux, Ultrix, SunOS, and Windows, etc. Backward compatibility is also supported across different release versions.
The chosen of this approach is based on the mature and robust implementation architecture which has been justified by the popular use in the Internet community, and also on the role and functionality of DNS which best fit into the design requirement of the directory service. Moreover, most of the distributed system properties such as fault tolerant, scalability, availability, and failure detection, etc. has been implemented and taken care of in BIND. BIND guarantees low latency behavior (very efficient response time), which is a very desirable feature to the directory service. Lastly, the entire software product is free and provided by one organization, which saves substantial amount of cost for updates and maintenance.
The design of the directory service is basically decomposed into 4 parts:
The database schema is responsible for organization of the data. The fundamental question to address is the kinds of data the directory service stores, and how to organize those data in the database storage. The more well organized the data is stored in the database, the more efficient the server can retrieve the data. Of course, the efficiency of data access also depends on its available retrieval and serialization mechanisms and available data types supported.
The database server is responsible for interfacing with the client and the database storage. The server job is to accept queries from the clients; queries can be either update or lookup queries, which will then be parsed and translated into database commands to communicate with the database. In addition, the server is designed to take into account different distributed system properties mentioned above.
The client API is responsible for interfacing with the users and the client communicator (described next). It is the application programming interface (API) exposed to the users to use the functionality of the directory service. The client API is freed from server communication mechanism, the job of the client communicator. The interface is designed to be intuitive to use.
The client communicator is responsible for providing directory service a communication mechanism to the database server. It job is to hide the complexity of communicating with the server by providing a communication interface layer to the client API.
This area consists of two stages. The first stage is mainly the design phase: to determine the kinds of data directory service needs to maintain, and organize the data into separate relational entities or tables. The second stage is the implementation phase: to integrate the design into the existing BIND implementation.
First Stage:
The following three major categories of data were identified to be stored in the directory database:
The following describes different relational entities (tables) to organize the above data categories:
This entity is used to store extension numbers having been assigned and distributed so far by the directory service administrator. Each entry contains one field, the assigned extension number (the number of digits is from 1 to 7). Only administrator can manipulate this entity to assign extension numbers.
This entity maintains each registered user profile's entry. Each newly registered user must have one associated entry. Each entry contains three fields: extension number, user ID, and custom message. User ID is associated EITHER with a registered person in the form of email address OR with a registered server ITX-application. Therefore, "user" in ITX system represents a physical person or a server ITX-application. An entry is searched by the extension number. An example of an entry is shown below.
Extension |
User ID |
Custom Message (Optional) |
123 |
John Hudson |
This entity contains security information for each registered user. Each newly registered user must have one associated entry. Each entry contains three fields: user ID, password, and access level. An entry is searched by the user ID. Password and access level are assigned by the directory service administrator. Only the password can be changed by the associated user. An entry is searched by the user ID. An example of an entry is shown below.
User ID |
Password |
Access level |
45364223 (encoded hash code) |
user access |
This entity maintains each registered user a roaming location. Each registered user has zero or at most one associated entry. Each entry contains two fields: user's extension number and location. An entry is searched by the extension number. An example of an entry is shown below.
Extension |
(Roaming) Location |
123 |
Internet location at host "host001.cs.cornell.edu" and port 4000 running Spot ITX application |
This entity maintains each registered user a list of dynamic locations. When more than one ITX-application is running on behalf of a user, one location of an application enters the roaming location entity, and the rest enter the dynamic location list entity. Each registered user can have zero or more than one entry. Each entry contains two fields: user's extension number and location. An entry is searched by the extension number. An example of 2 entries associated with the same user is shown below.
Extension |
(Dynamic) Location |
123 |
Internet location at host " host001.cs.cornell.edu" and port 4001 running CUPS ITX application |
123 |
Internet location at host " host001.cs.cornell.edu" and port 4002 running APP3 ITX application |
This entity maintains each registered user a list of default locations. User can optionally setup a list of static locations to be reached at any time. Home phone number is one example. Another example is user can also specify another user as default "forwarding" location. Each registered user can have zero or more than one entry. Each entry contains two fields: user's extension number and location. An entry is searched by the extension number. An example of 2 entries associated with the same user is shown below.
Extension |
(Default) Location |
123 |
home telephone location at 607-2554540 |
123 |
user location at ae21@cornell.edu |
These two entities maintain each registered user a list of custom location Ids. User can optionally setup a list of static locations to be reached at a specific time period. In addition to providing the same setup mechanism as in the default location list entity, the user can also setup the valid time period to use the custom location. Each registered user can have zero or more than one entry.
For the Custom Location ID List entity, Each registered user can have zero or more than one entry. Each entry contains two fields: user's extension number and custom location ID. An entry is searched by the extension number. An example of 2 entries associated with the same user is shown below.
Extension |
Custom Location ID |
123 |
123.1 |
123 |
123.2 |
Custom Location ID |
Start Time |
End Time |
Location |
123.1 |
8:00.00am 3/4/1998 |
5:00.00pm 3/4/1998 |
cellular telephone location at 607-2563456 |
123.1 |
8:00.00am 3/4/1998 |
5:00.00pm 3/4/1998 |
cellular telephone location at 607-2563457 |
Second Stage:
To integrate the entities defined above into the existing BIND, we need to understand the existing mechanisms provided by BIND to create database storage (For the details on the BIND implementation, please refers to the book, "DNS and BIND" by Paul Albitz and Cricket Liu). An extensive amount of time was spent on the book and related sources (such as the BIND web page and mailing list) to understand how BIND works. Basically, each entity is designed to be managed and serialized under different zones (a zone can be analogous to an entity name). Each zone is defined in a separate database file. DNS resource record is the storage format and syntax used in the database file.
The following zones were defined for each entity defined above:
One database file is created for each zone. Below shows the content of a database file for the zone "ext.to.user" (the explanation for the rest of the database files can be found in the appendix section):
$ORIGIN to.user.
ext IN NS sim1.cs.cornell.edu.
ext IN SOA sim1.cs.cornell.edu. itx.cs.cornell.edu. (
10800 ; Refresh after 3 hours
604800 ; Expire after 1 week
86400 ) ; Minimum TTL of 1 day
$ORIGIN ext.to.user.
123 0 IN TXT "userid=jh23@cornell.edu;custmsg=John Hudson"
10015 0 IN TXT "userid=guest;custmsg=Guest Account"
1 0 IN TXT "userid=adm;custmsg=Administrator"
As mentioned before, the format and syntax used to write the database file is defined by DNS resource record. From the above database file, there are three different resource records defined:
<extension number> 0 IN TXT "userid=<user>; custmsg=<description>"
The above database file shows there are three entries existed.
For details of the definition of resource records, please refers to the book, "DNS and BIND" by Paul Albitz and Cricket Liu.
To run the database server for the directory service, the BIND source code needs to be downloaded and installed. The details on download, installation, and running are fully explained in the appendix section.
After the installation, before the database server starts running, three pre-existing files are needed:
0.0.127.in-addr.arpa. IN NS sim1.cs.cornell.edu.
0.0.127.in-addr.arpa. IN SOA sim1.cs.cornell.edu. itx.cs.cornell.edu. (
1 ; Serial
10800 ; Refresh after 3 hours
3600 ; Retry after 1 hour
604800 ; Expire after 1 week
86400 ) ; Minimum TTL of 1 day
1.0.0.127.in-addr.arpa. IN PTR localhost.
The first entry is the name server (NS) resource record. The second entry is the start of authority (SOA) resource record. The third entry is the pointer (PTR) resource record, used for address-to-canonical-name mapping.
// BIND configuration file for the primary server
options {
directory "/amd/sim1/z/itx_ds/primary";
// place any additional options here
};
zone "extdistrib1.itx.cnrg" in {
type master;
file "db.extdistrib1";
};
zone "extdistrib2.itx.cnrg" in {
type master;
file "db.extdistrib2";
};
…
…
zone "ext.to.user" in {
type master;
file "db.ext2user";
};
…
…
zone "0.0.127.in-addr.arpa" in {
type master;
file "db.127.0.0";
};
zone "." in {
type hint;
file "db.cache";
};
The options statement sets up global options to be used by BIND. This statement may appear at only once in a configuration file; if more than one occurrence is found, the first occurrence determines the actual options used, and a warning will be generated. If there is no options statement, an options block with each option set to its default will be used (Please refer to http://www.isc.org/bind8/options.html for details.).
Each zone statement represents each database domain information. For example, the domain "extdistrib1.itx.cnrg" resides on the database file "db.extdistrib1"; it is of type master, which indicates it is a primary database server. The last two zone statements are standard for the configuration.
The above setup is for the primary database servers. For the setup of the secondary database servers, the only database files needed are the three pre-existing files described above. No database files described in the database schema section needs to be created for the secondary database servers because they will take care of data synchronization and replication by loading the database data over the network from the primary database servers (a mechanism called zone transfer). One difference between the primary and the secondary database servers are their named.conf files. For the secondary name server, the content of the named.conf files looks like the following:
// BIND configuration file for the secondary server
options {
directory "/amd/sim1/z/itx_ds/slave";
// place any additional options here
};
zone "extdistrib1.itx.cnrg" in {
type slave;
file "db.extdistrib1";
masters {128.84.223.58; };
};
zone "extdistrib2.itx.cnrg" in {
type slave;
file "db.extdistrib2";
masters {128.84.223.58; };
};
…
…
zone "ext.to.user" in {
type slave;
file "db.ext2user";
masters {128.84.223.58; };
};
…
…
zone "0.0.127.in-addr.arpa" in {
type master;
file "db.127.0.0";
};
zone "." in {
type hint;
file "db.cache";
};
The above configuration file tells the database server that it is secondary for the zone in which the slave keyword is signified, and it should track its update against the primary server on the host 128.84.223.58. For robustness, the configuration file for the secondary database server can specify up to ten database servers for zone transfer.
The client API is implemented in JAVA, which enables fast application development cycle and portability across multiple platforms. The client API basically exposes necessary interface(s) at the application level. The main interface exposed is the DirectoryService class, along with other supporting classes, described below:
DirectoryService.declareIdentity
method. Upon authentication successful, the user can lookup his/her user information (e.g. extension number, access level, custom message, etc.), manipulate his/her locations information (e.g. default and customized location), change his/her password, lookup all registered users in the ITX network, and reach them by their extension number or userID. In addition, different exception classes are defined to handle unexpected things happened in the directory service client API during the course of running ITX application. They are all inherited from Java Exception class.
All classes described above are packaged in the cnrg.itx.ds API library. Other supporting classes are defined in the package but are not exposed outside to the application level. For complete details of all the classes and methods defined in the cnrg.itx.ds package, please refer to the appendix section.
BIND implementation provides resolver, which is a set of library routines that are linked into client programs (such as telnet, ftp, nslookup, etc.) to access the server. The resolver basically handles:
Therefore, the client communicator needs to incorporate the resolver library, which are implemented in C. A DSComm JAVA interface is defined to interface between the client API and the resolver library. The DSComm interface provides necessary methods to the client API to perform query and update to the directory database server (The DSComm interface is defined in the cnrg.itx.ds package that is fully explained in the appendix section). Those methods are native methods allowed to be implemented in low-level languages like C/C++. The implementation of native methods is compiled (with the resolver library) into a dynamically linked library (DLL) called DSComm.dll to be loaded and referenced via the DSComm interface.
The client communicator is also designed to be flexible in its implementation. In other words, its design can be implemented to use different database solutions (other than BIND) such as MS Access, MS SQL database, and Oracle database, etc., in order to suit to the context of different business constraints. The reason to support this flexibility is to consider the fact that BIND server needs to start in super-user mode, which creates inflexibility in installing and running BIND. By overriding DSComm interface methods in a DSComm-derived class, users provide their implementation in the overridden methods of the DSComm-derived class to communicate with other database servers.
This area is the most challenging task compared with other three areas. First, a fair amount of time was spent on understanding and hacking the BIND query and update code since there is not enough documentation to explain query and update related data structure defined in the resolver library. Second, blending Java and C code together introduces interesting garbage collection issue because Java run-time system is managing garbage collection on behalf of the programmer, but C is not. Therefore, in DSComm.dll which reference Java classes, Java run-time garbage collection mechanism needs to be turned off and handled explicitly in the DLL. Third, although BIND has been ported to different platforms, the latest BIND resolver version ported to Windows turned out to be not up-to-dated (which is BIND 4.9.7), and the database server is running BIND 8.1.2, Even it is backward compatibility (meaning BIND 4.x resolver still can communicate with BIND 8.x server), BIND 4.9.7 lacks dynamic update functionality (query and update routines) which is only supported from BIND 8.x versions onwards. Therefore, a fair amount of the dynamic update codes need to be ported over from Unix-version BIND 8.1.2 resolver library to BIND 4.9.7 resolver library.
The performance of the implementation of the directory service was evaluated based on the requirements set forth in the design problem section:
The ITX joint project page is located at the following web page: http://www.cs.cornell.edu/cnrg/telephony/JavaDocs/
Description of database files used by Directory database server
$ORIGIN itx.cnrg.
extdistrib1 IN NS sim1.cs.cornell.edu.
IN SOA sim1.cs.cornell.edu. itx.cs.cornell.edu. (
1 10800 3600 604800 86400 )
$ORIGIN extdistrib1.itx.cnrg.
ds 0 IN TXT "1"
ds 0 IN TXT "3"
It shows there are two 1-digit extension numbers assigned by the administrator. The format is:
ds 0 IN TXT "<1-digit extension number>"
$ORIGIN itx.cnrg.
extdistrib2 IN NS sim1.cs.cornell.edu.
IN SOA sim1.cs.cornell.edu. itx.cs.cornell.edu. (
1 10800 3600 604800 86400 )
It shows there is no 2-digit extension number assigned by the administrator. The format is:
ds 0 IN TXT "<2-digit extension number>"
$ORIGIN itx.cnrg.
extdistrib3 IN NS sim1.cs.cornell.edu.
IN SOA sim1.cs.cornell.edu. itx.cs.cornell.edu. (
1 10800 3600 604800 86400 )
$ORIGIN extdistrib3.itx.cnrg.
ds 0 IN TXT "123"
It shows there is a 3-digit extension number assigned by the administrator. The format is:
ds 0 IN TXT "<3-digit extension number>"
$ORIGIN itx.cnrg.
extdistrib4 IN NS sim1.cs.cornell.edu.
IN SOA sim1.cs.cornell.edu. itx.cs.cornell.edu. (
1 10800 3600 604800 86400 )
The format is:
ds 0 IN TXT "<4-digit extension number>"
$ORIGIN itx.cnrg.
extdistrib5 IN NS sim1.cs.cornell.edu.
IN SOA sim1.cs.cornell.edu. itx.cs.cornell.edu. (
1 10800 3600 604800 86400 )
The format is:
ds 0 IN TXT "<5-digit extension number>"
$ORIGIN itx.cnrg.
extdistrib6 IN NS sim1.cs.cornell.edu.
IN SOA sim1.cs.cornell.edu. itx.cs.cornell.edu. (
1 10800 3600 604800 86400 )
The format is:
ds 0 IN TXT "<6-digit extension number>"
$ORIGIN itx.cnrg.
extdistrib7 IN NS sim1.cs.cornell.edu.
IN SOA sim1.cs.cornell.edu. itx.cs.cornell.edu. (
1 10800 3600 604800 86400 )
The format is:
ds 0 IN TXT "<7-digit extension number>"
$ORIGIN to.sec.
userid IN NS sim1.cs.cornell.edu
IN SOA sim1.cs.cornell.edu. itx.cs.cornell.edu. (
1 10800 3600 604800 86400 )
$ORIGIN userid.to.sec.
jh12@cornell.edu 0 IN TXT "pin=-1085180997;access=10"
It shows there is one entry assigned by the administrator. The format is:
<user> 0 IN TXT "pin=<hash code of password string>;access=<access level>"
$ORIGIN to.user.
ext IN NS sim1.cs.cornell.edu
IN SOA sim1.cs.cornell.edu. itx.cs.cornell.edu. (
1 10800 3600 604800 86400 )
$ORIGIN ext.to.user.
123 0 IN TXT "userid=jh12@cornell.edu;custmsg=John Hudson"
It shows there is one entry assigned by the administrator. The format is:
<extension number> 0 IN TXT "userid=<user>; custmsg=<description>"
$ORIGIN to.ext.
userid IN NS sim1.cs.cornell.edu.
IN SOA sim1.cs.cornell.edu. itx.cs.cornell.edu. (
1 10800 3600 604800 86400 )
$ORIGIN userid.to.ext.
jh12@cornell.edu 0 IN TXT "123"
It shows there is one entry assigned by the administrator. The format is:
<user> 0 IN TXT "<extension number>"
$ORIGIN to.roamloc.
ext IN NS sim1.cs.cornell.edu
IN SOA sim1.cs.cornell.edu. itx.cs.cornell.edu. (
1 10800 3600 604800 86400 )
$ORIGIN ext.to.roamloc.
123 0 IN TXT "128.84.223.135:1645+I+ITX Application"
It shows there is one entry associated with the extension number, 123. The format is:
<extension number> 0 IN TXT "<host address>:<port>+I+<location description>"
$ORIGIN to.dynamicloclist.
ext IN NS sim1.cs.cornell.edu
IN SOA sim1.cs.cornell.edu. itx.cs.cornell.edu. (
1 10800 3600 604800 86400 )
$ORIGIN ext.to.dynamicloclist.
123 0 IN TXT "128.84.223.20:1550+I+ITX Application 2"
0 IN TXT "128.84.223.20:1750+I+ITX Application 3"
It shows there two entries associated with the extension number, 123. The format follows the same as defined in the file db.ext2roamloc.
$ORIGIN to.defaultloclist.
ext IN NS sim1.cs.cornell.edu
IN SOA sim1.cs.cornell.edu. itx.cs.cornell.edu. (
1 10800 3600 604800 86400 )
$ORIGIN ext.to.defaultloclist.
123 0 IN TXT "607-2555520+T+home"
It shows there is one entry associated with the extension number, 123. The format is either:
<extension number> 0 IN TXT "<area code>-<phone number>+T+<location description>"; or
<extension number> 0 IN TXT "<user>+U+<location description>"
$ORIGIN to.customloclist.
ext IN NS sim1.cs.cornell.edu.
IN SOA sim1.cs.cornell.edu. itx.cs.cornell.edu. (
3 10800 3600 604800 86400 )
$ORIGIN ext.to.customloclist.
123 0 IN TXT "123.1"
It shows there is one entry associated with the extension number, 123. The format is:
<extension number> 0 IN TXT "<extension number>.<index number>"
$ORIGIN loc.
custom IN NS sim1.cs.cornell.edu.
IN SOA sim1.cs.cornell.edu. itx.cs.cornell.edu. (
1 10800 3600 604800 86400 )
$ORIGIN custom.loc.
123.1 0 IN TXT "starttime=887065594039;endtime=887095594039;607
-2551959+T+syslab"
It shows there is one entry. The format is either:
<extension number>.<index number> 0 IN TXT "starttime=<number of milliseconds since January 1, 1970, 00:00:00 GMT>;endtime=<number of milliseconds since January 1, 1970, 00:00:00 GMT>;<area code>-<phone number>+T+<location description>"; or
<extension number>.<index number> 0 IN TXT "starttime=<number of milliseconds since January 1, 1970, 00:00:00 GMT>;endtime=<number of milliseconds since January 1, 1970, 00:00:00 GMT>;<user>+U+<location description>"
Installation instruction on BIND server
Below shows an installation procedure for the BIND server running on a Solaris machine:
Pre-requisites:
Steps:
For example, assuming you are installing the BIND on the path, /usr/u/aaa:
Classes/Methods description - Directory Service Client API
This class provides clients an interface to communicate with the directory server.
Constructor Summary |
|
DirectoryService Default constructor NOTE: It also sets up where to find the config file. Config file is used to locate the Directory Server. The default location of the config file is in the same directory as DSComm.dll resides. |
|
( DSComm newDSComm) throws DirectoryServiceExceptionConstructor for a given DSComm-derived object. NOTE: It also sets up where to find the config file. Config file is used to locate the Directory Server. The default location of the config file is in the same directory as DSComm.dll resides. - a DSComm-derived object to provide customized interface communicating to user-defined directory database server. |
|
DirectoryService
- a full file path to locate the config file.
|
|
DirectoryService
- a full file path to locate the config file.
- a DSComm-derived object to provide customized interface communicating to user-defined directory database server.
|
Method Summary |
|
|
addCustomLocation
- a new custom location object
|
|
addUser
- new user's id
- new extension number to be assigned to the new user
- new user's password
- new user's access level (USER_ACCESS_LEVEL, SERVER_ACCESS_LEVEL, ADM_ACCESS_LEVEL)
- custom message (can be empty)
|
Digits |
addUser
- new user's id
- requested number of extension digits [DirectoryService.MIN_EXTENSION_SIZE...DirectoryService.MAX_EXTENSION_SIZE]
- new user's password
- new user's access level (USER_ACCESS_LEVEL, SERVER_ACCESS_LEVEL, ADM_ACCESS_LEVEL)
- custom message (can be empty)
|
|
declareIdentity
- user's ID
- user's PIN
|
|
deleteCustomLocation Deletes the custom location of the user authenticated with this directory service
- ID of the custom location to be deleted
|
|
dumpAllUsers Dump all users' records from the directory database to the terminal output.
|
|
getAccessLevel
|
|
getCustomLocationByExtension Gets all custom locations of the user authenticated with this directory service
- user's extension
|
|
getCustomMessage Get the custom message of the user authenticated with this directory service
|
|
getDefaultLocationByExtension Gets all default locations of the user authenticated with this directory service
- user's extension
vector of location objects |
Digits |
getExtension
|
Digits |
getExtension
- user's ID
|
UserID |
getID
|
UserID |
getID
- user's extension
|
LocationList |
getLocationListByExtension
- user's extension
|
LocationList |
( UserID id) throws AuthenticationException, AccessDeniedException, RecordNotFoundExceptionGet the location list from a given UserID. UserID can be one of the following: 1. email (physical person registered in our directory database) 2. server application (e.g. Gatewaysrv, PBXsrv, Vmailsrv, etc.) 3. phone number - user's ID
|
|
registerLocation Register the location of the user (authenticated with this directory service) when he/she starts up an application. Dialable location is allowed to be added ONLY as ROAMING or DYNAMIC location. Non-Dialable location is allowed to be added ONLY as DEFAULT location. Otherwise, an AccessDeniedException is thrown.
- (e.g. Location.ROAMING, Location.DEFAULT, Location.DYNAMIC)
- a new location object to be registered
|
|
removeUser
- extension of the user to be removed
|
|
(boolean bCleanup) Turn off or turn on the cleanup thread. The default is ON, which means when a user call declareIdentity, the cleanup thread starts automatically. - false to turn off the cleanup thread; true to turn it on
|
|
setCustomMessage Set the custom message of the user authenticated with this directory service
- new custom message
|
|
setPIN Change the PIN of the user authenticated with this directory service.
- user's ID
- user's PIN
- new user's PIN
|
|
unregisterLocation
- (e.g. Location.ROAMING, Location.DEFAULT, Location.DYNAMIC)
- a location object to be unregistered
|
This class is an inteface to the java native methods talking to the directory server. User should not directly call any methods of this class. Alternatively, if user prefers to provide his/her directory database server, he/she can define DSComm-derived class and the directory server.
Method Summary |
|
|
addRecord
- domain entry
- a record (associated with the entry) to be added. If the record already exists in the directory database, the input record will be ignored.
|
|
deleteRecord
- domain entry
- an existing record (associated with the entry) to be deleted. If rec is null, it deletes all records associated with the domain entry.
|
|
getCustomLocDomain
|
|
getExt2CustomLocListDomain
|
|
getExt2DefaultLocListDomain
|
|
getExt2DynamicLocListDomain
|
|
getExt2RoamLocDomain
|
|
getExt2UserDomain
|
|
getExtDistribDomain
|
|
getGatewayUserID
|
|
getMaxSubDomain
|
|
getMinSubDomain
|
ArrayRecords |
(byte[] key) Get record(s) associated with the domain entry. A domain entry can be associated with 1 or more than 1 record. For example, in the domain, "ext.to.user.", an entry, "10011.ext.to.user." has 1 and only 1 record, which is "userid=mr85@cornell.edu;custmsg=". For example, in the domain, "ext.to.defaultloclist.", an entry, "10011.ext.to.defaultloclist." can have more than 1 record. - domain entry (e.g. "10011.ext.to.user.")
|
|
getUserID2ExtDomain
|
|
getUserID2SecDomain
|
|
setConfigPath
- a file path of the config file (resolv.conf)
|
This class provides a abstraction of where the application or system is located.
Constructor Summary |
|
Location
- other location object
|
|
(java.lang.String rawLocationStr) Constructor for formatted record string retrieved from the directory database. If the record string is not in expected format, the location remains un-initialized. - a raw string from record entry (e.g. "pit052.cs.cornell.edu:5000+I+testapp"; "607-2775627+T"; "vmailsrv+U+voice mail server")
|
|
(java.lang.String type, java.lang.String value, java.lang.String label) Constructor Parameters: - type of the location (e.g. Location.TELEPHONE_TYPE or Location.INTERNET_TYPE or Location.USER_TYPE)
- value of the location
- label of the location (can be empty)
|
Method Summary |
|
|
() Parses the value of location into a array of string and returns e.g. String[0] = "pnt01.cs.cornell.edu"; String[1] = "5001" e.g. String[0] = "607"; String[1] = "2551595" e.g. String[0] = "bergmark@cs.cornell.edu" |
|
() Return the hostname address if this location can be directly dialed. . Otherwise, return null. |
|
getLabel
|
|
() Return the port number if this location can be directly dialed. Otherwise, returns -1. |
|
getType
|
UserID |
getUID
|
|
getValue
|
|
isDialable
|
|
isPhone
|
|
isSameAs
- other location object to be compared
|
|
setLabel
- location label in string
|
|
() Convert into raw location string format. Returns empty if the location object's properties are not sufficient enough to form a string. |
This class represents a list of locations.
Constructor Summary |
|
LocationList |
|
LocationList
- an input location list object
|
Method Summary |
|
|
add
- the new location object to be added to the list
|
|
add
- the new location list to be added to the list
|
|
count
|
Location |
first
|
Location |
getAt
- the index of the element to be retrieved
|
Location |
() Get the next element. Returms NULL if call Next on the last element. NOTE: To traverse the list from the beginning, call first(), then calling next() to traverse to the end of the list |
|
removeAll |
|
reset |
This class represents a list of locations with user-specified time interval
Constructor Summary |
|
CustomLocation
- specifying the starting time
- specifying the ending time
- list of location
|
|
CustomLocation
- formatted entry string
|
Method Summary |
|
|
currentValid
|
|
getEndTime
|
LocationList |
getLocationList
|
|
getStartTime
|
|
setEndTime
- specifying a new end time
|
|
setLocationList
- the given new location list (if newLocList is null or empty, it does nothing and exits)
|
|
setStartTime
- specifying a new starting time
|
|
toString
|
This class provides an abstraction to identify a user uniquely
Constructor Summary |
|
UserID
- UserID in string format
|
Method Summary |
|
|
toString
|
This class provides an encapsulation to store user's password information.
Constructor Summary |
|
Password
- input password string
|
Method Summary |
|
|
toString Returns: string representation of this Password object |
|
verified
- input password
|
This class provides an abstraction to digits
Constructor Summary |
|
Digits
- integer value
|
|
Digits
- array of int
|
|
Digits
- string of digits
|
Method Summary |
|
|
count
|
|
equals
- another digits object to be compared
|
|
getArray
|
|
getValue Returns: integer value of this Digits object |
|
toString
|
This class stores information on userID, extension, roaming location (if any), and custom message.
Constructor Summary |
|
UserProperty Parameters: id - UserID object extension - integer value of the extension number roamLoc - roaming location customMsg - custom message |
Method Summary |
|
|
getCustomMessage
|
|
getExtension Returns:
|
Location |
getRoamingLocation
|
UserID |
getUserID
|
This class is used to hold returned record entries from the directory database
Method Summary |
|
|
add
newValue - the new element to be added to the list |
|
add |
|
()
|
|
first Get the first element (also Reset to the first element position) Returns: the first element in the list |
|
()
the next element in the list |
|
reset |
This class is used to hold customLocationID-customLocation pair retrieved from the directory server.
Constructor Summary |
|
CustomLocationRecord
- a String to represent a custom location ID
- CustomLocation object
|
Method Summary |
|
CustomLocation |
getCustomLocation
CustomLocation object |
|
getID
String represents the ID |
This base class represents an exception thrown by the directory service.
Constructor Summary |
|
DirectoryServiceException Constructor
- string explaining the cause of exception |
This class represents an access-denied exception thrown by the directory service.
Constructor Summary |
|
AccessDeniedException
- string explaining the cause of exception
|
This class represents an authentication exception thrown by the directory service.
Constructor Summary |
|
AuthenticationException
- string explaining the cause of exception |
This class represents a record-already-exists exception thrown by the directory service.
Constructor Summary |
|
RecordAlreadyExistsException
- string explaining the cause of exception |
This class represents a record-not-found exception thrown by the directory service.
Constructor Summary |
|
RecordNotFoundException
- string explaining the cause of exception
|