Example #1
0
        private void RegisterCallEventNotification()
        {
            _callEventCb = (CallEvent callEvent, IntPtr eventData, IntPtr userData) =>
            {
                _callEvent?.Invoke(null, new CallEventEventArgs(callEvent, CmUtility.GetCallEventData(callEvent, eventData)));
            };
            int ret = Interop.CallManager.SetCallEventCb(_handle, _callEventCb, IntPtr.Zero);

            if (ret != (int)CmError.None)
            {
                Log.Error(CmUtility.LogTag, "Failed to set call event notification callback, Error: " + (CmError)ret);
                CmUtility.ThrowCmException(ret, _handle);
            }
        }