unit HelloWorld;

interface

 uses

   { Our namespace }

   IVRForBeginners;

 type

  { The application class definition }

  THelloWorld = class(NetClientCall)

  private

  public

   procedure Answer();
   class function Initialize() : System.Boolean; static;

  end;

implementation

  { Voice user interface }

  procedure THelloWorld.Answer();
  var

   ok  : Boolean;
   syn : Synthesizer;

  begin

   playMessage('helloworld');
   waitIfPlaying();

   syn := getSynthesizer();
   syn.speak('Please press a key on your telephone''s keypad.');
   ok := inputWait(1, '#', 10000);

   if ok then
    syn.speak('You pressed ' + getChar() + ' .')

   else
    syn.speak('You pressed nothing.');

   syn.speak('That was easy, wasn''t it?');
   syn.wait();

  end;

  {  Global initialization happens here }

  class function THelloWorld.Initialize() : System.Boolean;
  begin
   result := true;
  end;


end.