private void StopListenDTFM(object o) { Debug.Assert(_listen); DTMFFacilityRequestParameter dtfmParam = new DTMFFacilityRequestParameter(); FacilityRequest request = new FacilityRequest(dtfmParam); request.FacilitySelector = FacilitySelector.DTMF; dtfmParam.FacilityFunction = FacilityFunction.StopListen; request.Identifier.Value = _plci; RequestDTFM(request); _listen = false; }
private void RequestDTFM(FacilityRequest request) { MessageAsyncResult result = new MessageAsyncResult(this, request, null, null); ThreadPool.QueueUserWorkItem(RequestWaitCallback, result); object o = result.InternalWaitForCompletion(); if (o is Exception) { throw ((Exception)o); } }
private void StartListenDTFM(object o) { Debug.Assert(!_listen); DTMFFacilityRequestParameter dtfmParam = new DTMFFacilityRequestParameter(); FacilityRequest request = new FacilityRequest(dtfmParam); request.FacilitySelector = FacilitySelector.DTMF; dtfmParam.FacilityFunction = FacilityFunction.StartListen; dtfmParam.ToneDuration = _dtfmPause; dtfmParam.GapDuration = _dtfmPause; request.Identifier.Value = _plci; RequestDTFM(request); _listen = true; }
public void SendDTFMTone(string digits) { if (_status != ConnectionStatus.Connected) { throw Error.NotSupported(); } DTMFFacilityRequestParameter dtfmParam = new DTMFFacilityRequestParameter(); FacilityRequest request = new FacilityRequest(dtfmParam); request.FacilitySelector = FacilitySelector.DTMF; dtfmParam.FacilityFunction = FacilityFunction.Send; dtfmParam.ToneDuration = _dtfmDuration; dtfmParam.GapDuration = _dtfmPause; dtfmParam.Digits = digits; request.Identifier.Value = _plci; RequestDTFM(request); }