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; }
// 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; }