async void callObj_AnswerRequested(VoipPhoneCall sender, CallAnswerEventArgs args) { sender.NotifyCallActive(); await Task.Delay(3000); sender.NotifyCallEnded(); }
private void Call_AnswerRequested(VoipPhoneCall sender, CallAnswerEventArgs args) { CallOpParamRT param = new CallOpParamRT(); param.statusCode = 200; param.reason = "OK"; try { Current.MyApp.answerCall(param); } catch (Exception ex) { Current.MyApp.writeLog(2, ex.Message); } Current.VoipCall = sender; try { Current.VoipCall.NotifyCallActive(); } catch (Exception ex) { Current.MyApp.writeLog(2, ex.Message); } }
private async void OnAnswerRequested(VoipPhoneCall sender, CallAnswerEventArgs args) { if (_phoneCall != null) { await UpdateStateAsync(TLPhoneCallState.ExchangingKeys); var reqConfig = new TLMessagesGetDHConfig { Version = 0, RandomLength = 256 }; var config = await SendRequestAsync <TLMessagesDHConfig>("messages.getDhConfig", reqConfig); if (config.IsSucceeded) { var dh = config.Result; if (!TLUtils.CheckPrime(dh.P, dh.G)) { return; } var salt = new byte[256]; var secureRandom = new SecureRandom(); secureRandom.NextBytes(salt); secretP = dh.P; a_or_b = salt; var g_b = MTProtoService.GetGB(salt, dh.G, dh.P); var request = new TLPhoneAcceptCall { GB = g_b, Peer = _phoneCall.ToInputPhoneCall(), Protocol = new TLPhoneCallProtocol { IsUdpP2p = true, IsUdpReflector = true, MinLayer = Telegram.Api.Constants.CallsMinLayer, MaxLayer = Telegram.Api.Constants.CallsMaxLayer, } }; var response = await SendRequestAsync <TLPhonePhoneCall>("phone.acceptCall", request); if (response.IsSucceeded) { _systemCall.NotifyCallActive(); Handle(new TLUpdatePhoneCall { PhoneCall = response.Result.PhoneCall }); } } } }
private void Call_AnswerRequested(VoipPhoneCall sender, CallAnswerEventArgs args) { VoipCall.NotifyCallActive(); Hub.Instance.VoipChannel.Answer(); }
private async void Call_AnswerRequested(VoipPhoneCall sender, CallAnswerEventArgs args) { _voipCall.NotifyCallActive(); await Hub.Instance.CallChannel.AnswerAsync(); }
private static void Call_AnswerRequested(VoipPhoneCall sender, CallAnswerEventArgs args) { sender.NotifyCallActive(); }
private void Call_AnswerRequested(VoipPhoneCall sender, CallAnswerEventArgs args) { sender.NotifyCallActive(); Current.VoipCall = sender; Current.StartAudio(); }