DETECTION OF HANDSET STATE

Abstract: In voice communications taking place by way of a computer, it is a problem how to supply information on the activity state of a separate telephone handset to the computer attending to call management. In this invention, the handset state is found out by causing on the computer audio card's microphone line an echo of the signal sent to the audio card's loudspeaker line when the handset is in the first state (off-hook or on-hook). When the handset is in the second state (on-hook or off-hook), the echo connection is broken off. The handset state can hereby be deduced by measuring the characteristics of the echo perceived on the microphone line.

Description: Detection of handset state Field of the invention This invention relates to detection of the activity state of a telephone handset (handset on-hook/off-hook), especially in Internet or LAN telephone communications. Background of the invention In Internet or LAN telephone communications (LAN = Local Area Network) transmitting speech in packet form over a data network, the terminal equipment used is usually a computer provided with multimedia characteristics and connected to a telecommunication network. The structure of the system is shown in Figure 1. The connection with the other party to the call is set up by way of a datacommunication network, such as a LAN or the Internet. Control operations of the call, such as setting up and breaking off of the call, are performed by software in the computer, to which a mouse and a keyboard are connected. The outgoing speech is input by a separate microphone to an audio card, and the incoming speech is heard from loudspeakers connected to the audio card. The separate microphone and loudspeakers may also be replaced by a telephone handset used in the conventional telephone or by a headset, whereby the environment can not hear the incoming speech. The call is controlled by a CTI programme (CTI = Computer Telephony Integration), which reads the speech going out from the audio card and converts it into a form suitable for conveyance in the datacommunication network. The programme reads the incoming speech from the signal received from the datacommunication network and controls the audio card so that it replays the speech from the loudspeakers. The programme also maintains information on the state of the call, such as if the terminal equipment is in a passive (on-hook) or an active (off-hook) call state, whether a call is going on, whether a call is coming in, whether dialling is going on etc., and through the datacommunication network it sets up a connection with the other participant or participants of the call. When an incoming call arrives, the CTI programme tells the audio card to send an alerting signal through the loudspeakers. Differing from the use of a conventional telephone, the incoming call is typically answered by announcing the call by using the mouse and clicking on the reply key on the CTI programme's display or by striking some predetermined key in the keyboard, such as the Enter key. If it is desired to change over the audio signals from the loudspeakers and from a separate "hands-free" microphone to a handset, this can be done with a separate mechanical switch. Usually, the headset is constantly active, and change-over to loudspeakers takes place when required by disconnecting the headset from its connectors or by using a separate switch belonging to the headset. When making an outgoing call, the target is chosen by using the computer's user interface, and if a confidential handset or headset call is desired, the signals are changed over to the handset by changing the position of the switch element. When the call ends, one must remember to return the audio signals from the handset to the microphone-loudspeaker combination by again changing the position of the switch element, so that the ringing tone of the next call can be heard from the loudspeakers. However, when wishing to answer a call in the handset, it would be easier and also familiar from conventional telephones for the call to be connected automatically simply by lifting the handset. To this end the CTI programme managing the call must be able to find out whether the handset is off-hook or on-hook. In conventional telephones this identification is done with a mechanical or magnetic switch, the state of which is identified. Of course, this procedure could also be used in the case of a call taking place through a computer's audio card, but the computer has no input connection suitable for the switch nor has it any separately controllable output connections for loudspeakers and handset. Only a parallel port, a serial port and game control ports are usually available as input connections. Typically, however, the peripheral equipment intended for these is already connected to these, for which reason they can not be used without problems. Typically, the audio output of the audio card is simply the loudspeaker/line output located in the same connector. Some special cards have a separate output connection for loudspeakers and for the line level, but these again can not be separately controlled by the programme. Thus, detection of the handset state to the programme controlling the call in the computer by using only the existing connections of the audio card is a state-of-the-art problem. The present invention aims at eliminating this problem. This objective is achieved with the method and equipment defined in the independent claims. Brief description of the invention The inventive idea is to cause in the microphone line such an echo of a measuring signal to be sent to the loudspeaker line, which is a response to the handset state. Hereby the handset state can be deduced by studying the signal of the microphone line. The measuring signal used may be a normal dial signal, a speech signal conducted to the loudspeaker line or a separate measuring signal to be summed into the speech signal. The arrangement according to the invention includes means for leaking the measuring signal from the handset's loudspeaker line to its microphone line and means responsive to the handset state for turning off the leak. The response or echo of the measuring signal sent to the loudspeaker line, which echo can be perceived from the microphone signal, may be defined e.g. by the programme. In one embodiment of the invention which is mentioned as an example, the handset's loudspeaker signal is connected by way of an attenuator to the handset's microphone line. To the microphone line is also connected a relay or switch, which is responsive to the handset's activity state and which connects the line to equipment earth, if the handset is on- hook. When the switch is open, an electric echo of short delay obtained through the attenuator can be detected in the audio card's microphone input. When the microphone line is connected to equipment earth, the electric loudspeaker signal arriving by way of the attenuator will not be relayed to the audio card's microphone output, and an electric echo is no longer found in the microphone input, but only an acoustic echo which has travelled on the air path and which is of longer delay and which also has different frequency characteristics. The handset's activity state is determined by measuring the delay or frequency characteristics of the echo signal on the audio card and by defining the handset as active, if the echo is found to contain an electric echo component. List of figures The invention will be described in greater detail referring to the appended drawings, wherein Figure 1 shows a CTI system; Figure 2 shows the principle of the invention; Figure 3 shows an example of how the invention functions; Figure 4 shows another example of how the invention functions; Figure 5 shows hardware used for defining the handset state in accordance with the invention; and Figure 6 shows a call signal sent to a loudspeaker line and echo signals to be found on its microphone line, when the handset is on-hook and off-hook respectively. Detailed description of the invention The basic inventive principle is shown in Figure 2. A measuring signal is supplied from an audio card's loudspeaker connection to loudspeaker line 201. The signal of loudspeaker line 201 is connected intentionally to microphone line 211 by an echo connection 203 dependent on the handset state 200. In its simplest form the connection is just an attenuation, but from the viewpoint of the invention the only essential thing is that, when turned on, the connection will produce a response of the loudspeaker line signal to the microphone line. This response which is dependent on the handset state is detected by a specification programme 204 which compares the signals of the loudspeaker and microphone lines with one another and which specifies the handset state according to the detected response. The handset state may also be identified just by listening to the microphone line. When the handset is on-hook, the microphone and the amplifier connected to it are mute, whereby the computer programme perceives first level background noise. When the handset is lifted off its hook, this also activates the microphone and the connected amplifier and possibly also the signal sound generator. The computer programme now perceives a second higher-level signal and deduces that the handset is off- hook. If the system uses two microphones which can be automatically exchanged depending on the handset state (a handset and a separate "hands free" microphone), noise detection can not be used, because there is noise in both, and it is not possible to deduce which one is active. The solution hereby is to use a additional signal which is summed to one microphone signal only and the existence/absence of which is perceived by the programme. Figure 3 shows an example of how the invention is embodied in principle. The signal of the handset's loudspeaker line 301 is connected to the handset's microphone line 311 by a switch 303 causing an echo with a short delay. Switch 303 is preferably an attenuator, which controls a suitable echo strength so that it will not interfere with the outgoing speech signal but is still easily perceivable. Microphone line 311 has a handset state 300 responsive muting switch 304, which mutes the microphone line, when the handset is on-hook, that is, in an inactive state. Both the echo switching and the muting of the microphone line may be embodied either in the handset or in some equipment component which is separate from the handset, such as e.g. in the handset hook. Hereby all those echoes of the loudspeaker signal which can be perceived in the audio card's microphone input are such acoustic echoes caused by parallel equipment such as separate loudspeakers and microphones, which have a relatively long echo delay. When the handset is off-hook, that is, in an active state, the muting switch 304 will not mute the microphone signal. A short-delay echo component caused by intentional switching 303 of the echo and with frequency characteristics different from the acoustic echo is hereby perceived on the microphone line. The echo occurring on the microphone line is examined by the means 305 for specifying echo characteristics. The characteristics may be specified by a separate equipment component designed for the purpose, but it is preferable to specify the delay with the aid of a programme integrated with the CTI programme. The handset state is preferably specified based on echo characteristics measured by means 306 by comparing the measured characteristics, such as the delay or the echo strength, with limit values which are established in advance at predetermined frequencies. If the specification is based e.g. on a measurement of the echo delay time, the handset will be defined as being off-hook, if the delay is shorter than the established limit value, and if the delay is longer than the limit value, then the handset will be defined as being on-hook. Figure 4 shows the principle of another example of the operation of the method of finding out the handset state in accordance with the invention. The signal of the handset's loudspeaker line 401 is connected to the handset's microphone line 411 by a switch 403 causing a short-delay echo and by a switch 404 responsive to the handset state. Both the switch 403 and the switch 404 may be embodied either in the handset or in some equipment component which is separate from the handset, such as e.g. in the handset hook. Switch 403 is preferably an attenuator, with which a suitable echo strength is controlled, so that it will not interfere with an outgoing speech signal, but is still easy to perceive. The attenuated signal of the loudspeaker line is allowed to cause a short-delay echo on the microphone line when the handset is on-hook and it is turned off by switch 404 when the handset is off-hook. The echo occurring on the microphone line is examined by means 405 for specifying the echo characteristics. The characteristics may be specified by a separate equipment component designed for the purpose, but they are preferably specified by a programme integrated with a CTI programme. The handset state is specified based on echo characteristics measured by specification means 406 preferably by comparing the measured characteristics with pre-established limit values. If e.g. the delay is short, the handset is defined as being on-hook, and if the delay is long, the handset is defined as being off-hook. Figure 5 shows detection of the handset's activity state in a CTI system in accordance with the invention. The hook switch 2 used in handset 1 is e.g. a Reed relay or a mechanical switch, which will mute the handset by short-circuiting it to equipment earth. The switch may be either fixedly in the handset or separate from the handset, e.g. in the handset hook, provided that the microphone will be connected to earth when the handset is in its place. The microphone of the handset is connected by way of summing element 4 to such a microphone port 5 of the computer's audio card, which has a direct current supply connected through resistance 6 for an amplifier (an impedance matcher) in the microphone. When the handset is on-hook, hook switch 2 will short-circuit the microphone to approximately zero volt against equipment earth. A separate hands-free microphone 7 is connected to the other input of the summer 4. If desired, the separate microphone 7 may be muted by switch 8 controlled by level detector 15. Earpiece 9 of the handset is connected by summer and attenuator element 10 to loudspeaker output 11 of an audio card. The loudspeakers 12 are connected by attenuator element 14 to the handset microphone, whereby a side tone is brought about, which is called an electric echo in this application. The level detector controls the switches 8 and 13 so that when the handset is on-hook and the microphone line in equipment earth, the separate microphone 7 and the loudspeakers 12 are active. When the handset is lifted off its hook, the voltage of the handset's microphone line will rise, and the level identifier will (if so desired) mute the loudspeakers and the separate microphone. On perceiving an incoming call, the computer's call programme sends an alerting sound through the audio card's loudspeaker output to the loudspeakers and to the handset earpiece. In the earphone, an electric connection of side tone takes place to the handset microphone which is short-circuited. During the call, the computer programme will monitor the keyboard, the mouse and any signal arriving from the audio card's microphone. Figure 6 shows a signal Sk transmitted from the audio card to the loudspeaker line and signals Sm1 and Sm2 which are formed on the microphone line during different handset states. If the handset is on-hook, switch 2 in Figure 5 is closed and the handset microphone 3 is thus mute. Hereby, only a so-called acoustic echo signal Sm1 is perceived on the audio card's microphone line 5, which echo signal is caused acoustically by the ring sound Sk sent to the loudspeaker line from loudspeakers 12 to the separate microphone 7. The sound propagates in the air approximately one centimetre in 29 microseconds, so e.g. the delay D1 of an acoustic echo perceived from a microphone placed at a distance of 10 centimetres from the loudspeaker is approximately 290 microseconds. If the handset is lifted off its hook, switch 2 is open and an electric echo Sm2 of the handset's loudspeaker signal is perceived on the microphone line after it has passed through attenuator 14. The typical delay of the electric echo is a few microseconds, so in accordance with Figure 6 it is essentially shorter than the delay of the acoustic echo. Audio cards used in LAN calls are so-called full-duplex audio cards, wherein at pulse n of the sample clock a sound sample n is written out and a sound sample n-t is read in, wherein t is the standard delay of the electric feedback. Besides the electric feedback delay, an acoustic additional delay occurs on the acoustic path. For the acoustic delay identification programme to be able to distinguish the acoustic delay from the electric delay, the length of the acoustic delay must be no less than one sample interval. If the chosen sampling rate is 8000 samples a second, which is used in conventional telephone technology, the additional delay caused by the acoustic path can be detected, if the distance between loudspeaker and microphone is longer than 1 dmm ~ 8000X * 29 - 10- 6 m ~ 4 ' 3cm - (1 ) If a higher sampling frequency of 44100 samples a second is used, which is allowed by the audio card, the result is = 0,8 cm. (2) Thus, a call may be answered by using the keyboard or the mouse or by lifting the handset. That the handset is lifted can be noticed from a change in the ringing tone delay. The programme performed on a computer perceives the shortening of the delay of the ringing signal in the microphone input and from this it deduces that there is a wish to answer the call. Based on this, it may carry out the signalling required for starting the call in the direction towards the network. If it is desired to receive the incoming call as a loudspeaker call, then according to the state of the art, answering is done with the keyboard or with the mouse without lifting the handset, whereby the separate microphone and the loudspeakers or, correspondingly, the headset, will be active. During an answered call, the computer programme constantly performs measuring of the delay between the signal sent to the loudspeaker line and its echo signal received from the microphone line and it compares the result it obtains with the delay limits mentioned above. In this state, the delay measuring may be based e.g. on an analysis of the actual speech signal or on an analysis of the delay of a additional signal which is added to the speech signal and which is easy to detect. An example of a suitable additional signal is a sinusoidal signal, which is sent at a relatively high audio frequency and burst and which is easily filtered away from the speech signal. Suitable frequencies are e.g. such signals in a frequency range of 5000 Hz - 20,000 Hz, which are filtered away in such a speech signal processing that filters away all frequency components having a frequency of more than 4000 Hz, but which are easy to detect from samples taken by the audio card at a higher sampling frequency. When the programme finds that a delay which has been short (the handset off-hook, electric echo) becomes long (the handset on-hook, acoustic echo), it deduces that the handset has been placed on its hook. Hereby the programme triggers off a predetermined function which may be e.g. a call release, a suitable signal level adjustment for a loudspeaker call, a muted pause or any other state established by the programme's settings. Correspondingly, if it is found during a call that a long delay has become short, the programme deduces that the handset has been lifted off its hook and it may again carry out the steps defined for this situation, such as e.g. an adjustment of the signal level so that it is suitable for a handset call. The existence of an electric echo can be determined also in other ways than by measuring the delay, such as e.g. based on the different frequency characteristics of the electric echo and the acoustic echo. The acoustic echo has passed through the loudspeaker and microphone. The normally used capacitor microphones typically are very broadband, but the frequency band of ordinary loudspeakers connected to a multimedia computer is limited at the lower end to a range of 50...100 Hz. By using a low-frequency, e.g. 5 Hz, identifier signal, the acoustic echo is filtered in the loudspeakers to a very low level. Correspondingly, an intentionally caused electric echo is of a considerably higher level. Hereby, the existence of an electric echo and this way the handset state can be determined in a simple way by examining the echo strength at a frequency of 5 Hz. This embodiment depends a little more than the embodiment based on echo delay specification on the characteristics of computer components, mainly the amplifier, the loudspeakers, the microphone and the audio card's input degree.

