public StopResult Stop()
        {
            if (Payload != null)
            {
                Task <LL_SendFaxStopResult> taskLLSendFaxStop = Call.API.LL_SendFaxStopAsync(new LL_SendFaxStopParams()
                {
                    NodeID    = Call.NodeID,
                    CallID    = Call.ID,
                    ControlID = ControlID,
                });

                LL_SendFaxStopResult resultLLFaxStop = taskLLSendFaxStop.Result;

                return(new StopResult()
                {
                    Successful = resultLLFaxStop.Code == "200",
                });
            }
            else
            {
                Task <LL_ReceiveFaxStopResult> taskLLReceiveFaxStop = Call.API.LL_ReceiveFaxStopAsync(new LL_ReceiveFaxStopParams()
                {
                    NodeID    = Call.NodeID,
                    CallID    = Call.ID,
                    ControlID = ControlID,
                });

                LL_ReceiveFaxStopResult resultLLFaxStop = taskLLReceiveFaxStop.Result;

                return(new StopResult()
                {
                    Successful = resultLLFaxStop.Code == "200",
                });
            }
        }
Beispiel #2
0
        public void Stop()
        {
            if (Payload != null)
            {
                Task <LL_SendFaxStopResult> taskLLSendFaxStop = Call.API.LL_SendFaxStopAsync(new LL_SendFaxStopParams()
                {
                    NodeID    = Call.NodeID,
                    CallID    = Call.ID,
                    ControlID = ControlID,
                });

                LL_SendFaxStopResult resultLLFaxStop = taskLLSendFaxStop.Result;

                // If there was an internal error of any kind then throw an exception
                Call.API.ThrowIfError(resultLLFaxStop.Code, resultLLFaxStop.Message);
            }
            else
            {
                Task <LL_ReceiveFaxStopResult> taskLLReceiveFaxStop = Call.API.LL_ReceiveFaxStopAsync(new LL_ReceiveFaxStopParams()
                {
                    NodeID    = Call.NodeID,
                    CallID    = Call.ID,
                    ControlID = ControlID,
                });

                LL_ReceiveFaxStopResult resultLLFaxStop = taskLLReceiveFaxStop.Result;

                // If there was an internal error of any kind then throw an exception
                Call.API.ThrowIfError(resultLLFaxStop.Code, resultLLFaxStop.Message);
            }
        }