Summary of the invention
The existing VOIP IAD of product mix of the present invention product uses together, as long as be placed on the switching of phone between VOIP service and PSTN service that all rooms just can be controlled in some rooms.When user family opened normal telephone service, the number in all rooms all can be engaged plain old telephone; When this user closes normal telephone service and when opening the VOIP telephone service to telecommunication bureau application, the user does not need to change in the family any equipment and circuit can realize that just all phones make a call VOIP; And when the user opened normal telephone service once more, the design's product can detect this service automatically, and the phone in all rooms is reworked under normal telephone service.
The present invention has designed the detection method that a kind of accurate detection has or not the PSTN service: detect the voltage between telephone wire TIP and the RING, if voltage is arranged, expression has the PSTN service; On the contrary, if there is not voltage, the expression user does not open the PSTN service.Mix to cause and to make the judgement that has or not the PSTN service for solving VoIP SLIC output voltage and PSTN voltage, the employing double-pole is two puts relay, when when doing voltage detecting, cuts off VoIP SLIC circuit and connects, and switch to voltage detecting circuit, it is connected with telephone wire.Only when judging that no PSTN service exists, relay switches to VoIP SLIC circuit, is connected with telephone wire, and external telephone set uses VoIP.
In addition, the present invention has designed the mechanism that a kind of (Real Time) in real time monitoring has or not the PSTN service, and need not starts shooting again detects.The SLIC output voltage is set at-48V in this product, voltage range-38V in the PSTN network in country variant area ~-78V between, there are voltage difference between the two in the present invention's design and PSTN service, among the design, this voltage difference causes SLIC the state of off-hook (OffHook) to occur, and after CPLD detected this state, control relay disconnected VoIP SLIC circuit, switch to voltage detecting circuit one side, judge whether to have opened the PSTN traditional telephone service or be user's off-hook use phone.When PSTN voltage also be-48V about the time, can not cause SLIC off hook state to occur, at this moment, designed the mechanism of regularly doing SLIC polarity of voltage counter-rotating (PolarityReversal), after the counter-rotating of SLIC polarity of voltage, promptly can cause SLIC off hook state to occur, processing mode is the same.
Simultaneously, the present invention has designed a kind of safety partition method: utilize the isolation characteristic of DAA device, user ADSL IAD equipment and outside line are isolated effectively.Owing on the outside line high operating voltage is arranged, simultaneously owing to come in from outdoor access, have the danger of thunderbolt, on safety, this circuit is defined as the TNV-3 circuit, and VoIP FXS circuit only is used to connect interphone on the nearly all IAD of ADSL on the market equipment, and its safety grade is the TNV-2 circuit, can not directly connect between the two.In this product design, DAA telephone wire side (TIP/Ring) is connected with the FXS of user ADSL IAD equipment, so just effectively outside line and user's ADSL IAD equipment is kept apart, and has solved the safety problem.The four line voice signals of DAA are connected to the SLIC chip on the product of the present invention again, drive and provide the VoIP service channel to external telephone set.
The beneficial effect of product of the present invention is that whether detection family that can be real-time opens the PSTN normal telephone service, and switches user telephone line, makes the phone in all rooms can both realize real-time VOIP service and the switching of PSTN normal telephone service.
Description of drawings
Invention further specifies to this telephone line switcher below in conjunction with accompanying drawing and embodiment.
Fig. 1 is the internal circuit schematic diagram of product of the present invention.
Fig. 2 uses illustration for telephone line switcher.
Fig. 3 is for answering VOIP phone software logic control flow process figure.
Fig. 4 is for dialing VOIP phone and VOIP service standby software logic control flow chart.
Among Fig. 1: 1, DAA.2, SLIC.3, LED light shows.4, the circuit transfer relay.5, power-switching circuit.6, low pass filter.7, voltage detecting circuit.8, analyzing logic control device CPLD.9, the lightning strike protection device.10, high pass filter.11, the telephone interface of this product.12, the SLIC 13 of FXO interface of the present invention and ADSL IAD docks.14, the adsl interface butt joint of adsl interface of the present invention and ADSI IAD product.16, Line connects the telephone wire that inserts this this room.17, the power supply interface of this product.
Among Fig. 2: 18, for inserting user's telephony bus.19, telephone line switcher of the present invention position.20 and the present invention in same room the ADSL IAD product of (bedroom A).21, the telephone set of bedroom A can directly connect ADSL IAD or this product.22,23,24 is the telephone set in other bedrooms or parlor, all is directly connected on the telephony bus, just can realize the switching of VOIP service and PSTN normal telephone service by this telephone line switcher.
Embodiment
For realize in the summary of the invention purpose, the technical solution adopted for the present invention to solve the technical problems wherein comprises the structural principle and the concrete annexation of inside of the present invention as shown in Figure 1.Below each device is done and described in detail.1. the DAA chip is used for isolating ADSL IAD TNV2 (secure side) and inserts outdoor telephone line TNV3 (non-secure side), accepts control off-hook or the on-hook of CPLD, and the TIP﹠amp of ADSL IAD; RING two line signals are converted into the analog signal transmission of four lines and give the SLIC chip.2. SLIC chip provides bell signal by CPLD control to the phone of outside, and whether off-hook information sends CPLD to deals with phone, and transmission and received speech signal are given DAA.3. LED light shows the online service state of current phone in the family, and the bright VOIP of being of green light serves, and red light is bright to be the PSTN normal telephone service, and its behavior also is to be controlled by CPLD.4. two system relay switches of RELAY double-pole, switch to voltage detecting one tunnel, detect outside line whether have voltage (this voltage range comprises that about 38v ~ 78v of the voltage of normal telephone service standby and off-hook are conversed or the about 6v of voltage when calling ~ 8v), in order to have judged whether the PSTN normal telephone service; When not having the PSTN normal telephone service when existing, relay switches to SLIC one end, and the VOIP telephone service externally is provided.5. Power system power conversion system is converted to the voltage of 3.3V for system works to transformer input 12VDC supply voltage.6. low pass filter low pass filter is used for filtering out the high-frequency signal of ADSL and the call voice analog signal of 0 ~ 3.4KHz by low frequency.7. Voltage detect voltage sense line, form by a forward voltage comparator and peripheral circuit, when relay switches to voltage detecting one end, voltage comparator will link together with the outside line line, and disconnect with the design's SLIC, so what detect is exactly whether the outdoor telephone line has voltage, so that judged whether normal telephone service.8. the CPLD logic controller is realized the logic determines and the control of whole system, and its control details are shown in the running software logic diagram.9. Surge protection lightning strike protection device; because it is outer online that this deisgn product will be received phone; just can be connected to the open air; interior ADSL IAD of damage of height calendering telephone wire inlet chamber or miscellaneous equipment that thunderbolt might be arranged; the lightning strike protection device just can fall the energy absorption of these high pressure, plays a protective role.10. High pass filter high pass filter is in order to filter out the voice signal of low frequency, by the ADSL signal of high frequency.Most of ADSL IAD product has had this high pass filter has been integrated in product inside.(11) ADSL IAD can provide the ADSL product of VOIP energy supply.Whole system is divided from functional module can be divided into four parts; be respectively DAA (DataAccess Arrangement); SLIC (Subscribe Line Inter-face Circuit); CPLD (ComplexProgrammable Logic Device) and normal telephone service testing circuit; certainly also have some power source conversion, the LED lamp shows and telephone wire corresponding protection circuit.
Whole design system can be divided into four modules, and the functional description of each module is as follows:
DAA: the butt joint of the SLIC interface (telephone line interface) of main realization and ADSL IAD product, so that realize the conversion of ADSLSLIC interface phone analog voice and the safety of realization ADSL IAD product SLIC circuit and outside line are isolated.
SLIC: when subscriber phone is the VOIP service, accepts the various analog signals of DAA, and export to the telephone set in other all rooms.Provide the ring service for all phones of accepting the VOIP service simultaneously.
Voltage detecting circuit: whether telephone line on have plain old telephone (PSTN) service, and give CPLD information feedback if detecting.
CPLD: realize the logic control of whole system.The information of receiving test circuit, and control DAA and SLIC are operated in corresponding mode state.
According to top described, the advance of this product can be divided into hardware aspect and software aspect two parts.Hardware aspect, (1) the design uses the two system relay switches of double-pole, when switching to voltage detecting one end, with disconnecting simultaneously and being connected of SLIC, so just can not be subjected to the SLIC output voltage influence; When switching to SLIC one side, voltage sense line will be in vacant state, promptly can not play the voltage detecting effect.Certainly the voltage that also just can by mistake SLIC be provided is judged as the normal telephone service of PSTN; (2) two line telephone speech signals with telephone set are converted to four lines transmission acknowledge(ment) signal, and then there is DAA to be converted to the voice signal of two lines, so just utilized the buffer action of DAA, SLIC one side of outdoor telephone line and ADSL IAD is kept apart, satisfy the insulation request of various countries secure side and non-secure side.The software aspect, (1) according to the introduction of back software flow pattern, the design's product is whether off hook signal can occur by SLIC, then relay is switched to voltage detecting one side and judges that the mechanism that judges whether PSTN service accomplishes whether real-time monitoring normal telephone service exists or produce.When VOIP externally is provided at SLIC service, the client has opened the pstn telephone service, if pstn telephone that should country service voltage is not-48v, like this voltage that SLIC provided just with pstn telephone voltage mistake in voltage difference, thereby cause the SLIC chip can produce off hook signal, relay will switch to the voltage detecting end and detect whether the external voltage existence is arranged this moment then; (2) provide VOIP telephone service to outside all phones as SLIC, when all phones all were in the holding state of on-hook, SLIC can constantly remove to switch generating positive and negative voltage on the telephone wire with the very short cycle.If opened the pstn telephone service client sometime like this, and PSTN Service Phone line voltage is identical just with the SLIC phone, SLIC also can export off hook signal in the positive and negative upset of voltage, thereby make relay cut off SLIC one side, and be connected to the detection whether outdoor telephone line one side has the PSTN normal telephone service.
Concrete application such as Fig. 2 connect home phoneline network (part of thick line is a telephone line among the figure).Product collocation ADSL IAD of the present invention uses together, as long as product is placed in any house, the LINE mouth of product of the present invention is connected outside line, the FXO mouth connects the FXS mouth of ADSL IAD, the DSL mouth connects the ADSL mouth of ADSL IAD, the phone in this room can be connected the FXS mouth (this moment this phone can only dial the VOIP phone) of ADSLIAD or be connected on the LINE mouth of this product (at this time the phone in this phone and other room be the relation of equity) fully, can switch in PSTN normal telephone service and VOIP service.For bedroom B, the telephone line in bedroom C and parlor is not need moving arriving fully, under the switching of the design's product, automatically switch in the VOIP telephone service when just can be implemented in cancellation PSTN normal telephone service, the PSTN normal telephone service automaticallyes switch back when opening the PSTN normal telephone service again sometime in real time.So just realized that the circuit in all rooms do not change, just can realize the switching of PSTN normal telephone service and VOIP telephone service.When pstn telephone stops, circuit can switch to the telephone set in each room on the VOIP service circuit at once automatically; If the PSTN service is open-minded again, the design's product will monitor and circuit be switched on the normal telephone service automatically, and each room call can connect again beats plain old telephone.
Fig. 3, Fig. 4 are CPLD software logic control flow chart, describe the course of work of system in detail.Advance of the present invention just is this real-time PSTN wireline inspection mechanism, off hook signal occurs by SLIC, switches to outside line one side then and judges, to realize that real time line detects and switching; Under the SLIC holding state, constantly switch the telephone wire generating positive and negative voltage, to prevent the opening PSTN normal telephone service suddenly and voltage is identical with the SLIC output voltage just and in the same way the time, SLIC can not correctly export off hook signal.
All control logics of the design system are finished by CPLD, The whole control can be divided into two logical flow charts and analyze, answer the VOIP phone and dial VOIP phone and standby two parts, as Fig. 3, Fig. 4 is respectively that system works is being answered VOIP telephone state and the running software logic diagram of dialing VOIP phone and system standby state, will be presented in the course of work of two states below in detail.
Answer VOIP phone software logic control flow process figure as Fig. 3, at first open the design's product power supply 001, the relay of CPLD in will control chart 1 is to voltage sense line one end 002, judge whether to have on the PSTN line voltage to have 003 then, if CPLD has the voltage signal that detects circuit, illustrate that normal telephone service is arranged at this moment is online at phone, relay will be in one section of detection line always like this, this moment, the design system also can enter low-power consumption battery saving mode 004, and the number in all rooms just can be engaged and connect the PSTN plain old telephone at this moment; If CPLD does not receive the voltage signal (be user cancel or do not open the normal telephone service business) of testing circuit, CPLD will control relay link to each other the SLIC of outdoor telephone line and this equipment, because this equipment is connected with ADSLIAD equipment, this moment, the VOIP phone dialed and answered to the phone in all rooms just can 005.There is the VOIP phone to call in 006 when this moment, then DAA at first can receive bell signal and the caller ID (Caller ID) that ADSL IAD sends, DAA notice CPLD has bell signal to come in then, CPLD control SLIC enters Ring Mode, and the phone in all rooms is all shaken to ring and caller id information is sent to the phone waits for user off-hook by ring and replys 007 at this moment.If this moment, user arbitrary phone was picked up then CPLD can obtain signal and DAA is also switched to off hook state, so voice pathway sets up successfully, begins to converse 008 up to end of conversation on-hook 017, comes back to that the standby mode wait is next converses; Wait ADSL IAD phone ringing to stop back the design's product if nobody replys and reenter standby mode.
For dialing VOIP phone and VOIP service standby software logic control flow chart, system boot and judgement PSTN service are all identical with Fig. 3 logic diagram up to dialing VOIP phone 005 state as Fig. 4.Need externally to make a call VOIP when this moment, when the user picks up the telephone, system detects off hook signal 012, the CPLD control relay switches to voltage detecting one end rapidly then, be used for judging that this moment, off hook signal was that user's off-hook is made a phone call or (the SLIC output voltage is set at-48V in this product owing to there is the PSTN service to enter family 011 suddenly, voltage range-38V in the PSTN network in country variant area ~-78V between, when there were voltage difference in the present invention's design and PSTN service between the two, meeting was because of the excessive off hook signal that occurs of SLIC telephone wire direct current).If do not detect the PSTN voltage signal on the outside line this moment, then switch back SLIC one end at once again, the DAA of CPLD control simultaneously enters off hook state 015, and the user just can hear that ADSL IAD passes the dialing tone of coming by DAA this moment, waits for user's Outgoing Call number.The number that this moment, the user transferred to can be transmitted to ADSL IAD equipment completely, comprises DTMF pulsing (DTMF) or pulse dialing modulation (Pulse dialing) two kinds of modulation systems 012; When not having phone to insert and transfering to promptly to provide VOIP to serve to each room, and all phones are all when standby, this moment, CPLD was with the generating positive and negative voltage 009 on continuous control of the time cycle SLIC output telephone wire, was to occur in order to detect the PSTN service in real time at holding state like this.Under PSTN service voltage and the external output voltage of SLIC conflicts mutually and both voltages are identical situation 010, SLIC off hook signal can not occur, this moment, the telephone line voltages positive-negative polarity of SLIC overturn mutually, made SLIC off hook signal occur thereby so just can form loop current with outside pstn telephone; When SLIC provides voltage and PSTN service voltage not simultaneously 011, forming direct current because both have voltage difference makes SLIC enter off hook state, thereby detected by CPLD, SLIC can both enter off hook state when accomplishing can both externally have PSTN to come in any case, the CPLD control relay disconnects SLIC rapidly then, switch to wireline inspection end 013, judgement is the phone off-hook this moment or PSTN normal telephone service turn up service 014 is arranged, if the outside line voltage that detects the PSTN normal telephone service is arranged, explanation is to cause SLIC to enter off hook state owing to PSTN service voltage occurs, then relay no longer switches back SLIC, always with insert outdoor telephone wire and be connected up to detecting the PSTN service and disappear and then switching back SLIC one side; If do not detect PSTN outside line voltage, relay then rapidly switchback SLIC one side finish user's dialing and action such as answer, up to phone on-hook end of conversation 017.