private async void NewIncomingCallAsync() { txtBx_ActionLog.Text += "\n" + "Making New Incoming Call Request."; CallRequested.IsChecked = true; try { OperationResult result = await VoipCallHelper.NewIncomingCallAsync(txt_CallerName.Text, txt_CallerNumber.Text); if (result == OperationResult.Succeeded) { txtBx_ActionLog.Text += "\n" + "Request Succeeded."; RequestSuccess.IsChecked = true; } else { txtBx_ActionLog.Text += "\n" + "Request Failed."; CallRequested.IsChecked = false; RequestSuccess.IsChecked = false; InProgress.IsChecked = false; } } catch (Exception ex) { if (ex.HResult == MethodCallUnexpectedTime) { Debug.WriteLine("Double tapped Async Call"); } } }
private async void NewOutgoingCallAsync() { try { OperationResult result = await VoipCallHelper.NewOutgoingCallAsync(txt_CallerNumber.Text); } catch (Exception ex) { Debug.WriteLine(ex.Message); } }
private void EndCall() { try { OperationResult result = VoipCallHelper.EndCallAsync(); } catch (Exception ex) { Debug.WriteLine(ex.Message); } txt_CallStatus.Text = "Disconnected"; }
private async void ShowCallDuration() { txtBx_ActionLog.Text += "\n" + "Showing Call Duration."; String result = await VoipCallHelper.GetCallDurationAsync(); if (result != null) { MessageDialog dialog = new MessageDialog(result); await dialog.ShowAsync(); } else { txtBx_ActionLog.Text += "\n" + "Request Failed."; } }
private void EndCall() { txtBx_ActionLog.Text += "\n" + "Making New End Call Request."; CallRequested.IsChecked = true; OperationResult result = VoipCallHelper.EndCallAsync(); if (result == OperationResult.Succeeded) { txtBx_ActionLog.Text += "\n" + "Request Succeeded."; RequestSuccess.IsChecked = true; } else { txtBx_ActionLog.Text += "\n" + "Request Failed."; CallRequested.IsChecked = false; } }