コード例 #1
0
 private void softphone_IncomingCall(object sender, VoIPEventArgs <IPhoneCall> e)
 {
     if (call == null)
     {
         System.Windows.Application.Current.Dispatcher.Invoke(() => {
             call   = e.Item;
             caller = call.DialInfo.CallerDisplay;
             call.CallStateChanged += call_CallStateChanged;
             CzyOdebrac czyookno    = new CzyOdebrac(caller);
             if (czyookno.ShowDialog().Value)
             {
                 if (call != null)
                 {
                     call.Answer();
                 }
             }
             else
             {
                 if (call != null)
                 {
                     call.Reject();
                 }
             }
         });
     }
 }
コード例 #2
0
ファイル: frmSoftphone.cs プロジェクト: rosauceda/Softphone-1
        private void Hanguping()
        {
            if (_call != null)
            {
                if (_inComingCall && _call.CallState == CallState.Ringing)
                {
                    _call.Reject();
                    InvokeGUIThread(() => { lb_Log.Items.Add("Call rejected."); });
                }
                else
                {
                    _call.HangUp();
                    _inComingCall = false;
                    InvokeGUIThread(() => { lb_Log.Items.Add("Call hanged up."); });
                }

                _call = null;
            }
        }
コード例 #3
0
		/// <summary>
		/// In case a call is in progress, it breaks the call.
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void buttonHangUp_Click(object sender, EventArgs e)
		{
			if (call != null)
			{
				if (inComingCall && call.CallState == CallState.Ringing)
					call.Reject();
				else
					call.HangUp();
				inComingCall = false;
				call = null;
			}
			labelDialingNumber.Text = string.Empty;
		}
コード例 #4
0
ファイル: RealPhone.cs プロジェクト: 324275217/voip-phone
        /// <summary>
        /// 挂断
        /// </summary>
        public void HangUp()
        {
            if (call != null)
            {
                if (call.IsIncoming && call.CallState.IsRinging())
                {
                    call.Reject();
                }
                else
                {
                    call.HangUp();
                }

                call = null;
            }
        }
コード例 #5
0
ファイル: frmTelefono.cs プロジェクト: Mbmaldon/LxJuridico
 private void lnkHangUp_Click(object sender, EventArgs e)
 {
     if (_call != null)
     {
         if (_incomingCall && _call.CallState == CallState.Ringing)
         {
             _call.Reject();
         }
         else
         {
             _call.HangUp();
         }
         _incomingCall = false;
         _call         = null;
     }
     txtDisplay.Text = string.Empty;
 }
コード例 #6
0
 /// <summary>
 /// In case a call is in progress, it breaks the call.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnBitir_Click(object sender, EventArgs e)
 {
     if (call != null)
     {
         if (inComingCall && call.CallState == CallState.Ringing)
         {
             call.Reject();
         }
         else
         {
             call.HangUp();
         }
         inComingCall = false;
         call         = null;
     }
     labelDialingNumber.Text = string.Empty;
     this.Dispose();
 }
コード例 #7
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (PhoneCall != null)
            {
                if (InComingCall && PhoneCall.CallState == CallState.Ringing)
                {
                    PhoneCall.Reject();
                    InvokeGUIThread(mymsg = "Call rejected!");
                }
                else
                {
                    PhoneCall.HangUp();
                    InComingCall          = false;
                    InvokeGUIThread(mymsg = "Call hanged up");
                }

                PhoneCall = null;
            }
        }
コード例 #8
0
ファイル: Softphone.cs プロジェクト: toannd18/PBXForm
        public void Hang_up()
        {
            if (_call != null)
            {
                if (_inComingCall && _call.CallState == CallState.Ringing)
                {
                    _call.Reject();
                    _message.Add("Call Rejected");
                }
                else
                {
                    _call.HangUp();

                    _message.Add("Call hanged up");
                }
                _inComingCall = false;
                _call         = null;
            }
        }
コード例 #9
0
ファイル: Form1.cs プロジェクト: kterdal/VOIP-Softphone
        private void btn_HangUp_Click(object sender, EventArgs e)
        {
            if (call != null)
            {
                if (inComingCall && call.CallState == CallState.Ringing)
                {
                    call.Reject();
                    InvokeGUIThread(() => { lb_Log.Items.Add("Call rejected."); });
                }
                else
                {
                    call.HangUp();
                    inComingCall = false;
                    InvokeGUIThread(() => { lb_Log.Items.Add("Call hanged up."); });
                }

                call = null;
            }

            tb_Display.Text = string.Empty;
        }
コード例 #10
0
        public void Hang_Up()
        {
            if (_call != null)
            {
                if (_inComingCall && _call.CallState == CallState.Ringing)
                {
                    _call.Reject();
                    InvokeGUIThread(() => { lb_Log.Items.Add("Call rejected."); });
                }
                else
                {
                    _call.HangUp();
                    _inComingCall = false;
                    InvokeGUIThread(() => { lb_Log.Items.Add("Call hanged up."); });
                }

                _call = null;
            }

            //txtNumber.Text = string.Empty;
        }
コード例 #11
0
 private void rejectButton_Click(object sender, EventArgs e)
 {
     infoTable.Rows.Clear();
     call.Reject();
 }
コード例 #12
0
 public void Reject()
 {
     call.Reject();
 }
コード例 #13
0
 /// <summary>
 /// Hangs up the current call.
 /// </summary>
 public void HangUp()
 {
     _call?.Reject();
     _call?.HangUp();
     _call = null;
 }