net.sf.asterisk.fastagi.command
Class SayPhoneticCommand

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

public class SayPhoneticCommand
extends AGICommand

Say a given character string with phonetics, 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: SayPhoneticCommand.java,v 1.3 2005/03/10 21:48:11 srt Exp $
Author:
srt
See Also:
Serialized Form

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

SayPhoneticCommand

public SayPhoneticCommand(java.lang.String text)
Creates a new SayPhonticCommand.

Parameters:
text - the text to say.

SayPhoneticCommand

public SayPhoneticCommand(java.lang.String text,
                          java.lang.String escapeDigits)
Creates a new SayPhoneticCommand.

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

getText

public java.lang.String getText()
Returns the text to say.

Returns:
the text to say.

setText

public void setText(java.lang.String text)
Sets the text to say.

Parameters:
text - the text 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 text 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.