Beispiel #1
0
        protected override void ProcessEvent(Diacom.AltiGen.AltiLinkPlus.ALPEvent altiEvent)
        {
            switch ((ALPEvID)(altiEvent.CommandId))
            {
            case ALPEvID.RING:
                CallInfo rInfo             = new CallInfo(altiEvent[0]);
                AltiLinkPlus.ALPCommand ac = new AltiLinkPlus.ALPCommand(rInfo.lineID, (int)(ALPCmdID.GET_EXTRACALLINFO));
                ac[0] = new AltiLinkPlus.ALPParameter(rInfo.SessionHandle);
                RingInfo.Add(ac.SequenceId, rInfo);
                base.SendALPCommand(ac);
                break;

            case ALPEvID.STCHG:
                Diacom.ExtensionManager.StateChangedEventHandler ehsc = this.StateChanged;
                if (ehsc != null)
                {
                    SPLineState state = ((SPLineState)(altiEvent[0].ReadInt32()));
                    Diacom.ExtensionManager.LineStateInfoEventArgs si = new Diacom.ExtensionManager.LineStateInfoEventArgs(state);
                    ehsc(GetLine(altiEvent.LocationId), si);
                }
                break;
            }
            base.ProcessEvent(altiEvent);
        }
Beispiel #2
0
 /// <summary>
 /// Initializes new instance of class with specified line number.
 /// </summary>
 /// <param name="line">Line number.</param>
 /// <param name="state">State of the line.</param>
 public LineStateChanged(object line, SPLineState state) : base(line, Ev.EventID.LINE_STATE_CHANGED)
 {
     this.State = state;
 }
Beispiel #3
0
 public LineStateInfoEventArgs(SPLineState state)
 {
     this.state = state;
 }