unit HelloWorld;

interface

  uses TClientCallImpl;

implementation

  procedure Answer(call : TClientCall); stdcall;
  var

   ok  : Boolean;
   syn : TSynthesizer;

  begin

    call.playMessage('helloworld');
    call.waitIfPlaying(-1);

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

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

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

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

  end;

exports

  Answer;

end.