예제 #1
0
        public void Stop()
        {
            foreach (var item in _nodeMonitorService)
            {
                item.Value.Stop();
            }
            LocalEP = null;
            _nodeMonitorService.Clear();
            _nodeMonitorService = null;
            if (_audioChannel != null)
            {
                _audioChannel.Stop();
            }

            try
            {
                logger.Debug("SIP Registrar daemon stopping...");
                logger.Debug("Shutting down SIP Transport.");

                _transport.Shutdown();
                _transport = null;

                logger.Debug("sip message service stopped.");
                logger.Debug("SIP Registrar daemon stopped.");
            }
            catch (Exception excp)
            {
                logger.Error("Exception Stop: " + excp.Message);
            }
        }
예제 #2
0
 public SIPRegistrarCoreService(ISIPTransport sipTransport, ISipAccountStorage sipAccountStorage, IMemoCache <Camera> cameraCache, bool mangleUACContact = true, bool strictRealmHandling = true)
 {
     _sipTransport         = sipTransport;
     m_mangleUACContact    = mangleUACContact;
     m_strictRealmHandling = strictRealmHandling;
     _localSipAccount      = sipAccountStorage.GetLocalSipAccout();
     _needAuthentication   = _localSipAccount.Authentication;
     _cameraCache          = cameraCache;
 }
예제 #3
0
        // MessageCore = new SIPMessageCore(m_sipTransport, SIPConstants.SIP_SERVER_STRING);
        public SIPMessageCore(ISIPTransport sipTransport, string sipServerAgentStr)
        {
            _transport      = sipTransport;
            _sipServerAgent = sipServerAgentStr;
            // Configure the SIP transport layer.
            _transport.SIPTransportRequestReceived  += AddMessageRequest;
            _transport.SIPTransportResponseReceived += AddMessageResponse;

            _cameraCache.OnItemAdded += _cameraCache_OnItemAdded;
        }
예제 #4
0
        //   public SIPMessageCore(IServiceCollection serviceCollection)
        public SIPMessageCore(
            ISIPRegistrarCore sipRegistrarCore,
            ISIPTransport sipTransport,
            ISipAccountStorage sipAccountStorage,
            IMemoCache <Camera> cameraCache)
        {
            _registrarCore     = sipRegistrarCore;
            _transport         = sipTransport;
            _sipAccountStorage = sipAccountStorage;

            _LocalSipAccount = _sipAccountStorage.GetLocalSipAccout();

            // Configure the SIP transport layer.
            _transport.SIPTransportRequestReceived  += AddMessageRequest;
            _transport.SIPTransportResponseReceived += AddMessageResponse;
            _cameraCache = cameraCache;

            _cameraCache.OnItemAdded += _cameraCache_OnItemAdded;
        }