public class StreamFileCommand extends AbstractAgiCommand
Sends audio file on channel.
| Constructor and Description |
|---|
StreamFileCommand(String file)
Creates a new StreamFileCommand, streaming from the beginning.
|
StreamFileCommand(String file,
String escapeDigits)
Creates a new StreamFileCommand, streaming from the beginning.
|
StreamFileCommand(String file,
String escapeDigits,
int offset)
Creates a new StreamFileCommand, streaming from the given offset.
|
| Modifier and Type | Method and Description |
|---|---|
String |
buildCommand()
Returns a string suitable to be sent to asterisk.
|
String |
getEscapeDigits()
Returns the digits that allow the user to interrupt this command.
|
String |
getFile()
Returns the name of the file to stream.
|
int |
getOffset()
Returns the offset samples to skip before streaming.
|
void |
setEscapeDigits(String escapeDigits)
Sets the digits that allow the user to interrupt this command.
|
void |
setFile(String file)
Sets the name of the file to stream.
|
void |
setOffset(int offset)
Sets the offset samples to skip before streaming.
|
escapeAndQuote, escapeAndQuote, setAsteriskVersion, toStringpublic StreamFileCommand(String file)
file - the name of the file to stream, must not include extension.public StreamFileCommand(String file, String escapeDigits)
file - the name of the file to stream, must not include extension.escapeDigits - contains the digits that allow the user to interrupt
this command.public StreamFileCommand(String file, String escapeDigits, int offset)
file - the name of the file to stream, must not include extension.escapeDigits - contains the digits that allow the user to interrupt
this command. Maybe null if you don't want the
user to interrupt.offset - the offset samples to skip before streaming.public String getFile()
public void setFile(String file)
file - the name of the file to stream, must not include extension.public String getEscapeDigits()
public void setEscapeDigits(String escapeDigits)
escapeDigits - the digits that allow the user to interrupt this
command or null for none.public int getOffset()
public void setOffset(int offset)
offset - the offset samples to skip before streaming.public String buildCommand()
AgiCommandbuildCommand in interface AgiCommandbuildCommand in class AbstractAgiCommandCopyright © 2004–2024. All rights reserved.