computerised telephone metering system

6
North-Holland Microprocessing and Microprogramming 23 (1988) 345 - 350 345 COMPUTERISED TELEPHONE METERING SYSTEM D. RAJA, R. SHANTHI AND S. R. RAO Support Software Group, Switching R & D, Indian Telephone Industries Ltd, Bangalore 560 016. INDIA. ABSTRACT Strowger and Crossbar telephone exchanges in India use electromechanical meters for metering. Subscribers connected to these systems demand for more detailed billing information, as the counterpart SPC systems have been provided with many such facilities. This paper presents CTMS, a computerised system using microprocessors and based on software control, which is used to replace the electromechanical meters, with additional facilities and with increased reliability. i. INTRODUCTION For a long time, individual electro- mechanical meters have been in use in Strowger and Crossbar exchanges to record the number of calls made by a subscriber. Subscriber billing complaints are ever present and they demand for more detailed billing information as the counterpart SPC system has been provided with many such facilities. With telephone metering, a counter is associated with each subscriber. This counter is electromechanical and it is driven by electrical pulses, which are generated at the originating exchange. The number of pulses associated with any single call depends upon the tariff structure. Although the electromechanical systems have been working satis- factorily, these suffer from varoius drawbacks, such as: (a) The contacts are subjected to wear and tear, bouncing, spark and film formation and require adjustments and maintenance from time to time. (b) Since each subscriber is provided with a seperate meter, it requires a long time to note down the readings and hence billing tends to be a tedious job (c) Detailed billing information cannot be provided by meters and further the electromechanical meters occupy large space. Therefore there is need for a system approach towards meeting the diverse billing information requirements for the telephone industry. The Computerised Telephone Metering System (CTMS) incorporates microprocessor controlled data collection and a personal computer(IBM-PC), making it versatile enough for use in large scale data collection, storage and billing. A computerised system using micro- processor control has been developed which will monitor and record billing information of a large number of subscribers. The system software operates in a multiprocessor environment. Several line processors (8085 based) perform the telephone line scanning activites and a main processor(IBM-PC) co-ordinates the line processors(Via RS-232 link). The line processors periodically scan the lines,collect the metering pulses and store them in buffers. The main processor periodically collects the contents of these buffers and stores them in a database. The operator can query the system and get statistical and on-line information about the metering data of any subscriber. The system also automatically gives printout of billing and various other printouts which help in monitoring of the metering data. A protocol has been developed to ensure error free communication.

Upload: d-raja

Post on 21-Jun-2016

218 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Computerised telephone metering system

North-Holland Microprocessing and Microprogramming 23 (1988) 345 - 350 345

COMPUTERISED TELEPHONE METERING SYSTEM

D. RAJA, R. SHANTHI AND S. R. RAO

Support Software Group, Switching R & D,

Indian Telephone Industries Ltd, Bangalore 560 016. INDIA.

ABSTRACT

Strowger and Crossbar telephone exchanges in India use electromechanical meters for metering. Subscribers connected to these systems demand for more detailed billing information, as the counterpart SPC systems have been provided with many such facilities. This paper presents CTMS, a computerised system using microprocessors and based on software control, which is used to replace the electromechanical meters, with additional facilities and with increased reliability.

i. INTRODUCTION

For a long time, individual electro- mechanical meters have been in use in Strowger and Crossbar exchanges to record the number of calls made by a subscriber. Subscriber billing complaints are ever present and they demand for more detailed billing information as the counterpart SPC system has been provided with many such facilities. With telephone metering, a counter is associated with each subscriber. This counter is electromechanical and it is driven by electrical pulses, which are generated at the originating exchange. The number of pulses associated with any single call depends upon the tariff structure. Although the electromechanical systems have been working satis- factorily, these suffer from varoius drawbacks, such as:

(a) The contacts are subjected to wear and tear, bouncing, spark and film formation and require adjustments and maintenance from time to time. (b) Since each subscriber is provided with a seperate meter, it requires a long time to note down the readings and hence billing tends to be a tedious job (c) Detailed billing information cannot be provided by meters and further the electromechanical meters occupy large space.

