AsterNet Class Library (Sandcastle documentation)

| AGIScript RecordFile Method (String, String, String, Int32)

Record to a file until a given dtmf digit in the sequence is received.
Returns -1 on hangup or error.
The format will specify what kind of file will be recorded. The timeout is the maximum record time in milliseconds, or -1 for no timeout. Offset samples is optional, and if provided will seek to the offset without exceeding the end of the file. "maxSilence" is the number of seconds of maxSilence allowed before the function returns despite the lack of dtmf digits or reaching timeout.

Namespace: AsterNET.FastAGI
Assembly: AsterNET (in AsterNET.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy

    protected int RecordFile(
    	string file,
    	string format,
    	string escapeDigits,
    	int timeout
    )

    Protected Function RecordFile (
    	file As String,
    	format As String,
    	escapeDigits As String,
    	timeout As Integer
    ) As Integer

    protected:
    int RecordFile(
    	String^ file,
    	String^ format,
    	String^ escapeDigits,
    	int timeout
    )

    member RecordFile :
            file : string *
            format : string *
            escapeDigits : string *
            timeout : int -> int

#### Parameters

file
  Type: System
  String
  the name of the file to stream, must not include extension.
format
  Type: System
  String
  the format of the file to be recorded, for example "wav".
escapeDigits
  Type: System
  String
  contains the digits that allow the user to end recording.
timeout
  Type: System
  Int32
  the maximum record time in milliseconds, or -1 for no timeout.

#### Return Value

Type: Int32
result code
See Also

#### Reference

AGIScript Class
RecordFile Overload
AsterNET.FastAGI Namespace