コード例 #1
0
ファイル: ExtensionManager.cs プロジェクト: osherbakov/APCSDK
        protected override void ProcessResponse(Diacom.AltiGen.AltiLinkPlus.ALPResponse altiResponse)
        {
            switch ((ALPCmdID)(altiResponse.CommandId))
            {
            case ALPCmdID.GET_EXTRACALLINFO:
                CallInfo rInfo = (CallInfo)RingInfo[altiResponse.SequenceId];
                RingInfo.Remove(altiResponse.SequenceId);
                Diacom.ExtensionManager.CallInfoEventArgs RingData =
                    new Diacom.ExtensionManager.CallInfoEventArgs(
                        rInfo.callerName, rInfo.callerID, rInfo.callerPAD, rInfo.callerIPAddress,
                        rInfo.calleeName, rInfo.calleeID, rInfo.calleePAD,
                        rInfo.ANIName, rInfo.ANIID, rInfo.DNISName, rInfo.DNISID,
                        rInfo.StartTime, rInfo.HoldTime, rInfo.CurrentTime,
                        rInfo.WorkGroupNumber, rInfo.OutBoundWorkGroupNumber, rInfo.SessionHandle, rInfo.CallHandle);

                if (altiResponse.ResponseCode == 0)
                {
                    int SessionID = altiResponse[0].ReadInt32();
                    Diacom.ExtensionManager.ExtraCallInfo xci =
                        new Diacom.ExtensionManager.ExtraCallInfo(altiResponse[1].ReadString(),
                                                                  altiResponse[2].ReadString(), altiResponse[3].ReadString(),
                                                                  altiResponse[4].ReadString(), altiResponse[5].ReadString(),
                                                                  altiResponse[6].ReadString());

                    RingData.ExtraInfo = xci;
                }

                Diacom.ExtensionManager.CallEventHandler ehr = this.Ring;
                if (ehr != null)
                {
                    SPLine _line = GetLine(rInfo.lineID);
                    _line.CalledNumber = rInfo.callerID;
                    _line.CalledName   = rInfo.callerName;
                    _line.DNISNumber   = rInfo.DNISID;
                    _line.DNISName     = rInfo.DNISName;
                    _line.CIDNumber    = rInfo.ANIID;
                    _line.CIDName      = rInfo.ANIName;
                    _line.DIDNumber    = rInfo.calleeID;
                    _line.DIDName      = rInfo.calleeName;

                    ehr(_line, RingData);
                }
                break;
            }
            base.ProcessResponse(altiResponse);
        }
コード例 #2
0
ファイル: APCCommand.cs プロジェクト: osherbakov/APCSDK
 private void currentUser_Ring(object source, Diacom.ExtensionManager.CallInfoEventArgs oCallInfo)
 {
     SPLine _Line = (SPLine)source;
 }