示例#1
0
文件: TSAPI.cs 项目: cws2097/TSAPILIB
 public Task <ConferenceCallEventReturn> SetConferenceCall(ConnectionID_t activeCall, ConnectionID_t otherCall)
 {
     return(CreateTask <ConferenceCallEventReturn>((invokeId, pd) =>
                                                   NativeMethods.cstaConferenceCall(AcsHandle, invokeId, ref otherCall, ref activeCall, ref pd)
                                                   , $"SetConferenceCall('{activeCall}','{otherCall}')"
                                                   ));
 }
示例#2
0
文件: TSAPI.cs 项目: cws2097/TSAPILIB
 public Task <NullTsapiReturn> SetClearCall(ConnectionID_t call)
 {
     return(CreateTask <NullTsapiReturn>((invokeId, pd) =>
                                         NativeMethods.cstaClearCall(AcsHandle, invokeId, ref call, ref pd)
                                         , $"SetClearCall('{call}')"
                                         ));
 }
        private ConnectionID_t ReadNewCall(IStructReader reader)
        {
            try
            {
                object result;

                logger.Info("CSTAConferenceCallConfParser.ReadNewCall: try to read new call from stream...");

                if (reader.TryReadStruct(typeof(ConnectionID_t), out result))
                {
                    logger.Info("CSTAConferenceCallConfParser.ReadNewCall: successfully read new call from stream!");

                    ConnectionID_t newCall = (ConnectionID_t)result;

                    logger.Info("CSTAConferenceCallConfParser.ReadNewCall: newCall.callID={0};newCall.deviceID.device={1};newCall.devIDType={2};", newCall.callID, newCall.deviceID.device, newCall.devIDType);

                    return(newCall);
                }
            }
            catch (Exception err)
            {
                logger.Error(string.Format("Error in CSTAConferenceCallConfParser.ReadNewCall: {0}", err));
            }

            return(new ConnectionID_t());
        }
 public MonitorEventCollection(uint monitorCrossRefId, String deviceId)
 {
     _monitorCrossRefId = monitorCrossRefId;
     _deviceId          = new ConnectionID_t {
         deviceID = deviceId
     };
 }
示例#5
0
文件: TSAPI.cs 项目: cws2097/TSAPILIB
 public Task <NullTsapiReturn> SetGroupPickupCall(ConnectionID_t deflectCall, string pickupDevice)
 {
     return(CreateTask <NullTsapiReturn>((invokeId, pd) =>
                                         NativeMethods.cstaGroupPickupCall(AcsHandle, invokeId, ref deflectCall, pickupDevice, ref pd)
                                         , $"SetGroupPickupCall('{deflectCall}','{pickupDevice}')"
                                         ));
 }
示例#6
0
文件: TSAPI.cs 项目: cws2097/TSAPILIB
 public Task <NullTsapiReturn> SetHoldCall(ConnectionID_t activeCall)
 {
     return(CreateTask <NullTsapiReturn>((invokeId, pd) =>
                                         NativeMethods.cstaHoldCall(AcsHandle, invokeId, ref activeCall, false, ref pd)
                                         , $"SetHoldCall('{activeCall}')"
                                         ));
 }
示例#7
0
        private ConnectionID_t ReadSecondaryOldCall(IStructReader reader)
        {
            try
            {
                object result;

                logger.Info("CSTAConferencedParser.ReadSecondaryOldCall: try to read secondary old call from stream...");

                if (reader.TryReadStruct(typeof(ConnectionID_t), out result))
                {
                    logger.Info("CSTAConferencedParser.ReadSecondaryOldCall: successfully read secondary old call from stream!");

                    ConnectionID_t secondaryOldCall = (ConnectionID_t)result;

                    logger.Info("CSTAConferencedParser.ReadSecondaryOldCall: secondaryOldCall.callID={0};secondaryOldCall.deviceID.device={1};secondaryOldCall.devIDType={2};", secondaryOldCall.callID, secondaryOldCall.deviceID.device, secondaryOldCall.devIDType);

                    return(secondaryOldCall);
                }
            }
            catch (Exception err)
            {
                logger.Error(string.Concat("Error in CSTAConferencedParser.ReadSecondaryOldCall: ", err.ToString()));
            }

            return(new ConnectionID_t());
        }
示例#8
0
文件: TSAPI.cs 项目: cws2097/TSAPILIB
 public Task <SnapshotCallEventReturn> SetSnapshotCallReq(ConnectionID_t call)
 {
     return(CreateTask <SnapshotCallEventReturn>((invokeId, pd) =>
                                                 NativeMethods.cstaSnapshotCallReq(AcsHandle, invokeId, ref call, ref pd)
                                                 , $"SetSnapshotCallReq('{call}')"
                                                 ));
 }
