import com.IVRForBeginners.*;

public class HelloWorld extends JavaClientCall
{
  public void Answer()
  {
   boolean      ok;   
   ISynthesizer syn;
   
   playMessage("helloworld");
   waitIfPlaying(-1);
   
   syn = getSynthesizer();
   syn.speak("Please press a key on your telephone's key pad.");
   ok = inputWait(1, '#', 10000);
   
   if ( ok )
    syn.speak("You pressed " + new StringBuffer().append( getChar() ) + " .");
  
   else
    syn.speak("You pressed nothing.");
   
   syn.speak("That was easy, wasn't it?");
   syn.wait(-1);
  }
}