Utilize the existing telephone machine to realize the method for work of the computer expanding unit of IP phone
Technical field
The present invention relates to a kind of computer expanding unit and method of work thereof of novel structure, exactly, relate to a kind of computer expanding unit and method of work thereof of utilizing the existing telephone machine to realize IP phone, belong to the computer network communication technology field.
Background technology
At present, the IP network communication technology is just in develop rapidly, utilizes the Internet to realize that the communication protocol of multimedia transmission of voice, image and data is also perfect gradually.At present comparatively perfect agreement have the ITU-T of International Telecommunication Association H.323 with the SIP of international project task groups IETF.Domestic and international many manufacturers release IP network telephone set and Computer IP phone software according to these two kinds of agreements, to satisfy the demand of growing network voice communication.
Present IP network telephone set is the equipment that a kind of outer appearnce is similar to telephone set, behind the voice signal sample quantization that it transmits microphone, carries out speech coding, forms the IP packet according to protocol requirement again and transmits on IP network.Such equipment will have the RJ-45 interface, is used for the interconnection with IP network.Its realization block diagram as shown in Figure 1.Also have a kind of IP network telephone set not have the RJ-45 interface, it is to link to each other with computer by the general-purpose serial bus USB interface, by the network connection transferring voice IP packet of computer.Any IP network telephone set is compared with ordinary telephone set, all needs to possess above-mentioned two kinds of communication protocol disposal abilities, so IP network telephone set network structure more complicated, and price is higher, is difficult to popularize.And, although it is quite similar with ordinary telephone set in appearance,, it and ordinary telephone set are incompatible, can not utilize public switched telephone network (PSTN) to transmit voice.
Now, computer is all supported multimedia technology, and has very fast arithmetic speed to be connected with network easily, so software vendor develops the multiple network voice communication software, is used to realize the function of IP network telephone set.The IP network voice communication software realizes that VOIP functional programs institutional framework and Fig. 1 are essentially identical, its difference is to utilize computer to simplify the implementation method of some of them hardware cells, for example: its microphone replaces it with headset, Audio Processing Unit is a sound card, display screen and display processing unit are respectively display and video card, network processing unit and network interface are network interface card, and CPU then realizes by software.IP phone software utilizes computer to simplify the extra cost of internet phone device greatly; But also brought inconvenience for user's use thus: dialing must realize with computor-keyboard or mouse, connects and makes a phone call to be with headset to finish, and has changed traditional using method of telephone set, can computed personnel not feel inconvenience especially for some.And IP phone software is the same with the IP network telephone set, and when IP network was not connected, communication function just can't be realized.
Summary of the invention
The purpose of this invention is to provide a kind of method of work of utilizing the existing telephone machine to realize the computer expanding unit of IP phone, this expanding unit can use existing ordinary telephone set by computer realization IP network real time communication function, the traditional using method that has not only kept telephone set, can computed personnel not create facility for some, can also utilize the IP network cheaper advantage of long-distance telephone expenses of communicating by letter; And, when IP network is not connected, can utilize ordinary telephone set and public switched telephone network (PSTN) PSTN to solve the conversation problem conveniently, in time automatically.
The object of the present invention is achieved like this: a kind of method of work of utilizing the existing telephone machine to realize the computer expanding unit of IP phone, it is characterized in that: detect the IP network connection state earlier, and detect again once every a setting-up time, testing result according to this and last time produces different operating again: if during twice testing result no change, do not do any operation and keep original telephone set connection status; When IP network is become when obstructed by connection, telephone line is connected by being connected with IP network to switch to public switched telephone network (PSTN); When IP network is become when logical by obstructed, telephone line is connected by being connected with public switched telephone network (PSTN) to switch to IP network, and before switching, whether judges this telephone line in usefulness earlier, must treat the idle just switching of telephone line connection; If circuit in usefulness, then detects the IP network connection state again behind one section setting-up time.
When this method is connected with IP network at telephone set, further comprise the operating procedure of exchanges data:
When transfering to conversation, promptly computer reads in data from expanding unit, when sending to the listener on the IP network, obtains data from the bus interface of the control module that links to each other with computer, carries out sending to the network interface card interface after the data processing, until end of conversation;
When receiving conversation, promptly computer reads in data from IP network, when sending to the user of phone, reads in the ip voice packet from network interface card, carries out sending to after the data processing bus interface of the control module that links to each other with computer, until end of conversation.
This method can increase following operating procedure as required: when telephone set is connected with IP network, register on the gatekeeper; And when the IP network connection will disconnect, nullify registration to the gatekeeper.
When omitting the ip voice processing module in the expanding unit, the exchanges data of this method comprises following operating procedure:
When transfering to conversation, be that computer reads in data from expanding unit, when sending to the listener on the IP network, after from the bus interface of the control module that links to each other with computer, obtaining data, according to IP phone protocol requirement deal with data and compression, send to the network interface card interface behind the recomposition IP network packet, until end of conversation;
When receiving conversation, promptly computer reads in data from IP network, when sending to the user of phone, read in the ip voice packet from network interface card, unpacking the back, re-send to the bus interface of the control module that links to each other with computer, until end of conversation according to IP phone protocol requirement deal with data and decompress(ion).
Maximum characteristics of the present invention are not change under the traditional habit prerequisite that the user uses ordinary telephone set, the every function that can utilize computer realization present networks telephone set and IP phone software to be possessed, make full use of the IP network cheaper advantage of long-distance telephone expenses of communicating by letter, and when IP network is not connected, can utilize public switched telephone network (PSTN) PSTN to solve the conversation problem in time again automatically, thereby satisfy user's communication requirement under any circumstance.
Description of drawings
Fig. 1 is the functional circuit block diagram of present networks telephone set.
Fig. 2 is the annexation embodiment schematic diagram of computer expanding unit of the present invention and Other related equipment.
Fig. 3 is the embodiment block diagram that the circuit structure of computer expanding unit of the present invention is formed.
Fig. 4 is that the method for work-phone of computer expanding unit of the present invention connects the control method flow diagram.
Fig. 5 (A), (B) are respectively that the data in the exchanges data of method of work-when network connects of computer expanding unit of the present invention send and the embodiment block diagram of Data Receiving flow process.
Embodiment
Referring to Fig. 2, the present invention is a kind of computer expanding unit that utilizes the existing telephone machine to realize IP phone, this device is provided with two RJ-11 and a bus interface control module (being illustrated as pci interface) that is connected with computer, one of them RJ-11 connects telephone set, bear this expanding unit and be connected with the analog voice communication of telephone set, another RJ-11 connects telephone wire and inserts public switched telephone network (PSTN).When using this expanding unit to dial the IP network phone, the output signal of telephone set enters the computer expanding unit from the RJ-11 that is connected with it, after carrying out data processing under the control of the exchanges data software in this expanding unit, deliver to network interface card by pci bus interface, communicate by letter with correspondent by IP network again.When IP network connects when obstructed, the output signal of telephone set is directly sent into telephone wire via another RJ-11, by public telephone network PSTN with to side communication.
Referring to Fig. 3, introducing circuit structure of the present invention forms, this computer expanding unit includes: the telephony interface control module 1 that is linked in sequence, telephone signal modular converter 2 and ip voice processing module 3, and the control module 4 that links to each other with computer (being illustrated as the Peripheral Component Interconnect pci interface control module that links to each other with computer PCI bus); This control module 4 is carried out exchanges data between this expanding unit and computer, and controls this expanding unit and connect IP network, and this moment can calling IP phone; And when IP network connects disconnection, control this expanding unit and connect public switched telephone network (PSTN), realize telephone communication.
The telephony interface control module 1 that is connected with ordinary telephone set among Fig. 3 is made up of two RJ-11, a phone connected mode control unit, an input and output switch unit and a telephone signaling converting unit.A signal switching circuit that wherein is provided with in the phone connected mode control unit is changed the operating state of oneself under the control of the control module 4 that is connected with computer: connect just often in IP network, the control telephone set links to each other with the input and output switch unit and inserts IP network, at this moment, the input and output switch unit splits into input channel and the output channel that two paths are connected respectively to follow-up telephone signal modular converter 2 with input/output signal, and, send into telephone set by phone connected mode control unit with synthetic one road signal of these two passages; When IP network connected disconnection, the signal switching circuit control telephone set in this phone connected mode control unit linked to each other with telephone wire by another RJ-11 and inserts public switched telephone network (PSTN).The input and output switch unit is used to switch the transmission means of telephone signal, the telephone signaling converting unit detects the button and the dislodging machine operation of phone according to touch-tone signal and direct current signal, or the call signaling message that the signaling converting unit in the ip voice processing module is sent here is converted to touch-tone signal or direct current signal.
Telephone signal modular converter 2 has two information transfer channels: in telephony interface control module 1 on the directions of signal flow of ip voice processing module 3, be provided with the mediation analog to digital conversion circuit is amplified, separated to telephone signal, the phone analog signal conversion that telephone set is transmitted is a digital signal; On the directions of signal flow of telephony interface control module 1, be provided with the circuit that audio digital signals is carried out digital-to-analogue conversion, amplification and modulation in ip voice processing module 3, the audio digital signals that ip voice processing module 3 is transmitted is converted to the phone analog signal.
Ip voice processing module 3 includes speech coding, tone decoding, signaling conversion, data encapsulation packing and unpacks circuit, be respectively applied for the conversion between conversion between ip voice data and the audio digital signals and IP control signaling and the telephone signaling, and voice signal and control signaling packed according to the IP phone agreement or unpack.All or part of circuit data available exchange and process software in this ip voice processing module 3 replace it, at this moment, direct and control module 4 (for example pci interface module) exchange to external signal of remainder in the signal behind A/D, the D/A or this ip voice processing module 3.
Bus interface with the computer swap data in the control module 4 that links to each other with computer can be Peripheral Component Interconnect pci interface (as shown in Figure 3), also can be the high-speed serial bus IEEE1394 interface of industrial standard architectures ISA interface or general-purpose serial bus USB interface or Institute of Electrical and Electronics formulation or any interface in serial ports or the parallel port.When using any non-pci interface, this expanding unit of the present invention all can be used as external equipment and is arranged on outside the computer.The control module 4 that should link to each other with computer is to be in the different operating state that is connected IP network or public switched telephone network (PSTN) respectively by the signal switching circuit that a kind of control signal on its bus interface or one group of control signal are controlled in the phone connected mode control unit.
Referring to Fig. 4, the method for work of computer expanding unit of the present invention includes control phone connected mode and carries out data exchange processing two parts, introduces the former earlier:
Computer expanding unit of the present invention is behind computer booting, at first detect the IP network connection state, and detect again once every a setting-up time, testing result according to this and last time produces different operating again: if during twice testing result no change, do not do any operation and keep original telephone set connection status; When IP network is become when obstructed by connection, telephone line is connected by being connected with IP network to switch to public switched telephone network (PSTN); When IP network is become when logical by obstructed, telephone line is linked to each other by being connected with public switched telephone network (PSTN) to switch to IP network, and before switching, earlier judge whether telephone line is in the communication process, must treat that idle just switching of telephone line connects, if in communication process, then detecting IP network again behind one section setting-up time, circuit connects.In phone and operating process that IP network is connected, according to the needs of IP multimedia communications system, can be increased in the operation that the gatekeeper goes up registration, and connect will disconnect the time at network, nullify the operation of registering to the gatekeeper.If do not use the gatekeeper on the IP network or in the IP phone application, then above-mentioned gatekeeper registers and cancellation operation can be omitted.
Referring to Fig. 5, when phone was connected with IP network, this method further comprised the data exchange operation that is triggered by interrupt signal:
When transfering to conversation, be that computer reads in data from expanding unit, when sending to the listener on the IP network, this expanding unit is that the off-hook operation sends a signal to pci interface, trigger interrupt routine as interrupt signal, after this interrupt routine began, computer obtained voice and signaling data from the Peripheral Component Interconnect pci interface, carry out sending to the network interface card interface after the data processing, until end of conversation;
When receiving conversation, be that computer reads in data from IP network, when sending to the user of phone, the specific I P VoP that network is received also can trigger interrupt routine, after this interrupt routine begins, computer reads in the ip voice packet from network interface card, carries out sending to the Peripheral Component Interconnect pci interface after the data processing, until end of conversation.
If when omitting the ip voice processing module in the expansion card, need increase following operation during above-mentioned data exchange processing: when transfering to conversation, to send to the network interface card interface behind the recomposition IP network packet, until end of conversation according to IP phone protocol requirement deal with data and compression; When receiving conversation, read in the ip voice packet from network interface card, unpacking the back, re-send to the Peripheral Component Interconnect pci interface, until end of conversation according to IP phone protocol requirement deal with data and decompress(ion).