Beispiel #1
0
        public void Stop()
        {
            try
            {
                logger.Debug("SIP Application Server stopping...");

                DNSManager.Stop();
                m_dialPlanEngine.StopScriptMonitoring = true;

                if (m_accessPolicyHost != null)
                {
                    m_accessPolicyHost.Close();
                }

                if (m_sipProvisioningHost != null)
                {
                    m_sipProvisioningHost.Close();
                }

                if (m_callManagerSvcHost != null)
                {
                    m_callManagerSvcHost.Close();
                }

                if (m_sipNotificationsHost != null)
                {
                    m_sipNotificationsHost.Close();
                }

                if (m_callManager != null)
                {
                    m_callManager.Stop();
                }

                if (m_rtccCore != null)
                {
                    m_rtccCore.Stop();
                }

                if (m_notifyManager != null)
                {
                    m_notifyManager.Stop();
                }

                if (m_monitorEventWriter != null)
                {
                    m_monitorEventWriter.Close();
                }

                if (m_sipProxyDaemon != null)
                {
                    m_sipProxyDaemon.Stop();
                }

                if (m_sipMonitorDaemon != null)
                {
                    m_sipMonitorDaemon.Stop();
                }

                if (m_sipRegistrarDaemon != null)
                {
                    m_sipRegistrarDaemon.Stop();
                }

                if (m_sipNotifierDaemon != null)
                {
                    m_sipNotifierDaemon.Stop();
                }

                if (m_sipRegAgentDaemon != null)
                {
                    m_sipRegAgentDaemon.Stop();
                }

                if (m_sipNotifierDaemon != null)
                {
                    m_sipNotifierDaemon.Stop();
                }

                // Shutdown the SIPTransport layer.
                m_sipTransport.Shutdown();

                m_sipSorceryPersistor.StopCDRWrites = true;

                logger.Debug("SIP Application Server stopped.");
            }
            catch (Exception excp)
            {
                logger.Error("Exception SIPAppServerDaemon Stop." + excp.Message);
            }
        }