Пример #1
0
 void CallManager_OnCallStateChanged(ICall call)
 {
     if (call != null && !call.IsDisposed && call.IsIncoming && (call.State == CallState.ALERTING || call.State == CallState.INCOMING) && call.Headers.Contains("x-auto-answer"))
     {
         call.Answer();
     }
 }
Пример #2
0
        void AnswerClicked()
        {
            mAudioPlayer.StopRingtone();
            ICall call = GetSinchServiceInterface().GetCall(mCallId);

            if (call != null)
            {
                try
                {
                    call.Answer();
                    Intent intent = new Intent(this, typeof(CallScreenActivity));
                    intent.PutExtra(SinchService.CALL_ID, mCallId);


                    StartActivity(intent);
                }
                catch (MissingPermissionException e)
                {
                    ActivityCompat.RequestPermissions(this, new String[] { e.RequiredPermission }, 0);
                }
            }
            else
            {
                Finish();
            }
        }
Пример #3
0
        private void btnCall_Click(object sender, EventArgs e)
        {
            _call.Answer();

            if (!_persistentWindow)
            {
                Close();
            }
        }
Пример #4
0
    private void ClientOnIncomingCall(IClient sender, IncomingCallEventArgs e)
    {
        if (_call != null)
        {
            e.Call.Reject(RejectMode.Busy, null);
        }

        _call = e.Call;
        BindCallEventHandlers();
        _call.Answer(CallSettings);
    }
Пример #5
0
        void _timer_Elapsed(object sender, ElapsedEventArgs e)
        {
            _timer.Stop();
            if (!_active || _callToPickup == null)
            {
                return;
            }

            if (_callToPickup.State == CallState.INCOMING)
            {
                _callToPickup.Answer();
            }
            else
            {
                _callToPickup = null;
            }
        }