Exemplo n.º 1
0
        public void ProcessTimeOut(SipTimeOutEvent timeOutEvent)
        {
            Check.Require(PendingCall, "PendingCall");  /*a timeout can only come from a pending call.*/

            if (_logger.IsInfoEnabled)
            {
                _logger.Info("Processing Timeout...");
            }

            PendingCall.RaiseCallErrorOccured(CallError.TransactionTimeout);
            PendingCall.RaiseCallStateChanged(CallState.Error);

            if (_logger.IsInfoEnabled)
            {
                _logger.Info("Changing state to 'IDLE'...");
            }
            ChangeState(_stateProvider.GetIdle());

            if (_logger.IsInfoEnabled)
            {
                _logger.Info("Timeout processed.");
            }
        }
Exemplo n.º 2
0
        internal SoftPhone(ISipProvider provider, SipMessageFactory messageFactory, SipHeaderFactory headerFactory,
            SipAddressFactory addressFactory, ISoftPhoneStateProvider stateProvider, ITimerFactory timerFactory, SipListeningPoint listeningPoint)
        {
            ListeningPoint = listeningPoint;
            _provider = provider;
            _messageFactory = messageFactory;
            _headerFactory = headerFactory;
            _addressFactory = addressFactory;
            _stateProvider = stateProvider;
            _timerFactory = timerFactory;

            InternalState = _stateProvider.GetIdle();
            InternalState.Initialize(this);
            RetransmitRingingTimer = _timerFactory.CreateRingingTimer(OnRetransmitRinging);
            EndWaitForAckTimer = _timerFactory.CreateInviteCtxTimeOutTimer(OnWaitForAckTimeOut);

            if(_logger.IsDebugEnabled) _logger.Debug("Initialized.");
        }
Exemplo n.º 3
0
        internal SoftPhone(ISipProvider provider, SipMessageFactory messageFactory, SipHeaderFactory headerFactory,
                           SipAddressFactory addressFactory, ISoftPhoneStateProvider stateProvider, ITimerFactory timerFactory, SipListeningPoint listeningPoint)
        {
            ListeningPoint  = listeningPoint;
            _provider       = provider;
            _messageFactory = messageFactory;
            _headerFactory  = headerFactory;
            _addressFactory = addressFactory;
            _stateProvider  = stateProvider;
            _timerFactory   = timerFactory;

            InternalState = _stateProvider.GetIdle();
            InternalState.Initialize(this);
            RetransmitRingingTimer = _timerFactory.CreateRingingTimer(OnRetransmitRinging);
            EndWaitForAckTimer     = _timerFactory.CreateInviteCtxTimeOutTimer(OnWaitForAckTimeOut);

            if (_logger.IsDebugEnabled)
            {
                _logger.Debug("Initialized.");
            }
        }