Adding Speaker Phone Support

If your voice modem offers speaker phone support, you can add up to six different keys to the registry to direct the way Unimodem/V uses the speaker phone built into your modem. For example, here are the six keys from SMPVOICE.INF:


   HKR,, SpeakerPhoneSpecs,       1, 00,00,00,00,  0f,00,00,00,  03,00,00,00,  00,00,00,00
   HKR, SpeakerPhoneEnable,       1,, "at#vls=5cr"
   HKR, SpeakerPhoneDisable,      1,, "at#vls=0cr"
   HKR, SpeakerPhoneMute,         1,, "at#spk=0,,,cr"
   HKR, SpeakerPhoneUnMute,       1,, "at#spk=1,,,cr"
   HKR, SpeakerPhoneSetVolumeGain,1,, "at#spk=,<Vol>,<Gain>cr"

You must add a SpeakerPhoneSpecs key, even if all four values are 0. Unimodem/V uses the four values in the SpeakerPhoneSpecs key to determine the minimum and maximum speaker phone volumes, as well as the minimum and maximum gain, to use with your speaker phone hardware. Details of the four values to put in the key are in REG.DOC. The example values used in SMPVOICE.INF is


   HKR,, SpeakerPhoneSpecs,       1, 00,00,00,00,  0f,00,00,00,  03,00,00,00,  00,00,00,00

Unimodem/V uses the SpeakerSetVolumeGain key values to scale the speaker phone volume and gain when TAPI passes Unimodem/V a speaker volume setting, based on the values you put in the SpeakerPhoneSpecs key. Notice in the example SpeakerPhoneSpecs value above, the speaker gain values show an attenuation method, because the minimum speaker gain value (0x00000003) is greater than the maximum speaker gain value (0x00000000). Note also that both speaker volume and gain get reset each time Unimodem/V uses SpeakerPhoneSetVolumeGain command.

Set the values of the SpeakerPhoneEnable, SpeakerPhoneDisable, SpeakerPhoneMute, and SpeakerPhoneUnMute keys to the command strings Unimodem/V can send to your voice modem to accomplish those functions.

The relationship between the speaker phone commands you put into the registry for Unimodem/V to use is shown in the following state transition diagram. The Voice Connected (VCON) state can be entered when Unimodem/V sends to the modem either the command string in the VoiceAnswer key or the command string in the VoiceDialNumberSetup key.

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

The state transition diagram shows the TAPI functions called, and their parameters, when Unimodem/V performs the commands stored in the SpeakerPhoneSetVolumeGain, SpeakerPhoneMute, and SpeakerPhoneUnmute registry keys. The TAPI and MMSystem functions Unimodem/V calls when it performs the other commands shown in the state transition diagram are summarized in the following table.

Registry Key Holding Command

TAPI or MMSystem Function Called

Parameter(s)

SpeakerPhoneEnable

phoneSetHookSwitchState

PHONESETHOOKSWITCHDEV_SPEAKER PHONESETHOOKSWITCHMODE_MICSPEAKER or PHONESETHOOKSWITCHMODE_SPEAKER

LineSetPlayFormat then StartPlay

waveOutOpen

SpeakerPhoneDisable

phoneSetHookSwitchState

PHONESETHOOKSWITCHDEV_SPEAKER PHONESETHOOKSWITCHMODE_ONHOOK

TerminatePlay

WaveOutClose

AbortPlay then StopPlay

WaveOutClose

HangUp

lineDrop