class JVoiceXmlImplementationPlatform implements SpokenInputListener, SynthesizedOutputListener,
        TelephonyListener, ImplementationPlatform, Configurable {

    @Override
    public void telephonyCallHungup(final TelephonyEvent event) {
        synchronized (this) {
            // Ignore the event if we are already closing the connection
            if (hungup) {
                return;
            }
        }
        LOGGER.info("telephony connection hung up " + event);

        // Stop a possibly active recognition
        if (input != null && input.isBusy()) {
            final Collection<ModeType> types =
                    new java.util.ArrayList<ModeType>();;
            types.add(ModeType.VOICE);
            types.add(ModeType.DTMF);
            input.stopRecognition(types);
        }
        
        // Publish a corresponding event
        if (eventbus != null) {
            final JVoiceXMLEvent hangupEvent =
                    new ConnectionDisconnectHangupEvent("caller hung up");
            eventbus.publish(hangupEvent);
        }

        synchronized (this) {
            hungup = true;
        }
        
        // Immediately return the resources
        LOGGER.info("returning aqcuired resources");
        returnSystemOutput();
        returnUserInput();
        returnCallControl();
        LOGGER.info("implementation platform closed");
    }

      JVoiceXmlImplementationPlatform(
            final KeyedResourcePool<Telephony> telePool,
            final KeyedResourcePool<SynthesizedOutput> synthesizedOutputPool,
            final KeyedResourcePool<SpokenInput> spokenInputPool,
            final ConnectionInformation connectionInformation);
      JVoiceXmlImplementationPlatform(
            final KeyedResourcePool<Telephony> telePool,
            final KeyedResourcePool<SynthesizedOutput> synthesizedOutputPool,
            final KeyedResourcePool<SpokenInput> spokenInputPool,
            final BufferedDtmfInput bufferedCharacterInput,
            final ConnectionInformation connectionInformation);

}