예제 #1
0
		static LogEventSection()
		{
			CALLTIMES = new LogEventSection() { Name = "CALLTIMES" };
			CAMPAIGNS = new LogEventSection() { Name = "CAMPAIGNS" };
			CAMPAIGN_ALTDIAL = new LogEventSection() { Name = "CAMPAIGN_ALTDIAL" };
			CAMPAIGN_ALTDIALS = new LogEventSection() { Name = "CAMPAIGN_ALTDIALS" };
			CAMPAIGN_DIALSTATUS = new LogEventSection() { Name = "CAMPAIGN_DIALSTATUS" };
			CAMPAIGN_DIALSTATUSES = new LogEventSection() { Name = "CAMPAIGN_DIALSTATUSES" };
			CAMPAIGN_PAUSECODE = new LogEventSection() { Name = "CAMPAIGN_PAUSECODE" };
			CAMPAIGN_PAUSECODES = new LogEventSection() { Name = "CAMPAIGN_PAUSECODES" };
			CAMPAIGN_RECYCLE = new LogEventSection() { Name = "CAMPAIGN_RECYCLE" };
			CAMPAIGN_STATUS = new LogEventSection() { Name = "CAMPAIGN_STATUS" };
			CARRIERS = new LogEventSection() { Name = "CARRIERS" };
			CONFTEMPLATES = new LogEventSection() { Name = "CONFTEMPLATES" };
			DIDS = new LogEventSection() { Name = "DIDS" };
			FILTERS = new LogEventSection() { Name = "FILTERS" };
			INGROUPS = new LogEventSection() { Name = "INGROUPS" };
			LEADS = new LogEventSection() { Name = "LEADS" };
			LISTS = new LogEventSection() { Name = "LISTS" };
			PHONES = new LogEventSection() { Name = "PHONES" };
			REMOTEAGENTS = new LogEventSection() { Name = "REMOTEAGENTS" };
			SCRIPTS = new LogEventSection() { Name = "SCRIPTS" };
			SERVERS = new LogEventSection() { Name = "SERVERS" };
			SERVERS_TRUNK = new LogEventSection() { Name = "SERVERS_TRUNK" };
			SERVERSTRUNKS = new LogEventSection() { Name = "SERVERSTRUNKS" };
			STATUSCATEGORIES = new LogEventSection() { Name = "STATUSCATEGORIES" };
			SYSTEMSETTINGS = new LogEventSection() { Name = "SYSTEMSETTINGS" };
			TIMECLOCK = new LogEventSection() { Name = "TIMECLOCK" };
			USERGROUPS = new LogEventSection() { Name = "USERGROUPS" };
			USERS = new LogEventSection() { Name = "USERS" };
		}
예제 #2
0
		/// <summary>
		/// Given a log section and log event type, returns vicidial's event_code values.  For each combination of event_section and event_type, vicidial stores
		/// a composite string into event_code field of log.  To avoid having to enter these event_code values manually, this method provides such a string
		/// for 99% of the combinations.<br/>
		/// <br/>
		/// For example, campaign clone has event_section='CAMPAIGN', event_type='COPY', and event_code='ADMIN COYP CAMPAIGN' (typo is correct)<br/>
		/// <br/>
		/// When using the AddLog method, the developer can optionally pass NULL on the event_code and the this value will be generated automatically.<br/>
		/// <br/>
		/// In once instance, adding a DNC to campaign, metadata is included in the event_code, such as adding number to a campaign dnc list.
		/// <br/>
		/// The log has event_section='CAMPAIGN', event_type='ADD', and event_code='ADMIN ADD NUMBER TO CAMPAIGN DNC LIST 10003'.
		/// In this case, the Vicidial.Data developer should pass an explicit value for event_code when calling AddLog(...) method to remain consistent.
		/// 
		/// </summary>
		/// <param name="section"></param>
		/// <param name="type"></param>
		/// <returns></returns>
		public string GetEventCode(LogEventSection section, LogEventType type)
		{
			string key = String.Format("{0}_{1}", section.Name, type.Name);
			if (_logEventCodes.ContainsKey(key))
				return _logEventCodes[key];

			return String.Empty;

		}