public class WaitForDigitCommand extends AbstractAgiCommand
Returns -1 on channel failure, 0 if no digit is received in the timeout, or the numerical value of the ascii of the digit if one is received. Use -1 for the timeout value if you desire the call to block indefinitely.
| Constructor and Description |
|---|
WaitForDigitCommand()
Creates a new WaitForDigitCommand with a default timeout of -1 which
blocks the channel indefinitely.
|
WaitForDigitCommand(long timeout)
Creates a new WaitForDigitCommand.
|
| Modifier and Type | Method and Description |
|---|---|
String |
buildCommand()
Returns a string suitable to be sent to asterisk.
|
long |
getTimeout()
Returns the milliseconds to wait for the channel to receive a DTMF digit.
|
void |
setTimeout(long timeout)
Sets the milliseconds to wait for the channel to receive a DTMF digit.
|
escapeAndQuote, escapeAndQuote, setAsteriskVersion, toStringpublic WaitForDigitCommand()
public WaitForDigitCommand(long timeout)
timeout - the milliseconds to wait for the channel to receive a DTMF
digit.public long getTimeout()
public void setTimeout(long timeout)
timeout - the milliseconds to wait for the channel to receive a DTMF
digit.public String buildCommand()
AgiCommandbuildCommand in interface AgiCommandbuildCommand in class AbstractAgiCommandCopyright © 2004–2022. All rights reserved.