Ejemplo n.º 1
0
        public void Start()
        {
            if(_configuration == null) throw new InvalidOperationException("The server is not configured.");

            _stack = new SipStack();
            _stack.MaxWorkerThreads = _configuration.MaxThreadPoolSize;
            _stack.MinWorkerThreads = _configuration.MinThreadPoolSize;
            _stack.EnableThreadPoolPerformanceCounters = _configuration.EnableThreadPoolPerformanceCounters;
             var listeningPoint = _stack.CreateUdpListeningPoint(_ipEndPoint);
            _provider = (SipProvider)_stack.CreateSipProvider(listeningPoint);
            _listener = new SipServerListener();
            _registrar = InitializeRegistrar();
            _listener.AddRequestHandler(_registrar);
            _provider.AddSipListener(_listener);
            //_stack.Start();
        }
Ejemplo n.º 2
0
        public void Start()
        {
            if (_configuration == null)
            {
                throw new InvalidOperationException("The server is not configured.");
            }

            _stack = new SipStack();
            _stack.MaxWorkerThreads = _configuration.MaxThreadPoolSize;
            _stack.MinWorkerThreads = _configuration.MinThreadPoolSize;
            _stack.EnableThreadPoolPerformanceCounters = _configuration.EnableThreadPoolPerformanceCounters;
            var listeningPoint = _stack.CreateUdpListeningPoint(_ipEndPoint);

            _provider  = (SipProvider)_stack.CreateSipProvider(listeningPoint);
            _listener  = new SipServerListener();
            _registrar = InitializeRegistrar();
            _listener.AddRequestHandler(_registrar);
            _provider.AddSipListener(_listener);
            //_stack.Start();
        }