示例#9
0
文件: TSAPI.cs 项目: cws2097/TSAPILIB
 public Task <QueryUcidEventReturn> GetQueryUcid(ConnectionID_t call)
 {
     return(CreateTask <QueryUcidEventReturn>((invokeId, pd) =>
                                              NativeMethods.attQueryUCID(ref pd, ref call) |
                                              NativeMethods.cstaEscapeService(AcsHandle, invokeId, ref pd), $"GetQueryUCID('{call}')"
                                              ));
 }
示例#10
0
文件: TSAPI.cs 项目: cws2097/TSAPILIB
 public Task <NullTsapiReturn> SetAlternateCall(ConnectionID_t activeCall, ConnectionID_t otherCall)
 {
     return(CreateTask <NullTsapiReturn>((invokeId, pd) =>
                                         NativeMethods.cstaAlternateCall(AcsHandle, invokeId, ref activeCall, ref otherCall, ref pd)
                                         , $"SetAlternateCall('{activeCall}','{otherCall}')"
                                         ));
 }
示例#11
0
文件: TSAPI.cs 项目: cws2097/TSAPILIB
 public Task <NullTsapiReturn> SetDeflectCall(ConnectionID_t deflectCall, string calledDevice)
 {
     return(CreateTask <NullTsapiReturn>((invokeId, pd) =>
                                         NativeMethods.cstaDeflectCall(AcsHandle, invokeId, ref deflectCall, calledDevice, ref pd)
                                         , $"SetDeflectCall('{deflectCall}','{calledDevice}')"
                                         ));
 }
示例#12
0
文件: TSAPI.cs 项目: cws2097/TSAPILIB
 public Task <NullTsapiReturn> SetAnswerCall(ConnectionID_t allertingCall)
 {
     return(CreateTask <NullTsapiReturn>((invokeId, pd) =>
                                         NativeMethods.cstaAnswerCall(AcsHandle, invokeId, ref allertingCall, ref pd)
                                         , $"SetAnswerCall('{allertingCall}')"
                                         ));
 }
示例#13
0
文件: TSAPI.cs 项目: cws2097/TSAPILIB
        public Task <NullTsapiReturn> SetSendDtmfTone(ConnectionID_t call, string tone, int pauseDuartion)
        {
            var list = new ATTV4ConnIDList_t();

            return(CreateTask <NullTsapiReturn>((invokeId, pd) =>
                                                NativeMethods.attSendDTMFTone(ref pd, ref call, ref list, tone, 0, 0) |
                                                NativeMethods.cstaEscapeService(AcsHandle, invokeId, ref pd), $"SetSendDTMFTone('{call}','{tone}','{pauseDuartion}')"
                                                ));
        }
示例#14
0
文件: TSAPI.cs 项目: cws2097/TSAPILIB
 public Task <NullTsapiReturn> SetReconnectCall(ConnectionID_t activeCall, ConnectionID_t heldCall,
                                                ATTDropResource_t resource, string info)
 {
     return(CreateTask <NullTsapiReturn>((invokeId, pd) =>
     {
         var info2 = GetUuiFromString(info);
         return NativeMethods.attV6ReconnectCall(ref pd, resource, ref info2) |
         NativeMethods.cstaReconnectCall(AcsHandle, invokeId, ref activeCall, ref heldCall, ref pd);
     }, $"SetReconnectCall('{activeCall}','{heldCall}','{resource}','{info}')"));
 }
示例#15
0
文件: TSAPI.cs 项目: cws2097/TSAPILIB
 public Task <NullTsapiReturn> SetClearConnection(ConnectionID_t call, ATTDropResource_t resourse,
                                                  string info)
 {
     return(CreateTask <NullTsapiReturn>((invokeId, pd) =>
     {
         var info2 = GetUuiFromString(info);
         return NativeMethods.attV6ClearConnection(ref pd, resourse, ref info2) |
         NativeMethods.cstaClearConnection(AcsHandle, invokeId, ref call, ref pd);
     }, $"SetClearConnection('{call}','{resourse}','{info}')"
                                         ));
 }
示例#16
0
文件: TSAPI.cs 项目: cws2097/TSAPILIB
 public Task <ConsultationCallEventReturn> SetConsultationCall(ConnectionID_t activeCall, string calledDevice,
                                                               string destRoute, bool priorityCalling, string info)
 {
     return(CreateTask <ConsultationCallEventReturn>((invokeId, pd) =>
     {
         var info2 = GetUuiFromString(info);
         var ret = NativeMethods.attV6ConsultationCall(ref pd, destRoute, priorityCalling, ref info2) |
                   NativeMethods.cstaConsultationCall(AcsHandle, invokeId, ref activeCall, calledDevice, ref pd);
         return ret;
     }, $"SetConsultationCall('{activeCall}','{calledDevice}','{destRoute}','{priorityCalling}','{info}')"
                                                     ));
 }
