Esempio n. 1
0
        public SipInviteServerDialog(
            ISipTransaction transaction,
            SipDialogTable dialogTable,
            ITimerFactory timerFactory,
            SipHeaderFactory headerFactory,
            SipMessageFactory messageFactory,
            SipAddressFactory addressFactory,
            ISipMessageSender messageSender,
            ISipListener listener,
            IPEndPoint listeningPoint)
            : base(headerFactory, messageFactory, addressFactory, messageSender, listener, listeningPoint, transaction)
        {
            Check.Require(transaction, "transaction");
            Check.Require(dialogTable, "dialogTable");
            Check.Require(timerFactory, "timerFactory");

            _logger = NLog.LogManager.GetCurrentClassLogger();

            _dialogTable  = dialogTable;
            _state        = DialogState.Null;
            _timerFactory = timerFactory;

            //(only ?) localtag is set on firstresponse
            //localtarget is not defined, because is has no use, (every user agent knows it local address)

            _retransmitOkTimer = _timerFactory.CreateInviteCtxRetransmitTimer(OnOkReTransmit);
            //_endWaitForAckTimer = _timerFactory.CreateInviteCtxTimeOutTimer(OnWaitForAckTimeOut);

            if (_logger.IsInfoEnabled)
            {
                _logger.Info("ServerDialog[Id={0}] created.", GetId());
            }
        }
Esempio n. 2
0
        public SipInviteClientDialog(
            ISipTransaction transaction,
            SipDialogTable dialogTable,
            SipHeaderFactory headerFactory,
            SipMessageFactory messageFactory,
            SipAddressFactory addressFactory,
            ISipMessageSender messageSender,
            ISipListener listener,
            IPEndPoint listeningPoint)
            : base(headerFactory, messageFactory, addressFactory, messageSender, listener, listeningPoint, transaction)
        {
            Check.Require(transaction, "transaction");
            Check.Require(dialogTable, "dialogTable");
            Check.Require(transaction.Request, "transaction.Request");

            _logger = NLog.LogManager.GetCurrentClassLogger();

            _dialogTable = dialogTable;
            _state       = DialogState.Null;
            _topMostVia  = (SipViaHeader)transaction.Request.Vias.GetTopMost().Clone();
        }