|
Asterisk-Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.asteriskjava.fastagi.command.AbstractAgiCommand
org.asteriskjava.fastagi.command.RecordFileCommand
public class RecordFileCommand
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.
Constructor Summary | |
---|---|
RecordFileCommand(java.lang.String file,
java.lang.String format,
java.lang.String escapeDigits,
int timeout)
Creates a new RecordFileCommand. |
|
RecordFileCommand(java.lang.String file,
java.lang.String format,
java.lang.String escapeDigits,
int timeout,
int offset,
boolean beep,
int maxSilence)
Creates a new RecordFileCommand. |
Method Summary | |
---|---|
java.lang.String |
buildCommand()
Returns a string suitable to be sent to asterisk. |
boolean |
getBeep()
Returns true if a beep should be played before recording. |
java.lang.String |
getEscapeDigits()
Returns the digits that allow the user to end recording. |
java.lang.String |
getFile()
Returns the name of the file to stream. |
java.lang.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(java.lang.String escapeDigits)
Sets the digits that allow the user to end recording. |
void |
setFile(java.lang.String file)
Sets the name of the file to stream. |
void |
setFormat(java.lang.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. |
Methods inherited from class org.asteriskjava.fastagi.command.AbstractAgiCommand |
---|
escapeAndQuote, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RecordFileCommand(java.lang.String file, java.lang.String format, java.lang.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(java.lang.String file, java.lang.String format, java.lang.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.Method Detail |
---|
public java.lang.String getFile()
public void setFile(java.lang.String file)
file
- the name of the file to stream, must not include extension.public java.lang.String getFormat()
public void setFormat(java.lang.String format)
format
- the format of the file to be recorded, for example "wav".public java.lang.String getEscapeDigits()
public void setEscapeDigits(java.lang.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 java.lang.String buildCommand()
AgiCommand
buildCommand
in interface AgiCommand
buildCommand
in class AbstractAgiCommand
|
Asterisk-Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |