public void Init() { IEmbeddedHandler handler = (IEmbeddedHandler) new ConfigurationWebHandler(); EmbeddedHandlerFactory.RegisterHandler(ConfigurationWebHandler.BASE_PATH + ConfigurationWebHandler.CONFIGURATION_PATH, handler); EmbeddedHandlerFactory.RegisterHandler(ConfigurationWebHandler.BASE_PATH + ConfigurationWebHandler.DIALPLAN_PATH, handler); EmbeddedHandlerFactory.RegisterHandler(ConfigurationWebHandler.BASE_PATH + ConfigurationWebHandler.DIRECTORY_PATH, handler); EventController.RegisterEventHandler(this); }
public void DeInit() { EventController.UnRegisterEventHandler(this); EmbeddedHandlerFactory.DeregisterHandler(ConfigurationWebHandler.BASE_PATH + ConfigurationWebHandler.CONFIGURATION_PATH); EmbeddedHandlerFactory.DeregisterHandler(ConfigurationWebHandler.BASE_PATH + ConfigurationWebHandler.DIALPLAN_PATH); EmbeddedHandlerFactory.DeregisterHandler(ConfigurationWebHandler.BASE_PATH + ConfigurationWebHandler.DIRECTORY_PATH); if (_previousType != null) { CoreGenerator.ChangeDeploymentMethod(_previousType); } }
void IInitializer.Init() { EventController.RegisterEventHandler(new CdrListener()); EventController.RegisterEventHandler(this); if (ModuleController.Current.IsModuleEnabled("ESL")) { ModuleController.Current.InvokeModuleMethod("ESL", "RegisterEvent", new NameValuePair[] { new NameValuePair("eventName", CdrListener.CALL_HANGUP_EVENT) }, false); } else { EmbeddedHandlerFactory.RegisterHandler("/cdrs/", new CDRWebHandler()); } }
public void ProcessEvent(IEvent Event) { switch (Event.Name) { case "ModuleDisabledEvent": if (((ModuleDisabledEvent)Event).Module.ModuleName == "ESL") { EmbeddedHandlerFactory.RegisterHandler("/cdrs/", new CDRWebHandler()); } break; case "ModuleEnabledEvent": if (((ModuleEnabledEvent)Event).Module.ModuleName == "ESL") { EmbeddedHandlerFactory.DeregisterHandler("/cdrs/"); ModuleController.Current.InvokeModuleMethod("ESL", "RegisterEvent", new NameValuePair[] { new NameValuePair("eventName", CdrListener.CALL_HANGUP_EVENT) }, false); } break; case "EventSocketReconnect": ModuleController.Current.InvokeModuleMethod("ESL", "RegisterEvent", new NameValuePair[] { new NameValuePair("eventName", CdrListener.CALL_HANGUP_EVENT) }, false); break; } }
public void DeInit() { EmbeddedHandlerFactory.DeregisterHandler("RelativeFiles/*"); }
public void Init() { EmbeddedHandlerFactory.RegisterHandler("RelativeFiles/*", new RelativeFileDownloader()); }