Be applied to the VoIP terminal adapter of IP network
Technical field
The utility model relates to the IP network communications field, especially about a kind of VoIP terminal adapter that is applied to IP network.
Background technology
Existing VoIP terminal adapter generally comprises the FXO mouth, ring detecting circuit, microprocessor and controlled circuit, and this FXO mouth is connected with the pstn telephone line, and the input of ring detecting circuit connects this FXO mouth, and its output connects microprocessor.When using the PSTN conversation, then ring detecting circuit detects ringing-current, and the ringing-current status signal is transported to microprocessor, and microprocessor receives the PSTN status signal, thus control controlled circuit and make it be in the PSTN talking state.Yet, there is following shortcoming in this kind circuit structure: because can only detect ringing-current, so can only judge whether to be in talking state, but when conversation begins and finishes for PSTN, then can not judge, thereby VoIP dial dial and deposit with PSTN in, can not realize the switching of VoIP and PSTN call office.
The utility model content
The purpose of this utility model is to provide a kind of VoIP terminal adapter that is applied to IP network that can realize switching between VoIP and the PSTN conversation.
The purpose of this utility model is achieved in that this is applied to the VoIP terminal adapter of IP network, comprise the FXO interface, ring detecting circuit and data processor, the ring interface of FXO mouth is connected with the pstn telephone line with the tip interface, the FXO mouth, ring detecting circuit and data processor electrically connect successively, it also comprises commutation circuit and picking/hanging machine detection circuit, the input of picking/hanging machine detection circuit connects the FXO mouth, its output connects data processor, picking/hanging machine detection circuit and ring detecting circuit receive the PSTN signal by it, and this PSTN state information is input to data processor, its selection VoIP or PSTN is controlled in this data processor output control information to commutation circuit.
Described ring detecting circuit is connected between Ring and the tip interface, and picking/hanging machine detection circuit is serially connected with the ring interface.
Described picking/hanging machine detection circuit comprises self adapting circuit of polarity, sample circuit and optocoupler testing circuit, self adapting circuit of polarity receives the current signal of off-hook or on-hook and carries out the self adaptation of this electric current, sample this current information and be entered into the optocoupler testing circuit of sample circuit, the optocoupler testing circuit is transported to data processor to this current information with the level form, and data processor receives this level information and controls commutation circuit and select PSTN or VoIP.
Compared with prior art, the utlity model has following advantage: by the setting of ring detecting circuit and picking/hanging machine detection circuit, the state that can judge whether this terminal adapter is in that off-hook begins, conversation or on-hook finishes, and be in high level or low level by the I/O interface of control data processor, and then the control commutation circuit is switched between VoIP and PSTN talking state.
Description of drawings
Fig. 1 is the circuit block diagram that the utility model is applied to the VoIP terminal adapter of IP network.
Fig. 2 is the circuit block diagram of the picking/hanging machine detection circuit part of the utility model VoIP terminal adapter of being applied to IP network.
Embodiment
See also Fig. 1 and Fig. 2, the VoIP terminal adapter that the utility model is applied to IP network is to be connected with the pstn telephone line by the FXO mouth, and the ring interface of this telephone wire and FXO mouth and tip interface electrically connect.This terminal adapter comprises ring detecting circuit, picking/hanging machine detection circuit, data processor and commutation circuit.The PSTN signal is input to ring detecting circuit and dislodging machine circuit respectively, ring detecting circuit and dislodging machine circuit receive this PSTN state information, and this PSTN state information is input to data processor, data processor receives this state information, and controls connected commutation circuit and select PSTN or VoIP.
This ring detecting circuit is an available circuit, it is parallel between ring interface and the tip interface, ringing-current when carrying out the PSTN conversation in order to detection, and the state information of this ringing-current is transported to data processor, this data processor is according to the state information that receives, and the control commutation circuit remains on the PSTN talking state, in addition, for the ringing signal of level and smooth this ring detecting circuit output and reduce the power consumption of data processor, can connect the signal smoothing circuit in its output, the output of this signal smoothing circuit connects data processor.Picking/hanging machine detection circuit comprises self adapting circuit of polarity, sample circuit and optocoupler testing circuit, and the output of this optocoupler testing circuit connects data processor.Under hook state, the electric current on the pstn telephone line is 10uA ~ 100uA; Under off hook state, the electric current on the pstn telephone line is 18mA ~ 80mA, by the variation that utilizes this electric current machine state-detection that realizes seting out.When carrying out the on-hook detection, the current information on the PSTN line is carried out the adaptation of electric current by self adapting circuit of polarity, by sample circuit this current information of sampling, this current information is input to the optocoupler testing circuit, this optical coupling testing circuit is accepted this current information and is input to data processor with level signal, this data processor is accepted this level information, and sends control signal and give commutation circuit.Electric current under the hook state on the PSTN line has only 10uA ~ 100uA, behind the current sample, because this undercurrent so that the optocoupler of optocoupler testing circuit is in cut-off state, makes the I/O interface of data processor be in high level; Electric current is 18mA ~ 80mA under the off hook state, behind the current sample, makes the optocoupler conducting, then the I/O mouth of data processor is in low level, by making data processor output high-low level, switch between PSTN and VoIP and control commutation circuit, thereby realize PSTN conversation and IP network conversation.This commutation circuit is controlled the available circuit of its switch for utilizing level signal, is generally relay or switching circuit.
Terminal adapter of the present utility model is defaulted as the VoIP talking state when initial condition.When user's off-hook, then picking/hanging machine detection circuit detects the electric current on the PSTN line, thereby makes optocoupler be in conducting, and then makes the I/O mouth of data processor be in high level, makes commutation circuit switch to the PSTN talking state; In user's communication process, the ringing-current when ring detecting circuit detects conversation, and to data processor transmission PSTN state information, data processor receives this PSTN status signal, and the control commutation circuit is selected the PSTN state; During on-hook,, thereby make optocoupler be in cut-off state when end of conversation, make the I/O interface of data processor be in low level, thereby the control commutation circuit is selected the VoIP talking state then because the electric current on the PSTN line is 10uA ~ 100uA.
Setting by ring detecting circuit and picking/hanging machine detection circuit, the state that can judge whether this terminal adapter is in that off-hook begins, conversation or on-hook finishes, and be in high level or low level by control data processor I/O interface, and then the control commutation circuit is switched between VoIP and PSTN talking state.