*** THISFORM.TestResponse() is method/fuction to test for "OK", "VCON", etc. *** response codes from the modem - not included here. Nor is any error *** handling. Assume all is OK.This code may be as a result of the operator's response to
* Enter voice mode THISFORM.Dialer.Output = "AT#CLS=8"+CHR(13) Goodtogo = THISFORM.TestResponse("OK") * Voice Line Select THISFORM.Dialer.Output = "AT#VLS=0"+CHR(13) Goodtogo = THISFORM.TestResponse("OK") * Set Tone generation to 100 ms - not needed in this app THISFORM.Dialer.Output = "AT#VBT=1"+CHR(13) Goodtogo = THISFORM.TestResponse("OK") * Now have the modem pick up the line THISFORM.Dialer.Output = "ATA"+CHR(13) Goodtogo = THISFORM.TestResponse("VCON")The following code might be put in your Record button .click() method
* Set sample rate to 8kHz THISFORM.Dialer.Output = "AT#VSR=8000"+CHR(13) Goodtogo = THISFORM.TestResponse("OK") * Set bits/Sample to 4 THISFORM.Dialer.Output = "AT#VBS=4"+CHR(13) Goodtogo = THISFORM.TestResponse("OK") * Voice Line Select - just to make sure THISFORM.Dialer.Output = "AT#VLS=0"+CHR(13) Goodtogo = THISFORM.TestResponse("OK") * Setup MCI for Record THISFORM.VREC.DeviceType = "waveaudio" * Adjust the following to suit. THISFORM.VREC.FileName = "C:\wavefiles\test.wav" * Finish modem setup THISFORM.Dialer.Output = "AT#VSM=130,8000"+CHR(13) Goodtogo = THISFORM.TestResponse("OK") * and turn on Voice Receive THISFORM.Dialer.Output = "AT#VRX"+CHR(13) Goodtogo = THISFORM.TestResponse("CONNECT") * Lastly, start the Record THISFORM.VREC.Command = "Record"A "Stop Record" button Click() might be:
THISFORM.VREC.Command = "Stop"A "Hangup" button Click() might be:
THISFORM.Dialer.Output = "AT#BDR=0"+CHR(13) Goodtogo = THISFORM.TestResponse("VCON") THISFORM.Dialer.Output = "ATH"+CHR(13) Goodtogo = THISFORM.TestResponse("OK") THISFORM.Dialer.Output = "AT#CLS=0"+CHR(13) Goodtogo = THISFORM.TestResponse("OK")Instead of driving the MCI control as I have, you may want the operator to manually start and stop the process. Your choice.