Therefore there is need for a system approach towards meeting the diverse billing information requirements for the telephone industry. The Computerised Telephone Metering System (CTMS) incorporates microprocessor controlled data collection and a personal computer(IBM-PC), making it versatile enough for use in large scale data collection, storage and billing.

A computerised system using micro- processor control has been developed which will monitor and record billing information of a large number of subscribers. The system software operates in a multiprocessor environment. Several line processors (8085 based) perform the telephone line scanning activites and a main processor(IBM-PC) co-ordinates the line processors(Via RS-232 link). The line processors periodically scan the lines,collect the metering pulses and store them in buffers. The main processor periodically collects the contents of these buffers and stores them in a database. The operator can query the system and get statistical and on-line information about the metering data of any subscriber. The system also automatically gives printout of billing and various other printouts which help in monitoring of the metering data. A protocol has been developed to ensure error free communication.

Page 2: Computerised telephone metering system

346 D. Raja et al / Computerised Telephone Metering System

F I G . ! H A R D W A R E B L O C K D I A G R A M

L I C = L INE I N T E R F A C E C A R D

LP = L INE P R O C E S S O R

M i

M P = M A I N P R O C E S S O R

PR 1

A P - A U X l L A R Y P R O C E S S O R

M U X = M U L T I P L E X E R

PR - P R I N T E R

2. HARDWARE

The hardware for CTMS consists of the line interface cards, line processor cards and main processor(IBM-PC) with an auxiliary processor. Fig i. shows the hardware configuration of the CTMS.

The line interface card performs the function of converting the available metering pulse into a form suitable to be given as input to the line processor. The lines are multiplexed so that information pertaining to all the lines can be obtained with the minimum of components. 128 subscriber lines have thus been accomodated in one line interface card.

The line processor collects data from the lines which are interfaced to it through the line interface cards. To collect the metering information correctly, each subscriber line has to be scanned at least every 10 ms(since the meter pulse is of 40-400ms duration). This imposes a limitation on the number of lines that can be interfaced to each line processor. Based on this and on traffic observations, a maximum number of 256 lines has been connected to each line processor. Two line interface cards and a line processor card together form one module. Thus the system can be expanded to cater to more lines by adding more such modules.

The line processor card contains, apart from the CPU(8085), memory for storing the metering information obtained by scanning the lines through the line cards. It also has the I/O interface necessary for collecting metering information from the line interface cards and for communicating the same to the main processor.

The serial communication lines from the line processor are multiplexed and this single serial path is connected to the main processor. The main processor co- ordinates the line processors and keeps all the relevant information in the main memory. The real-time data collection will be interrupted if there is an error in the communication link. To avoid such failure, an auxiliary processor is also connected in the system. This processor is connected to the main processor through a serial link(RS-232). The auxiliary processor operates in the hot-stand-by mode.

3. SYSTEM SOFTWARE

The CTMS system software consists of two parts, one resides in the line processor and the other in the main processor.

Page 3: Computerised telephone metering system

D. Raja et a l / Computerised Telephone Metering System 347

3.1. Line processor software

The software on the line processor side performs two main functions; scanning of the subscriber lines and transferring the collected data to the main processor, other than the on-line self diagnostics.

The scanning of the subscriber lines is performed on 10 ms real-time interrupt. The collected data is analysed and stored temporarily in the memory of the line processor.

The data transfer is initiated by the main processor which interrupts the scanning activities of the line processor with its request for data. The line processor then forms the collected data into a buffer and sends it on to the main processor. The buffer contents are held unerased until the next data transfer request comes. This is done to ensure that there is no data lost even if there is any corruption of the data in the main processor.

3.2. Main processor Software

