Ejemplo n.º 1
0
        /// <summary>
        /// Answers an incoming call.
        /// </summary>
        /// <param name="answerType">Call answer type.</param>
        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation.</exception>
        public void AnswerCall(CallAnswerType answerType)
        {
            int ret = Interop.CallManager.AnswerCall(_handle, answerType);

            if (ret != (int)CmError.None)
            {
                Log.Error(CmUtility.LogTag, "Failed to answer call, Error: " + (CmError)ret);
                CmUtility.ThrowCmException(ret, _handle);
            }
        }
Ejemplo n.º 2
0
        private async void AnsCallBtn_Clicked(object sender, EventArgs e)
        {
            try
            {
                var action = await DisplayActionSheet("Operation", "Cancel", null, Enum.GetNames(typeof(CallAnswerType)));

                Log.Debug(Globals.LogTag, "Action: " + action);
                if (action != null)
                {
                    Log.Debug(Globals.LogTag, "Answer call start .. incoming call id  = " + incomingCallHandle);
                    CallAnswerType type = (CallAnswerType)Enum.Parse(typeof(CallAnswerType), action);
                    uint           x    = await call.AnswerCall(incomingCallHandle, type);

                    Log.Debug(Globals.LogTag, "Answer call end, call id = " + x);
                }
            }

            catch (Exception ex)
            {
                Log.Debug(Globals.LogTag, "AnswerCall ,exception = " + ex.ToString());
            }
        }
Ejemplo n.º 3
0
 internal static extern int AnswerCall(IntPtr handle, uint callHandle, CallAnswerType type, TapiResponseCallback cb, IntPtr userData);
Ejemplo n.º 4
0
 internal static extern int AnswerCall(IntPtr handle, CallAnswerType answerType);