Claims: Claims 1. Method of finding out the state of a telephone handset in a system wherein the handset includes a loudspeaker and a microphone and wherein the handset has a first state, such as an on-hook state or an off-hook state, and a second state, such as an off-hook state or an on-hook state, c h a r a c t e r i z e d in that when the handset is in the first state, an intentional echo connection is caused from the loudspeaker signal to the microphone signal, the intentional echo connection is turned off when the handset is in the second state, the microphone signal is examined, and the handset is found to be in the first state, if the loudspeaker's intentionally caused echo component is found in the microphone signal. 2. Method as defined in claim 1 , c h a r a c t e r i z e d in that a limit value is set for the delay of the echo of the signal sent to the loudspeakers which can be perceived from the microphone signal, when the handset is in the first state, an electric short-delay echo connection is caused from the loudspeaker signal to the microphone signal, the electric short-delay echo connection is broken off, when the handset is in the second state, the delay of the echo of the signal sent to the loudspeakers, which can be perceived from the microphone signal, is examined, and the handset is found to be in the first state, if the perceived echo delay is below the established limit value. 3. Method as defined in claim 1 in a system wherein an acoustic echo which has propagated acoustically may occur on the microphone line, c h a r a c t e r i z e d in that such an echo connection is caused from the loudspeaker signal to the microphone signal the frequency characteristics of which are different from those of an acoustic echo, and the frequency characteristics of the echo perceived from the microphone signal are analysed, and the handset is found to be in the first state, if such an echo component is found in the microphone signal which has the frequency characteristics of the intentional echo connection. 4. Method as defined in claim 1, characterized in that the short-delay echo connection is brought about by connecting the handset's loudspeaker signal through an attenuator to the handset's microphone line. 5. Method as defined in claim 1, cha racte rized in that the short-delay echo connection is broken by a muting switch which is responsive to the handset state and which is open when the handset is in the first state and which connects the handset's microphone line to equipment earth, when the handset is in the second state. 6. Method as defined in claim 1, cha racte rized in that the short-delay echo connection is broken by a switch which is responsive to the handset state and which when the handset is in the second state will break the short-delay echo connection set up from the loudspeaker line to the microphone line. 7. Method as defined in claim 1, characte rized in that the echo delay is specified by analysing the speech signal which is to be sent to the audio card's loudspeaker line and which is to be received from the microphone line. 8. Method as defined in claim 1, characterized in that a additional signal is sent to the audio card's loudspeaker line, and the echo delay is defined by measuring the delay of the additional signal's echo perceived on the microphone line. 9. Method as defined in claim 8, ch a ra cte rized in that the frequency of the additional signal is within a frequency range of 5000 Hz - 20000 Hz. 10. Method as defined in claim 8, characterized in that the additional signal is a burst. 11. Equipment for finding out the state of a telephone handset in a system wherein the handset includes a loudspeaker (9) and a microphone (3) and wherein the handset has a first state and a second state, characterized in that the equipment includes means for setting up an echo connection (14) for setting up an electric connection from the handset's loudspeaker signal to the handset's microphone signal, a switch (2) which is responsive to the handset state and which is designed to mute the handset's microphone signal when the handset is in the second state, means for specifying the echo delay for specifying the delay of that echo of the signal sent to the loudspeakers which can be perceived from the microphone signal, and means for finding out the handset state which are responsive to the means for specifying the echo delay for finding out the handset state. 12. Equipment as defined in claim 11, characterized in that the echo connection is brought about by connecting the handset's loudspeaker signal through an attenuator to the handset's microphone line. 13. Equipment as defined in claim 11, characterized in that the switch responsive to the handset state is a Reed relay. 14. Equipment as defined in claim 11, ch aracterized in that the switch responsive to the handset state is a mechanical relay. 15. Equipment for finding out the state of a telephone handset in a system, wherein the handset includes a loudspeaker and a microphone and wherein the handset has a first state and a second state, characterized in that the equipment includes means for setting up an echo connection for setting up an electric connection from the handset's loudspeaker signal to the handset's microphone signal, a switch which is responsive to the handset state and which is designed to break off the electric connection from the handset's loudspeaker signal to the handset's microphone signal when the handset is in the first position, means for specifying the echo delay for specifying the delay of that echo of the signal sent to the loudspeakers which can be perceived from the microphone signal, and means for finding out the handset state which are responsive to the means for specifying the echo delay for finding out the handset state. 16. Equipment as defined in claim 15, characterized in that the echo connection is brought about by connecting the handset's loudspeaker signal through an attenuator to the handset's microphone line. 17. Equipment as defined in claim 15, characterized in that the switch responsive to the handset state is a Reed relay. 18. Equipment as defined in claim 15, ch a racterized in that the switch responsive to the handset state is a mechanical relay.

Inventors: TIKKALA MARKKU, TIKKALA, MARKKU
Applicants: TIKKALA MARKKU, TIKKALA, MARKKU
Application year: 1998
Main classification: H04M3
IPC codes: H04M1, H04M3