Records a prompt or message from the specified channel. The voice recording can go to one of 3 destinations. 1. Record to a specific file.. 2. Record into a specific prompt in an indexed voice file (VAP). 3. Record into memory buffer of a specified size. Recording into a memory (VAP) structure is not supported. In addition to specifying the destination of the file, you must specify the voice file format and speed. You must also specify the various ways the recording may terminate.
[Visual Basic] Overloads Public Shared Function RecordConversation( _ ByVal chdev As Integer, _ ByVal dev1 As Integer, _ ByVal type1 As DevType, _ ByVal dev2 As Integer, _ ByVal type2 As DevType, _ ByVal source As Source, _ ByVal voice_format As VoiceFormat, _ ByVal buffer As Byte(), _ ByVal Fhandle As Integer, _ ByVal prompt As Integer, _ ByVal MaxTime As Integer, _ ByVal MaxSilence As Integer, _ ByVal digmask As String, _ ByVal ClearDigitBuffer As Integer, _ ByVal beep As Integer, _ ByVal error_file As String, _ ByRef bytes_recorded As Integer, _ ByRef talk_time As Integer _ ) As TermCode
The first device number to record (chdev) returned from the CTIOpenVoicePort() or CTIOpenT1Port() or CTIOpenISDNPort().
type1
Type of device.
dev2
The second device number to record (chdev) returned from the CTIOpenVoicePort() or CTIOpenT1Port() or CTIOpenISDNPort().
type2
Type of device.
source
This parameter can be 1) CTI_FILE (0 defined in cti.h) which will record to a file, 2) CTI_VAP (1 defined in cti.h) which will record a single prompts into an indexed voice file (.VAP), 3) CTI_MEMORY which will record voice into a memory buffer. CTI_VAP_INDEX_IN_MEMORY is also supported. This will cause the index to be updated on both the file index and the memory index.
voice_format
Voice format
buffer
If the Source was CTI_MEMORY, this is a pointer to a memory location where you want the recording to go. For CTI_VAP_INDEX_IN_MEMORY, this is the pointer to a memroy location where the index is located. For CTI_VAP, this parameter is not used - the VAP file is expected to be open and a file handle is passed in the next parameter.
Fhandle
For CTI_VAP or CTI_VAP_INDEX_IN_MEMORY, this is the file handle to the open index file to use. The file must have been opened with write rights. For CTI_MEMORY, this contains the size of the memory buffer pointed to in the previous parameter. For CTI_FILE, this parameter is not used.
prompt
This is an integer that specifies the prompt number you wish to record if CTI_VAP or CTI_VAP_INDEX_IN_MEMORY was specified. If CTI_MEMORY or CTI_FILE was specified, this parameter is not used. NOTE: The way the prompt number is passed in the CTIRecord() function is different than in CTIPlay().
MaxTime
This is the maximum time in seconds that you will allow the user to record.
MaxSilence
Specifies how many seconds of silence to allow before stopping the recording.
digmask
This is a string of digits that will terminate the recording if the key is pressed. Valid digits are 1-9 and the # and * key. For example, if you wished to terminate on the 1 key OR the # key, send the string "1#". If you pass the string "ANY", recording will be terminated upon any press of a key. Pass the empty string "" if you wish for the recording NOT to be interrupted by a touch tone.
ClearDigitBuffer
1=TRUE or 0=FALSE. If true, any digits sitting in the board’s digit buffer are cleared before getting the new digits. Usually set to TRUE.
beep
1=TRUE or 0=FALSE. This specifies whether you want a Beep tone played when recording starts.
error_file
This is a full path to a file which speaks of a system error and a technical support number to call. This file must be a separate file and not part of a VAP file.