US 6434169 B1 Resumen A relay device associated with each end point modem in a data communication network provides a system for transporting data over a communication channel employing voice compression. Each relay device exchanges relevant parameter information with its associated modem and with each other in order to negotiate compatible data transfer conditions. The protocol exchange between each relay and its associated modem will typically include the calculation of inter-loop delay values for echo cancellation and line probing for line equalization or bandwidth optimization. Supported data rates, modulation type and encoding information is also exchanged. The invention provides a system for full duplex transmission of data over modems while saving on bandwidth because of voice compression techniques. Reclamaciones 1. In a communications network for full duplex transport of voiceband data between end point terminals over a communication channel that employs a transmission means at each end thereof for transmitting voiceband data signals via a demodulation/modulation protocol, a relay system, associated with each transmission means, including a modem relay for exchanging parameter information with the end point terminal associated therewith upon detection of the initiation of a voiceband data call, for relaying said parameter information to a counterpart modem relay and for receiving parameter information from said counterpart modem relay with respect to the end point terminal associated with said counterpart modem to thereby emulate a communication channel between said end point terminals, for the purpose of negotiating compatible data transmission conditions therebetween. 2. A relay system as defined in 3. A relay system as defined in 4. A relay system as defined in 5. A relay system as defined in 6. A relay system as defined in 7. A relay system as defined in 8. A relay system as defined in 9. A method of communicating voiceband data from a near end modem to a far end modem over a voice compressed communications channel that employs a transmission means at each end thereof for transmitting voiceband data signals via a demodulation/modulation protocol, said method comprising: providing a modem relay associated with each said transmission means and in communication with and separated from an associated end modem coupled to its associated transmission means; configuring each said modem relay to exchange parameter information with its associated end modem and; configuring each said modem relay to relay said parameter information to its counterpart modem relay in order to negotiate compatible data transmission conditions between said near end modem and said far end modem in full duplex communication. 10. A method as defined in 11. A system for negotiating data transmission parameters between end system modems connected through a voiceband communications channel that employs a transmission means associated with an end system modem at each end thereof for transmitting voiceband data signals via a demodulation/modulation protocol, said system having a modem relay associated with each said transmission means and with the end system modem associated with the associated transmission means, each modem relay being configured to exchange transmission parameter information with its associated end system modem and with its counterpart modem relay associated with the opposite end system modem upon detection of an initiation of a data call, and wherein said modem relays compare said exchanged transmission parameters to establish common characteristics for full duplex data communication between said end system modems. 12. A system as defined in 13. A system as defined in 14. A system as defined in 15. A system as defined in 16. A system as defined in 17. A system as defined in Descripción This invention relates to data communications over the Public Switched Telephone Network (PSTN) and more particularly to modem relay devices operating in conjunction with end user modems to permit full duplex exchange of data over voice compressed communications channels. Telephone calls over a communication channel using voice compression provides for greater bandwidth utilization. Uncompressed pulse code modulated (PCM) voice circuits require the full 64 kb/s bandwidth for voice communications. Utilizing voice compression, the PCM rate can be reduced substantially without appreciably affecting voice quality. Standard voice compression techniques can reduce the PCM rate to 16 kb/s or below. This, of course, results in a better utilization of the 64 kb/s bandwidth which is of particular importance to telephone companies and private enterprises that lease bandwidth from service providers. Attempts to carry voiceband signals, such as those originating from a fax or modem, over a voice compressed channel results in severe compatibility problems. Obviously, a fax or modem operating at 14.4 kb/s cannot send data over a channel which has been voice compressed to 16 kb/s because the voice compression cannot accurately duplicate the voiceband signal. To overcome this limitation voice compressed channels traditionally employ a secondary system to demodulate and remodulate voiceband signals. For example, when a fax or modem call is initiated a protocol signature is detected and the system stops its operation of compressing the voice and goes into a mode of demodulating and remodulating the voiceband signal. Further, voiceband relay systems as discussed above use a piping approach where the demodulated signal sent out from the near end is reproduced as is at the receiving end. In half duplex fax calls wherein the hand-shaking protocol is conducted sequentially, echo does not create significant impediments. In full duplex modem calls such as those supported by V.32 ITU and V.34 ITU standards, a ranging operation is conducted as part of their initial protocol exchange. This ranging operation allows the two interconnected modems to calculate the round trip delay of the in-between path and this permits a configuration of the far end echo canceller in order to remove or at least significantly reduce the echo component. Echo components in voice communications are annoying but can be tolerated whereas in data communications they make the system unusable. Line probing is also performed to measure the transfer characteristics of the analog loop. In a telecommunications system such as might be used by a commercial establishment wherein a PBX is used to connect into the network at the near end and at the far end of the connection a further PBX receives the communication for connection to the end user. If the demodulated signal from the PBX is reproduced as is at the far end PBX, the distance between the near end modem and near end PBX as well as the distance between the near end PBX and far end PBX and the far end PBX and far end modem are not taken into consideration. As a result, the round trip delay is not properly calculated and the modem far end echo canceller cannot operate successfully. In order to make this type of system work effectively the distances between the modem and the PBX must be kept to a minimum to limit the echo within the modem near end echo canceller. This, of course, is not acceptable in most commercial establishments. The present invention overcomes the aforementioned limitations by incorporating a modem relay in association with the system manager or PBX. The system manager might be, for example, a Newbridge Networks 3600 MainStreet bandwidth manager. The modem relay is configured to exchange parameter information with its associated modem upon detection of the initiation of a modem call. The parameter information includes round trip delay between the modem relay and its associated modem. Other parameter information such as supported data rate, modulation type and encoding algorithm is exchanged. The near end modem relay relays this information to its counterpart modem relay at the receiving end, which, in turn, exchanges parameter information with the designated far end modem. The respective modem relays and modems arrive at compatible parameters and this information is relayed between modem relays such that common transmission characteristics are established. The round trip delay information caused by the two local loops is used to properly configure the echo cancellers. The line probing is also properly performed because the relay modem interacts with its associated modem in a local loop. It is also within the control of the modem relays to not only convey supported parameters but also modify them so as to match the capabilities of the system. For example, if the voice compression uses a bandwidth of 8 kb/s and the modems have agreed on a capability of 14.4 kb/s, the relay can make sure that the information conveyed between modems will not show any data rate above 8 kb/s. It is an object of the present invention to provide a communications system which permits modem calls over a voice-compressed channel in the Public Switched Telephone Network. Therefore, in accordance with a first broad aspect of the present invention there is provided in a communications network for transporting data between end point terminals over a communication channel employing voice compression a relay device associated with each end point terminal. Each of the relay devices have means to exchange parameter information with its associated end point terminal and means to relay the parameter information to its counterpart relay device, and to receive parameter information from its counterpart relay device for the purpose of negotiating compatible data transmission conditions. In accordance with a preferred embodiment the end point terminal is customer premise equipment having voice and data capabilities. In accordance with a second broad aspect of the present invention, there is provided a method of communicating data from a near end modem to a far end modem over a voice compressed communications channel comprising: providing a modemrelay associated with each modem; configuring each modem relay to exchange parameter information with its associated modem and configuring each modem relay to relay the parameter information to its counterpart modem relay in order to negotiate compatible data transmission conditions. The invention will now be described in greater detail with reference to the attached drawings wherein: FIG. 1 is a high-level block diagram of a prior art voice compression system; FIG. 2 is a high-level block diagram of a prior art communication system for modem calls; FIG. 3 is a high-level block diagram of the voice band/modem signal relay system according to the present invention; FIG. 4 is a diagram illustrating the two local loop equivalent circuit; FIG. 5 illustrates a modem relay architecture according to one implementation of the present invention; FIG. 6 illustrates false phase reversal detection in an answering modem; FIG. 7 illustrates false phase reversal detection in a caller modem; FIGS. 8a to 8 d illustrate the modem relay state sequence and; FIG. 9 illustrates the modem relay handshake sequence. FIG. 1 illustrates a voice compression technique as taught in the prior art. As shown, telephone 12, which may have an associated modem or Fax machine, connects to node 14, which includes voice to data detection, a voice compression system, and demodulating/re-modulating circuits. Node 14 is connected to far end node 16 via network 18 which is, for example, the PSTN. Node 16 provides similar functionality as node 14. Node 16 is connected to far end terminal 20. A voice conversation between terminals 12 and 20 is compressed from the PCM 64 kb/s rate to some lower rate such as 16 kb/s depending on the application. Upon receipt of a protocol signature from terminal 12, node 14 in the prior art system switches off the voice compression and switches on the demodulating circuit whereby the demodulated voiceband signal is carried through on the PSTN to node 16 at a PCM rate of 64 kb/s. Node 16 re-modulates the voice band signal for delivery to telephone/modem 20. Obviously, this prior art system does not offer any bandwidth savings for voiceband signals. FIG. 2 relates to a system for providing full duplex modem calls through the network 22. Because full duplex communication leads to returned echoes due to system elements i.e. 4 wire to 2 wire relays 24, 26, the round trip delay between end points 28, 30 must be known. In the system of FIG. 2 (which does not employ voice compression) call set up protocol establishes the round trip delay and can thereby configure system echo cancellers (not shown) appropriately. FIG. 3 is a high-level diagram of the system of the present invention. In this system modem relays 40, 41 are associated with bandwidth manager 42, 43 as shown at either side of the PSTN 18. Bandwidth manager 42 may be one of Newbridge's 3600 MainStreet series of products and accessories. Modem relay 40 is connected to a near end terminal 44 which, as known, can provide for voice communication or data communication from a modem/computer terminal (not shown). At the opposite end of the network modem relay 41 via manager 43 is connected to a terminal 46 which is similar to terminal 44. Managers 42, 43 in addition to the modem relay will support such functionality as voice compression; echo cancellation; switch from voice to data detection; modulation/demodulation; switching etc. In a preferred implementation, managers 42, 43 serve as a PBX for an enterprise network. In this implementation, manager 42, 43 provide switching and other functionality to a plurality of terminals 44, 46 within each premise served by the system. It will be appreciated that the premise or area supported by each manager or PBX may be substantial whereby the distance between relay 40, 41 and terminals 44, 46 is significant and certainly not constant. According to the invention relays 40, 41 exchange parameter information with terminals 44, 46 respectively upon detection of a switch from voice to data at either end of the network. For example, when terminal 44 initiates a modem call, relay 40 exchanges parameter information with terminal 44 to ascertain a common set of parameters such as supported data rate, modulator type and encoding. The modem relay 40 also advises relay 41 that a data call is being directed to terminal 46. Relay 41 and terminal 46 then exchange parameter information and select a set of conditions supported by both. Upon completion of this exchange, the two relays 40, 41 arrive at a set of conditions that can be supported by both modems taking into account the voice compression PCM rate employed by the network. Thus, for example, if modem 44 can operate a 14.4 kb/s but relay 40 only supports 12 kb/s, while modem 44 can operate at 28.8 kb/s and relay 41 supports 14.4 kbbb/s, the two relays will agree on a rate of 12 kb/s. If, however, the voice compression rate is only 8 kb/s this minimum will be indicated by relays 40 and 41 during the exchange. Additionally, the round trip loop delay between each modem and its associated modem relay is calculated using protocol transitional information. This round trip delay information is used in providing accurate estimates of the system echo so that the echo cancellers can be properly configured. The exact same measurement procedure applies to the evaluation of the local loop characteristics. In effect the modems and relays at each end of the system create two local loops as shown in FIG. 4. The following provides a detailed description of one implementation of the present invention herein known as the nData V.32 modem relay protocol state machine. This description defines the interface to, and the workings of, the nData V.32 modem relay state machine. The modem relay module uses a V.32 bis software modem. It also uses the modem controller interface and the nData access functions design to facilitate the communication with the modem software. This implies that the state machine software must follow the requirements of these modules. Furthermore, all the requirements of CPU usage, RAM, etc., required by these modules must be respected restricting the amount of MIPs, RAM available for the modem relay software. The AC15, echo suppressor and super-tandem are assumed to be turned off at this point (i.e when switching to data mode). The EC is left in the state it was in before switching to data mode and must be handled properly by the nData application to enable it, and to start and stop the adaptation when necessary. The modem relay state machine assumes that a voice detector has already detected a certain amount of preamble sequence (either AA or AC) and that some delay is required for switching before it enters the first V.32 state machine. The amount of constant delay introduced should be kept to a minimum and for that reason the network layer is placed in HS mode with a small packet size of 15 msec. It can only work with double buffering size of 10 msec or less. This module should also be designed to be multi-channel compatible meaning that all necessary memory should be in a structure. The timer resolution should also be taken in account by the module; this resolution is dependent of the task switch iteration. The nData V.32 modem relay state machine is designed to run on the TMS320C51 DSP. It is assumed that no internal RAM is available and that the software stack will also be in external memory. The TMS320C51 has eight levels of hardware stack and four of them are in used or reserved for interrupts and the voice kernel, this limits the V.32 modem relay state machine software to use up to a maximum of four levels of hardware stack. For this reason, hardware stack level(s) will be saved and restored from the software stack when necessary. The amount of external program memory used by the module should be as small as possible, the external data space usage should be moderate and the number of MIPs should also be minimum since the software modem requires the bulk of the processing power. The design here is to be a V.32, V.32 bis modem relay application. This implies that the rate sequence from the near end must be sent to the remote end before the near end transmits the rate sequence to the external modem. Other messages are also exchanged between the two ends for data exchange and status information. FIGS. 8a-8 d and 9 give a global view of the modem relay. A distinct database of type V32Dta must exist for each nData stream supporting the V.32 bis modem relay. The structure and description of this database follows in table 1:
In addition to the V.32 modem relay specific database, the V.32 modem relay state machine as do all nData state machines requires a per stream database of type nDataCDta The protocols supported by the modem relay application are V.32 and V.32 bis excluding some functionality listed in table 2. These are excluded since they are not supported by the software modem at the moment. Other features aren't supported by the software modem but they are not required by the relay application.
The main function of the state machine is to detect and respond to the modulation changes of the V.32 connect sequence. Then once the connect sequence is completed the state machine enters data mode where it has to transfer data between the two ends. In data mode a depacketizing function reads the packets from the network and extracts the data coming from the remote end. The data is modulated and transmitted by the software modem, on the other way demodulated data is pulled out from the software modem buffer, packetized and transmit as a data message to the remote end. For the proper operation of the rate controller (underflow or overflow), the network layer queues must be filled with enough data before entering data mode. The way we acheive this is by sending a lots of Bi until the desired amount of packets have been received. The minimum transmission time of 128T B1 is also taken in account in the numbers of packets required. The nData V.32 bis modem relay state machine is part of an nData task handling data or message between the two endpoint. The state machine interfaces with the network layer directly via queues or indirectly via the packetizer and depacketizer functions when required. The state machine also interfaces with the software modem through the modem controller and several access functions. The nData task is called depending on the number of samples it has to process. This currently depends on the type of voice application running before switching. For now, the possibilities are 2.5 msec, 10 msec and 20 msec. The lowest iteration should be used to minimize the jitter of the round trip delay estimation. FIG. 5 illustrates the v.32 bis modem relay architecture. The processes that make up the V.32 modem relay software are programmed as a state machine. When one of these new processes is called, it is called through the FSA. This in turn calls the appropriate state function. Each function (state) returns an offset that indicates what the next state of that state machine will be run. The purpose of the automaton is to control the operation of the state machine. Here is the basic procedure that follows the FSA in the V.32 bis modem relay software: The current state to be executed is determined; Address of the parameters structures are passed on the stack; The state is called; If a state transition is required, the state calls a function to initialize the next state. The finite state automaton reads a table containing all the information related to the state sequence. The V.32 state machine is responsible of detecting and generating protocol specific patterns. It is also responsible of interpreting and generating the appropriate NL messages used to inform the other end of a transition occurring in the protocol sequence. The V.32 modem relay application has a common entry function called V32ModemRelay, its main functions are to call the states through the FSA, verify the state sanity timer and transition to the switch to voice in case of timer expiration. The state sanity timer is necessary to make sure that the state machine won't stay locked into a state if an expected event is not occurring. Also where necessary, level(s) of the hardware stack are saved into the software stack to permit required function calls. This state machine implements the caller and answerer mode modem relay. Two entry points exist for the state machine and the appropriate one is selected depending on the reason of switching set by the voice application and read by the nData task upon entry. These two points are V32CallWaitACDet and V32AnsWaitAADet. The V32AnsWaitAADet is selected when the reason for switching to data mode is that a transitional signalling message is received indicating that the other end has detected the AC pattern or when the voice detector has detected the AA pattern. The V32CallWaitACDet is selected when the reason for switching is that the voice modem detector has detected the AC pattern or when the transitionnal signalling indicates that AA was detected at the other end. These initial states also generates a message indicating their version identification, their mode (V32_CALLER_MODE, V32_ANSWER_MODE) of operation and their packet size configuration. This mode of operation is used to verify if both sides are configured properly i.e. one side must be a caller and the other side must be an answerer. The version identification will be used in the future to identify the remote system and will therefore know what features are supported. The packet size is exchanged to enable both sides to use the lowest packet size. The state machine state table for both sides, the caller and responder follows as table 3:
The V32ModemRelay function is the entry point of the V.32 modem relay state machine. It saves levels of the hardware stack on the software stack (to give more level of functions calls), performs the state sanity timeout verification and calls the FSA. If the state sanity timer expires, a transition to the switch to voice state is requested. The function may have a repeat loop to call the FSA several times if it appears to become necessary. The pseudo code for this state follows:
When a switch from voice occurs provoked by the arrival of a transitional signaling message indicating that the remote end has detected the AA pattern or that the local detector has detected AC, the system goes into the V32CallWaitACDetState state. The V32CallWaitACDetState is responsible for starting the transmission of the AA pattern and it waits for the detection of the AC pattern from the software modem. the state also sends the modem information message twice to indicate to the remote end our mode of operation (V32_CALER_MODE, V32_ANSWER_MODE), our current packet size configuration and our system identification. This is done to inform the remote end of some information about this end. For instance, both ends must be configured in the opposite mode and use the same packet size. If both are configured in the same mode of operation a switch to voice is requested. We also have to configure both ends to use the same and lowest packet size. At all time in this state we also verify the reception of a switch to voice message in which case the other end requests a switch to voice. The reception of the modem information message (V32_MODEM_INFO_MSG) is verified in the V32Sw2VoiceMsg ( ) function and the V32CallWaitR2Msg and V32AnsWaitR1Msg states. When the message is received, the mode of operation is compared to switch to voice as soon as possible if they differ and the packet size and system identification written to the database. The packet size configuration is done in the V32CallWaitR3DetInit and in the V32AnsWaitSDetInit. The message is sent twice since it is a data message and we want to make sure that a bad FCS on the first one won't stop the call. The pseudo code for this state follows:
When the state V32CallWaitACDetState exits because the AC pattern has been detected, the control is transferred to the V32CallWaitCADet state. The V32CallWaitCADet state waits to detect the first phase reversal in the AC pattern (the AC to CA transition). When the phase reversal is detected, a transition to the V32CallWaitCCSend or the V32CallAC1Det is requested. It maybe necessary depending on the double buffer size to wait for a while because there shall be a delay of 64T between the detection of the AC to CA pattern and the next change in the transmitted pattern. The command to start the round trip delay count is also configured at this since it is required by the modem controller to detect the phase reversal and to start counting at that point. At all times in this state we verify the reception of a switch to voice message indicating the other end is going back to voice. We also continuously verify that there is energy at the modem receiver. If a loss of energy is detected, a switch to voice is sent to the remote end and we switch to voice. The pseudo code for this state follows:
Once the incoming transition from AC to CA has been detected, the caller must wait some time before starting to send the CC pattern. This delay is the processing delay required between the received phase reversal at our line terminals (rx) and the time the transmitted phase reversal is at the line terminals (tx) and is 64+/−2T. This delay has to be the same for all modem types since the transitions are used to estimate the round trip delay and used for far end echo cancellers. In this case the timer count shall be 64T minus the processing delay of detecting the phase reversal and the delay introduce by the buffering (receiving and transmitting buffering). The buffering delay introduced is two times the size of the buffers (doubled buffer) used by nData per call. The jitter of the delay measurement is then the size of the iteration buffer (2.5). We also substract the 2.5 msec jitter to push it. The V32CallWaitCCSend state is there to wait for the expiration of this timer when necessary. Once the timer expires, we start the transmission of the CC pattern, start the measurement of the round trip delay (NT) and request a transition to the V32CallWaitAC1State to wait for the detection of the CA to AC transition. This state could be bypassed if the timer evaluation indicates that it is less or equal to zero. At all time in this state we verify the reception of a switch to voice message indicating the other end is going back to voice. We also continuously verify that there is energy at the modem receiver. If a loss of energy is detected, a switch to voice is sent to the remote end and we switch to voice. The pseudo code for this state follows:
The V32CallWaitAC1Det state is responsible of detecting the second phase reversal in the AC pattern (the CA to AC transition). Once the transition is detected, we will shut off the transmitter. At all time in this state we verify the reception of a switch to voice message indicating the other end is going back to voice. We also continuously verify that there is energy at the modem receiver. If a loss of energy is detected, a switch to voice is sent to the remote end and we switch to voice. The pseudo code for this state follows:
The V32CallWaitR1Det state is responsible of detecting the rate sequence R1 from the external modem and starting the transmission of S, SN and TRN. This occurs once the second phase reversal in the AC sequence is detected. We then have to configure our modem to transmit silence and configure our modem receiver to disable its S detector following the. detection of S. This is required at this point since the modem will disable its S detector after the reception of the incoming S from the other modem. The modem S detector is disabled to avoid a false detection of our transmitted S (echo). It must also verify the capabilities of the local end before transmitting the message with the modified rate sequence to the remote end. The maximal rate of the modem capability is verified since it is possible the modem max rate offered by the external modem exceeds the available bandwidth. If the user wants to select a specific mode, it will simply have to configure the external modem. At all times in this state we verify the reception of a switch to voice message indicating the other end is going back to voice. We also continuously verify that there is energy at the modem receiver. If a loss of energy is detected, a switch to voice is sent to the remote end and we switch to voice. This verification of loss of energy is delayed because of the 16T time when the other modem is silent. The waiting delay has to take in account the roundtrip delay (RT), our buffering delay and the jitter in our measurement of the round trip delay. This is why a safety value is added in the waiting delay timer. The pseudo code for this state follows:
Upon entry in this state, the timer to delay the start of the echo canceller training is started. This timer is necessary since we want to start the echo adaptation when the TRN sequence is started. The delay is the round trip delay (NT of S) plus the 256T of S and 16T of SN since we are not transmitting the note sequence. The transmission of TRN is also delayed by the input and output buffering delay and our value of RT does not include the extra 64T include in NT. The input buffer must also be taken into account since we want the adaptation to be done on a valid buffer. The pseudo code for this state follows:
The V32CallWaitR2Msg state waits for the R2 rate sequence message from the remote end modem and for the echo adaptation to be completed. When received, the rate is read from the message, stored in the database, modified to remove the unsupported capabilities and finally written to the software modem. Writing the rate to the modem also instructs it to send the rate. Because we must make sure the training of the echo canceller is successful, the system must stay in this state for a minimum time, the minimum training time for the EC. The ITU G.165 specs indicates that echo cancellers must train within 650 ms. When the R2 message is received, the echo canceller status is requested. When the adaptation is completed and the minimum amount of TRN is transmitted we transition to the V32CallWaitR2MsgState. Until the echo adaptation is completed and the maximal allowed adaption time is not expired we stay in this state. Two timers are started in this init state, the first one is the timer used to make sure that we transmit the minimum amount of TRN (1280T) and the other one is the maximal allowed time to train the echo canceller. The init state also start the echo canceller. This involves resetting the taps to zero, zeroing the delay line of the far-end echo canceller and configuring the delay line based on the round trip delay for the far-end echo canceller. The pseudo code for this state follows:
The V32CallWaitR3Det state waits to detect the rate sequence R3 from the external modem. Once the rate sequence R3 is detected, the modem goes into the initiation of the data exchange. The R3 rate indicates the capabilities accepted by both the external modems and is duplicated in the rate sequence E (with different framing bits). It is compared against the GSTN clear down condition. When a cleardown is requested, the system goes to the V32GSTNClearDown state where the transmission will be stopped after 64T. At all times in this state we verify the reception of a switch to voice message indicating the other end is going back to voice. We also continuously verify that there is energy at the modem receiver. If a loss of energy is detected, a switch to voice is sent to the remote end and we switch to voice. This verification of loss of energy is delayed because of the propagation time when the other modem is silent. This delay is the round trip delay as measured previously. The pseudo code for this state follows:
The V32CallWaitData state waits to be ready to start the full duplex exchange. We transmit the previously received rate sequence R3, convert the R3 rate sequence into the E sequence and configure the modem transmitter with this converted E with a lot of B1. Then we read the final speed and mode from the modem transmitter to initialize the network and the packetizer. We have to do all this since we are about to received data (demodulate) and may use the packetizer. The state itself waits for the queue to be at the optimal level and for the detection of the E sequence. Once both conditions are met we transition to the V32DataMode state. The state also looks for any demodulated data and will transmit the V32_DATA_START_MSG before packetizing any demodulated data. This is to inform the remote end of the start of demodulation at this end. At all the time we verify the presence of the carrier since a loss of the carrier indicates either loss or corruption of data. The state also looks for the reception of the switch to voice message in which case a transition to the switch to voice state is requested. The pseudo code for this state follows:
The V32AnsWaitAADetstate starts the transmission of the AC pattern and waits for the detection of the AA pattern from the software modem. Once AA is detected, a transition to the V32AnsWaitSendAC is requested a message is sent to the remote end to indicate our mode of operation and the packet size we are going to use. The pseudo code for this state follows:
The V32AnsWaitSendAC state waits the expiration of the 256T timer. Once the timer expires, we starts the transmission of the AC pattern, start the measurement of the round trip delay and request a transition to the V32AnsWaitCCDetState. The 256T timer is used to send the minimal amount of AC. The minimal amount of AC is 128T (64T when AA Detected) but it is recommended to transmit at least 256T of AC before generating the first phase reversal. The first implementation had 128T of AC but connection problems were found and it has been suggested to increase it at 256T. The pseudo code for this state follows:
The V32AnsWaitCCDet is responsible of detecting the AA/cc transition at the receiver and to generate the second phase reversal (transmit AC). We must also configure the receiver to disable its S detector to avoid detecting the echo of the S sequence we will very soon transmit. This is necessary since we are going to transmit an S sequence whose echo could falsely trigger our receiver. The configuration will simply delay the S detector until a safe point. Also at this point the round trip delay (MT) has been estimated and is available for reading. The pseudo code for this state follows:
Once the incoming transition from AA to CC has been detected, the answerer must wait some time (64T) before starting to send the AC pattern. The reason for this delay is for the processing time of detecting the phase reversal versus the transmission of the phase reversal. We take into account our detection timer plus our buffering time delay as explained in the V32CallWaitCADet state. The V32AnsWaitSendAC1 state is there to wait for the expiration of this timer when necessary. If the timer is not required, this state will be bypassed. The V32AnsWaitCCDet will transition directly to the V32AnsWaitSendAC1 if this timer is not required. Once the timer expires, we start the transmission of the AC pattern. At all times in this state we verify the reception of a switch to voice message indicating the other end is going back to voice. We also continuously verify that there is energy at the modem receiver. If a loss of energy is detected, a switch to voice is sent to the remote end and we switch to voice. The pseudo code for this state follows:
The V32AnsWaitSilDet state is responsible of detecting the end of the CC sequence and to transmit the 16T of silence followed by S, SN and TRN. This is also equivalent to detecting the beginning of the silence sequence. At all times in this state we verify the reception of a switch to voice message indicating the other end is going back to voice. The pseudo code for this state follows:
The V32AnsDelayECStart state starts a timer to delay the beginning of the echo canceller training. This timer is necessary since we want to start adaptating when the TRN sequence is started. The delay before starting the adaptation is 16T of silence, plus 256T of S , plus 16T of SN, plus the buffering delay (one buffer for transmission and one buffer for reception) and finally plus the round trip delay measurement jitter (NSampPerIteration). The optional note sequence is not transmitted and is therefore not taken into account. The pseudo code for this state follows:
The V32AnsWaitR1Msg state waits for rate sequence R1message from the other end. When the rate is received, the rate is extract from the message, modified to clear the unsupported speeds and then written to the software modem. When the rate is written to the modem, this also instructs it to transmit that rate. The EC adaptation is started in the init state since we are about to start the transmitting TRN. Two timers are started in this init state, the first one is the timer used to make sure that we transmit the minimum amount of TRN (1280T) and the other one is the maximal allowed time to train the echo canceller. This involves resetting the taps to zero, zeroing the delay line of the far-end echo canceller and configuring the delay line based on the round trip delay for the far-end echo canceller. The pseudo code for this state follows:
The V32AnsWaitSDet waits for the modem receiver to detect S and to start transmitting silence. The EC is stopped in the init state since we are about to transmit R1 that follows the TRN sequence. At all time in this state we verify the reception of a switch to voice message indicating the other end is going back to voice. We also re-enable the S detector at this point since we are about to detect S from the other modem. The pseudo code for this state follows:
The V32AnsWaitR2Det is responsible of detecting the R2 sequence from the software modem and to report it to the remote modem. We apply here the necessary modifications to the rate sequence before it is transmitted to the remote end. The pseudo code for this state follows:
The V32AnsWaitR3Msg state waits for the rate sequence R3 from the other end. When received the rate is compared against the GSTN clear down request for the appropriate mode to detect such demands coming from the other end. In that case a transition to the V32GSTNClearDown state is requested. We exit from this state only if the message has been received and the minimum amount of TRN is respected. The minimum amount of TRN in this case is 1280T but since we start the transmission of S, SN and TRN our timer is loaded with the value of 256T+16T+1280T. At all times in this state we verify the reception of a switch to voice message indicating the other end is going back to voice. We also continuously verify that there is energy at the modem receiver. If a loss of energy is detected, a switch to voice message is sent to the remote end and we switch to voice. The pseudo code for this state follows:
The V32AnsWaitEDet state function is responsible of waiting for the demodulation of the E rate sequence. We need to wait for the detection of the E sequence because the software modem usesthis information for its final data rate and modulation type configuration. The rate received (E) is compare against the computed E from the R3 rate sequence. This is required to make sure that the modem receiver and modem transmitter are configured exactly the same. If they are different, a switch to voice is requested. At the same time it also continuously monitors the network layer for the incoming of a switch to voice message and verifies that the demodulator is receiving energy. The pseudo code for this state function follows:
The V32AnsWaitData state waits to be ready to start the full duplex exchange. The init state reads the final speed and mode from the modem receiver and configures the network layer and the packetizer accordingly. The init state also requests the transmission of the E sequence followed by a lot of B1. The state itself is the V32WaitData and waits for the queue level to be optimal. The state doesn't have to wait for the detection of E since it has already being detected. in the previous state. The pseudo code for this state follows:
The V32DataMode state is responsible of querying the software modem for the number of bytes that must be transmitted and to process the demodulated bytes received. This is doneby calling two functions, the software modem transmitter handler and the software modem receiver handler. The return value of each handler is verified since it contains the results of their operations. If the return value from the transmitter handler is zero, this indicates that everything was processed normally. When the transmitter handler returns a value different of zero this indicates that either it has to stop because of a switch to voice or it has received the end.of data message and there is no more data to process. The same goes for the receiver, when it returns a zero, this indicates that the receiving process went as expected but when it returns a value different than zero this means that it has to stop processing. It could occur that the receiver or the transmitter require their process to be stopped at the same time (same iteration), this is treated as a request to switch to voice. The init state of data mode is responsible for enabling the rate controller and to configure the depacktizer. It also sets the maximal value for the sanity timer since it is not used in this state. The pseudo code for this state follows:
The V32DataRxOnly state is responsible of processing the modulated bytes from the external modem until the modem drops its carrier or ceases transmitting. Once either loss of carrier or no demodulated bytes are detected, the state requests a transition to switch to voice. The pseudo code for this state follows:
The V32DataTxOnly state is responsible of processing the remaining queue elements until a message is received indicating to stop transmitting or when no more queue elements are available. Then the state will stop modulation and request a transition to the switch to voice state. The pseudo code for this state follows:
The V32Sw2VoiceState state doesn't perform anything, it just waits for the nData scanner to read the request and to perform the switch to voice. All the processing is done in the initialization routine. The initialization routine is responsible for generating the V32_SW_TO_VOICE_MSG message, setting the protocol flag to request the switch, generating the RDS events and finally to stop the modulation. Several initialization routines exist and are selected depending on the reason for switching. The V32Sw2VoiceMsgRxInit is the only routine not sending the V32_SW_TO_VOICE_MSG to the remote end since we just have received this indication from the other end. The V32Sw2VoiceInit is selected when the modem has unsuccessfully configured itself in the init function of the modem relay. This sends the V32_SW_TO_VOICE_MSG to the remote end, sets the protocol flag to request the switch to voice and generates the RDS event. The pseudo code for this init state follows:
The V32GSTNClearDown state sends the remaining rate sequence (R3) for a period of at least 64T as required by the protocol then stops the modulation, set the protocol flag to indicate a switch to voice is requested and transitions to the switch to voice state. The pseudo code for this state follows:
The V.32 caller and answerer states communicate to the remote end by network link messages to inform or request appropriate action (navigate the V.32 protocol and transfer demodulated data). Messages are classified as either control or non-control. Control messages signal the appropriate actions required to navigate the state of the V.32 protocol. Non-control messages contain demodulated V.32 data. The V32_MODEM_INFO_MSG and V32_R_DET_MSG are control messages sent with information attached to it. Since they have information (data) attached to it they are considered by the network layer as data messages. To avoid the call being stopped when the message received is in error (bad FCS), the message is sent twice. The second will be discard by the remote end if the first message is valid.
Due to the amount of time required by the voice detector to detect the AA (1800 hz) or the AC (600 and 3000 Hz) tones it is necessary to use a notch filter at these values to eliminate the possibility of the far end modem seeing a phase reversal when the real AA or AC transmission starts in data mode. The glitch may be seen by the other modem as the phase reversal indicating the start of its transition from AC to CA or AA to CC which will eventually cause a modem failure. FIGS. 6 and 7 illustrate answer and call modem false phase detection respectively. The echo canceller (EC) provided with the software modem won't be use for two reasons. First the voice kernel (VK) is already providing one and there isn't enough real time (CPU) and RAM to run the software modem one. Two echo cancellers are needed. One for the near end cancellation and another one for the far end cancellation. The near end EC doesn't require anything special from our point. We just have to start and stop it at the right time during the sequence. These start and stop location are explained in the two following sections since they are different depending on the mode of operation of the modem (caller or answerer). The far end EC is more complex since it has to take into account the estimated round trip delay of the modem, the buffering and detection time of the modem and our system (nData). When EC is started, this involves resetting the taps to zero, zeroing the delay line of the far-end echo canceller and configuring the delay based on the round trip delay estimate (NT or MT) for the the far-end echo canceller. Because we must make sure the training of the echo canceller is successful, the system must stay in the state for a minimum time, the minimum training time for the EC. The ITU G.165 specs indicates that echo cancellers must train within 650 ms. As a safety factor, we require that the system stay in this state at least 1 s plus the round trip delay to allow the far-end EC the same valid training time. In Answer mode, the EC should start to adapt when the first S sequence is transmitted and should stop the adaptation at the end of that sequence. In Call mode, the EC adaptation is started when the transmission of first S sequence is started, again here the EC is stopped when the TRN sequence is over. The V.32 and V.32 bis protocols allow some variance on the length of certain preamble sequences, we utilize robustness timers at every step of the preamble to ensure that if an error occurs in recognizing a preamble sequence or receiving a message, we fall back to voice mode and do not hang the DSP in that state. Next how each timeout for each state is computed is described. V.32 specification list of sequence and their timing The optional echo cancellation sequence (NOTE) must not exceed 8192 symbol intervals @ 2400 symbols/s; approximately 3400 ms. The TRN sequence must not exceed 8192 symbol intervals @ 2400 symbols/s; approximately 3400 ms. In all transitions which involve messaging with the remote end, a 1300 msec network delay is allowed for. This value permits two satellite delay hops. Network delay=(one satellite delay×2 way)×number of satellites+terrestrial delay (propagation) 1300 msec=(270 msec×2)×2+220 msec This first implementation of the modem relay does not support the presence of the note sequence or the case when an external modem transmits the maximal amount of TRN (8192T). The reason comes from the fact .that we are stretching the DSP's TRN sequence until the reception of the TRN termination from the external modem therefore if the external modem sends the maximal amount of TRN, we will transmit more than the maximal amount allocated in the specification. The behaviour of the modems in this condition is not known. The state code function V32Wait4Tone simply waits for the detection of a tone. It stays in the same state as long as the tone is not detected. At the same time it also continuously monitors the network layer for the incoming of a switch to voice message. The pseudo code for this state function follows:
The state code function V32Wait4Time simply waits for the expiry of timer #2. It stays in the same state as long as the timer is not expired. At the same time it also continuously monitors the network layer for the incoming of a switch to voice message and verifies that the demodulator is receiving energy. The pseudo code for this state function follows:
The state code function V32WaitTrans1 simply waits for the arrival of the first phase reversal. It stays in the same state as long as the phase reversal is not detected. The 64T delay is evaluated and if required the appropriate state will be entered otherwise we transition to the state transmitting the phase reversal. At the same time it also continuously monitors the network layer for the incoming of a switch to voice message and verifies that the demodulator is receiving energy. The pseudo code for this state function follows:
The state code function V32WaitTrans2 simply waits for the arrival of the second phase reversal. It stays in the same state as long as the phase reversal is not detected. At the same time it also continuously monitors the network layer for the incoming of a switch to voice message and verifies that the demodulator is receiving energy. The pseudo code for this state function follows:
The V32WaitRDet statefunction is responsible of detecting a rate sequence from the external modem. It also verifies the capabilities of the local end before transmitting the message with the modified rate sequence to the remote end. The maximal rate of the modem capability is verified since it is possible the modem max rate offered by the external modem exceeds the available bandwidth. At all time in this state we verify the reception of a switch to voice message indicating the other end is going back to voice. We also continuously verify that there is energy at the modem receiver. If a loss of energy is detected, a switch to voice is sent to the remote end and we switch to voice. This verification of loss of energy can be delayed by setting TIMER_2 to the required delay. The pseudo code for this state function follows:
The V32WaitRMsg state function is responsible for waiting for the reception of a rate sequence from the network layer. It also verifies the capabilities of the local end before sending the modified rate sequence to the modem transmitter. The maximal rate of the modem capability is verified since it is possible the modem max rate offered by the external modem exceeds the available bandwidth. If the message contains a bad frames check sequence, a switch to voice is requested since the rate received cannot be used. We exit from this state when the message is received and the minimum amount of training time has elapsed or when the message is received and the maximal amount of training time has elapsed. At all times in this state we verify the reception of a switch to voice message indicating the other end is going back to voice. The pseudo code for this state function follows:
The V32WaitData state function is responsible of waiting for the start of the continuous data transfer. This state is common to the caller and the answerer. Its duty is to make sure the system is stable before authorizing the full blown data exchange. This means that the network queue has the optimal number of elements in it for the proper behavior of the rate controller and the E sequence from the modem has been detected. On the protocol side, we generate a very long duration of the B1 sequence. This will be guaranteed to cover at least 128T B1 because when switching from this state, we will terminate the very long sequence by requesting the generation of a 128T sequence length. The fact that we generate a very long B1 sequence simply translates into the external modem considering that the data is all 1's. Because we will generate 128T of the B1 sequence when exiting from this state, we have to take this into account when selecting the optimal size of the data queue. On the demodulation front, at all times, all the demodulated data is transferred toward the network. Upon entry, this state sets the modem rate, and asks to generate an infinite duration of B1. At all times we verify the presence of the carrier and if a switch to voice message is received on the network layer. The pseudo code for this state follows:
The V32Sw2VoiceMsg state function is responsible of verifying the network link queue for the switch to voice message or the modem information message. When the switch to voice message is received, the calling function is informed and a transition to the switch to voice requested. When the V32_MODEM_INFO_MSG is received, the remote end mode is read and compared with our mode (caller or answer). If the modes are identical, this means the call will eventually fail and we should request to stop now. This could happen when both side tone detectors have detected the same tone. To prevent the propagation of AA and AC tones to the other side we use three notch filters to block these tones. The packet size received in the message is also compared with ours and the lowest value kept in the database. Finally the other end system version is written to the database. The pseudo code for the function follows:
The V32SmodemRxHandler function interrogates the software modem receiver for the number of bytes that have been demodulated. These bytes are packetized and transmitted by the network layer to the remote end. When bytes are demodulated and, if the flag indicating the generation of the V32_DATA_START_MSG isn't set, we have to send this message since we must indicates to the remote end the beginning of demodulation at this end. The function verifies the presence of carrier or energy depending on the calling function request. When either the carrier or energy disappears, the function returns this indication to the calling function. The pseudo code for this function follows:
The V32SmodemTxHandler function is responsible of querying the software modem for the number of bytes that must be transmitted. The number of bytes required by the transmitter are depacketized and copied to the software modem transmit buffer for modulation. If the depacketizer error indicates a switch to voice message or a termination packet, the error is reported to the calling function. When the depacketizer error indicates a queue failure or a bad FCS we generate the RDS event and exit the function. The queue failure indicates that we don't have any bytes for modulation. In this case the software modem will modulate zeroes automatically. If a bad FCS occurs, this mean that the data in the packet has errors, the corrupted data is modulated as is and we don't consider this as an exit condition. The pseudo code for this function follows:
The V32InfoSend function sends the V32_MODEM_INFO_MSG message to the remote end. For now this message contains the system identification, the mode of operation (V32_CALLER, V32_ANSWER) and the current packet size used. The pseudo code for this function follows:
The V32InfoExtract function extracts the modem information from the V32_MODEM_INFO message. It select the smallest packet size between the two ends, verifies the remote end mode and memories the system identification. If both modes are the same this indicates a problem and we stop the call. The pseudo code for this function follows:
The V32IsEnergy function looks for the presence of energy at the modem receiver. It returns zero if energy is not present and returns a value different of zero when energy is present. The pseudo code for this function follows:
The V32CompPktSize function computes the packet size table. The packet size table has memory reserved by the nDatav32Init function and both databases (V32Dta, nDataCDta) hold a pointer to this memory. The pseudo code for this function follows:
The nData real time task init function calls the protocol specific function (nDataV32Init) when the nData task real time task becomes enabled (switch from voice). The function of this task is to initialize all the modules, structures and variables not initialized by the nData real time init function. Its main function is to initialize the database of the protocol and allocate the memory for the required buffers. It also selects the appropriate state to run and configures the software modem depending on the mode requested (caller or answerer). It also initialize the entry in the modem and common databases and configures the rate controller to its default. At this point the rate controller, the software modem transmitter and receiver have been turned off. The pseudo code for this initializing function is as follows:
There is no indication in the V.32 ITU specification on how termination should be achieved. For now we simply detect that we have lost the carrier detection from the software modem receiver and request a transition to the transmitter state only or a switch back to voice. For each nData stream supporting the V.32 bis modem relay, a structure of type V32bDta and nDataDta must exist. A single FSA state table can support multiple V.32 bis state machines as long as the controlling task saves the state context for each state machine.
The following glossary defines some of the terms used in the foregoing description. AA V.32 AA sequence corresponding to the signal state AAAA . . . AA. It is also corresponding to a 1800 Hz tone. AC V.32 AC sequence corresponding to the signal state ACAC . . . AC. It is also corresponding to 600 and 3000 Hz tones AC1 V.32 AC sequence corresponding to the signal state ACAC . . . AC. It is also corresponding to 600 and 3000 Hz tones with phase inverted relative to the CA sequence ANS 2100 Hz ITU answer tone with optional phase reversals at 450 msec intervals B1 V.32 B1 sequence corresponding to scrambled modulated one bps Bits per second C5x A Texas Instruments TMS320C51 digital signal processor CA V.32 CA sequence corresponding to the signal state CACA . . . CA. It is also corresponding to 600 and 3000 Hz tones with phase inverted relative to the AC sequence CC V.32 CC sequence corresponding to the signal state CCCC . . . CC. It is also corresponding to a 1800 Hz tone with phase inverted relative to the AA sequence E V.32 E sequence corresponding to a 16 bits sequence marking the end of rate sequence R2 and R3 FSA Finite State Automaton FCS Frame Check Sequence HS High Speed Data MT Round trip delay observed from the Answer Modem NL Network Layer NOTE Optional echo canceller trainning sequence NT Round trip delay observed from the Call Modem Protocol A formal set of rules governing the establishment and orderly conduct of communications between two systems sharing a common interface. R1 V.32 R1 sequence corresponding to a 16 bits rate information used by Modems to exchange their capabilities R2 V.32 R2 sequence corresponding to a 16 bits rate information used by Modems to exchange their capabilities R3 V.32 R3 sequence corresponding to a 16 bits rate information used by Modems to exchange their capabilities p0 RT Round trip delay S V.32 S sequence corresponding to the signal state ABAB . . . AB S1 V.32 second S sequence corresponding to the signal state ABAB . . . AB SN V.32 !S sequence corresponding to the signal state CDCD . . . CD SN1 V.32 second !S sequence corresponding to the signal state CDCD . . . CD TRN V.32 TRN sequence corresponding to scrambled ones at 4800 bps with dibits encoded directly from states A,B,C,D TRSIG Transitional Signalling V.32 ITU . Recommendation for 4800 and 9600 bps Modems. V.32 Bis ITU . Recommendation for 4800-14400 bps Modems. VA Voice Application. A Voice Application is the combination of the Voice Kernel and core application. Example of core application are HCV, LDCELP, ACELP, V.17, V.32 etc . . . VK Voice Kernel. A generic DSP voice handling module. This module is configurable by SMP messages. While a specific embodiment of the invention has been illustrated and described it will be apparent to one skilled in the art that numerous variations and/or alterations can be made to the basic concept. It is to be understood that such variations and alterations will fall within the scope of the invention as defined by the appended claims. Citas de patentes
Citada por
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||