Пример #1
0
 static void dam_NewStateEvent(object sender, NewStateEvent e)
 {
     Console.WriteLine("New State Event"
         + "\n\tChannel\t\t" + e.Channel
         + "\n\tUniqueId\t" + e.UniqueId
         + "\n\tCallerId\t" + e.CallerId
         + "\n\tCallerIdName\t" + e.CallerIdName
         + "\n\tState\t\t" + e.ChannelStateDesc
         + "\n\tDateReceived\t" + e.DateReceived.ToString()
         );
     FillAndAddEventToDB(AsteriskEvent.NEW_EVENT_STATE_EVENT_CODE, e.Channel, e.ChannelStateDesc, e.CallerIdName, e.CallerIdNum, e.UniqueId, e.DateReceived, null);
 }
Пример #2
0
 private LineControlConnection getLineControlConnectionFromNewState(NewStateEvent state)
 {
     LineControlConnection lcc = new LineControlConnection();
     lcc.callid = state.UniqueId;
     lcc.contact = "";
     lcc.remoteState = Wybecom.TalkPortal.CTI.Proxy.ConnectionState.unknown;
     lcc.state = Wybecom.TalkPortal.CTI.Proxy.ConnectionState.alerting;
     lcc.terminalState = TerminalState.ringing;
     return lcc;
 }