Abstract:
A novel and improved method and apparatus for providing an interface to a digital wireless telephone system compatible with standard analog wire line telephones and analog wire line fax machines is disclosed. During a telephone call, a fax detector monitors the incoming data for fax signals. If a fax is detected, the data processor switches from processing the data as if it were voice to processing it as fax In addition, the remote station is sent a signal notifying it to process the data as fax rather than voice. The fax detector operates by detecting the preamble of a V.21 message, present at the beginning of every fax call. Energy is measured in both frequencies of the BFSK signals. A decision is made by analyzing these energies and locating a specific pattern which repeats itself a sufficient number of times.

Description:
This is a continuation application of Ser. No. 08/751,190, filed Nov. 15, 1996, now U.S. Pat. No. 5,892,816, entitled “Method and Apparatus for Detecting Facsimile Transmission”. 
    
    
     BACKGROUND OF THE INVENTION 
     I. Field of the Invention 
     The present invention relates to communications systems. More particularly, the present invention relates to a novel and improved method for automatically detecting a fax call and providing the correct service option based on that detection. 
     II. Description of the Related Art 
     Digital wireless telephone systems allow information to be exchanged more efficiently than analog wireless telephone systems. This increased efficiency allows a greater number of telephone calls or other communications to be conducted over digital wireless telephone systems using a given amount of radio frequency (RF) bandwidth. A prominent example of an analog wireless telephone system is the AMPS cellular telephone system employed extensively throughout the United States. 
     In some instances, the increased efficiency provided by digital wireless telephone systems is so substantial that digital wireless telephone service becomes economically competitive with the traditional analog wire line telephone service. Analog wire line telephone service is the telephone service provided using the conventional wire based telephone system, often referred to as the public switched telephone network (PSTN). Analog wireline telephone systems typically process data in analog format directly, or in a digital representation of the analog data referred to as pulse code modulated (PCM) format. Analog wire line telephone service has traditionally been far less expensive than wireless telephone service. 
     To provide a complete replacement for traditional analog wire line telephone service, wireless digital telephone systems must be able to accommodate all the services and functions that are currently supported by analog wire line telephone service. One such service is fax transmission. 
     Although digital wireless telephone systems typically do provide fax transmission service, the interface to the fax service is generally different than that of analog telephone systems. In particular, digital wireless telephone systems process the digital data directly, rather than in the form of tones, as practiced for analog communication systems. 
     Because of the different interface methods, some analog telecommunication equipment can not be used with the digital wireless telephone systems. In particular, fax machines designed for use with an analog telephone system typically cannot be used with a digital wireless telephone system. Therefore, a user converting from analog wire based telephone service to digital wireless telephone service will have to consider the capital investment made in such equipment when determining the cost benefit of switching to digital wireless telephone service. 
     Therefore, to reduce the cost of transitioning from wire based telephone service to a digital wireless telephone service, it is desirable to provide interface to a digital wireless telephone system that works with analog based wire line telecommunication equipment. In particular, it would be desirable to provide an interface to a digital wireless telephone system that works with standard telephones and fax machines. 
     SUMMARY OF THE INVENTION 
     The present invention is a novel and improved method and apparatus for providing an interface to a digital wireless telephone system compatible with standard analog wire line telephones and analog wire line fax machines. During a telephone call, a fax detector monitors the incoming data for fax signals. If a fax is detected, the data processor switches from processing the data as if it were voice to processing it as fax. In addition, the remote station is sent a signal notifying it to process the data as fax rather than voice. 
     The fax detector operates by detecting a known pattern that is present at the beginning of every fax call. During the initiation of a fax call, certain parameters are negotiated between the transmitting and the receiving fax machines. These parameters are transmitted as BFSK signals consisting of a preamble followed by the parameter data. The preamble is the known pattern which can be detected. Energy is measured in both frequencies of the BFSK signals. A decision is made by analyzing these energies and locating a specific pattern which repeats itself a sufficient number of times. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The features, objects, and advantages of the present invention will become more apparent from the detailed description set forth below when taken in conjunction with the drawings in which like reference characters identify correspondingly throughout and wherein: 
     FIG. 1 is a block diagram of the digital wireless telecommunications system when configured in accordance with one embodiment of the present invention; 
     FIG. 2 is a block diagram of one embodiment of the fax detector; and 
     FIG. 3 is a flow chart illustrating the operation of the decision making element of the fax detector when configured in accordance with one embodiment of the present invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     FIG. 1 depicts elements that are common to both the subscriber and base stations. Thus, the present invention is equally applicable when the subscriber initiates a call to the base station, or the base station initiates a call to the subscriber. For the elements considered in FIG. 1, it is only necessary to know whether the call is being initiated or received, not whether the device is a base station or a subscriber station. In the exemplary embodiment, fax detection occurs in the station which received the call. 
     Consider first the call initiation. Memory  20  contains code for processing fax  22  and code for processing voice  23 . In the exemplary embodiment, the voice code  23  performs a variable rate code excited linear prediction (CELP) algorithm as described in detail in U.S. Pat. No. 5,414,796 entitled “variable Rate Vocoder” which is assigned to the assignee of the present invention and incorporated by reference herein. Memory  20  may be a random access memory (RAM) or read only memory (ROM) or other memory devices as are known in the art. In the exemplary embodiment, the default data processing code is set for voice. Hence, voice code  23  is loaded via memory multiplexor (mux)  21  into data processor  12 , and microprocessor  30  signals to the remote station via transceiver  40  that the following call data should be processed as voice. Data samples from the local input device are processed by digital signal processor (DSP)  10 . Those samples are processed by data processor  12  and also provided to fax detector  11 . Results of data processor  12  are sent to microprocessor  30  where they are transmitted to the remote station via transceiver  40 . The data is processed as a voice call until such time as fax detector  11  determines that the incoming data is that of a fax. Upon detection of facsimile data, fax detector  11  provides a signal indicating the detection to microprocessor  30 . Following receipt of the fax detection signal from fax detector  11 , microprocessor  30  signals to the remote station (not shown) via transceiver  40  that the following call data should be processed as fax, no longer as voice. In addition, microprocessor  30  provides a signal to DSP  10  and memory  20  which causes the fax code  22  to be provided through mux  21  to data processor  12 . Data processor  12 , now loaded with fax code, also processes data received from the remote station via transceiver  40  and microprocessor  30 . Results of that processing are sent to the local output device which, in the exemplary embodiment, is a speaker for voice data and a connected fax machine for fax data (not shown). 
     In the exemplary embodiment, voice code  23  or fax code  22  is selectively loaded into DSP  10 . In an alternative embodiment, both fax code  22  and voice code  23  may reside concurrently in DSP  10 . Another alternative embodiment may include parallel processors, one for voice, the other for fax, where the output of one processor is selected based on the type of call being processed. These and other alternatives obvious to those skilled in the art employ the principles defined in this invention. 
     Now consider a received call. Microprocessor  30  receives instructions indicating how to process the call data from the remote station via transceiver  40 . Microprocessor  30  provides a signal to DSP  10  and memory  20 . In response to the signal from microprocessor  30 , data processor  12  is loaded with fax code  22  or voice code  23  via memory mux  21 . 
     In the exemplary embodiment, the subscriber station local samples come from and go to an external (to the subscriber station) analog device such as a fax machine or fax modem connected through an interface circuit which converts the analog signal into digital samples and vice versa. The base station local device is the Public Switched Telephone Network (PSTN). 
     Fax calls must conform to behavior as specified in “ITU-T Recommendation T.30: Procedures For Document Facsimile Transmission in the General Switched Telephone Network” incorporated herein by reference. In the exemplary embodiment, parameter negotiation at the beginning of a fax call is accomplished as specified by “CCITT Recommendation V.21:300 BPS Duplex Modem Standardized For Use in the General Switched Telephone Network (GSTN)” incorporated herein by reference. 
     At the start of a fax call, messages are exchanged between the fax machines according to V.21. These V.21 messages communicate parameters such as capabilities of the fax machines and rates supported. The V.21 messages are BFSK modulated signals where 1650 Hz represents binary 1 and 1850 Hz represents binary 0. Each message consists of a preamble followed by the information specific to that message. The preamble is made up of a sequence of the pattern 0×7e repeated for 1 second within a 15% tolerance. Fax detector  11  determines a call is fax by detecting this preamble. Although the exemplary embodiment detects V.21 signals in order to detect fax, this invention can also be used to detect other signals including non-fax V.21 signals and, with slight modification, non-V.21 signals as well. However, the simplicity of the detector and its reliability derives from intimate knowledge of fax protocols and the nature in which V.21 signals are used in fax calls. The spectral characteristics of the V.21 message exhibit a pattern that is repetitive and stationary over a sufficient amount of time so as to be detected by fax detector  11 . Also, the pattern is sufficiently unique that false detects are highly unlikely. The V.21 message is repeated for a duration of up to 30 seconds. This allows for data processor  12  to be replaced with fax code  22  in time to process the information in the V.21 message once fax detector  11  determines a fax call is beginning. 
     FIG. 2 shows the block diagram of fax detector  11 . Input samples are filtered by notch filter  50  at 1650 KHz, squared by squaring means  51 , and summed up by accumulator  52  to produce the energy at 1650 Hz (ene1650). In like fashion, input samples are filtered by notch filter  60  at 1850 Hz, squared by squaring means  61 , and summed up by accumulator  62  to produce the energy at 1850 Hz (ene1850). In the preferred embodiment, the sampling rate is 8 MHz and the energy measurements are sums of 20 samples. Comparator  70  compares ene1650 ; with ene1850 and produces two outputs: one signifying whether ene1650 is less than a fraction of ene1850, and one signifying whether ene1850 is less than a fraction of ene1650. In the preferred embodiment, the fraction used in both comparisons is 0.25. The outputs of comparator  70  go into decision box  80 , where a detection decision is made based on the present and some of the past comparison values. 
     Decision box  80  looks for 6, 7, or 8 consecutive frames where the 1650 Hz energy measurements are less than one quarter of their corresponding 1850 Hz energy measurements, followed by 3 or 4 frames where that condition is not true and wherein at least one of those 3 or 4 frames has the energy at 1850 Hz less than one quarter of the corresponding 1650 Hz energy measurement. Only if this sequence is consecutively repeated 8 times will decision box  80  declare that V.21 signals, and hence fax signals, are detected. Values associated with comparison thresholds, number of consecutive energy measurements, sampling rates, samples per energy calculation, etc. can all be readily modified by someone skilled in the art to accomplish the same result. 
     The flow chart in FIG. 3 depicts the decision making process as utilized by the preferred embodiment of decision box  80 . Start in  81 , labeled “START AGAIN”. There, initialize variables A, {overscore (A)}, B, and Rep to zero and proceed to  82 . In  82 , if ene1650&lt;0.25* ene1850 (defined as condition A) is true, proceed to  83 . Otherwise, return to  81 , “START AGAIN”. In  83 , increment A by one, get the next sample, and proceed to  84 . In  84 , if condition A is true, loop back to  83 . Otherwise, proceed to  85 . In  85 , if 6≦A≦8, proceed to  87 . Otherwise, proceed to  86  and then back to  81 , “START AGAIN”. In  87 , increment {overscore (A)} by one and proceed to  88 . In  88 , if ene1850&lt;0.25* ene1650 (defined as condition B), proceed to  89 . Otherwise, jump ahead to  90 . In  89 , increment B by one and proceed to  90 . In  90 , get the next sample and proceed to  91 . In  91 , if condition A is false, proceed to  92 . In  92 , if {overscore (A)}&lt;4, loop back to  87 . Otherwise, proceed to  93  then return to  81 , “START AGAIN”. 
     In  91 , if condition A is true, proceed to  94 . In  94 , if {overscore (A)}=3 or 4 and B&gt;0, proceed to  95 . Otherwise, proceed to  97  then return to  81 , “START AGAIN”. 
     In  95 , if Rep=8, proceed to  96  and signal that a fax is detected. Otherwise, proceed to  98 . In  98 , increment rep by one, reset A, {overscore (A)}, and B to zero, and loop back to  83 . 
     The previous description of the preferred embodiments is provided to enable any person skilled in the art to make or use the present invention. The various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without the use of the inventive faculty. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.