/** Handle a exit request */
 public void handleExitRequest() {
   if (mediaManager != null) {}
   // SIP unregister
   if (sipManager != null) {
     try {
       sipManager.endAllCalls();
     } catch (CommunicationsException exc) {
       Log.error("handleExitRequest", exc);
     } catch (Throwable exc) {
       Log.error("handleExitRequest", exc);
     }
     try {
       sipManager.unregister();
     } catch (CommunicationsException exc) {
       Log.error("handleExitRequest", exc);
     } catch (Throwable exc) {
       Log.error("handleExitRequest", exc);
     }
     try {
       sipManager.stop();
     } catch (Exception exc) {
       Log.error("handleExitRequest", exc);
     }
   }
   NetworkAddressManager.shutDown();
 }
  /** Destroys the softphone handlers and stack */
  public void destroySoftPhone() {

    try {
      sipManager.stop();
    } catch (Exception exc) {
      Log.error("destroySoftPhone", exc);
    }
  }