Sequence of Events for Incoming Calls
The exact sequence of events depends on whether the modem is operating in data mode or in audio mode. This, in turn, is decided by the collective modem media modes specified by the active call discriminator modules.
Modem in Data Mode
The following italicized words are application properties. Information on each of these may be found in "Application Properties for the Modem Manager".
When a call is answered, the Modem Manager starts a configurable noise suppression phase as follows:
- Wait for SquelchDetectDelay seconds, then go to step 3. If while waiting, data is received, then go immediately to step 2.
- Throw away data until either:
- An idle period equal to SquelchIdleTime seconds occurs, in which case go to step 3.
- Data received exceeds SquelchPacketLength, in which case the call is disconnected.
- Wait for data to start arriving. When it does, go to step 4. If the wait exceeds InitialDataDelay seconds, disconnect the call. Alternatively, if InitialDataDelay1 is specified, go to step 4 after the defined period of time. This allows for RTUs that don't speak until they are spoken to.
- Every DataIdleTime seconds, monitor the total amount of data received in this step. If it is at least HelloPacketLength bytes, or does not change between two successive DataIdleTime periods, go to step 5.
- Offer the received data packet to each registered driver.
- The data is offered to the registered driver(s) by calling the module discriminator in the driver's scope. The data received so far is passed in a buffer as a parameter to the discriminator module. This subroutine examines the data and returns Invalid if the data is not recognized, or the station identifier of the driver instance that should handle the call. If the call is accepted, then Modem Manager will call the driver's Connect() module, passing the station identifier and the stream as parameters.
An example of a data discriminator can be found in Example Data Discriminator.
Factors to Consider for the Configuration of Incoming Calls
- Will incoming calls be answered (AnswerCalls)?
- Set up modems (on a per modem basis) to answer on a specific number of rings (see: Modem Tag Type properties Settings Tab).
- Decide how many modems should be kept free to accept incoming calls (MinModemsFree).
- Specify noise filtering conditions to ensure that good connections are appropriately detected.
- Register the driver (provide a module) (see Modem Manager Programming Interface).
- Decide whether to hand-off unaccepted calls (MaxHandOffCount).
Modem in Audio Mode
An audio discriminator recites voice prompts to the caller, and determines the validity of the caller by received DTMF tones.
When a tag registers an audio discriminator object, that tag should have a DataPort variable and a module called AudioDiscriminator().
When a call is answered, the modem is initially in audio mode. The highest priority AudioDiscriminator() module is called with the tag's DataPort variable set to a useable stream.
- This is a steady state call that times-out after the period of time specified when the discriminator module was registered.
- If the discriminator module returns "0", the call is passed to the next discriminator module.
- If the discriminator module returns a non-zero result, then it is deemed to have accepted the call.
The discriminator may read and write on the DataPort stream.
Any data written to the stream is converted to speech using the voice identified when the discriminator was registered. The speech device is initialized using the string defined by the DialerSpeechInit application property. Data written may include any escape sequences meaningful to the TTS engine.
If a bookmark is set, when the bookmark is reported back to the Modem Manager, a single character equal to 0x45+Bookmark Number is be inserted into the stream, and may be read by the discriminator module.
- The only other data that can be received are DTMF tones inputted at the remote device (to receive such tones, this requirement must be specified in the media mode for the discriminator). This data appears in the stream as the digits 0..9, the number-hatch character (#), or the asterisk character (*).
- If the discriminator accepts the call, then DataPort remains as a valid stream, and the tag that owns the discriminator now has control.
- If the discriminator rejects the call or times out, then the call is passed to the next audio discriminator in priority order. If there are no more audio discriminators, the modem is switched into data mode, and the identification of the call continues as described in Modem in Data Mode (as if a data call had just been received).
Careful consideration needs to be given to the overall time tolerance of this sequence. If, say, a RAS call is received in audio mode, then it must go through all audio discriminators, the switching of the modem to data mode (which typically takes 10 seconds), and all the data discriminators, before the call is handed off to RAS. This is not a deficiency in the Modem Manager, but a necessary consequence of accepting mixed media calls.
An example of an audio discriminator can be found in Example Audio Discriminator.
Factors to Consider for the Configuration of Outgoing Calls
Local telecommunications authorities may have regulations regarding the frequency at which call attempts are made to a particular number. By defining values for the following modem-related application properties, you can set restrictions on redial attempts.
- CycleLength defines the number of steps in the cycle (with a maximum of 10),
- CallInterval1 through to CallInterval10 define the delay (in seconds) at each step transition.
- CycleDelay defines the final delay (in seconds) before the cycle restarts.
- HangUpDelay indicates the number of seconds to wait before hanging up the modem when there are not active attempts to read or write.
- DialWaitTime enables you to configure the number of seconds to wait before retrying a failed modem operation after no dial tone or response from the modem has been detected. The default value is 10 seconds. During this time, TAPI sends initialization strings to reset the modem. If not granted an appropriate time interval, the modem will not reset properly.
For a complete listing of the configuration variables related to the Modem Manager, refer to "Application Properties for the Modem Manager".