#define STRICT

#include <windows.h>
#include "ClientCall.h"
#include "Synthesizer.h"
#include <string>

using namespace IFB;

void CALLBACK Answer(ClientCall &call)
{
 char        c[] = { 0, '.', 0 };
 std::string str;
 Synthesizer *psyn;

 call.playMessage("helloworld");
 call.waitIfPlaying();

 if ( psyn = call.getSynthesizer() )
 {
  psyn->speak("Please press a key on your telephone's keypad.");
  psyn->wait();

  call.inputWait(1, '#', 10000);

  str = "You pressed ";

  if ( c[0] = call.getChar() )
   str.append(c);

  else 
   str.append(" nothing.");

  psyn->speak( str.c_str() );
  psyn->speak("That was easy, wasn't it?");
  psyn->wait();
 }

}