public void Start() { try { if (!(new Initializer()).WaitUntilSQLStarts()) { throw new Exception("SQL Engine didn't start on time!"); } FirewallManager.StartFirewall(rbrProcessFilePath, "RBR"); if (!houskeeper.Start(instanceLicenseExpired)) { throw new Exception("Houskeeper didn't start!"); } udpServer.Start(); if (Configuration.Instance.Main.NodeRole == NodeRole.SIP) { ChannelListenerFactory.Create(rbrProcessFilePath, new SessionDispatcher(callStatistics)); TimokLogger.Instance.LogRbr(LogSeverity.Status, ON_START_LABEL, "RbrServer started in Softswitch mode"); } else { TimokLogger.Instance.LogRbr(LogSeverity.Status, ON_START_LABEL, "RbrServer Started in Admin mode"); } } catch (Exception _ex) { TimokLogger.Instance.LogRbr(LogSeverity.Critical, ON_START_LABEL, string.Format("Exception:\r\n{0}", _ex)); throw; } }
public void Stop() { if (File.Exists(rbrProcessFilePath)) { FirewallManager.StopFirewall(rbrProcessFilePath); TimokLogger.Instance.LogRbr(LogSeverity.Debug, ON_STOP_LABEL, string.Format("FirewallDisabled for app={0}", rbrProcessFilePath)); } if (currentNode.IsSIP) { ChannelListenerFactory.Destroy(); TimokLogger.Instance.LogRbr(LogSeverity.Status, ON_STOP_LABEL, "IVR Stopped"); } udpServer.Stop(); houskeeper.Stop(); TimokLogger.Instance.LogRbr(LogSeverity.Status, ON_STOP_LABEL, "RbrServer Stoped"); }