public class RecordFileCommand extends AbstractAgiCommand
Records to a given file.
| Constructor and Description |
|---|
RecordFileCommand(String file,
String format,
String escapeDigits,
int timeout)
Creates a new RecordFileCommand.
|
RecordFileCommand(String file,
String format,
String escapeDigits,
int timeout,
int offset,
boolean beep,
int maxSilence)
Creates a new RecordFileCommand.
|
| Modifier and Type | Method and Description |
|---|---|
String |
buildCommand()
Returns a string suitable to be sent to asterisk.
|
boolean |
getBeep()
Returns
true if a beep should be played before recording. |
String |
getEscapeDigits()
Returns the digits that allow the user to end recording.
|
String |
getFile()
Returns the name of the file to stream.
|
String |
getFormat()
Returns the format of the file to be recorded, for example "wav".
|
int |
getOffset()
Returns the offset samples to skip.
|
int |
getTimeout()
Returns the maximum record time in milliseconds.
|
void |
setBeep(boolean beep)
Set to
true to play a beep before recording. |
void |
setEscapeDigits(String escapeDigits)
Sets the digits that allow the user to end recording.
|
void |
setFile(String file)
Sets the name of the file to stream.
|
void |
setFormat(String format)
Sets the format of the file to be recorded, for example "wav".
|
void |
setOffset(int offset)
Sets the offset samples to skip.
|
void |
setTimeout(int timeout)
Sets the maximum record time in milliseconds.
|
escapeAndQuote, escapeAndQuote, setAsteriskVersion, toStringpublic RecordFileCommand(String file, String format, String escapeDigits, int timeout)
file - the name of the file to stream, must not include extension.format - the format of the file to be recorded, for example "wav".escapeDigits - contains the digits that allow the user to end recording.timeout - the maximum record time in milliseconds, or -1 for no timeout.public RecordFileCommand(String file, String format, String escapeDigits, int timeout, int offset, boolean beep, int maxSilence)
file - the name of the file to stream, must not include extension.format - the format of the file to be recorded, for example "wav".escapeDigits - contains the digits that allow the user to end recording.timeout - the maximum record time in milliseconds, or -1 for no timeout.offset - the offset samples to skip.beep - true if a beep should be played before recording.maxSilence - The amount of silence (in seconds) to allow before
returning despite the lack of dtmf digits or reaching timeout.public String getFile()
public void setFile(String file)
file - the name of the file to stream, must not include extension.public String getFormat()
public void setFormat(String format)
format - the format of the file to be recorded, for example "wav".public String getEscapeDigits()
public void setEscapeDigits(String escapeDigits)
escapeDigits - the digits that allow the user to end recording or null for none.public int getTimeout()
public void setTimeout(int timeout)
timeout - the maximum record time in milliseconds, or -1 for no timeout.public int getOffset()
public void setOffset(int offset)
offset - the offset samples to skip.public boolean getBeep()
true if a beep should be played before recording.true if a beep should be played before recording, false if not.public void setBeep(boolean beep)
true to play a beep before recording.beep - true if a beep should be played before recording, false if not.public String buildCommand()
AgiCommandbuildCommand in interface AgiCommandbuildCommand in class AbstractAgiCommandCopyright © 2004–2024. All rights reserved.