The software on the main processor has been modularly structured based on requirements. The system software maintains a database in the main memory to record the relevant information of each subscriber. Each record in the data base pertaining to each subscriber consists of five attributes. The initial and final metering attributes store respectively the initial and final meter values of the subscriber. After each billing printout session, the final meter values will be copied into initial meter values for each subscriber for the next metering session. Periodically the metering information is collected from the line processors and added to the daily meter reading attribute. Once in a day the daily metering values are added to the final meter values and daily meter values are initialised. Every subscriber line will be classified to belong to one of three categories depending upon the number of calls he makes per fortnight. This is required for monitoring purposes. Subscribers' class attribute holds identity of the category to which he belongs. The flag attribute is used to identify whether a subscriber has not made calls for three consecutive days(for monitoring). The

database acts as a core for the system software. Over and above this the system functions are organised in a layered fashion.

3.2.1. Functional description

Software organisation of the main processor is shown in the figure 2.

PROCESSOR INT E R RUPT INTERFACE DRIVEN FUNCTIONS FUNCTIONS

FIG.2 SOFTWARE ORGANISATION

The functions which act on the database can be classified into four categories apart from the basic functions. The basic functions are subroutines which are called by the above mentioned functions. Since the software is modularly structured, any modification can be easily done on any particular module without affecting other modules.

3.2.1.1. Interrupt driven functions

PC/XT provides a timer interrupt for every one sixth of a second. Using this interrupt some functions are invoked at specified time intervals. These interrupt driven functions are used by the main processor to give an alarm for metering on unused lines, to add daily meter readings to the final meter readings, to give a list of subscribers who have not made calls for three consecutive days, subscribers' class, fortnightly meter readings of all subscribers and billing etc.

Page 4: Computerised telephone metering system

348 D. Raia et al / Computerised Telephone Metering System

3.2.1.2.Processor interface functions

Processor interface functions are periodically invoked by the main processor to collect the metering information from the line processors. The collected information is stored in the database after error checking. Timer interrupt is used to maintain the periodicity. Even if the operator is interacting with the system, if it is time for collecting the metering information from the line processor, then the processor interface function disables the user invoked function till it has completed its job.

3.2.1.3. Duplication functions

The main processor periodically collects the metering information from the line processor and updates its database. The updated database contents are transferred to the 'hot-stand-by' by the duplication functions. The duplication functions are invoked by the main processor automatically.

(e) Subscriber numbers can be printed out according to their category. (f) Billing, fortnightly meter readings and jump in class printouts can be obtained.

4. FAULT DETECTION AND SWITCH OVER TO "HOT-STAND-BY"

The auxiliary processor functions as a hot-stand-by. Thus both the main and auxiliary processor are provided with direct, separate RS-232 links (LP LINK 1 & LP LINK 2) to access the line processor(fig. 3.). Further, another link is provided which connects the main and auxiliary processor together (PC-PC link). It is through this link that the main processor updates the data base in the auxiliary processor and maintains it in the hot-stand-by mode; so that it is ready to take over as main processor as soon as the main processor fails.

3.2.1.4 User interface functions

The operator can query the system and get the statistical and on line information of any subscriber by invoking the user interface functions. These functions are table driven functions. Any addition or deletion of functions can be done without affecting the other modules. User interface functions can be interrupted by the interrupt driven fucntions and will be resumed after the completion of the interrupt driven function's job.

3.3. Facilities offered to the user

A set of help commands are displayed on the display which the user can use to get information from the database. Some of them are: (a) During installation or after a system crash the user can enter or edit the initial meter values. Password facility is built in to validate the user to edit the initial meter readings. (b) User can enter or edit the class of the subscriber. (c) User can see the daily meter readings of all subscribers. (d) User can view and edit the valid pulse limit values.

[ LP LINK

I=~CI~ PC- PC LINK

RS 232 -C

11 I L P'S

] =P LINK 2

FIG,3 HOT- STAND- BY

Three types of failures can occur in this configuration. (a) Failure of the LP link only. In this case, the main processor senses the failure of the link and requests the auxiliary processor to take over as main processor, while it turns itself into the auxiliary processor. (b) Failure of PC-PC Link. This is taken by the auxiliary processor to be a system failure on the main processor since it can no longer access the main processor at all. But since it is not actually a