示例#17
0
文件: TSAPI.cs 项目: cws2097/TSAPILIB
 public Task <MonitorEventCollection> SetMonitorCall(ConnectionID_t call, CSTAMonitorFilter_t filter)
 {
     return(CreateTask <SetupMonitorEventReturn>((invokeId, pd) =>
                                                 NativeMethods.cstaMonitorCall(AcsHandle, invokeId, ref call, ref filter, ref pd)
                                                 , $"SetMonitorCall('{call}','{filter}')"
                                                 ).ContinueWith(task =>
     {
         var monitoEvent = new MonitorEventCollection(task.Result.Csta.monitorCrossRefID, call);
         Monitors.TryAdd((int)task.Result.Csta.monitorCrossRefID, monitoEvent);
         return monitoEvent;
     }));
 }
示例#18
0
 public static extern ACSFunctionRet_t cstaMonitorCall(uint acsHandle, uint invokeId, ref ConnectionID_t call, ref CSTAMonitorFilter_t monitorFilter, ref PrivateData_t privateData);
示例#19
0
 public static extern ACSFunctionRet_t attSingleStepConferenceCall(ref PrivateData_t privateData, ref ConnectionID_t activeCall, [MarshalAs(UnmanagedType.LPStr)] string deviceToBeJoin, ATTParticipationType_t participationType, byte alertDestination);
示例#20
0
 public static extern ACSFunctionRet_t attSelectiveListeningRetrieve(ref PrivateData_t privateData, ref ConnectionID_t subjectConnection, byte allParties, ref ConnectionID_t selectedParty);
示例#21
0
 public static extern ACSFunctionRet_t attSetBillRate(ref PrivateData_t privateData, ref ConnectionID_t call, ATTBillType_t billType, float billRate);
示例#22
0
 public static extern ACSFunctionRet_t attQueryUCID(ref PrivateData_t privateData, ref ConnectionID_t call);
示例#23
0
文件: TSAPI.cs 项目: cws2097/TSAPILIB
 public Task <NullTsapiReturn> SetRetrieveCall(ConnectionID_t heldCall)
 {
     return(CreateTask <NullTsapiReturn>((invokeId, pd) => NativeMethods.cstaRetrieveCall(AcsHandle, invokeId, ref heldCall, ref pd), $"SetRetrieveCall('{heldCall}')"));
 }
示例#24
0
文件: TSAPI.cs 项目: cws2097/TSAPILIB
 public Task <TransferCallEventReturn> SetTransferCall(ConnectionID_t activeCall, ConnectionID_t heldCall)
 {
     return(CreateTask <TransferCallEventReturn>((invokeId, pd) =>
                                                 NativeMethods.cstaTransferCall(AcsHandle, invokeId, ref activeCall, ref heldCall, ref pd), $"SetTransferCall('{activeCall}','{heldCall}')"
                                                 ));
 }
示例#25
0
 public static extern ACSFunctionRet_t attSendDTMFToneExt(ref PrivateData_t privateData, ref ConnectionID_t sender, ref ATTConnIDList_t receivers, [MarshalAs(UnmanagedType.LPStr)] string tones, short toneDuration, short pauseDuration);
示例#26
0
 public static extern Acs.RetCode_t cstaSnapshotCallReq(
     Acs.ACSHandle_t acsHandle,
     Acs.InvokeID_t invokeID,
     ConnectionID_t snapshotObj,
     Acs.PrivateData_t privateData);
示例#27
0
 public MonitorEventCollection(uint monitorCrossRefId, ConnectionID_t deviceId)
 {
     _monitorCrossRefId = monitorCrossRefId;
     _deviceId          = deviceId;
     _isCallMonitor     = true;
 }
示例#28
0
文件: TSAPI.cs 项目: cws2097/TSAPILIB
 public Task <NullTsapiReturn> SetCallCompletion(ConnectionID_t call, Feature_t feature)
 {
     return(CreateTask <NullTsapiReturn>((invokeId, pd) =>
                                         NativeMethods.cstaCallCompletion(AcsHandle, invokeId, feature, ref call, ref pd), $"SetCallCompletion('{call}','{feature}')"
                                         ));
 }
示例#29
0
 public static extern ACSFunctionRet_t attMonitorStopOnCall(ref PrivateData_t privateData, int monitorCrossRefId, ref ConnectionID_t call);
示例#30
0
 public static extern Acs.RetCode_t cstaSnapshotCallReq(
                 Acs.ACSHandle_t acsHandle,
                 Acs.InvokeID_t invokeID,
                 ConnectionID_t snapshotObj,
                 Acs.PrivateData_t privateData);
示例#31
0
 public static extern ACSFunctionRet_t cstaSnapshotCallReq(uint acsHandle, uint invokeId, ref ConnectionID_t snapshotObj, ref PrivateData_t privateData);