public void HandleEvent(ManagerEvent e) { // should always be a ResponseEvent, anyway... if (e is Event.ResponseEvent) { ResponseEvent responseEvent = (ResponseEvent)e; events.AddEvent(responseEvent); } // finished? if (action.ActionCompleteEventClass().IsAssignableFrom(e.GetType())) { lock (events) events.Complete = true; if (events.Response != null) autoEvent.Set(); } }
void manager_Events(object sender, ManagerEvent e) { Debug.WriteLine("Event : " + e.GetType().Name); }
private void internalEventHandler(object sender, ManagerEvent e) { int eventHash = e.GetType().Name.GetHashCode(); if (registeredEventHandlers.ContainsKey(eventHash)) { switch (registeredEventHandlers[eventHash]) { #region A-C case 0: if (AgentCallbackLogin != null) { AgentCallbackLogin(this, (AgentCallbackLoginEvent)e); return; } break; case 1: if (AgentCallbackLogoff != null) { AgentCallbackLogoff(this, (AgentCallbackLogoffEvent)e); return; } break; case 2: if (AgentCalled != null) { AgentCalled(this, (Event.AgentCalledEvent)e); return; } break; case 3: if (AgentComplete != null) { AgentComplete(this, (Event.AgentCompleteEvent)e); return; } break; case 4: if (AgentConnect != null) { AgentConnect(this, (Event.AgentConnectEvent)e); return; } break; case 5: if (AgentDump != null) { AgentDump(this, (Event.AgentDumpEvent)e); return; } break; case 6: if (AgentLogin != null) { AgentLogin(this, (Event.AgentLoginEvent)e); return; } break; case 7: if (AgentLogoff != null) { AgentLogoff(this, (Event.AgentLogoffEvent)e); return; } break; case 8: if (AgentsComplete != null) { AgentsComplete(this, (AgentsCompleteEvent)e); return; } break; case 9: if (Agents != null) { Agents(this, (AgentsEvent)e); return; } break; case 10: if (AlarmClear != null) { AlarmClear(this, (AlarmClearEvent)e); return; } break; case 11: if (Alarm != null) { Alarm(this, (AlarmEvent)e); return; } break; case 12: if (Cdr != null) { Cdr(this, (CdrEvent)e); return; } break; case 13: if (Cel != null) { Cel(this, (CelEvent)e); return; } break; #endregion #region D-L case 14: if (DBGetResponse != null) { DBGetResponse(this, (DBGetResponseEvent)e); return; } break; case 15: if (Dial != null) { Dial(this, (DialEvent)e); return; } break; case 17: if (DNDState != null) { DNDState(this, (DNDStateEvent)e); return; } break; case 18: if (ExtensionStatus != null) { ExtensionStatus(this, (ExtensionStatusEvent)e); return; } break; case 19: if (Hangup != null) { Hangup(this, (HangupEvent)e); return; } break; case 20: if (HoldedCall != null) { HoldedCall(this, (HoldedCallEvent)e); return; } break; case 21: if (Hold != null) { Hold(this, (HoldEvent)e); return; } break; case 22: if (Join != null) { Join(this, (JoinEvent)e); return; } break; case 23: if (Leave != null) { Leave(this, (LeaveEvent)e); return; } break; case 24: if (Link != null) { Link(this, (LinkEvent)e); return; } break; case 25: if (LogChannel != null) { LogChannel(this, (LogChannelEvent)e); return; } break; #endregion #region M-P case 26: if (MeetMeJoin != null) { MeetMeJoin(this, (MeetmeJoinEvent)e); return; } break; case 27: if (MeetMeLeave != null) { MeetMeLeave(this, (MeetmeLeaveEvent)e); return; } break; case 28: if (MeetMeTalking != null) { MeetMeTalking(this, (MeetmeTalkingEvent)e); return; } break; case 29: if (MessageWaiting != null) { MessageWaiting(this, (MessageWaitingEvent)e); return; } break; case 30: if (NewCallerId != null) { NewCallerId(this, (NewCallerIdEvent)e); return; } break; case 31: if (NewChannel != null) { NewChannel(this, (NewChannelEvent)e); return; } break; case 32: if (NewExten != null) { NewExten(this, (NewExtenEvent)e); return; } break; case 33: if (NewState != null) { NewState(this, (NewStateEvent)e); return; } break; case 34: if (OriginateResponse != null) { OriginateResponse(this, (OriginateResponseEvent)e); return; } break; case 35: if (ParkedCall != null) { ParkedCall(this, (ParkedCallEvent)e); return; } break; case 36: if (ParkedCallGiveUp != null) { ParkedCallGiveUp(this, (ParkedCallGiveUpEvent)e); return; } break; case 37: if (ParkedCallsComplete != null) { ParkedCallsComplete(this, (ParkedCallsCompleteEvent)e); return; } break; case 38: if (ParkedCallTimeOut != null) { ParkedCallTimeOut(this, (ParkedCallTimeOutEvent)e); return; } break; case 39: if (PeerEntry != null) { PeerEntry(this, (PeerEntryEvent)e); return; } break; case 40: if (PeerlistComplete != null) { PeerlistComplete(this, (PeerlistCompleteEvent)e); return; } break; case 41: if (PeerStatus != null) { PeerStatus(this, (PeerStatusEvent)e); return; } break; #endregion #region Q-Z case 42: if (QueueEntry != null) { QueueEntry(this, (QueueEntryEvent)e); return; } break; case 43: if (QueueMemberAdded != null) { QueueMemberAdded(this, (QueueMemberAddedEvent)e); return; } break; case 44: if (QueueMember != null) { QueueMember(this, (QueueMemberEvent)e); return; } break; case 45: if (QueueMemberPaused != null) { QueueMemberPaused(this, (QueueMemberPausedEvent)e); return; } break; case 46: if (QueueMemberRemoved != null) { QueueMemberRemoved(this, (QueueMemberRemovedEvent)e); return; } break; case 47: if (QueueMemberStatus != null) { QueueMemberStatus(this, (QueueMemberStatusEvent)e); return; } break; case 48: if (QueueParams != null) { QueueParams(this, (QueueParamsEvent)e); return; } break; case 49: if (QueueStatusComplete != null) { QueueStatusComplete(this, (QueueStatusCompleteEvent)e); return; } break; case 50: if (Registry != null) { Registry(this, (RegistryEvent)e); return; } break; case 52: if (Rename != null) { Rename(this, (RenameEvent)e); return; } break; case 54: if (StatusComplete != null) { StatusComplete(this, (StatusCompleteEvent)e); return; } break; case 55: if (Status != null) { Status(this, (StatusEvent)e); return; } break; case 56: if (Unhold != null) { Unhold(this, (UnholdEvent)e); return; } break; case 57: if (Unlink != null) { Unlink(this, (UnlinkEvent)e); return; } break; case 58: if (UnparkedCall != null) { UnparkedCall(this, (UnparkedCallEvent)e); return; } break; case 59: if (UserEvents != null) { UserEvents(this, (UserEvent)e); return; } break; case 60: if (ZapShowChannelsComplete != null) { ZapShowChannelsComplete(this, (ZapShowChannelsCompleteEvent)e); return; } break; case 61: if (ZapShowChannels != null) { ZapShowChannels(this, (ZapShowChannelsEvent)e); return; } break; #endregion case 62: if (ConnectionState != null) { ConnectionState(this, (ConnectionStateEvent)e); return; } break; default: if (UnhandledEvent != null) UnhandledEvent(this, e); return; } } if (fireAllEvents && UnhandledEvent != null) UnhandledEvent(this, e); }
void manager_UnhandledEvent(object sender, ManagerEvent e) { log.Debug("New unhandled event received: " + e.GetType().Name); LineControl lc = null; //StateServer switch (e.GetType().Name) { case "AGIExecEvent": AGIExecEvent agievent = e as AGIExecEvent; break; case "AlarmClearEvent": AlarmClearEvent alarmclear = e as AlarmClearEvent; break; case "AlarmEvent": AlarmEvent alarmevent = e as AlarmEvent; break; case "AsyncAGIEvent": AsyncAGIEvent asyncagievent = e as AsyncAGIEvent; break; case "BridgeEvent": BridgeEvent bridgeevent = e as BridgeEvent; break; case "CdrEvent": CdrEvent cdrevent = e as CdrEvent; break; case "ChannelReloadEvent": ChannelReloadEvent channelreload = e as ChannelReloadEvent; break; case "ChannelUpdateEvent": ChannelUpdateEvent channelupdate = e as ChannelUpdateEvent; break; case "ConnectEvent": ConnectEvent connectevent = e as ConnectEvent; break; case "ConnectionStateEvent": ConnectionStateEvent connectionstate = e as ConnectionStateEvent; break; case "DBGetResponseEvent": DBGetResponseEvent dbget = e as DBGetResponseEvent; log.Debug("DBGet response: " + dbget.ToString()); switch (dbget.Family) { case "DND": ss.SetLineControl(setLineControlDND(dbget.Key, true)); break; case "CF": ss.SetLineControl(setLineControlForward(dbget.Key, dbget.Val)); break; } break; case "DialEvent": DialEvent dial = e as DialEvent; log.Debug("Dial event: " + dial.ToString()); break; case "DisconnectEvent": DisconnectEvent disconnect = e as DisconnectEvent; log.Debug("Disconnect event: " + disconnect.ToString()); break; case "DNDStateEvent": DNDStateEvent dndstate = e as DNDStateEvent; log.Debug("DND state event: " + dndstate.ToString()); break; case "ExtensionStatusEvent": ExtensionStatusEvent extensionstatus = e as ExtensionStatusEvent; log.Debug("Extension status event: " + extensionstatus.ToString() + ", status: " + extensionstatus.Status + ", hint: " + extensionstatus.Hint); ss.SetLineControl(getLineControlFromExtensionStatusEvent(extensionstatus)); break; case "FaxReceivedEvent": FaxReceivedEvent faxreceived = e as FaxReceivedEvent; break; case "HangupEvent": HangupEvent hangup = e as HangupEvent; log.Debug("Hangup event: " + hangup.ToString() + " callerid: " + hangup.CallerId + " calleridnum: " + hangup.CallerIdNum); //line control if (channels.Contains(hangup.Channel)) { lc = getLineControl((string)channels[hangup.Channel]); int hi = 0; LineControlConnection[] newLCC = null; if (lc.lineControlConnection.Length > 1) { newLCC = new LineControlConnection[lc.lineControlConnection.Length - 1]; foreach (LineControlConnection hlcc in lc.lineControlConnection) { if (hlcc.callid != hangup.Channel) { newLCC[hi] = hlcc; hi++; } } } lc.lineControlConnection = newLCC; ss.SetLineControl(lc); channels.Remove(hangup.Channel); } //missed calls callToFind = hangup.UniqueId.Substring(0, 6) + "," + hangup.UniqueId.Substring(6); Call mCall = missedCalls.Find(FindCall); if (mCall != null) { log.Debug("Missed call finded for callid: " + hangup.UniqueId); AddCallLogs(mCall.callee, mCall); if (missedCalls.Remove(mCall)) { log.Debug("Call " + mCall.callId + " successfully removed from missedcall cache"); } else { log.Debug("Call " + mCall.callId + " cannot be removed from missedcall cache"); } } break; case "HoldedCallEvent": HoldedCallEvent holdedcall = e as HoldedCallEvent; break; case "HoldEvent": HoldEvent holdevent = e as HoldEvent; break; case "JabberEvent": JabberEvent jabberevent = e as JabberEvent; break; case "JitterBufStatsEvent": JitterBufStatsEvent jitter = e as JitterBufStatsEvent; break; case "JoinEvent": JoinEvent join = e as JoinEvent; break; case "LeaveEvent": LeaveEvent leave = e as LeaveEvent; break; case "LinkEvent": LinkEvent link = e as LinkEvent; log.Debug("Link event: " + link.ToString()); lc = getLineControl(link.CallerId1); if (lc != null) { foreach (LineControlConnection linklcc in lc.lineControlConnection) { if (linklcc.callid == link.Channel1) { linklcc.contact = link.CallerId2; ss.SetLineControl(lc); break; } } } lc = getLineControl(link.CallerId2); if (lc != null) { foreach (LineControlConnection linklcc in lc.lineControlConnection) { if (linklcc.callid == link.Channel2) { linklcc.contact = link.CallerId1; ss.SetLineControl(lc); break; } } } break; case "LogChannelEvent": LogChannelEvent logchannel = e as LogChannelEvent; break; case "ManagerEvent": ManagerEvent managerevent = e; break; case "MeetmeEndEvent": MeetmeEndEvent meetmeend = e as MeetmeEndEvent; break; case "MeetmeJoinEvent": MeetmeJoinEvent meetmejoin = e as MeetmeJoinEvent; break; case "MeetmeLeaveEvent": MeetmeLeaveEvent meetmeleave = e as MeetmeLeaveEvent; break; case "MeetmeMuteEvent": MeetmeMuteEvent meetmemute = e as MeetmeMuteEvent; break; case "MeetmeStopTalkingEvent": MeetmeStopTalkingEvent meetmestoptalking = e as MeetmeStopTalkingEvent; break; case "MeetmeTalkingEvent": MeetmeTalkingEvent meetmetalking = e as MeetmeTalkingEvent; break; case "MeetmeTalkRequestEvent": MeetmeTalkRequestEvent meetmetalkrequest = e as MeetmeTalkRequestEvent; break; case "MessageWaitingEvent": MessageWaitingEvent messagewaiting = e as MessageWaitingEvent; log.Debug("Message waiting event: " + messagewaiting.ToString()); lc = getLineControl(messagewaiting.Mailbox.Substring(0, messagewaiting.Mailbox.IndexOf("@"))); if (lc != null) { if (messagewaiting.Waiting > 0) { lc.mwiOn = true; } else { lc.mwiOn = false; } ss.SetLineControl(lc); } break; case "MobileStatusEvent": MobileStatusEvent mobilestatus = e as MobileStatusEvent; break; case "ModuleLoadReportEvent": ModuleLoadReportEvent moduleload = e as ModuleLoadReportEvent; break; case "MonitorStartEvent": MonitorStartEvent monitorstart = e as MonitorStartEvent; break; case "MonitorStopEvent": MonitorStopEvent monitorstop = e as MonitorStopEvent; break; case "NewAccountCodeEvent": NewAccountCodeEvent newaccountcode = e as NewAccountCodeEvent; break; case "NewCallerIdEvent": NewCallerIdEvent newcallerid = e as NewCallerIdEvent; log.Debug("New caller id envent: " + newcallerid.ToString()); break; case "NewChannelEvent": NewChannelEvent newchannel = e as NewChannelEvent; log.Debug("New Channel event: " + newchannel.ToString()); CommandAction ca = new CommandAction("core show channel " + newchannel.Channel); CommandResponse cr = (CommandResponse)manager.SendAction(ca, 10000); log.Debug("Channel info: " + cr.ToString()); string dn = newchannel.CallerIdNum; log.Debug("Retreive call information..."); bool callerIdUnknown = true; if (newchannel.CallerIdNum != "<unknown>") { callerIdUnknown = false; } else { foreach (string s in cr.Result) { if (s.Contains("Caller ID:")) { dn = s.Substring(s.LastIndexOf(" ")); break; } } } Call newOutboundCall = getOutboundCallFromChannelInfo(cr.Result, callerIdUnknown); if (newOutboundCall != null) { Call missedCall = newOutboundCall; AddCallLogs(dn, newOutboundCall); dnToFind = newOutboundCall.callee; if (linecontrols.Find(FindLineControl) != null) { log.Debug("This call will be put in missedcall cache: " + missedCall.callId); missedCall.type = CallType.missed; missedCalls.Add(missedCall); } } break; case "NewExtenEvent": NewExtenEvent newexten = e as NewExtenEvent; log.Debug("New exten event: " + newexten.ToString()); string channel = ""; char[] splitter = { '/' }; string[] splitchannel = newexten.Channel.Split(splitter); splitter[0] = '-'; splitchannel = splitchannel[1].Split(splitter); channel = splitchannel[0]; //DND? if (newexten.Extension == Properties.Settings.Default.FeatureCodeDNDToggle && newexten.Application == "Playback") { switch (newexten.AppData) { case "do-not-disturb&activated": log.Debug("Successfully activate dnd for channel: " + channel); ss.SetLineControl(setLineControlDND(channel, true)); break; case "do-not-disturb&de-activated": log.Debug("Successfully deactivate dnd for channel: " + channel); ss.SetLineControl(setLineControlDND(channel, false)); break; } } //Forward all? else if (newexten.Extension.Contains(Properties.Settings.Default.FeatureCodeCallForwardAllActivate) && newexten.Application == "Playback" && newexten.AppData == "call-fwd-unconditional&for&extension") { string forward = newexten.Extension.Substring(Properties.Settings.Default.FeatureCodeCallForwardAllActivate.Length); log.Debug("Call forward all from channel: " + channel + " to " + forward); ss.SetLineControl(setLineControlForward(channel, forward)); } // UnForwardAll else if (newexten.Extension == Properties.Settings.Default.FeatureCodeCallForwardAllDeactivate && newexten.Application == "Playback" && newexten.AppData == "call-fwd-unconditional&de-activated") { log.Debug("Call unforward all from channel: " + channel); ss.SetLineControl(setLineControlForward(channel,"")); } break; case "NewStateEvent": NewStateEvent newstate = e as NewStateEvent; log.Debug("New State event: " + newstate.ToString()); LineControl newstateLc = getLineControl(newstate.CallerId); LineControlConnection[] newStateLccs = null; int i = 0; if (newstateLc.lineControlConnection != null) { bool isContained = false; foreach (LineControlConnection elcc in newstateLc.lineControlConnection) { if (elcc.callid == newstate.Channel) { isContained = true; newStateLccs = newstateLc.lineControlConnection; break; } i++; } if (!isContained) { i = 0; newStateLccs = new LineControlConnection[newstateLc.lineControlConnection.Length + 1]; foreach (LineControlConnection newstateLcc in newstateLc.lineControlConnection) { newStateLccs[i] = newstateLcc; i++; } } } else { newStateLccs = new LineControlConnection[1]; newStateLccs[0] = new LineControlConnection(); } try { switch (newstate.State) { case "Up": //received call? callToFind = newstate.UniqueId; Call rCall = missedCalls.Find(FindCall); if (rCall != null) { log.Debug("Missed call finded: " + callToFind + ", this call will be received"); rCall.type = CallType.received; AddCallLogs(rCall.callee, rCall); missedCalls.Remove(rCall); } if (newStateLccs != null) { if (!channels.Contains(newstate.Channel)) { channels.Add(newstate.Channel, newstate.CallerId); } newStateLccs[i].callid = newstate.Channel; newStateLccs[i].remoteState = Wybecom.TalkPortal.CTI.Proxy.ConnectionState.established; newStateLccs[i].state = Wybecom.TalkPortal.CTI.Proxy.ConnectionState.established; newStateLccs[i].terminalState = TerminalState.talking; } break; case "Ringing": if (newStateLccs != null) { if (!channels.Contains(newstate.Channel)) { channels.Add(newstate.Channel, newstate.CallerId); } newStateLccs[i].callid = newstate.Channel; newStateLccs[i].remoteState = Wybecom.TalkPortal.CTI.Proxy.ConnectionState.established; newStateLccs[i].state = Wybecom.TalkPortal.CTI.Proxy.ConnectionState.alerting; newStateLccs[i].terminalState = TerminalState.ringing; } break; case "Ring": if (newStateLccs != null) { if (!channels.Contains(newstate.Channel)) { channels.Add(newstate.Channel, newstate.CallerId); } newStateLccs[i].callid = newstate.Channel; newStateLccs[i].remoteState = Wybecom.TalkPortal.CTI.Proxy.ConnectionState.alerting; newStateLccs[i].state = Wybecom.TalkPortal.CTI.Proxy.ConnectionState.dialing; newStateLccs[i].terminalState = TerminalState.inuse; } break; } } catch (Exception stateException) { log.Debug("NewState exception: " + stateException.Message); } if (newstateLc != null) { newstateLc.lineControlConnection = newStateLccs; ss.SetLineControl(newstateLc); } break; case "OriginateResponseEvent": OriginateResponseEvent originateresponse = e as OriginateResponseEvent; break; case "ParkedCallEvent": ParkedCallEvent parkedcall = e as ParkedCallEvent; break; case "ParkedCallGiveUpEvent": ParkedCallGiveUpEvent parkedcallgiveup = e as ParkedCallGiveUpEvent; break; case "ParkedCallsCompleteEvent": ParkedCallsCompleteEvent parkedcallscomplete = e as ParkedCallsCompleteEvent; break; case "ParkedCallTimeOutEvent": ParkedCallTimeOutEvent parkedcalltimeout = e as ParkedCallTimeOutEvent; break; case "PeerEntryEvent": log.Debug("SipAction: one peer entry event received, " + e.ToString()); PeerEntryEvent peerentry = e as PeerEntryEvent; peers.Add(peerentry); ss.SetLineControl(getLineControlFromPeerEntry(peerentry)); break; case "PeerlistCompleteEvent": log.Debug("SipAction: peer list completed " + e.ToString()); PeerlistCompleteEvent peerlistcomplete = e as PeerlistCompleteEvent; acs.setPeers(peers); break; case "PeerStatusEvent": PeerStatusEvent peerstatus = e as PeerStatusEvent; log.Debug("Peer status: " + peerstatus.ToString()); break; case "PRIEvent": PRIEvent pri = e as PRIEvent; break; case "RegistryEvent": RegistryEvent registry = e as RegistryEvent; break; case "ReloadEvent": ReloadEvent reload = e as ReloadEvent; break; case "RenameEvent": RenameEvent rename = e as RenameEvent; break; case "ResponseEvent": ResponseEvent response = e as ResponseEvent; break; case "RTCPReceivedEvent": RTCPReceivedEvent rtcpreceived = e as RTCPReceivedEvent; break; case "RTCPSentEvent": RTCPSentEvent rtcpsent = e as RTCPSentEvent; break; case "RTPReceiverStatEvent": RTPReceiverStatEvent rtpreceiver = e as RTPReceiverStatEvent; break; case "RTPSenderStatEvent": RTPSenderStatEvent rtpsender = e as RTPSenderStatEvent; break; case "ShowDialPlanCompleteEvent": ShowDialPlanCompleteEvent showdialplan = e as ShowDialPlanCompleteEvent; break; case "ShutdownEvent": ShutdownEvent shutdown = e as ShutdownEvent; break; case "StatusCompleteEvent": StatusCompleteEvent statuscomplete = e as StatusCompleteEvent; break; case "StatusEvent": StatusEvent status = e as StatusEvent; break; case "TransferEvent": TransferEvent transfer = e as TransferEvent; break; case "UnholdEvent": UnholdEvent unhold = e as UnholdEvent; break; case "UnknownEvent": UnknownEvent unknown = e as UnknownEvent; break; case "UnlinkEvent": UnlinkEvent unlink = e as UnlinkEvent; log.Debug("Unlink event : " + unlink.ToString()); LineControlConnection[] lccs = null; i = 0; lc = getLineControl(unlink.CallerId1); if (lc != null) { if (lc.lineControlConnection.Length > 1) { lccs = new LineControlConnection[lc.lineControlConnection.Length - 1]; foreach (LineControlConnection linklcc in lc.lineControlConnection) { if (linklcc.callid != unlink.Channel1) { lccs[i] = linklcc; i++; break; } } } else { lc.lineControlConnection = null; } ss.SetLineControl(lc); } i = 0; lc = getLineControl(unlink.CallerId2); if (lc != null) { if (lc.lineControlConnection.Length > 1) { lccs = new LineControlConnection[lc.lineControlConnection.Length - 1]; foreach (LineControlConnection linklcc in lc.lineControlConnection) { if (linklcc.callid != unlink.Channel2) { lccs[i] = linklcc; i++; break; } } } else { lc.lineControlConnection = null; } ss.SetLineControl(lc); } break; case "UnparkedCallEvent": UnparkedCallEvent unparked = e as UnparkedCallEvent; break; case "UserEvent": UserEvent user = e as UserEvent; break; case "VarSetEvent": VarSetEvent varset = e as VarSetEvent; break; case "ZapShowChannelsCompleteEvent": ZapShowChannelsCompleteEvent zapshowchannelscomplete = e as ZapShowChannelsCompleteEvent; break; case "ZapShowChannelsEvent": ZapShowChannelsEvent zapshowchannels = e as ZapShowChannelsEvent; break; } //ACDConnector switch (e.GetType().Name) { case "AgentCallbackLoginEvent": AgentCallbackLoginEvent agentcallbacklogin = e as AgentCallbackLoginEvent; break; case "AgentCallbackLogoffEvent": AgentCallbackLogoffEvent agentcallbacklogoff = e as AgentCallbackLogoffEvent; break; case "AgentCalledEvent": AgentCalledEvent agentcalled = e as AgentCalledEvent; break; case "AgentCompleteEvent": AgentCompleteEvent agentcomplete = e as AgentCompleteEvent; break; case "AgentConnectEvent": AgentConnectEvent agentconnect = e as AgentConnectEvent; break; case "AgentDumpEvent": AgentDumpEvent agentdump = e as AgentDumpEvent; break; case "AgentLoginEvent": AgentLoginEvent agentlogin = e as AgentLoginEvent; break; case "AgentLogoffEvent": AgentLogoffEvent agentlogoff = e as AgentLogoffEvent; break; case "AgentsCompleteEvent": AgentsCompleteEvent agentscomplete = e as AgentsCompleteEvent; break; case "AgentsEvent": AgentsEvent agentevent = e as AgentsEvent; break; case "QueueCallerAbandonEvent": QueueCallerAbandonEvent queuecallerabandon = e as QueueCallerAbandonEvent; break; case "QueueEntryEvent": QueueEntryEvent queueentry = e as QueueEntryEvent; break; case "QueueEvent": QueueEvent queue = e as QueueEvent; break; case "QueueMemberEvent": QueueMemberEvent queuemember = e as QueueMemberEvent; break; case "QueueMemberPausedEvent": QueueMemberPausedEvent queuememberpaused = e as QueueMemberPausedEvent; break; case "QueueMemberPenaltyEvent": QueueMemberPenaltyEvent queuememberpenalty = e as QueueMemberPenaltyEvent; break; case "QueueMemberRemovedEvent": QueueMemberRemovedEvent queuememberremoved = e as QueueMemberRemovedEvent; break; case "QueueMemberStatusEvent": QueueMemberStatusEvent queuememberstatus = e as QueueMemberStatusEvent; break; case "QueueParamsEvent": QueueParamsEvent queueparams = e as QueueParamsEvent; break; case "QueueStatusCompleteEvent": QueueStatusCompleteEvent queuestatuscomplete = e as QueueStatusCompleteEvent; break; } }