Asterisk-Java

org.asteriskjava.fastagi.command
Class SayDigitsCommand

java.lang.Object
  extended by org.asteriskjava.fastagi.command.AbstractAgiCommand
      extended by org.asteriskjava.fastagi.command.SayDigitsCommand
All Implemented Interfaces:
java.io.Serializable, AgiCommand

public class SayDigitsCommand
extends AbstractAgiCommand

Say a given digit string, returning early if any of the given DTMF digits are received on the channel.

Returns 0 if playback completes without a digit being pressed, or the ASCII numerical value of the digit if one was pressed or -1 on error/hangup.

Version:
$Id: SayDigitsCommand.java 938 2007-12-31 03:23:38Z srt $
Author:
srt
See Also:
Serialized Form

Constructor Summary
SayDigitsCommand(java.lang.String digits)
          Creates a new SayDigitsCommand.
SayDigitsCommand(java.lang.String digits, java.lang.String escapeDigits)
          Creates a new SayDigitsCommand.
 
Method Summary
 java.lang.String buildCommand()
          Returns a string suitable to be sent to asterisk.
 java.lang.String getDigits()
          Returns the digits string to say.
 java.lang.String getEscapeDigits()
          Returns the digits that allow the user to interrupt this command.
 void setDigits(java.lang.String digits)
          Sets the digits to say.
 void setEscapeDigits(java.lang.String escapeDigits)
          Sets the digits that allow the user to interrupt this command.
 
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

SayDigitsCommand

public SayDigitsCommand(java.lang.String digits)
Creates a new SayDigitsCommand.

Parameters:
digits - the digits to say.

SayDigitsCommand

public SayDigitsCommand(java.lang.String digits,
                        java.lang.String escapeDigits)
Creates a new SayDigitsCommand.

Parameters:
digits - the digits to say.
escapeDigits - the digits that allow the user to interrupt this command.
Method Detail

getDigits

public java.lang.String getDigits()
Returns the digits string to say.

Returns:
the digits string to say.

setDigits

public void setDigits(java.lang.String digits)
Sets the digits to say.

Parameters:
digits - the digits string to say.

getEscapeDigits

public java.lang.String getEscapeDigits()
Returns the digits that allow the user to interrupt this command.

Returns:
the digits that allow the user to interrupt this command.

setEscapeDigits

public void setEscapeDigits(java.lang.String escapeDigits)
Sets the digits that allow the user to interrupt this command.

Parameters:
escapeDigits - the digits that allow the user to interrupt this command or null for none.

buildCommand

public java.lang.String buildCommand()
Description copied from interface: AgiCommand
Returns a string suitable to be sent to asterisk.

Specified by:
buildCommand in interface AgiCommand
Specified by:
buildCommand in class AbstractAgiCommand
Returns:
a string suitable to be sent to asterisk.

Asterisk-Java

Copyright © 2004-2009 Stefan Reuter. All Rights Reserved.