Adding Registry Keys to Support Phone Message Recording and Playback

To support the telephone answering machine functions of recording incoming phone messages and playing the messages back through the handset when there is no active call, you must use your modem INF file to put values in fourteen different registry keys:

Registry Key

Value

AbortPlay

Command that stops playing audio data immediately (does not play the rest of the audio buffer contents). This command is not used for modems that are not using a serial wave device.

CloseHandset

Command that resets the modem to Class 0.

HandsetSetPlayFormat

Command that sets the modem's handset playback format.

HandsetSetRecordFormat

Command that sets the modem's handset recording format.

LineSetPlayFormat

Command that sets the modem's line playback format.

LineSetRecordFormat

Command that sets the modem's line recording format.

OpenHandset

Command that puts modem in a mode that enables audio to be played back through the handset when there is no active call.

StartPlay

Command that starts playing audio (wave files) out of the modem. If a serial wave driver is being used, a bit in the VoiceProfile key controls whether the baud rate is set prior to the StartPlay command or after the StartPlay command.

StartRecord

Command that starts recording audio (wave files) from the modem. If a serial wave driver is being used, a bit in the VoiceProfile key controls whether the baud rate is set prior to the StartRecord command or after the StartRecord command.

StopPlay

Command that can be used to reset the modem's baudrate after an AbortPlay or TerminatePlay command. A bit in the VoiceProfile key indicates whether Unimodem/V has to reset the UART's baudrate.

StopRecord

Command that stops recording audio (wave files) from the modem. If a serial wave driver is being used, a bit in the VoiceProfile key controls whether the baud rate is set prior to the StopRecord command or after the StopRecord command.

TerminateRecord

Command that causes the modem to finish recording its local buffer and stop recording audio data. This command is not used for modems that are not using a serial wave device.

TerminatePlay

Command that causes the modem to finish playing the contents of its local buffer and stop playing audio data after that. This command is not used for modems that are not using a serial wave device.


The relationship between these commands and the way they are used in sequence by Unimodem/V is shown in the following state transition diagram.

The following conventions are used in the illustration:

Italics = Registry key

Bold caps = State name

Underline = TAPI or MMSystem function called to cause state change

Non-bold caps = Parameters for TAPI functions

SMPVOICE.INF is a sample INF file in the MDK for a voice modem that uses the serial wave driver for playing audio to the handset and line. The example values from SMPVOICE.INF for the fourteen keys listed in the table above are:


   HKR, CloseHandset,            1,, "at#cls=0cr"
   HKR, StartPlay,               1,, "at#vtxcr"
   HKR, StopPlay,                1,, "None"
   HKR, StopPlay,                2,, "NoResponse"
   HKR, StartRecord,             1,, "at#vrxcr"
   HKR, StopRecord,              1,, "None"
   HKR, StopRecord,              2,, "NoResponse"
   HKR,, TerminateRecord,,       "
<h10>Ecratcr"
   HKR,, TerminatePlay,,         "
<h10>
<h03>atcr"
   HKR,, AbortPlay,,             "
<h10>
<h18>atcr"
   HKR, LineSetPlayFormat,       1,, "at#vls=0cr"
   HKR, LineSetRecordFormat,     1,, "None"
   HKR, LineSetRecordFormat,     2,, "NoResponse"
   HKR, HandsetSetRecordFormat,  1,,"at#vsr=7200cr"
   HKR, HandsetSetRecordFormat,  2,,"at#vbs=4cr"
   HKR, HandsetSetPlayFormat,    1,,"at#vsr=7200cr"
   HKR, HandsetSetPlayFormat,    2,,"at#vbs=4cr"
   HKR, OpenHandset,             1,, "at#cls=8cr"
   HKR, OpenHandset,             2,, "at#vls=2cr"