SIP_SDK_UNREGISTER() private method

private SIP_SDK_UNREGISTER ( ) : EM_SIP_RESULT
return EM_SIP_RESULT
Ejemplo n.º 1
0
        /// <summary>
        /// 该函数用于发送SIP UNRegister消息,有效期为0
        /// </summary>
        public EM_SIP_RESULT SIP_SDK_UNREGISTER()
        {
            NLogEx.LoggerEx logEx = new NLogEx.LoggerEx(log);
            logEx.Trace("Enter: SipStackAdapter.SIP_SDK_UNREGISTER().");
            EM_SIP_RESULT iRet = EM_SIP_RESULT.RET_FAILURE;

            try
            {
                iRet = SipSDKInterface.SIP_SDK_UNREGISTER();
                //停止定时器
                this.keepLiveTimer.Stop();

                if (iRet != EM_SIP_RESULT.RET_SUCCESS)
                {
                    logEx.Error("SipStackAdapter.SIP_SDK_UNREGISTER Error = {0}.", Enum.GetName(typeof(EM_SIP_RESULT), iRet));
                }
            }
            catch (System.Exception ex)
            {
                logEx.Error("SipStackAdapter.SIP_SDK_UNREGISTER ,Exception:{0}", ex.ToString());
                iRet = EM_SIP_RESULT.RET_FAILURE;
            }
            return(iRet);
        }