Exemplo n.º 1
0
 public SIPRegistrarCore(ISIPTransport sipTransport, ISipStorage 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;
 }
Exemplo n.º 2
0
        //   public SIPMessageCore(IServiceCollection serviceCollection)
        public SIPMessageCore(
            ISIPRegistrarCore sipRegistrarCore,
            ISIPTransport sipTransport,
            ISipStorage 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;
        }