Caller Line Identity Delivery: A Computerized Call Alert Application

: The subject of this study was to analyze the Frequency Shift Keying caller ID FSK transmission protocol used by Jordan Telecom. and implement a call alert computer application. An FSK decoder is presented and a decoding algorithm based on asynchronous data communication is discussed. Data is captured through the RS232 serial port and a 32-bit software is presented as a call alert application using a small mail transfer protocol through a TCP/IP Internet connection.


INTRODUCTION
Caller number Identity delivery CLID is a service provided by a tele-communication company to provide the called party with the calling party's directory number and the date and time of the call. Different protocols are used worldwide, hence the incompatibility between the local exchanges which provide the caller ID signal and the computer telephony software using modems developed for a specific protocol. The need for developing special hardware and software for specific protocol is then a necessity.

Transmission protocol analysis:
The caller ID signal uses Analog, phase-coherent FSK modulation and is transmitted at 1200 bps tones, 8 bits asynchronous communication, one stop bit, no parity bit. The FSK signal is transmitted between the first and the second ring (Fig. 1). The Packet is composed with three parts: Channel seizure signal, carrier signal and data packet [1] . The channel seizure signal is transmitted as 30 bytes of 01010101, the duration of this signal is 250ms and this represents a 600Hz square wave. The carrier signal is 1300 Hz with a duration of 150 milliseconds, (Fig. 2). The data packet starts with one byte code indicating the presence of CLID, the value used is 80 hex which is 128 in decimal coding, the next byte N indicates, how many bytes follows, the byte N does not include itself or the checksum bytes CS. After the byte N a byte code 01h indicates the date time field in the packet with a length of 08h bytes. A byte of 02h starts the calling number field with a byte L, which gives the count of digits, contained in the caller number. The phone number is transmitted in ASCII code representation. Finally, a checksum byte, consisting of the two's-complement of the 8-bit sum of the message-type 80h , the message-length N and the data (Fig. 2). Figure 1 shows that the first ring duration is 250ms, the second ring duration is 1.5 seconds. The caller ID FSK signal appears between the two rings. The duration between the first ring and the CLID signal is 500ms. The CLID signal duration varies between 533ms and 716ms according to the caller number length (Fig. 2).
Currently there are two types of Caller ID. The first, often referred to as "basic" service, just returns the calling number or an error message and the date/time of the call. The second, "enhanced" Caller ID also may return the directory Name about the calling number. At a minimum, the number of the subscriber is returned. In the first method, the data is transmitted in Single Data Message Format (SDMF) which includes the date, time and number, Jordan Telecom. uses this format. The second method uses Multiple Data Message Format (MDMF) which adds the caller Name field. The Date field is four bytes and the time field is also four bytes. The maximum number of digits contained in the caller ID is given by: .
1200 . Where R is the bit rate and D is the data duration in milliseconds.
Since caller ID is transmitted using asynchronous serial data protocol, ten bits are reserved for each digit [2] . ASCII code requires 8bits, one start bit and one stop bit. The number of bytes reserved for message type, date and time checksum and other fields is 15 bytes (Fig. 2). This last equation means that if the maximum length is 715ms, the data filed is the 315 ms since the channel seizure and carrier signal length is 400ms (250ms and 150ms). Then N d is 23 digits, which is large enough to handle any number for international calls. The minimum value of N d is one byte as an error message.
Caller ID FSK decoder and spectrum analysis: The first step for analyzing the protocol was the programming of a spectrum analyzer. Using Fast Fourier Transform FFT [3,4] calculated on 1024 sample, after splitting the received signal on three parts: channel seizure (250ms), carrier signal (150ms) and data (200ms for 9digits number). The spectrum analysis of the carrier shows a carrier signal of 1300 Hz by (Fig.  3). The analysis of the data field shows the presence of two frequencies: 1300 Hz and 2100 Hz (Fig. 4). This analysis shows that the FSK protocol used by the Jordan Telecom is a basic V.23 protocol [1] . The fact that data is transmitted using a digital frequency modulation FSK, a phase locked loop may be used as a frequency demodulator [5] . The PLL is the corner stone of the caller ID decoder. The caller ID decoder is composed with a phase locked loop PLL that operates with a free running frequency of 1700Hz. A tone decoder for sensing the presence of the 1300Hz carrier, then a pulse filter eliminates the presence of the carrier for any period less than 100ms. The output of the pulse filter provides carrier detection. Any presence of the carrier must be carried after the first ring. This is ensured by monostable activated by a ring detector. A TTL logic to RS232 logic converter permits the interfacing to a serial port of a computer. The computer serial port receives two signals: Data out (DO) and carrier detect (CD) (Fig.5). An example of a bit streams received by a computer is given by Fig. 7. The timing diagram of the decoder is shown by Fig. 6.  The data is received as asynchronous data stream. The CLID is extracted and verified using a nine steps algorithm as follow: Step 1: Initialize serial port with 1200bps, one stop bit, No parity and open it.
Step 2: Check the carrier presence CD (Carrier Detect).
Step Else generate "Error" message.

