phoneManager.destroy();
if (phoneManager != null) { phoneManager.destroy(); }
    public void destroy() {        Log.info("unloading asterisk-im plugin resources");        try {            Log.info("Unregistering phone plugin as a component");            // Unregister this component. When unregistering the isComponentReady variable            // will be set to false so new phone calls won't be processed.            componentManager.removeComponent(getName());        }        catch (Throwable e) {            Log.error(e.getMessage(), e);            // Do nothing. Should never happen.            componentManager.getLog().error(e);        }                interceptor.restoreCompletely();        phoneManager.destroy();        // Remove the packet interceptor        InterceptorManager.getInstance().removeInterceptor(interceptor);        // Remove OnPhonePacketInterceptor as a session event listener        SessionEventDispatcher.removeListener(interceptor);    }