Communication channel multiplexer, system and method
Technical field
The present invention relates to communication technique field more particularly to a kind of communication channel multiplexer, system and methods.
Background technology
The prior art passes through Public Switched Telephone Network in processing POS terminal(Public Switched Telephone
Network, PSTN)When carrying out speech communication with net control device, different PSTN-E1 channels are all utilized in by being configured, to divide
Manage MODEM voice messagings and shift keying modulation in other places(Frequency-shift keying, FSK)Voice messaging.
However, different POS terminals, when being sent using different MODEM and FSK voices, must just be configured different exhale
It calls out the numbers code, increases the possibility of error, in addition, POS terminal user must also apply for different PSTN-E1 channels, increase
Operation cost, and the utilization rate of PSTN-E1 channels is reduced.
Invention content
Technical problem to be solved of the embodiment of the present invention is, provides a kind of communication channel multiplexer, system and side
Method reduces the possibility of error, cuts operating costs, and improves the utilization rate of PSTN-E1 channels.
In order to solve the above-mentioned technical problem, the embodiment of the present invention proposes a kind of communication channel multiplexing method, including:
Incoming call receiving step:The incoming signal that the request sent out by communication channel reception requesting party connects;
Mode decision step:Confirm to be currently the first operating mode or the second operating mode, if the first operating mode is then
Into the first work step, if the second operating mode then enters the second work step;
First work step:It is docked using the first operating mode with requesting party, docks and successfully then receive the first formatted data
And it is sent to the first backstage;And
Second work step:It is docked using the second operating mode with requesting party, docks and successfully then receive the second formatted data
And it is sent to the second backstage.
Further, the first operating mode is MODEM patterns, and the first work step includes:
First sends sub-step:MODEM audio signals are sent to requesting party;
First docking judges sub-step:If receiving the MODEM signals of requesting party's feedback, success is docked;And
First communication sub-step:It receives the first formatted data and is sent to MODEM finance backstage.
Further, the second operating mode is FSK patterns, and the second work step includes:
Second sends sub-step:Fsk data sound signal 0x81 is sent to requesting party;
Second docking judges sub-step:If receiving the fsk data sound signal 0x82 of requesting party's feedback, success is docked;And
Second communication sub-step:It receives the second formatted data and is sent to FSK finance backstage.
Further, timeout treatment step is further included after first work step and the second work step:Docking is super
It is still unsuccessful to spend the predetermined time, terminates flow.
Further, the first formatted data is MODEM data packets, and form is " indexed variable+destination address+source address+number
According to ".
Further, the second formatted data is fsk data packet, and form is " type of message+data length+random number+synchronization
Serial number+data ".
The embodiment of the present invention additionally provides a kind of communication channel multiplexer, including:
The incoming call receiving module of incoming signal that the request sent out by communication channel reception requesting party connects;
Confirm the mode deciding module currently for the first operating mode or the second operating mode;
It is docked, docked after successfully then receiving the first formatted data and being sent to first with requesting party using the first operating mode
First operational module of platform;And
It is docked, docked after successfully then receiving the second formatted data and being sent to second with requesting party using the second operating mode
Second operational module of platform.
Further, the communication channel multiplexer further includes:Docking is still unsuccessful more than the predetermined time, terminates to flow
The timeout treatment module of journey.
The embodiment of the present invention additionally provides a kind of communication channel multiplex system, the system comprises:
Generate and send the incoming signal of request connection, and the requesting party communicated in successful connection;
Communication channel multiplexer as described above, the communication channel multiplexer are connected by PSTN-E1 communication channels
It is connected to requesting party;And
The first backstage and the second backstage of communication channel multiplexer are connected to by TCP/IP.
Further, the requesting party is POS terminal, and the communication channel multiplexer is net control device, and the first backstage is
MODEM finance backstage, the second backstage are FSK finance backstage.
The embodiment of the present invention judges by using advanced row current operation mode, is carried out further according to current operation mode corresponding
Docking communication technological means, reached that fallibility is small, and operation cost is low, the high technology of PSTN-E1 channel utilization indexs
Effect.
Description of the drawings
Fig. 1 is the structure diagram of the communication channel multiplex system of the embodiment of the present invention.
Fig. 2 is the communication channel multiplex system functional block diagram of the embodiment of the present invention.
Fig. 3 is the flow diagram of the communication channel multiplexing method of the embodiment of the present invention.
Fig. 4 is a kind of preferred MODEM data packet formats of the embodiment of the present invention.
Fig. 5 is a kind of preferred fsk data packet form of the embodiment of the present invention.
Fig. 6 is the flow diagram of the first work step of the embodiment of the present invention.
Fig. 7 is the flow diagram of the second work step of the embodiment of the present invention.
Specific embodiment
It should be noted that in the absence of conflict, the feature in embodiment and embodiment in the application can phase
It mutually combines, the utility model is described in further detail in the following with reference to the drawings and specific embodiments.
The embodiment of the present invention handles different MODEM and FSK voice messagings using same PSTN-E1 channels, thus
Different POS terminal, it is possible to identical call number be configured, reduce the possibility of error, in addition, POS terminal user can be with
The application quantity of PSTN-E1 channels is reduced, operation cost is reduced, improves the utilization rate of PSTN-E1 channels.
It please refers to Fig.1 and Fig. 2, it is described logical an embodiment of the present invention provides a kind of communication channel multiplexer 10 and system
The preferably net control device of channel multiplexing device 10 is interrogated, including:Incoming call receiving module 11, mode deciding module 12, the first operational module
13 and second operational module 14.
Incoming call receiving module 11 is used for the incoming signal of request connection for receiving requesting party 20 by a communication channel and sending out.
Preferably, the communication channel is PSTN-E1 channels;Channel is established by the way of pstn telephone incoming call, and using same
Message structure carries out data transmission.
Mode deciding module 12 is currently the first operating mode or the second operating mode for confirming.
First operational module 13 is docked using the first operating mode with requesting party 20, is docked and is successfully then received the first form number
According to and be sent to first backstage 30.Preferably, the first operating mode is MODEM patterns.
Second operational module 14 is docked using the second operating mode with requesting party 20, is docked and is successfully then received the second form number
According to and be sent to second backstage 40.Preferably, the second operating mode is FSK patterns.
As a kind of embodiment, the communication channel multiplexer 10 further includes:Docking be more than the predetermined time still not into
Work(then terminates the timeout treatment module 15 of flow.Wherein, the predetermined time can be 1 second to 20 seconds, preferably 5 seconds.
The communication channel multiplex system of the embodiment of the present invention, after requesting party 20, communication channel multiplexer 10, first
30 and second backstage 40 of platform.
Requesting party 20 generates and sends the incoming signal of request connection, and communicated in successful connection.Preferably, please
The side of asking 20 is POS terminal.
The structure of communication channel multiplexer 10 is as described above, and passing through PSTN-E1 communication channels and being connected to requesting party 20.
First backstage 30 and the second backstage 40 are connected to communication channel multiplexer 10 by TCP/IP, that is, pass through TCP/IP
Carry out data communication.Preferably, the first backstage 30 is MODEM finance backstage, and the second backstage 40 is FSK finance backstage.
Referring to Fig. 3, the embodiment of the present invention additionally provides a kind of communication channel multiplexing method, the communication channel multiplexing side
Method includes following several steps.
Incoming call receiving step S1:The incoming signal that the request sent out by communication channel reception requesting party 20 connects.
Mode decision step S2:Confirm to be currently the first operating mode or the second operating mode, if the first operating mode
Then enter the first work step, if the second operating mode then enters the second work step.
First work step S3:It is docked using the first operating mode with requesting party 20, docks and successfully then receive the first form
Data Concurrent is sent to the first backstage 30.Preferably, the first formatted data is MODEM data packets, and form is " indexed variable+purpose
Address+source address+data ", Fig. 4 are just a kind of preferred MODEM data packet formats.
Second work step S4:It is docked using the second operating mode with requesting party 20, docks and successfully then receive the second form
Data Concurrent is sent to the second backstage 40.Preferably, the second formatted data is fsk data packet, and form is " type of message+data are long
Degree+random number+synchronization serial number+data ", Fig. 5 are just a kind of preferred fsk data packet form.
As a kind of embodiment, timeout treatment is further included after the first work step S3 and the second work step S4
Step S5:Docking is still unsuccessful more than the predetermined time, terminates flow, is disconnected with POS terminal, waits for next PSTN electricity
The incoming call of words.
Referring to Fig. 6, the first operating mode is MODEM patterns, the first work step S3 includes following sub-step.
First sends sub-step S31:MODEM audio signals are sent to requesting party 20;
First docking judges sub-step S32:If receiving the MODEM signals of the feedback of requesting party 20, success is docked;
First communication sub-step S33:It receives the first formatted data and is sent to MODEM finance backstage.
Referring to Fig. 7, the second operating mode is FSK patterns, the second work step S4 includes following sub-step.
Second sends sub-step S41:Fsk data sound signal 0x81 is sent to requesting party 20;
Second docking judges sub-step S42:If receiving the fsk data sound signal 0x82 of the feedback of requesting party 20, it is butted into
Work(;
Second communication sub-step S43:It receives the second formatted data and is sent to FSK finance backstage.
People in the art is it will also be appreciated that first operating mode is alternatively FSK patterns, accordingly, second
Operating mode is MODEM patterns.
As a kind of embodiment, the flow of the communication channel multiplexing method is:When receiving incoming signal, judge
It is current whether to be in MODEM operating modes, if then sending MODEM audio signals to requesting party, if receiving request in 5 seconds
The MODEM signals just fed back then dock success, carry out MODEM modulated signals, FSK operating modes are otherwise turned to, if not locating currently
In MODEM operating modes, then fsk data sound signal 0x81 is sent, if receiving the fsk data sound of requesting party's feedback in 5 seconds
Signal 0x82, then it represents that dock successfully, carry out the second format data transmission, otherwise by time-out failure, terminate this flow, wait for
The incoming call of next pstn telephone.
The above is the specific embodiment of the present invention, it is noted that for those skilled in the art
For, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also considered as
Protection scope of the present invention.