/** * Fired when softphone is unregistering * * @param evt RegistrationEvent */ public void unregistering(RegistrationEvent evt) { status = SipRegisterStatus.Unregistered; registerStatusChanged( new RegisterEvent(this, SipRegisterStatus.Unregistering, evt.getReason())); int waitUnreg = SIPConfig.getWaitUnregistration(); if (waitUnreg != -1) { try { int delay = waitUnreg; // we get here through a _synchronous_ call from shutdown so // let's try // and wait for unregistrations confirmation in case the // registrar has requested authorization // before conriming unregistration if (delay > 0) synchronized (unregistrationLock) { unregistrationLock.wait(delay); } } catch (InterruptedException ex) { Log.error("unregistering", ex); } catch (NumberFormatException ex) { Log.error("unregistering", ex); } } }