net.sf.asterisk.fastagi.command
Class SayNumberCommand

java.lang.Object
  extended by net.sf.asterisk.fastagi.command.AGICommand
      extended by net.sf.asterisk.fastagi.command.SayNumberCommand
All Implemented Interfaces:
java.io.Serializable

public class SayNumberCommand
extends AGICommand

Say a given number, returning early if any of the given DTMF number 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: SayNumberCommand.java,v 1.3 2005/03/11 19:01:02 srt Exp $
Author:
srt
See Also:
Serialized Form

Constructor Summary
SayNumberCommand(java.lang.String number)
          Creates a new SayNumberCommand.
SayNumberCommand(java.lang.String number, java.lang.String escapeDigits)
          Creates a new SayNumberCommand.
 
Method Summary
 java.lang.String buildCommand()
          Returns a string suitable to be sent to asterisk.
 java.lang.String getEscapeDigits()
          Returns the number that allow the user to interrupt this command.
 java.lang.String getNumber()
          Returns the number to say.
 void setEscapeDigits(java.lang.String escapeDigits)
          Sets the number that allow the user to interrupt this command.
 void setNumber(java.lang.String number)
          Sets the number to say.
 
Methods inherited from class net.sf.asterisk.fastagi.command.AGICommand
escapeAndQuote, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SayNumberCommand

public SayNumberCommand(java.lang.String number)
Creates a new SayNumberCommand.

Parameters:
number - the number to say.

SayNumberCommand

public SayNumberCommand(java.lang.String number,
                        java.lang.String escapeDigits)
Creates a new SayNumberCommand.

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

getNumber

public java.lang.String getNumber()
Returns the number to say.

Returns:
the number to say.

setNumber

public void setNumber(java.lang.String number)
Sets the number to say.

Parameters:
number - the number to say.

getEscapeDigits

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

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

setEscapeDigits

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

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

buildCommand

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

Specified by:
buildCommand in class AGICommand
Returns:
a string suitable to be sent to asterisk.


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