DialVoice (Define Dialing String for Voice Modem)
The DialVoice function is used to define the dialing string for a COM310/COM320 voice modem.
Syntax
DialVoice ( DialString )

In the following example program, the modem will dial out and make an announcement if the variable TCTemp is greater than 28.
'CR6 Datalogger
'Declare Variables
Public Reft, TCTemp, Counter
'Main Program
BeginProg
Scan (1,Sec,3,0)
TCDiff (TCTemp,1,mv200C,U1,TypeT,RefT,True,0,15000,1.0,0)
Counter=0
If TCTemp>28
DialVoice ("9,1 800 555 1212")
Do
Counter=Counter+1
VoiceSpeak ("WARNING THE TEMPERATURE IS" + TCTemp + "DEGREES", 2)
VoiceSpeak ("PRESS STAR TO DISCONNECT", 2)
Loop Until VoiceKey(500)=42 OR Counter=60
VoiceHangup
EndIf
NextScan
EndProg
Remarks
This function returns a -1 (True) if the communication attempt was successful, 0 (False) if it failed, or -3 if a voice modem is not detected. VoiceHangup is used after the communication attempt to hang up the voice modem.
NOTE: When creating code for voice modems, the VoiceKey instruction should be used to add a delay before the EndVoice instruction is executed. Otherwise, the datalogger will end the VoiceSpeak command before the spoken message is completed.
Parameter
DialString
The telephone number and any other codes used to dial the modem. A semi-colon is used to separate multiple commands. Two semi-colons in a row will insert a 1 second delay before continuing to the next characters in the string. A comma inserts a 2 second delay before continuing to the next character.
Type: String
A 9 sent to a voice modem puts the modem into data mode. Several pauses (commas) should be inserted prior to sending the 9 to allow the modem time to answer and establish communication. A typical dial string in this instance might be 1-435-555-1212,,,,,9. In some instances, the first 9 sent to the voice modem is not "heard" and the communication attempt fails. An additional 9 can be added to the string to ensure the 9 is received; e.g., 1-435-555-1212,,,,,9,,9.