RESULTS
The following received packet bytes are given in decimal format. The packet starts with the message type 128 or 80 in hexadecimal. Table 2 explains each byte. The phone number, the date and time fields are presented in ASCII code format. Equation (2) explains how to extract the phone number, date and time digits. If no number is present in the number field, then a specific code is transmitted. This code is 04h 01h, then a byte explains the absence of the caller number. This byte is 4Fh for "Out of area" call and 50h for a "Private" or blocked caller ID. The code 4Fh is the ASCII code for the character "O". The code 50h is the ASCII code for the character "P". The field 04h means that the number is absent and byte 01h means that one byte is transmitted as "P" or "O". Four experiments are described, the first experiment concern a caller number with nine digits, the second experiment concern a caller number with eight digits, the third call is received from a caller with "Private" or blocked number and the fourth experiment is an international call.  The Checksum Word contains the two's complement of the modulo 256 sum of all bytes in the data message (i.e., message type, message length and data words). The receiving equipment may calculate the modulo 256 sum of the received words and add this sum to the received checksum word. A result of zero generally indicates that the message was correctly received. CLID packet validly is performed using equation 3. Call alert application: Call alert software was developed under a 32-bit environment. The software decodes the caller ID, date and time and register the call in a local database. When a phone number is decoded the software searches in a local database phone book for the name of the caller. The software converts the callers number to a voice and talk it, this feature is named talking caller ID. The software connects to the Internet periodically and sends an electronic mail to the administrator using Small Mail Transfer Protocol (SMTP) Internet protocol.
The administrator can configure many features including the language of voice, period of connection to the Internet, Call blocking. This later feature concern the blocking of a call based on its number this is done by disconnecting a relay circuit which connects the line to the called party phone. The software call logging is unlimited in size, therefore a company can use it to track call for years. This software is developed for windows operating systems including windows 9.x, windows me, windows 2000 and windows XP. The search engine permits to find any call, calls are searched in the database indices, which are: caller ID, Caller name, call time and call date. The search method can be normal, which means that the searched string is entered then searched in the database. The auto search method means that any characters entered in the "search for" field the search engine is activated. The user can find the exact or a approximated string in the database. This is useful when searching caller names, you do not need to know the exact spelling of the name.
Calls can be filtered for a specific range of calls based on the call indices explained above. When the filter is applied, only the calls responding the specific filter are viewed in the database. Figure 10 shows the email notification feature and talking caller ID language selection. Figure 11 shows a filtering of numbers based on a specific number. The calls found on the database are 46 calls. The button return cancels the filter and returns the original database status. Signaling System 7 (SS7) is the standard for the call data circuit. It has been adopted internationally and this allows digital exchanges throughout the world to communicate and therefore for the CLID to be communicated from exchange to exchange. The two exchanges must be linked by SS7. For example caller ID is received from Egypt and United Arab Emirates, however calls from Algeria are received with "Out of Area" 4Fh-error code and calls from France are received with "Private" 50h-error code. Despite some modems are caller ID enabled. the incompatibility between the different standards makes that this feature is not carried out. Modems developed in United States of America supports the Bellcore Bell 202 protocol.
There is no modem, which supports multiple protocols.

CONCLUSION
This study presents a computerized call alert application based on the FSK caller ID protocol. A spectrum analysis was performed to identify the communication protocol used. A V.23 FSK modulation protocol was identified. The different fields and signal length was analyzed, the data packet was described and the communication protocol was fully described. An FSK decoder was realized and tested with real communication and the results shows the decoding using a fast algorithm, which is implemented in a 32-bit environment. Call alert software is developed with many features including talking caller ID, e-mail notification using SMTP message sender.