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();
        }
Ejemplo n.º 3
0
 /// <summary>
 /// extension point. Allows for custom handlers to plugin into the server processing.
 /// </summary>
 /// <param name="handler"></param>
 public void AddRequestHandler(ISipRequestHandler handler)
 {
     Check.Require(handler, "handler");
     _listener.AddRequestHandler(handler);
 }