Page 5: Computerised telephone metering system

D. Raja et al / Computerised Telephone Metering System 349

system failure, the main processor automatically switches off until the link is repaired, so that both the proessors do not try to access the line processors directly. When the auxiliary processor receives no information from the main processor, it switches over as main processor. It tries to contact the other prcoessor periodically to update its data base. When the broken link has been repaired the PC is manually configured as an auxiliary processor. (c) System failure (main processor). In this case, the auxiliary switches over as main processor and tries to access the failed PC periodically. When the failed system has been repaired, and put back into the configuration as the auxiliary processor, its database is again periodically updated and it is back into action in the hot-stand-by mode.

5. DATA SECURITY

Database contents in the main memory are stored in the harddisk and floppy disk as backups as soon as it is updated. Anybody can modify the data base file contents in the backups which in turn affect the billing. To avoid such malpractices, the database contents are stored in encrypted form. A formula is used to convert the normal form (data) to an encrypted form. The same formula is used in the reverse order to convert the encrypted form to the normal form. So, even if somebody modifies the encrypted form file, while restoring the data, the system easily identifies the error and restores the previously updated database contents (encrypted form) from the hidden file. The line processors still hold the data sent for the previous interval in their buffers. The main processor collects this data also and adds it on the database. In this way, data security is maintained without any loss of data.

6.PROTOCOL FOR THE ERROR FREE COMMUNICATION

For error free communication, after sending the data values the line processor sends a checksum value to the main processor. This checksum value is the sum of all the data(Ascii values), apart from the handshake codes. The main processor also calculates the checksum value in the same way. Then it

compares the calculated and received values, if both are the same the data received is correct. Otherwise the main processor asks the line processor to send the data text again. If this process does not succeed for three times, the main processor gives an alarm and an error message and switches over to the next line processor.

7. CONCLUSION

The CTMS system plan is one example of an integrated design intended to address the multitude of problems faced by telephone administration in the areas of subscriber billing information recording. The CTMS system provides for centralised data recording and system administration, rapid fault detection, automatic switch over to duplication modules and to back up modules and encrypted data formats.

We have shown that a PC can be used in a real time application environment. The development time is considerably reduced as some of the system functions are also used in the software development. A major portion of the software has been implemented employing C language. Since a PC has been used in the system, the problem of transpQrting programs from host to a target has been avoided. Any enhancement is possible on-line as all the facilities are available on the target machine.

ACKNOWLEDGEMENTS

We would like to thank Dr. Sira G. Rao., General manager, Switching R & D., for his commitment and guidance in this project. We are grateful to Dr. B. Radhakrishnan., Group Head, Support Software Group., for his guidance and co-operation in making this project a success. Our sincere thanks to Dr. C. R. Shashidhar for his valuable suggestions and comments and also to members of software group, and Solid state Lab. We are grateful to Indian Telephone Industries Ltd., for the facilities they provided for this project.

REFERENCE

[i] Jeffrey D. Ullman., Principles of

Page 6: Computerised telephone metering system

350 D. Raja eta/ /Computerised Telephone Metering SFstem

Database Systems (Pitman publishing Ltd.). [2] Andrew S Tanenbaum., Computer Networks (Prentice-hall of India pvt Ltd.). [3] Brian W. Kernighan., Dennis M. Ritchie., The C programming language., (Prentice-hall of India pvt Ltd.). [4] Franklin F Kuo., Protocols and techniques for data communication networks. (Prentice-hall series in computer application in Electrical Engineering).

[5] The Peter Norton Programmer's Guide to the IBM PC. (Microsoft Press). [6] Michael Durr., Networking IBM PCs (Que corporation Indianapolis). [7] James Martin., Computer Data-Base Organization., (Eastern Economy Edition). [8] D.Raja and R.Shanthi., Telephone metering system., CSI-87. Poster Presentation. (1987) 315.