CN104639744B - GSM/PSTN (global system for mobile communication/public switched telephone network) automatic switching device - Google Patents

GSM/PSTN (global system for mobile communication/public switched telephone network) automatic switching device Download PDF

Info

Publication number
CN104639744B
CN104639744B CN201510023811.8A CN201510023811A CN104639744B CN 104639744 B CN104639744 B CN 104639744B CN 201510023811 A CN201510023811 A CN 201510023811A CN 104639744 B CN104639744 B CN 104639744B
Authority
CN
China
Prior art keywords
gsm
pstn
module
mode
microprocessor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201510023811.8A
Other languages
Chinese (zh)
Other versions
CN104639744A (en
Inventor
林凡强
贾建军
陈起传
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Univeristy of Technology
Original Assignee
Chengdu Univeristy of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Univeristy of Technology filed Critical Chengdu Univeristy of Technology
Priority to CN201510023811.8A priority Critical patent/CN104639744B/en
Publication of CN104639744A publication Critical patent/CN104639744A/en
Application granted granted Critical
Publication of CN104639744B publication Critical patent/CN104639744B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a GSM/PSTN (global system for mobile communication/public switched telephone network) automatic switching device, which comprises a microprocessor, a GSM module, a PSTN dialing and detection module, a DTMF (dual-tone multi-frequency) coding and decoding module and an analog switch, wherein incoming signals of a PSTN network and a GSM network can be monitored, if the incoming signal of the PSTN network is monitored, an SIM (subscriber identity module) card calls a preset GSM switching number, if the incoming signal of the GSM is monitored and the judging result shows that a user corresponding to the incoming signal is an authorized user, a call can only be answered, then entering into a setting mode or a switching mode is carried out according to the mobile phone press key input of the authorized user, instruction setting is carried out in the setting mode, or the PSTN network is used for dialing in the switching mode. The GSM/PSTN automatic switching device has the advantages that the simple and fast switching can be realized between the GSM and PSTN networks, the calling and called operations can be flexibly converted according to requirements, in addition, the user privacy can be protected, and the telephone charge of the user is saved.

Description

Automatic switching device for GSM/PSTN
Technical Field
The invention relates to a telephone switching device, in particular to a GSM/PSTN automatic switching device.
Background
At present, two telephone lines are connected to two input ends of the telephone adapter at the same time, and the telephone is connected to the output end of the telephone adapter. When an external telephone is called, a ringing signal appears on one of the two lines, and the telephone adapter automatically connects the telephone set to the ringing telephone line. The telephone rings, and the user goes off-hook to talk with the outside line. When making a call, the access is selected by pressing a key.
The other fixed telephone adapter has two external LINE interfaces of LINE1/LINE2, and if a call is incoming from LINE1, the equipment automatically makes the call out to the specified call through LINE2 for answering. The telephone number for appointed answering can be preset in the adapter, and can be the mobile phone number of the person who goes out. The device has RJ11 interface and DC interface.
At present, the two main stream switches adopt a fixed telephone network for telephone switching, so at least two telephone lines are needed, and the use is inconvenient. The switch-over machine can only store one user number generally, has no password protection function, and can not carry out remote short message or voice setting.
In addition, the switching machine cannot well protect the privacy of a user, for example, the currently realized switching function is that an external dialing base machine can be automatically switched to a set user mobile phone, so that the mobile phone number of the user can be protected from being leaked, but if the user wants to dial a call to the outside, the base machine needs to be dialed, otherwise, the problem of number leakage exists, and a convenient switching machine is not provided for the user to directly dial the external number by using the mobile phone without leaking the user number.
There is also a case where when the user uses the switch over machine in a different place, a call charge and a roaming charge are generated which are expensive if the switch over machine is dialed as a calling party.
Disclosure of Invention
The invention aims to provide a GSM/PSTN automatic switching device which can solve the problems, flexibly realize switching between GSM and PSTN networks, flexibly switch a calling party and a called party according to needs, protect the privacy of users, save the telephone charge of the users and have flexible use modes.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows: a GSM/PSTN automatic switching device comprises a microprocessor, a GSM module, a PSTN dialing and detecting module, a DTMF decoding module, a DTMF coding module and an analog switch, wherein the GSM module, the PSTN dialing and detecting module, the DTMF decoding module, the DTMF coding module and the analog switch are connected with the microprocessor; wherein,
the GSM module is externally connected with an SIM card, is electrified to automatically recognize and connect with a GSM network, monitors an incoming call signal of a mobile phone user, and sends the incoming call signal to the microprocessor through a serial port;
the PSTN dialing and detecting module is communicated with a PSTN network, monitors a ringing signal from the PSTN network, and is controlled by the microprocessor to realize the switching of PSTN voice through the GSM network when the telephone is not answered by a person;
the analog switch is positioned between the GSM module and the DTMF decoding module and between the GSM module and the PSTN network, and the on-off of the switch is controlled by the microprocessor;
after the microprocessor receives the first incoming call signal and carries out preprocessing, the device enters a normal working mode, monitors the incoming call signal of a GSM network and the ringing signal of a PSTN network, and carries out corresponding processing;
the pretreatment comprises the following steps: the microprocessor detects the incoming call signal of a first mobile phone user of the GSM network, defaults the incoming call signal as an administrator number, answers the incoming call signal and enters an administrator initial setting mode; the instructions in the administrator initial setting mode comprise an authorized user adding mode, an authorized user deleting mode, a GSM incoming call forwarding number setting mode, a PSTN incoming call forwarding number setting mode and a login password setting mode;
the signal processing after entering the normal working mode is as follows:
if the call is a PSTN network call signal, the SIM card calls a PSTN call forwarding number, and opens an analog switch between the PSTN network and the GSM module to connect the PSTN network and a voice channel of the GSM module;
if the call is a GSM call signal, the call is judged to be answered by the authorized user, and the call is judged to enter a setting mode or a transfer mode according to a mobile phone key input value of the authorized user, instruction setting is carried out in the setting mode, or transfer dialing is carried out by utilizing a PSTN network in the transfer mode, and the PSTN network and a voice channel of a GSM module are connected; the instruction for setting the mode comprises the setting of a GSM call forwarding number and the setting of a PSTN call forwarding number.
The microprocessor can monitor incoming call signals of a GSM network and a PSTN network, when the invention is used for the first time, the microprocessor can enter a normal working mode only by preprocessing, the microprocessor can default the incoming call number of a first mobile phone user of the GSM network as an administrator number in the preprocessing, the microprocessor has the highest authority, and the invention can normally work only after the administrator adds and deletes authorized users in a preset mode, sets information such as a GSM incoming call transfer number, a PSTN incoming call transfer number, a login password and the like, wherein:
the adding and deleting of the authorized user specifically comprises the steps of inputting a mobile phone number of the authorized user into a memory built in the microprocessor, or deleting;
the PSTN incoming call forwarding number is an authorized user mobile phone number needing to be forwarded when the microprocessor detects that an incoming call signal exists in a PSTN network, the number is mainly used for forwarding a mobile phone when a landline phone is called, the number is generally fixed and is a number of one of authorized users, when someone calls the landline phone, the number is automatically forwarded when no person answers the landline phone, and an administrator can set and change the number;
the GSM incoming call forwarding number is a number which an authorized user wants to dial out through a landline telephone, and when the authorized user wants to dial by using a mobile phone but uses a PSTN network for communication (the personal number information is hidden), the number can be input through a keyboard of the mobile phone. The number is not fixed and is the number that the authorized user wants to establish a call.
After the presetting is finished, the telephone enters a normal working mode, the invention can realize the switching of incoming call signals, wherein, if the incoming call signals of the PSTN network are detected, namely, a person dials the number of the fixed telephone, when the fixed telephone is determined to answer by no person, the SIM card calls the PSTN incoming call switching number, and opens an analog switch between the PSTN network and the GSM module to connect the voice channel of the PSTN network and the GSM module, and at the moment, the telephone switching can be realized.
The method comprises the following steps that an authorized user dials the SIM card number on a device, wherein the first step is setting, the setting mode is the same as the mode of setting by a manager through a mobile phone key, but the authority is not as high as that of the manager, for example, operations such as adding and deleting the authorized user, setting a login password and the like cannot be performed, but the setting of a GSM incoming call forwarding number and a PSTN incoming call forwarding number can be realized; and secondly, carrying out telephone switching, judging as an authorized user if the microprocessor detects that the GSM incoming call signal is detected, carrying out the next operation if the GSM incoming call signal is detected, and otherwise, not answering and not establishing a call. If the telephone switching is needed, the telephone of the PSTN network is used for dialing, and the voice channel of the PSTN network and the GSM module is connected, at the moment, the dialed user displays a telephone number, the authorized user can hide the number of the authorized user, meanwhile, if the authorized user and the SIM card are the same virtual V-network user, the communication cost between the authorized user and the SIM card is very low, the communication cost of the fixed telephone is far lower than that of a mobile telephone, and at the moment, the communication cost of the authorized user can be reduced.
Preferably, the method comprises the following steps: in the preprocessing, the incoming call signal is answered, and the specific mode of entering the administrator initial setting mode is as follows: the microprocessor answers the incoming call signal, a module switch between the GSM module and the DTMF decoding module is opened, the GSM module and the DTMF decoding module are connected, an administrator inputs DTMF codes of corresponding instructions through keys of the mobile phone, and the DTMF codes are decoded by the DTMF decoding module and then sent to the microprocessor for processing.
Preferably, the method comprises the following steps: the specific method for judging whether the call is an authorized user is that after the microprocessor detects a GSM call indication signal, the GSM module sends the number information of the call to the microprocessor through the serial port, and the microprocessor extracts the call number from the information received by the serial port and compares the call number with the number stored in the system to judge whether the call is an authorized number.
Preferably, the method comprises the following steps: the specific mode of entering the setting mode or the switching mode according to the mobile phone key input of the authorized user is as follows:
(1) after answering, opening an analog switch between the GSM module and the DTMF decoding module, and communicating the GSM module and the DTMF decoding module;
(2) the DTMF code input by the mobile phone key is decoded by the DTMF decoding module controlled by the microprocessor;
(3) if the decoding is a preset instruction, entering a set mode, and operating according to a DTMF code of the corresponding instruction input by the mobile phone of the authorized user; if the phone number is decoded to be forwarded, entering a forwarding mode, wherein the forwarding mode is as follows:
a. the microprocessor sends the telephone number to be transferred to the DTMF coding module to be converted into an analog signal, and the analog signal is dialed through the PSTN module;
b. after the dialing-on, the analog switch between the GSM module and the DTMF decoding module is switched off, the analog switch between the PSTN network and the GSM module is switched on, and the voice channel between the PSTN network and the GSM module is switched on.
Preferably, the method comprises the following steps: the analog switch model is CD 4066.
Preferably, the method comprises the following steps: the setting mode of the authorized user also comprises roaming mode setting, and after entering the roaming mode, the switching mode is as follows:
(1) the microprocessor detects the GSM incoming call signal of the authorized user, hangs up first, and dials back the authorized user by the SIM card;
(2) authorizing the user to answer and inputting the transferred telephone number;
(3) the microprocessor sends the telephone number to the DTMF coding module for recoding, and sends the code to the PSTN dialing and detecting module;
(4) the microprocessor controls the PSTN dialing and the detection module to dial according to the codes;
(5) after the dialing is completed, the serial port returns the state information of the dialing to the microprocessor, at the moment, the analog switch between the GSM module and the DTMF decoding module is switched off, the analog switch between the PSTN network and the GSM module is switched on, and the voice channel between the PSTN network and the GSM module is switched on.
In the roaming mode, when the authorized user needs to use the device, the authorized user is enabled to become a called party, so that the communication cost of the authorized user in the roaming process can be saved.
Preferably, the method comprises the following steps: the setting mode of the authorized user also comprises a short message setting mode, the microprocessor monitors signals through a serial port connected with the GSM module, judges the signals to be a telephone or a short message, answers the telephone if the signals are the telephone, sets corresponding functions according to a code input by the user, and sets related settings according to the content of the short message if the signals are the short message, wherein the content of the short message is coded information corresponding to a command input in a telephone mode.
And through a short message setting mode, an authorized user inputs the coding information corresponding to the instruction through a short message, and the microprocessor operates according to the corresponding code after extracting the coding information.
Preferably, the method comprises the following steps: the instructions in the initial mode further comprise login password modification, administrator recovery system modification and administrator password modification.
Preferably, the method comprises the following steps: the microprocessor adopts an STC10F04 singlechip.
Compared with the prior art, the invention has the advantages that: the single chip microcomputer is used as the whole control core, the GSM module is used for wireless communication, the dual in-line CMOS integrated circuit CD4066 bidirectional analog numerical control switch is selected for channel switching, the MAX232 interface conversion module is matched to enable the single chip microcomputer and the GSM module to carry out RS232 serial port communication, and standard AT commands are used for controlling the GSM module to realize various wireless communication functions. After a call is established by dialing a SIM card externally connected with a GSM module, a user can use a mobile phone keyboard to send DTMF codes to carry out user login, addition, deletion, password change and number switching setting. Or can be set directly through short messages. Under the control of the processor, the PSTN calls the post-system through the GSM to dial the set telephone number, then selects the communication channel through the analog switch, the GSM calls the transfer number through the PSTN after the call, the analog switch automatically transfers the communication channel, and finally, the automatic transfer is realized.
The invention can realize simple and quick switching between the GSM network and the PSTN network according to the actual requirements of users, solves the problem of telephone omission of the telephone set, also solves the problem that the dialing required by the mobile phone can not be directly dialed by the telephone set, and simultaneously can reduce the communication cost of authorized users when a plurality of users are the same virtual V network user of the GSM network.
Drawings
FIG. 1 is a block diagram of the system of the present invention.
Fig. 2 is a circuit diagram of GSM network condition monitoring.
Fig. 3 is a circuit diagram of a SIM card.
Fig. 4 is a GSM module control pin diagram.
Fig. 5 is a circuit diagram of a DTMF decoding module.
Fig. 6 is a circuit diagram of a DTMF coding module.
Figure 7 is a functional diagram of a CD4066 analog switch pin.
Fig. 8 is a circuit diagram of the CD4066 analog switch peripheral connection.
Fig. 9 is a connection diagram of the single chip microcomputer and the GSM module.
Fig. 10 is a circuit diagram of the single chip microcomputer control.
Fig. 11 is a circuit diagram of a PSTN voice call.
FIG. 12 is a system software flow diagram of the present invention.
Fig. 13 is a list of system setting commands for the dial mode according to the present invention.
Detailed Description
The invention will be further explained with reference to the drawings.
Example 1: referring to fig. 1 to 12, a GSM/PSTN automatic switching device includes a microprocessor, and a GSM module, a PSTN dialing and detecting module, a DTMF decoding module, a DTMF coding module and an analog switch connected to the microprocessor; wherein,
the GSM module is externally connected with an SIM card, is electrified to automatically recognize and connect with a GSM network, monitors an incoming call signal of a mobile phone user, and sends the incoming call signal to the microprocessor through a serial port;
the PSTN dialing and detecting module is communicated with a PSTN network, monitors a ringing signal from the PSTN network, and is controlled by the microprocessor to realize the switching of PSTN voice through the GSM network when the telephone is not answered by a person;
the analog switch is positioned between the GSM module and the DTMF decoding module and between the GSM module and the PSTN network, and the on-off of the switch is controlled by the microprocessor; in the invention, the analog switch is CD4066 in model;
after the microprocessor receives the first incoming call signal and carries out preprocessing, the device enters a normal working mode, monitors the incoming call signal and the ringing signal and carries out corresponding processing;
the pretreatment comprises the following steps: the microprocessor detects the incoming call signal of a first mobile phone user of the GSM network, defaults the incoming call signal as an administrator number, answers the incoming call signal and enters an administrator initial setting mode; the instructions in the administrator initial setting mode comprise an authorized user adding mode, an authorized user deleting mode, a GSM incoming call forwarding number setting mode, a PSTN incoming call forwarding number setting mode and a login password setting mode; the method also comprises the steps of modifying a login password, recovering the system by the administrator and modifying the password by the administrator.
In the preprocessing, the incoming call signal is answered, and the specific mode of entering the administrator initial setting mode is as follows: the microprocessor answers the incoming call signal, a module switch between the GSM module and the DTMF decoding module is opened, the GSM module and the DTMF decoding module are connected, an administrator inputs DTMF codes of corresponding instructions through keys of the mobile phone, and the DTMF codes are decoded by the DTMF decoding module and then sent to the microprocessor for processing.
The signal processing after entering the normal working mode is as follows:
if the call is a PSTN network call signal, the SIM card calls a PSTN call forwarding number, and opens an analog switch between the PSTN network and the GSM module to connect the PSTN network and a voice channel of the GSM module;
if the call is a GSM call signal, the call is judged to be answered by the authorized user, the call enters a set mode or a transfer mode according to the input of a mobile phone key of the authorized user, instruction setting is carried out in the set mode, or dialing is carried out by utilizing a PSTN network in the transfer mode, and the PSTN network and a voice channel of a GSM module are connected; the instruction for setting the mode comprises the setting of a GSM call forwarding number and the setting of a PSTN call forwarding number.
The specific method for judging whether the call is an authorized user is that after the microprocessor detects a GSM call indication signal, the GSM module sends related information of the call to the microprocessor through the serial port, and the microprocessor extracts a call number from the information received by the serial port and compares the call number with a number stored in the system to judge whether the call is an authorized number.
The specific mode of entering the setting mode or the switching mode according to the mobile phone key input of the authorized user is as follows:
(1) after answering, opening an analog switch between the GSM module and the DTMF decoding module, and communicating the GSM module and the DTMF decoding module;
(2) the DTMF code input by the mobile phone key is decoded by the DTMF decoding module controlled by the microprocessor;
(3) if the decoding is a preset instruction, entering a set mode, and operating according to a DTMF code of the corresponding instruction input by the mobile phone of the authorized user; if the phone number is decoded to be forwarded, entering a forwarding mode, wherein the forwarding mode is as follows:
a. the microprocessor sends the telephone number to be transferred to the DTMF coding module to be converted into an analog signal, and the analog signal is dialed through the PSTN module;
b. after the dialing-on, the analog switch between the GSM module and the DTMF decoding module is switched off, the analog switch between the PSTN network and the GSM module is switched on, and the voice channel between the PSTN network and the GSM module is switched on.
The setting mode of the authorized user also comprises roaming mode setting, and after entering the roaming mode, the switching mode is as follows:
(1) the microprocessor detects the GSM incoming call signal of the authorized user, hangs up first, and dials back the authorized user by the SIM card;
(2) authorizing the user to answer and inputting the telephone number to be transferred;
(3) the microprocessor sends the telephone number to the DTMF coding module for recoding and sends the code to the PSTN for dialing;
(4) after the dialing is completed, the serial port returns the state information of the dialing to the microprocessor, at the moment, the analog switch between the GSM module and the DTMF decoding module is switched off, the analog switch between the PSTN network and the GSM module is switched on, and the voice channel between the PSTN network and the GSM module is switched on.
In this embodiment, the STC10F04 single chip microcomputer is used as the whole control core, the MD231 model GSM module is used for wireless communication, the dual in-line CMOS integrated circuit CD4066 bidirectional analog numerical control switch is used for channel automatic switching, and the MAX232 interface conversion module is used to make the single chip microcomputer and the GSM module perform RS232 serial port communication. When the MD231 is used as a standard GSM module, the AT command input by the serial port uses the module, the feedback information of the module is obtained from the COM port, and the singlechip controls the module to perform communication functions such as GPRS internet surfing, telephone calling, short message receiving and sending and the like by the standard AT command through the serial port. Compared with the existing switching machine, the function of the invention is expanded more.
The PWR pin of the MD231GSM module is pulled down for 2 seconds to start up, and the module can be powered on and automatically started up by manual start-up or a pattern circuit. The module has an average standby current of about 15mA in a non-low power consumption mode and reaches about 3-4mA in a low power consumption mode, which is also a solution of the invention for low power consumption. Two conditions are needed for the module to enter low power consumption, namely, the AT command (AT + cslp =1) is used for setting, so that the module is allowed to enter a low power consumption mode, and the DSR pin of the serial port is pulled high. After the low power consumption mode is entered, the serial port function is closed, at the moment, the DSR pin is pulled down when the single chip microcomputer is communicated with the GSM module, the module is awakened, and the serial port resumes working again. The serial communication mode of the single chip and the GSM module is shown in fig. 9, and this example belongs to a 9-pin serial port. In the low power consumption mode, if an incoming call or a short message exists, the module can automatically wake up and output square waves by the RI pin to inform the single chip microcomputer.
Referring to fig. 2, fig. 3, fig. 4, and fig. 10, the pin IO31 of the GSM module is externally connected to a network detection circuit so as to detect a network channel to which an incoming call belongs. The pins VRSIM, SIM _ RST, SIM _ IO and SIM _ CLK are externally connected with an SIM card circuit, and when a user dials the number, the module can receive information and receive the control of the single chip microcomputer through a serial port and perform corresponding processing. The pins WATCHDOG, RI, TXD1, RXD2 and HARDWARE _ SHUTOFF are connected with the singlechip to transmit and receive messages.
Referring to fig. 5, 6 and 10, when a user dials the SIM card to perform a corresponding voice call, DTMF decoding is performed first, and the transmitted voice information is sent to the single chip, so that the single chip can determine and control the GSM module to perform correct processing. If the call is to be switched, DTMF coding is performed first to convert the digital information into DTMF signals and send out.
In order to realize the automatic switching of the GSM/PSTN, a dual in-line CMOS integrated circuit CD4066 bidirectional analog-digital transmission switch is matched. Referring to fig. 7, a pin diagram of a CD4066 analog switch, with 4 independent analog switches inside each package, each analog switch has three terminals, input, output, and control, where the input and output terminals are interchangeable. The power supply is switched on, when the control pin is at a high potential, the output pin and the input pin are switched on, and when the control pin is at a low potential, the output pin and the input pin are switched off.
Referring to fig. 5, 8 and 10, the pin CTR _ A, CTR _ B, CTR _ C, CTR _ D of the analog switch is connected to the single chip and serves as a control terminal for controlling input and output of the analog switch. For example, when the network detects that the electrical channel is GSM, the CTR _ B pin is high, the switch B and the input/output pin 3/4 are turned on, GSM decoding is performed, and then encoding and switching are performed.
Referring to fig. 11, a circuit diagram of a voice call is shown, in which an earphone path is on the left, a microphone path is on the right, and both sides are connected to a varactor diode, so as to form an audio transformer for isolating voice signals, improve the voice clarity of system switching, and reduce audio distortion.
The invention is especially suitable for office use, and a user needs to configure one 9V power supply, one telephone line, one antenna and one GSM card when using the device. The installation method of the invention is as follows: the power supply supplies power to the invention, the telephone line is connected with the PSTN dialing and detecting module and a fixed telephone in an office, the antenna is connected with the GSM module, and the GSM module is externally connected with an SIM card. In this embodiment, it is assumed that the SIM card and the authorized user are numbers in the same virtual V network. After the device is connected correctly, the system can be automatically started, the signal lamp can twinkle once every 1 second, and after the system finds the signal, the signal lamp can twinkle once every 3 seconds. At this point, the system is initialized.
When the invention is used for the first time, the normal work can be realized only by preprocessing, in the processing, the microprocessor can default the incoming call signal of the first mobile phone user of the GSM network as the administrator number and grant the highest management operation authority to the administrator, and the administrator can perform operations of authorizing the user, deleting the authorized user, setting the GSM incoming call forwarding number, setting the PSTN incoming call forwarding number, setting the login password and the like. The specific arrangement is shown in fig. 13. Of course, fig. 13 is only one embodiment, and the command method is not limited to this one.
When the administrator sets the authorized user, the authorized user can use the device, otherwise, the authorized user cannot answer the SIM card. Of course, some authorities of the administrator and the authorized user are the same, for example, the above-mentioned GSM call forwarding number setting and PSTN call forwarding number setting, and both the administrator and the authorized user can set the forwarding number according to actual needs, so as to facilitate use.
After the initial setting is finished, the device carries out a normal working mode, provides switching operation for an administrator and an authorized user, or receives the setting of the administrator and the authorized user to set the system.
Now, suppose that one authorized user has six digits, when the telephone call is not answered by people, the PSTN call forwarding number is set as the authorized user 1, and then when the outside line is called into the telephone, the invention judges that the telephone call is not answered by people, the mobile phone number of the authorized user 1 is called through the SIM card, and the analog switch between the PSTN network and the GSM module is opened, the voice channel of the PSTN network and the GSM module is connected, and the authorized user 1 and the outside line are connected.
The SIM card is generally dialed by an authorized user and an administrator, when the authorized user dials the SIM card, two SIM cards are needed, one SIM card is set, and the other SIM card is used for call forwarding, so when the GSM incoming call signal is monitored, whether the GSM incoming call signal is an authorized user is judged, the GSM incoming call signal is answered only if the GSM incoming call signal is answered, and the GSM incoming call signal enters a set mode or a forwarding mode according to the method. If the user enters the setting mode, the authorized user inputs the DTMF code corresponding to the command again to perform setting operation. If the mobile phone enters the switching mode, the user inputs the number to be switched through the keys of the mobile phone, and the microprocessor controls the PSTN dialing and the detection module to dial according to the codes. And after the call is dialed, the PSTN network and the voice channel of the GSM module are connected, and the call is established.
At the moment, because the PSTN dialing and detection module is utilized to dial, the called mobile phone shows a telephone number, the function of hiding the mobile phone number of the calling party is achieved, meanwhile, because the calling party and the SIM card are users in the same virtual V network, the telephone charge cost is very low, and the telephone conversation cost is also relatively low, so that the telephone charge saving effect is achieved.
Certainly, the authorized user can also set its own mode, such as the normal mode and the roaming mode, the normal mode is as described above, no special setting is made, the roaming mode is used when the authorized user is in a different place, the setting mode can be as shown in fig. 13, in the roaming mode, when the microprocessor monitors the GSM network incoming call signal and determines that the user is an authorized user, the user will be on-hook first, and then the user is called back through the SIM card, the specific mode is as described above in this embodiment, so that the cost of the authorized user for a different place call can be reduced.
Example 2: the setting mode of the authorized user also comprises a short message setting mode, the microprocessor monitors GSM incoming call information of the authorized user through a serial port, judges the GSM incoming call information to be a telephone or a short message, answers the telephone if the GSM incoming call information is the telephone, performs corresponding function setting according to a code input by the user, and performs related setting according to the content of the short message if the GSM incoming call information is the short message, wherein the content of the short message is coding information corresponding to the instruction. The rest is the same as in example 1.
Referring to fig. 12, which is a system software flow chart of the present invention, the system software working process: firstly, defining and initializing functions and ports to ensure that chips and modules are in normal working states. After the call comes, the mobile phone or the fixed telephone is detected firstly, if the mobile phone detects the short message or the telephone, and if the mobile phone detects the short message or the telephone, corresponding setting is directly carried out. If the call is the authorized user, judging whether the call is the authorized user, and only the authorized user can carry out setting and call forwarding.

Claims (8)

1. The utility model provides a GSM/PSTN automatic switching device, includes microprocessor and the GSM module that links to each other with microprocessor, PSTN dial and detection module, DTMF decoding module, DTMF coding module and analog switch, its characterized in that:
the GSM module is externally connected with an SIM card, is electrified to automatically recognize and connect with a GSM network, monitors an incoming call signal of a mobile phone user, and sends the incoming call signal to the microprocessor through a serial port;
the PSTN dialing and detecting module is communicated with a PSTN network, monitors a ringing signal from the PSTN network, and is controlled by the microprocessor to realize the switching of PSTN voice through the GSM network when the telephone is not answered by a person;
the analog switch is positioned between the GSM module and the DTMF decoding module and between the GSM module and the PSTN network, and the on-off of the switch is controlled by the microprocessor;
after the microprocessor receives the first GSM incoming call signal for preprocessing, the device enters a normal working mode, monitors the incoming call signal and the ringing signal and carries out corresponding processing;
the pretreatment comprises the following steps: the microprocessor detects the incoming call signal of a first mobile phone user of the GSM network, defaults the incoming call signal as an administrator number, answers the incoming call signal and enters an administrator initial setting mode; the instructions in the administrator initial setting mode comprise an authorized user adding mode, an authorized user deleting mode, a GSM incoming call forwarding number setting mode, a PSTN incoming call forwarding number setting mode and a login password setting mode;
the signal processing after entering the normal working mode is as follows:
if the call is a PSTN network call signal, the SIM card calls a GSM call forwarding number, and opens an analog switch between the PSTN network and the GSM module to connect the PSTN network and a voice channel of the GSM module;
if the call is a GSM call signal, the call is judged to be answered by the authorized user, the call enters a setting mode or a transfer mode according to the input of a mobile phone key of the authorized user, instruction setting is carried out in the setting mode, or DTMF codes are used in the transfer mode, dialing is carried out through a PSTN network, and then a PSTN network and a voice channel of a GSM module are connected; the instruction for setting the mode comprises the setting of a GSM call forwarding number and the setting of a PSTN call forwarding number.
2. The GSM/PSTN automatic transfer device of claim 1, wherein: in the preprocessing, the incoming call signal is answered, and the specific mode of entering the administrator initial setting mode is as follows: the microprocessor answers the GSM call, an analog switch between the GSM module and the DTMF decoding module is turned on, the GSM module and the DTMF decoding module are connected, an administrator inputs DTMF codes of corresponding instructions through keys of the mobile phone, and the DTMF codes are decoded by the DTMF decoding module and then sent to the microprocessor for processing.
3. The GSM/PSTN automatic transfer device of claim 1, wherein: the specific method for judging whether the call is an authorized user is that after the microprocessor detects a GSM call indication signal, the GSM module sends the number information of the call to the microprocessor through the serial port, and the microprocessor extracts the call number from the information received by the serial port and compares the call number with the number stored in the system to judge whether the call is an authorized number.
4. The GSM/PSTN automatic transfer device of claim 1, wherein: the specific mode of entering the setting mode or the switching mode according to the mobile phone key input of the authorized user is as follows:
(1) after answering, opening an analog switch between the GSM module and the DTMF decoding module, and communicating the GSM module and the DTMF decoding module;
(2) the DTMF code input by the mobile phone key is decoded by the DTMF decoding module controlled by the microprocessor;
(3) if the decoding is a preset instruction, entering a set mode, and operating according to a DTMF code of the corresponding instruction input by the mobile phone of the authorized user; if the phone number is decoded to be forwarded, entering a forwarding mode, wherein the forwarding mode is as follows:
a. the microprocessor sends the telephone number to be transferred to the DTMF coding module to be converted into an analog signal, and the analog signal is dialed through the PSTN module;
b. after the dialing-on, the analog switch between the GSM module and the DTMF decoding module is switched off, the analog switch between the PSTN network and the GSM module is switched on, and the voice channel between the PSTN network and the GSM module is switched on.
5. The GSM/PSTN automatic transfer device of claim 1, wherein: the analog switch model is CD 4066.
6. The GSM/PSTN automatic transfer device of claim 1, wherein: the setting mode of the authorized user also comprises roaming mode setting, and after entering the roaming mode, the switching mode is as follows:
(1) the microprocessor detects the GSM incoming call signal of the authorized user, hangs up the phone first, and then dials back the authorized user by the SIM card;
(2) authorizing the user to answer and inputting the telephone number to be transferred;
(3) the microprocessor sends the telephone number to the DTMF coding module for recoding and sends the code to the PSTN dialing module;
(4) after the dialing is completed, the serial port returns the state information of the dialing to the microprocessor, at the moment, the analog switch between the GSM module and the DTMF decoding module is switched off, the analog switch between the PSTN network and the GSM module is switched on, and the voice channel between the PSTN network and the GSM module is switched on.
7. The GSM/PSTN automatic transfer device of claim 1, wherein: the setting mode of the authorized user also comprises a short message setting mode, the microprocessor monitors a GSM incoming call signal of the authorized user through a serial port, judges the GSM incoming call signal to be a telephone or a short message, answers the telephone if the GSM incoming call signal is the telephone, performs corresponding function setting according to a code input by the user, and performs related setting according to the content of the short message if the GSM incoming call signal is the short message, wherein the content of the short message is coded information corresponding to the instruction.
8. The GSM/PSTN automatic transfer device of claim 1, wherein: the instructions in the initial mode further comprise login password modification, administrator recovery system modification and administrator password modification.
CN201510023811.8A 2015-01-19 2015-01-19 GSM/PSTN (global system for mobile communication/public switched telephone network) automatic switching device Expired - Fee Related CN104639744B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510023811.8A CN104639744B (en) 2015-01-19 2015-01-19 GSM/PSTN (global system for mobile communication/public switched telephone network) automatic switching device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510023811.8A CN104639744B (en) 2015-01-19 2015-01-19 GSM/PSTN (global system for mobile communication/public switched telephone network) automatic switching device

Publications (2)

Publication Number Publication Date
CN104639744A CN104639744A (en) 2015-05-20
CN104639744B true CN104639744B (en) 2017-02-22

Family

ID=53218031

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510023811.8A Expired - Fee Related CN104639744B (en) 2015-01-19 2015-01-19 GSM/PSTN (global system for mobile communication/public switched telephone network) automatic switching device

Country Status (1)

Country Link
CN (1) CN104639744B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106056722A (en) * 2016-07-01 2016-10-26 孟贤领 Remote-control intelligent door lock based on cellphone card and using method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1931153A2 (en) * 2006-12-04 2008-06-11 Ivaylo Emilov Velev System with a device for combining the operation fo GSM phones with internet telephony
CN201345746Y (en) * 2009-01-16 2009-11-11 厦门敏讯信息技术股份有限公司 Dual-mode phone
CN102056350A (en) * 2009-11-04 2011-05-11 陈樟卿 Remote transfer mobile phone communication system
CN202873078U (en) * 2012-09-28 2013-04-10 深圳市广和通实业发展有限公司 GSM/GPRS industrial module

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080107051A1 (en) * 2006-11-07 2008-05-08 Mediatek Inc. System and method for operating a portable electronic device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1931153A2 (en) * 2006-12-04 2008-06-11 Ivaylo Emilov Velev System with a device for combining the operation fo GSM phones with internet telephony
CN201345746Y (en) * 2009-01-16 2009-11-11 厦门敏讯信息技术股份有限公司 Dual-mode phone
CN102056350A (en) * 2009-11-04 2011-05-11 陈樟卿 Remote transfer mobile phone communication system
CN202873078U (en) * 2012-09-28 2013-04-10 深圳市广和通实业发展有限公司 GSM/GPRS industrial module

Also Published As

Publication number Publication date
CN104639744A (en) 2015-05-20

Similar Documents

Publication Publication Date Title
CN101832067A (en) Electronic control door lock system based on CDMA module and thievery prevention implementation method thereof
CN102104667B (en) Mobile phone and on-hook method thereof
AU621752B2 (en) Cellular telephone with standard telephone set
US5553122A (en) Universal wedge-type telephone adaptor for computer system
US5722087A (en) Method for interpreting dialled digits of a dialling sequence transmitted by a dialling means to a radio transceiver
CN201274576Y (en) Dual-mode telephone
CN104639744B (en) GSM/PSTN (global system for mobile communication/public switched telephone network) automatic switching device
CN102857731A (en) Method for identity validation and automatic answering of 3G wireless communication module video telephone call
US20050107121A1 (en) Method and system for enhance utilization of a cell phone
EP2523438B1 (en) Mobile terminal
US5638437A (en) Telecommunication system and method enabling a user to get access to an automated call processing from a central station operating on pulse dialling mode
US6901271B1 (en) Determining the last digit of a dialed number
KR0149155B1 (en) Calling method using personal computer
CN201699771U (en) Wireless office fixed phone
US6580922B1 (en) Method of transmitting telephone number in wireless local loop system
US20070223460A1 (en) System and method for communicating VoIP module and telephone network
CN201467239U (en) Two-lane access telephone
JP2805724B2 (en) Telephone switching equipment
KR19990010671A (en) Digital Key Phones for Sending / Receiving Texts and Their Operation Methods
US20080049721A1 (en) 3-in-1 automatic call forward system
KR100576022B1 (en) Mobile terminal device with mobility in private exchange
CN101969611A (en) Method for transmitting communication information between communication devices by utilizing internet
JP3584330B2 (en) Communication terminal, data communication method using the same, and network control device
JP3091070B2 (en) Terminal side network controller
CN101170598B (en) Incoming call distinguishing method and device for device with common phone line

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170222

CF01 Termination of patent right due to non-payment of annual fee