    public void processMessage(final PhoneResponseMessage message) {
	if (message instanceof CallEndedResponseMessage) {
	    final CallEndedResponseMessage msg = (CallEndedResponseMessage) message;
            if (msg.wasSuccessful() == false) {    
                logger.warning("Failed END_CALL");
		return;
	    }
            CallListing listing = msg.getCallListing();
            if (mostRecentCallListing == null ||
		    listing.equals(mostRecentCallListing) == false) {
		return;
	    }
            if (mostRecentCallListing.isPrivate()) {
            }
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    phoneForm.setCallEnded(msg.getReasonCallEnded());
                }
            });
	    return;
	}
	if (message instanceof LockUnlockResponseMessage) {
	    LockUnlockResponseMessage msg = (LockUnlockResponseMessage) message;
	    phoneForm.changeLocked(msg.getLocked(), msg.wasSuccessful());
	    return;
	}
	if (message instanceof PhoneResponseMessage == false) {
	    logger.warning("Invalid message:  " + message);
	    return;
	}
	PhoneResponseMessage msg = (PhoneResponseMessage) message;
        CallListing listing = msg.getCallListing();
	if (msg instanceof PlaceCallResponseMessage) {
	    logger.fine("Got place call response...");
            if (msg.wasSuccessful() == false) {
                logger.warning("Failed PLACE_CALL!");
		return;
	    }
            if (mostRecentCallListing == null ||
		    listing.equals(mostRecentCallListing) == false) {
		logger.warning("Didn't find listing...");
		return;
	    }
	    mostRecentCallListing.setPrivateClientName(listing.getPrivateClientName());
	    logger.fine("Updating listing with " + listing.getExternalCallID());
	    mostRecentCallListing.setExternalCallID(listing.getExternalCallID());
            if (listing.isPrivate()) {
            }
	    return;
	}
	if (msg instanceof JoinCallResponseMessage)  {
            if (msg.wasSuccessful() == false) {
                logger.warning("Failed JOIN_CALL");
		return;
	    }
	    if (mostRecentCallListing == null || 
		    listing.equals(mostRecentCallListing) == false) {
		return;
	    }
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    phoneForm.setCallEstablished(false);
                }
            });
	    return;
	}
	if (msg instanceof CallInvitedResponseMessage) {
            if (mostRecentCallListing == null ||
		    listing.equals(mostRecentCallListing) == false) {
		return;  
	    }
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    phoneForm.setCallInvited();
                }
            });
            return;
	}
	if (msg instanceof CallEstablishedResponseMessage) {
	    logger.fine("Got est resp");
            if (mostRecentCallListing == null ||
		    listing.equals(mostRecentCallListing) == false) {
		logger.warning("no listing " + mostRecentCallListing 
		    + " listing " + listing);
		return;  
	    }
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
		    synchronized (phoneForm) {
                        phoneForm.setCallEstablished(
			    mostRecentCallListing.isPrivate());
		    }
                }
            });
            return;
        }
    }

    public void processMessage(final PhoneResponseMessage message) {
	if (message instanceof CallEndedResponseMessage) {
	    final CallEndedResponseMessage msg = (CallEndedResponseMessage) message;
            if (msg.wasSuccessful() == false) {    
                logger.warning("Failed END_CALL");
		return;
	    }
            CallListing listing = msg.getCallListing();
            if (mostRecentCallListing == null ||
		    listing.equals(mostRecentCallListing) == false) {
		return;
	    }
            if (mostRecentCallListing.isPrivate()) {
            }
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
		    if (phoneForm != null) {
                        phoneForm.setCallEnded(msg.getReasonCallEnded());
		    }
                }
            });
	    return;
	}
	if (message instanceof LockUnlockResponseMessage) {
	    LockUnlockResponseMessage msg = (LockUnlockResponseMessage) message;
	    if (phoneForm != null) {
	        phoneForm.changeLocked(msg.getLocked(), msg.wasSuccessful());
	    }
	    return;
	}
	if (message instanceof PhoneResponseMessage == false) {
	    logger.warning("Invalid message:  " + message);
	    return;
	}
	PhoneResponseMessage msg = (PhoneResponseMessage) message;
        CallListing listing = msg.getCallListing();
	if (msg instanceof PlaceCallResponseMessage) {
	    logger.fine("Got place call response...");
            if (msg.wasSuccessful() == false) {
                logger.warning("Failed PLACE_CALL!");
		return;
	    }
            if (mostRecentCallListing == null ||
		    listing.equals(mostRecentCallListing) == false) {
		logger.warning("Didn't find listing...");
		return;
	    }
	    mostRecentCallListing.setPrivateClientName(listing.getPrivateClientName());
	    logger.fine("Updating listing with " + listing.getExternalCallID());
	    mostRecentCallListing.setExternalCallID(listing.getExternalCallID());
            if (listing.isPrivate()) {
            }
	    return;
	}
	if (msg instanceof JoinCallResponseMessage)  {
            if (msg.wasSuccessful() == false) {
                logger.warning("Failed JOIN_CALL");
		return;
	    }
	    if (mostRecentCallListing == null || 
		    listing.equals(mostRecentCallListing) == false) {
		return;
	    }
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
	    	    if (phoneForm != null) {
                        phoneForm.setCallEstablished(false);
		    }
                }
            });
	    return;
	}
	if (msg instanceof CallInvitedResponseMessage) {
            if (mostRecentCallListing == null ||
		    listing.equals(mostRecentCallListing) == false) {
		return;  
	    }
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
		    if (phoneForm != null) {
                        phoneForm.setCallInvited();
		    }
                }
            });
            return;
	}
	if (msg instanceof CallEstablishedResponseMessage) {
	    logger.fine("Got est resp");
            if (mostRecentCallListing == null ||
		    listing.equals(mostRecentCallListing) == false) {
		logger.warning("no listing " + mostRecentCallListing 
		    + " listing " + listing);
		return;  
	    }
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
		    if (phoneForm != null) {
		        synchronized (phoneForm) {
                            phoneForm.setCallEstablished(
			        mostRecentCallListing.isPrivate());
		        }
		    }
                }
            });
            return;
        }
    }
